# mainmod shortcuts
# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-# example: bind = $mainmod Shift, Return, exec, [float; size 1280 800;] foot -o pad=0x0
bind = $mainmod, Return, exec, $term
bind = $mainmod Ctrl, Return, exec, $fallbackterm
bind = $mainmod Shift, Return, exec, $floatterm
bind = $mainmod Shift, Q, killactive,
bind = $mainmod, A, pseudo, # dwindle, A for Artificial
bind = $mainmod, B, exec, $HOME/.config/hypr/scripts/browser_focus_or_run.sh
-# bind = $mainmod, C, exec, killall fuzzel || cliphist list | fuzzel -d --config=$HOME/.config/fuzzel/fuzzel-emojii.ini --prompt='Copy > ' | cliphist decode | wl-copy
-# bind = $mainmod Ctrl, C, exec, foot -a clipse -e clipse
bind = $mainmod, C, exec, qs -c noctalia-shell ipc call launcher clipboard
bind = $mainmod, D, exec, qs -c noctalia-shell ipc call launcher toggle
bind = $mainmod SHIFT, D, exec, killall fuzzel || fuzzel --config=$HOME/.config/fuzzel/fuzzel-centered.ini
bind = $mainmod SHIFT, G, lockactivegroup, toggle
bind = $mainmod CTRL, G, denywindowfromgroup, toggle
bind = $mainmod ALT, G, moveoutofgroup, active
+bind = $mainmod, I, togglespecialworkspace, overlay
+bind = $mainmod SHIFT, I, movetoworkspace, special:overlay
bind = $mainmod, P, exec, foot -w 640x400 -a popup -H hyprpicker #color Pipette
bind = $mainmod SHIFT, P, pin
-bind = $mainmod, S, layoutmsg, swapwithmaster # master
-bind = $mainmod, S, togglesplit, # dwindle
-bind = $mainmod Shift, S, swapsplit, # dwindle
+bind = $mainmod, S, layoutmsg, togglesplit # dwindle
+bind = $mainmod Shift, S, layoutmsg, swapsplit # dwindle
+bind = $mainmod, S, layoutmsg, colresize +conf # scrolling
+bind = $mainmod Shift, S, layoutmsg, colresize -conf # scrolling
bind = $mainmod, V, togglefloating
bind = $mainmod, W, exec, killall -SIGUSR1 waybar
bind = $mainmod SHIFT, W, exec, killall -SIGUSR2 waybar
-# bind = $mainmod, grave, exec, ~/.config/hypr/scripts/RofiEmoji.sh
+bind = $mainmod, Z, centerwindow # floating only
bind = $mainmod, grave, exec, qs -c noctalia-shell ipc call launcher emoji
-bind = $mainmod, C, centerwindow
-# scratchpad
-bind = $mainmod, I, togglespecialworkspace, overlay
-bind = $mainmod SHIFT, I, movetoworkspace, special:overlay
# suremod keys (prevent fat-fingering 'em by accident)
# ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
submap = reset
-# ───────────────────────────────────────────────────────────
-# will switch to a submap called gaps
-bind = $mainmod ALT, G, submap, gaps
-
-# will start a submap called "gaps"
-submap = gaps
-
-# sets repeatable binds for resizing the active window
-binde = , i, exec, ~/.config/hypr/scripts/gaps.sh --inc_gaps_in
-binde = SHIFT, i, exec, ~/.config/hypr/scripts/gaps.sh --dec_gaps_in
-binde = , o, exec, ~/.config/hypr/scripts/gaps.sh --inc_gaps_out
-binde = SHIFT, o, exec, ~/.config/hypr/scripts/gaps.sh --dec_gaps_out
-binde = CTRL, i, exec, ~/.config/hypr/scripts/gaps.sh --reset_gaps_in
-binde = CTRL, o, exec, ~/.config/hypr/scripts/gaps.sh --reset_gaps_out
-
-# use reset to go back to the global submap
-bind = , catchall, submap, reset
-
-# will reset the submap, which will return to the global submap
-submap = reset
-
-
-# ───────────────────────────────────────────────────────────
-# will switch to a submap called resize16-9
-bind = $mainmod, Z, submap, resize16-9
-
-# will start a submap called "gaps"
-submap = resize16-9
-
-# sets repeatable binds for resizing the active window
-bind = , 1, exec, hyprctl dispatch 'resizewindowpixel exact 640 360,activewindow'
-bind = , 1, exec, submap, reset
-bind = , 2, exec, hyprctl dispatch 'resizewindowpixel exact 853 480,activewindow'
-bind = , 2, exec, submap, reset
-bind = , 3, exec, hyprctl dispatch 'resizewindowpixel exact 1280 720,activewindow'
-bind = , 3, exec, submap, reset
-bind = , 4, exec, hyprctl dispatch 'resizewindowpixel exact 1920 1080,activewindow'
-bind = , 4, exec, submap, reset
-bind = , 5, exec, hyprctl dispatch 'resizewindowpixel exact 2400 1350,activewindow'
-bind = , 5, exec, submap, reset
-bind = , 6, exec, hyprctl dispatch 'resizewindowpixel exact 2560 1440,activewindow'
-bind = , 6, exec, submap, reset
-
-# use reset to go back to the global submap
-bind = , catchall, submap, reset
-
-# will reset the submap, which will return to the global submap
-submap = reset
-
-
-# ───────────────────────────────────────────────────────────
-# will switch to a submap called resize16-10
-bind = $mainmod Shift, Z, submap, resize12-10
-
-# will start a submap called "gaps"
-submap = resize12-10
-
-# sets repeatable binds for resizing the active window
-bind = , 1, exec, hyprctl dispatch 'resizewindowpixel exact 432 360,activewindow'
-bind = , 1, exec, submap, reset
-bind = , 2, exec, hyprctl dispatch 'resizewindowpixel exact 576 480,activewindow'
-bind = , 2, exec, submap, reset
-bind = , 3, exec, hyprctl dispatch 'resizewindowpixel exact 864 720,activewindow'
-bind = , 3, exec, submap, reset
-bind = , 4, exec, hyprctl dispatch 'resizewindowpixel exact 1296 1080,activewindow'
-bind = , 4, exec, submap, reset
-bind = , 5, exec, hyprctl dispatch 'resizewindowpixel exact 1620 1350,activewindow'
-bind = , 5, exec, submap, reset
-bind = , 6, exec, hyprctl dispatch 'resizewindowpixel exact 1728 1440,activewindow'
-bind = , 6, exec, submap, reset
-
-# use reset to go back to the global submap
-bind = , catchall, submap, reset
-
-# will reset the submap, which will return to the global submap
-submap = reset
-
+++ /dev/null
-#!/usr/bin/env python3
-
-# based on https://gist.github.com/fufexan/de2099bc3086f3a6c83d61fc1fcc06c9
-
-import struct
-import os
-import sys
-import math
-
-# ===== PARAMETERS =====
-# set according to your device:
-device_dpi = 2048 * 1.5 # mouse dpi
-screen_dpi = 163
-screen_scaling_factor = 1
-sample_point_count = 20
-sensitivity_factor = 6
-
-def sigmoid(x, a=1.0):
- return 1 / (1 + math.exp(-a * (x - 0.5)))
-
-def find_arg(arg):
- for i in sys.argv:
- if i == arg:
- return True
- return False
-
-def float16x16(num):
- return struct.unpack('<i', num[:-4])[0] / int(0xffff)
-
-if find_arg("help") or find_arg("-h") or find_arg("--help") or find_arg("h"):
- print(f'{sys.argv[0]} <device>')
- print('To get the device, run `hyprctl devices` and get its name')
- exit(0)
-
-# Make sure the device is passed as the first argument
-if len(sys.argv) < 2:
- print("Error: device not specified. Usage: <script> <device>")
- exit(1)
-
-# The first argument is treated as the device
-device = sys.argv[1]
-
-scale_x = device_dpi / 1e3
-scale_y = screen_dpi / 1e3 / screen_scaling_factor * sensitivity_factor
-
-X = [
-b'\x00\x00\x00\x00\x00\x00\x00\x00',
-b'\x15\x6e\x00\x00\x00\x00\x00\x00',
-b'\x00\x40\x01\x00\x00\x00\x00\x00',
-b'\x29\xdc\x03\x00\x00\x00\x00\x00',
-b'\x00\x00\x28\x00\x00\x00\x00\x00',
-]
-Y = [
-b'\x00\x00\x00\x00\x00\x00\x00\x00',
-b'\xfd\x11\x01\x00\x00\x00\x00\x00',
-b'\x00\x24\x04\x00\x00\x00\x00\x00',
-b'\x00\xfc\x12\x00\x00\x00\x00\x00',
-b'\x00\xc0\xbb\x01\x00\x00\x00\x00',
-]
-
-windows_points = [[float16x16(x), float16x16(y)] for x, y in zip(X, Y)]
-points = [[x * scale_x, y * scale_y] for x, y in windows_points]
-
-def find2points(x):
- i = 0
- while i < len(points) - 2 and x >= points[i + 1][0]:
- i += 1
- assert -1e6 + points[i][0] <= x <= points[i + 1][0] + 1e6, f'{points[i][0]} <= {x} <= {points[i + 1][0]}'
- return points[i], points[i + 1]
-
-def interpolate(x):
- (x0, y0), (x1, y1) = find2points(x)
- factor = sigmoid(x) # This smoothly adjusts based on x
- y = factor * ((x - x0) * y1 + (x1 - x) * y0) / (x1 - x0)
-
- return y
-
-def sample_points(count):
- last_point = -2
- max_x = points[last_point][0]
- step = max_x / (count + last_point) # we need another point for 0
- sample_points_x = [si * step for si in range(count)]
- sample_points_y = [interpolate(x) for x in sample_points_x]
- return sample_points_x, sample_points_y
-
-sample_points_x, sample_points_y = sample_points(sample_point_count)
-step = sample_points_x[1] - sample_points_x[0]
-sample_points_str = " ".join(["%.3f" % number for number in sample_points_y])
-
-print(f'\tPoints: {sample_points_str}')
-print(f'\tStep size: {step:0.10f}')
-
-def hyprctl(device, option, arg):
- os.system(f"hyprctl keyword 'device[{device}]:{option}' '{arg}'")
-
-# Apply settings for the specified device
-print(f'Setting device:\'{device}\':accel_profile using hyprctl')
-hyprctl(device, 'accel_profile', f'custom {step} {sample_points_str}')