]> Freerunner's - dotfiles.git/commitdiff
hypr: update config
authorAndre Ramnitz <tux.rising@gmail.com>
Mon, 27 Oct 2025 22:21:15 +0000 (23:21 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Mon, 27 Oct 2025 22:21:15 +0000 (23:21 +0100)
dot-config/hypr/fragments/env.conf
dot-config/hypr/fragments/keybinds.conf
dot-config/hypr/fragments/windowrules.conf
dot-config/hypr/hyprland.conf
dot-config/hypr/hyprlock.conf
dot-config/hypr/scripts/accel.py [new file with mode: 0755]
dot-config/hypr/scripts/gamemode.sh
dot-config/hypr/scripts/hyprsunset.sh
dot-config/hypr/scripts/startup.sh
dot-config/hypr/sunsetr.toml [deleted file]

index 648a7104093e4714aeb0b56de8e918488bf84553..968982c2bfc3dcdac5a08ac4374c20a261db648c 100644 (file)
@@ -16,8 +16,7 @@ env = SDL_VIDEODRIVER,wayland # remove or set to x11 for games providing older v
 env = CLUTTER_BACKEND,wayland
 
 # tweak swww
-env = SWWW_TRANSITION_FPS,60
-env = SWWW_TRANSITION_STEP,2
+env = SWWW_TRANSITION_FPS,59
 
 # necessary for hi-dpi displays:
 # env = GDK_SCALE=1 # scaling XWayland clients
@@ -31,7 +30,6 @@ env = HYPRCURSOR_SIZE,40
 
 # tweak applications/frameworks
 env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
-env = XDG_MENU_PREFIX,plasma-
 
 # test stuff
 env = TERMINAL,/usr/bin/foot
index 3c9171d9fd5f19ef1d4699a12b1b82a27c49b853..0c280e9f8b7e3c907a3f762c6cec2413db503bea 100644 (file)
@@ -9,16 +9,17 @@ $mainmod = SUPER
 # mainmod shortcuts
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 # example: bind = $mainmod Shift,      Return, exec, [float; size 1280 800;] foot -o pad=0x0
-bind = $mainmod,                        Return, exec, foot
+bind = $mainmod,                        Return, exec, footclient
+bind = $mainmod Ctrl,                   Return, exec, foot
+bind = $mainmod Shift,                  Return, exec, footclient -w 1280x800 -o pad=0x0 -a popup
 bind = $mainmod Shift,                  Q, killactive,
-bind = $mainmod Shift,                  Return, exec, foot -w 1280x800 -o pad=0x0 -a popup
 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,                        C, exec, foot -a clipse -e clipse
+bind = $mainmod Ctrl,                   C, exec, foot -a clipse -e clipse
 bind = $mainmod,                        D, exec, killall fuzzel || fuzzel --config=$HOME/.config/fuzzel/fuzzel-centered.ini
 bind = $mainmod SHIFT,                  D, exec, sherlock
-bind = $mainmod,                        E, exec, foot -a lf lfrun
+bind = $mainmod,                        E, exec, foot -a lf lf
 bind = $mainmod SHIFT,                  E, exec, dolphin
 bind = $mainmod,                        F, fullscreen,1
 bind = $mainmod Shift,                  F, fullscreen,0
@@ -26,11 +27,6 @@ bind = $mainmod,                        G, togglegroup
 bind = $mainmod SHIFT,                  G, lockactivegroup, toggle
 bind = $mainmod CTRL,                   G, denywindowfromgroup, toggle
 bind = $mainmod ALT,                    G, moveoutofgroup, active
-bind = $mainmod,                        M, togglespecialworkspace, magic
-bind = $mainmod,                        M, movetoworkspace, +0
-bind = $mainmod,                        M, togglespecialworkspace, magic
-bind = $mainmod,                        M, movetoworkspace, special:magic
-bind = $mainmod,                        M, togglespecialworkspace, magic
 bind = $mainmod,                        P, exec, foot -w 640x400 -a popup -H hyprpicker #color Pipette
 bind = $mainmod,                        S, layoutmsg, swapwithmaster # master
 bind = $mainmod,                        S, togglesplit, # dwindle
@@ -39,10 +35,26 @@ 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
+bind = $mainmod,                        C, centerwindow
 # scratchpad
 bind = $mainmod,                        I, togglespecialworkspace, overlay
 bind = $mainmod SHIFT,                  I, movetoworkspace, special:overlay
+# virtually minimalized windows
+bind = $mainmod,                        M, togglespecialworkspace, magic
+bind = $mainmod,                        M, movetoworkspace, +0
+bind = $mainmod,                        M, togglespecialworkspace, magic
+bind = $mainmod,                        M, movetoworkspace, special:magic
+bind = $mainmod,                        M, togglespecialworkspace, magic
+bind = $mainmod SHIFT,                  M, togglespecialworkspace, sorcery
+bind = $mainmod SHIFT,                  M, movetoworkspace, +0
+bind = $mainmod SHIFT,                  M, togglespecialworkspace, sorcery
+bind = $mainmod SHIFT,                  M, movetoworkspace, special:sorcery
+bind = $mainmod SHIFT,                  M, togglespecialworkspace, sorcery
+bind = ALT CTRL,                        k, togglespecialworkspace, keepassxc
+bind = ALT CTRL,                        k, movetoworkspace, +0
+bind = ALT CTRL,                        k, togglespecialworkspace, keepassxc
+bind = ALT CTRL,                        k, movetoworkspace, special:keepassxc
+bind = ALT CTRL,                        k, togglespecialworkspace, keepassxc
 
 
 # suremod keys (prevent fat-fingering 'em by accident)
@@ -57,7 +69,7 @@ bind = $suremod,                        L, exec, ~/.config/hypr/scripts/powermen
 bind = $mainmod,                        Print, exec, hyprshot -m output -m active -o $HOME/Bilder/Screenshots
 bind = SHIFT,                           Print, exec, hyprshot -m window -m active -o $HOME/Bilder/Screenshots
 bind = CTRL,                            Print, exec, hyprshot -z -m region -o $HOME/Bilder/Screenshots
-bind = ALT CTRL,            L, exec, hyprlock
+bind = ALT CTRL,                        L, exec, hyprlock
 
 # media keys
 # ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -226,7 +238,63 @@ binde = CTRL,                           i, exec, ~/.config/hypr/scripts/gaps.sh
 binde = CTRL,                           o, exec, ~/.config/hypr/scripts/gaps.sh --reset_gaps_out
 
 # use reset to go back to the global submap
-bind = , escape, submap, reset
+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
index 3e1bc34ba171c1a6453eb07e26b48e7e6cc2f25c..0fb8493e7c715a5a5eb87e32e8a7f2677f7c64ea 100644 (file)
@@ -24,13 +24,15 @@ windowrule = stayfocused, class:^(com.nextcloud.desktopclient.nextcloud)$
 windowrule = float, class: ^(com.nextcloud.desktopclient.nextcloud)$
 
 windowrule = float, class:^(kdesystemsettings.*)$
-windowrule = float, size 1560 1000, pin, workspace special:overlay, class:^(org.keepassxc.KeePassXC)$
+windowrule = float, size 1560 1000, pin, workspace special:overlay, class:^(org.keepassxc.KeePassXC|KeePassXC)$
 
 # handle dialogs
 windowrule = float, title:^((Über|About|Öffnen).*)$
-windowrule = stayfocused, title:^((Über|About|Öffnen).*)$
-windowrule = float, class:^((org.kde.kwalletd6|org.kde.ksecretd).*)$
-windowrule = stayfocused, class:^((org.kde.kwalletd6|org.kde.ksecretd).*)$
+windowrule = stayfocused, title:^((Über|About|Öffnen|Neuen Ordner erstellen|Datei überschreiben).*)$
+windowrule = float, class:^((org.kde.kwalletd6|org.kde.ksecretd|org.kde.polkit-kde-authentication-agent-1).*)$
+windowrule = stayfocused, class:^((org.kde.kwalletd6|org.kde.ksecretd|org.kde.polkit-kde-authentication-agent-1).*)$
+windowrule = float, title:^(.*)auncher$
+windowrule = stayfocused, class:negative:heroic,title:^(.*)Launcher$
 
 # indicate windows with special attention
 windowrulev2 = bordercolor 0xff$berror 0xff$black 30deg, initialTitle:^(upgrayyedd)$
@@ -68,25 +70,31 @@ windowrule = tag +neverdim, class:^(Microsoft-edge.*)$
 windowrule = tag +neverdim, class:^(firefox.*)$
 windowrule = workspace 1, class:^(firefox.*)$
 windowrule = group barred, class:^(firefox.*)$, title:^(Mozilla Firefox)$
+windowrule = workspace 1, class:^(org.qutebrowser.*)$
+windowrule = group barred, class:^(org.qutebrowser.*)$
 
 # handle video PiPs
-windowrule = float, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$
-windowrule = move onscreen 100%-w-10 4%+h, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$
-windowrule = size 800 450, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$
-windowrule = plugin:hyprbars:nobar, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$
-windowrule = noinitialfocus, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$
-windowrule = group deny, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$
-windowrule = pin, class:^(firefox.*)$, title:^(Bild-im-Bild|Picture-in-picture)$
+windowrule = float, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
+windowrule = move onscreen 100%-w-10 52, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
+windowrule = size 800 450, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
+windowrule = plugin:hyprbars:nobar, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
+windowrule = noinitialfocus, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
+windowrule = group deny, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
+windowrule = pin, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
+windowrule = noborder, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
+windowrule = content video, class:^(firefox.*)$, initialTitle:^(Bild-im-Bild|Picture-in-Picture)$
 
 # handle terminal(s/-apps)
 windowrule = float, class:^(popup)$
 windowrule = float, class:^(clipse)$
 windowrule = plugin:hyprbars:nobar, class:^(clipse)$
+windowrule = float, stayfocused, center, opacity 1.0 override, class:^(kakpopup)$
 
+# handle music player clients
 windowrule = pseudo, class:^(ncmpcpp)$
 windowrule = workspace 4, class:^(ncmpcpp)$
 windowrule = noinitialfocus, class:^(ncmpcpp)$
-windowrule = float, stayfocused, center, opacity 1.0 override, class:^(kakpopup)$
+windowrule = workspace 4, class:^(deezer-nativefier.*)$
 
 # handle other clients
 windowrule = float, class:^(openrgb)$
@@ -94,8 +102,10 @@ windowrule = float, class:^(nwg-look)$
 windowrule = float, class:^(alsa-scarlett-gui)$
 windowrule = float, class:^(lstopo)$
 windowrule = float, class:^(org.corectrl.CoreCtrl)$
+windowrule = float, initialTitle:^(LACT)$
 windowrule = float, class:^(lutris)$
 windowrule = workspace 7, class:^(thunderbird|thunderbird-bin)$
+windowrule = tag +neverdim, class:^(Gkrellm)$
 
 windowrule = float, class:^(pavucontrol.*)$
 windowrule = maxsize 600 800, class:^(pavucontrol.*)$
@@ -122,27 +132,24 @@ windowrule = group deny, class:^(ueberzugpp.*)$
 windowrule = float, class:^(org.freedesktop.impl.portal.desktop.kde)$
 windowrule = stayfocused, class:^(org.freedesktop.impl.portal.desktop.kde)$
 
-# handle steam client
-windowrule = float, class:^(steam)$
-windowrule = workspace 6, class:^(steam)$
-windowrule = minsize 1 1, title:^()$, class:^(steam)$
+# handle game launchers
+windowrule = workspace 6, initialclass:^(steam|heroic)$
+windowrule = float, initialclass:^(steam)$, title:^(Freundesliste|Friendlist)$
+windowrule = float, initialClass:^(steam)$, title:negative:^()$
+windowrule = size 300 800, initialclass:^(steam)$, title:^(Freundesliste|Friendlist)$
+windowrule = move onscreen 100%-w-10 25%, initialclass:^(steam)$, title:^(Freundesliste|Friendlist)$
+windowrule = minsize 1 1, initialClass:^(steam)$, title:^()$
 windowrule = plugin:hyprbars:nobar,class:^(steam)$
-# windowrule = decorate 0, class:^(steam)$
-# windowrule = stayfocused, title:^()$, class:^(steam)$, title:^(Steam)$
-# windowrule = suppressevent activate, class:^(steam)$, title:^(Steam)$
-# windowrule = noanim 1, class:^(steam)$
-# windowrule = noblur 1, class:^(steam)$
-# windowrule = norounding 1, class:^(steam)$
-# windowrule = nodim 1, class:^(steam)$
 
 # handle wine/proton games
 $GAMES = ^(steam_app_.*|steam_proton|streaming_client|gamescope)$
-windowrule = tag +game, class:$GAMES
-
+windowrule = tag +game, initialClass:$GAMES
+windowrule = content game, tag:game
 
 # handle TAGS (always handle tags last)
 windowrule = nodim 1, tag:neverdim
 
+windowrule = float, tag:game
 windowrule = nodim 1, tag:game
 windowrule = noblur 1, tag:game
 windowrule = norounding 1, tag:game
@@ -152,8 +159,8 @@ windowrule = opaque 1, tag:game
 windowrule = minsize 1280 800, tag:game
 windowrule = move 50% 50%, tag:game
 windowrule = plugin:hyprbars:nobar, tag:game
-windowrule = idleinhibit always,  tag:game
-windowrule = fullscreenstate 2 3,  tag:game
+windowrule = idleinhibit always, tag:game
 windowrule = fullscreen, tag:game
+windowrule = fullscreen, initialTitle:^(vkcube)$
 # windowrule = immediate, tag:game #experimental
 
index 3d4f6ac2d3705cd2e1f7e6d045dacf5018e53e8a..01cf485a9a6d50d37a0730f971979d3769f3c076 100644 (file)
@@ -13,12 +13,13 @@ monitorv2 {
     mode = preferred
     position = 0x0
     scale = 1
-    bitdepth = 8
+    bitdepth = auto
     cm = auto
-    sdrbrightness = 0.80
+    sdrbrightness = 1.00
     sdrsaturation = 1.00
     sdr_min_luminance = 0.005
     sdr_max_luminance = 245
+    vrr = 1
 }
 
 # other displays
@@ -26,16 +27,20 @@ monitor=,preferred,auto-center-right,1,vrr,2
 
 # Execute your favorite apps at launch
 exec-once = dbus-update-activation-environment --systemd --all
-# exec-once = /usr/bin/gnome-keyring-daemon --start --components=secrets --daemonize
 exec-once = /usr/libexec/pam_kwallet_init
-exec-once = ~/.config/hypr/scripts/startup.sh
+# exec-once = ~/.config/hypr/scripts/startup.sh
+exec-once = openrc --user gui # AFTER pam_kwallet_init!!!
 exec-once = hyprpm reload
+exec-once = matugen image /home/andy/Wallpapers/3440x1440-jffmy9eofxof1.jpg
+exec-once = env XDG_MENU_PREFIX=plasma- kbuildsycoca6
 
 # Unset variables on exit
+exec-shutdown = lastwall save
+exec-shutdown = openrc --user default
 exec-shutdown = setenv WAYLAND_DISPLAY= XDG_SESSION_TYPE= XDG_CURRENT_DESKTOP=
 
 general {
-    allow_tearing = 0
+    allow_tearing = 1
     border_size = 2
     gaps_in = 5
     gaps_out = 10
@@ -58,7 +63,7 @@ dwindle {
     force_split = 2
     smart_split = 0
     split_width_multiplier = 2.0
-    single_window_aspect_ratio = 16 10
+    single_window_aspect_ratio = 16 9.1
     single_window_aspect_ratio_tolerance = 0.1
     pseudotile = 1 # master switch for pseudotiling. Enabling is bound to mainMod + A in the keybinds section below
     preserve_split = 1 # you probably want this
@@ -121,12 +126,23 @@ input {
     sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
     off_window_axis_events = 2    # default = 1
     scroll_points = 3
+    # scroll with right mouse button and mouse movement
+    # scroll_method = on_button_down
+    # scroll_button = 273
 }
 
 device {
     name = razer-razer-basilisk-v3
-    sensitivity = -0.1
-    accel_profile = custom 0.3308622437 0.000 0.224 0.449 0.673 0.997 1.335 1.672 2.010 2.348 2.685 3.186 3.699 4.212 4.725 5.237 5.750 6.263 6.776 7.288 7.801 8.314 8.827 9.339 9.852 10.365 10.878 11.390 11.903 12.416 13.476
+    sensitivity = 0
+    # accel_profile = custom 0.3308622437 0.000 0.224 0.449 0.673 0.997 1.335 1.672 2.010 2.348 2.685 3.186 3.699 4.212 4.725 5.237 5.750 6.263 6.776 7.288 7.801 8.314 8.827 9.339 9.852 10.365 10.878 11.390 11.903 12.416 13.476
+    accel_profile = custom 0.0965014878 0.000 0.099 0.198 0.297 0.396 0.495 0.627 0.776 0.925 1.074 1.223 1.372 1.521 1.670 1.819 1.969 2.153 2.379 2.606 2.832 3.058 3.285 3.511 3.738 3.964 4.190 4.417 4.643 4.870 5.096 5.322 5.549 5.775 6.002 6.228 6.454 6.681 6.907 7.133 7.360 7.586 7.813 8.039 8.265 8.492 8.718 8.945 9.171 9.397 9.865
+       # accel_profile = flat
+}
+
+device {
+       name = zsa-technology-labs-moonlander-mark-i-1
+       sensitivity = -0.1
+       accel_profile = flat
 }
 
 group {
@@ -161,6 +177,7 @@ group {
         round_only_edges = 1
         gradients = 1
         gradient_rounding = 10
+               gradient_rounding_power = 2
         gradient_round_only_edges = 1
         stacked = 0
         gaps_in = 2
@@ -170,10 +187,12 @@ group {
 }
 
 misc {
-    force_default_wallpaper = 1 # Set to 0 to disable the anime mascot wallpapers
+    force_default_wallpaper = 0 # Set to 0 to disable the anime mascot wallpapers
+    disable_hyprland_logo = 0
     key_press_enables_dpms = 1
-    vfr = 1 #enable for battery savings
-    render_unfocused_fps = 60
+    vfr = 1 # set to 1 for battery savings
+       vrr = 2
+    render_unfocused_fps = 59
     allow_session_lock_restore = 1
     initial_workspace_tracking = 1
     font_family = ZedMono NFP
@@ -192,20 +211,22 @@ xwayland {
 }
 
 render {
-    direct_scanout = 2
+    direct_scanout = 1
     cm_fs_passthrough = 2
     cm_enabled = 1
     send_content_type = 1
-    cm_auto_hdr = 1
-    new_render_scheduling = 1
+    cm_auto_hdr = 2
+    new_render_scheduling = 0
 }
 
 cursor {
     enable_hyprcursor = 1
     no_warps = 0
-    no_hardware_cursors = 0
+    no_hardware_cursors = 2
     no_break_fs_vrr = 2
+    warp_on_change_workspace = 1
     warp_on_toggle_special = 1
+    use_cpu_buffer = 2 # 2=nvidia-only
 }
 
 ecosystem {
index 202cbef75b96c3215e6eccf9e6b6352166ad4973..8115d7576a11c8f3921767cce0ff67cccabee59a 100644 (file)
@@ -13,9 +13,9 @@ animations {
 
 background {
     monitor =
-       path = ~/Bilder/Wallpapers-simple/atmosphere.png
+    path = ~/Bilder/Wallpapers-simple/atmosphere.png
     color = 0xdd$background
-    blur_passes = 2
+    blur_passes = 3
     blur_size = 7
     noise = 0.0117
     contrast = 0.8916
@@ -43,7 +43,7 @@ image {
 
 shape {
        size = 300, 20
-       color = 0xff$primary
+       color = 0xff$secondary
        rounding = 8
        border_size = 2
        border_color = 0xff$outline_variant
diff --git a/dot-config/hypr/scripts/accel.py b/dot-config/hypr/scripts/accel.py
new file mode 100755 (executable)
index 0000000..b438b4d
--- /dev/null
@@ -0,0 +1,161 @@
+#!/usr/bin/env python3
+
+# original at https://gist.github.com/yinonburgansky/7be4d0489a0df8c06a923240b8eb0191
+# modified for ease of use in Hyprland
+
+# calculation are based on http://www.esreality.com/index.php?a=post&id=1945096
+# assuming windows 10 uses the same calculation as windows 7.
+# guesses have been made calculation is not accurate
+# touchpad users make sure your touchpad is calibrated with `sudo libinput measure touchpad-size`
+
+# import matplotlib.pyplot as plt
+import struct
+import os
+import sys
+
+# ===== PARAMETERS =====
+# set according to your device:
+device_dpi = 1200 # mouse dpi
+screen_dpi = 110
+screen_scaling_factor = 1
+sample_point_count = 50 # should be enough but you can try to increase for accuracy of windows function
+sensitivity_factor = 4.5
+# sensitivity factor translation table: (windows slider notches)
+# 1 = 0.1
+# 2 = 0.2
+# 3 = 0.4
+# 4 = 0.6
+# 5 = 0.8
+# 6 = 1.0 default
+# 7 = 1.2
+# 8 = 1.4
+# 9 = 1.6
+# 10 = 1.8
+# 11 = 2.0
+# ===== END PARAMETERS =====
+
+def find_arg(arg):
+    for i in sys.argv:
+        if i == arg:
+            return True
+
+    return False
+
+
+if find_arg("help") or find_arg("-h") or find_arg("--help") or find_arg("h"):
+    print(f'{sys.argv[0]} [[accel_profile] [scroll_points] device=<device>]')
+    print('To get the device, run `hyprctl devices` and get its name')
+    exit(0)
+
+# TODO: find accurate formulas for scale x and scale y
+# mouse speed: inch/s to device-units/millisecond
+scale_x = device_dpi / 1e3
+# pointer speed: inch/s to screen pixels/millisecond
+scale_y =  screen_dpi / 1e3 / screen_scaling_factor * sensitivity_factor
+
+# print(f'scale_x={scale_x}, scale_y={scale_y}')
+
+
+def float16x16(num):
+    return struct.unpack('<i', num[:-4])[0] / int(0xffff)
+
+# windows 10 registry values:
+# HKEY_CURRENT_USER\Control Panel\Mouse\SmoothMouseXCurve
+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',
+]
+# HKEY_CURRENT_USER\Control Panel\Mouse\SmoothMouseYCurve
+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)]
+# scale windows points according to device config
+points = [[x * scale_x, y * scale_y] for x, y in windows_points]
+
+# print('Windows original points:')
+# for point in windows_points:
+#     print(point)
+
+# print('Windows scaled points')
+# for point in points:
+#     print(point)
+
+
+# plt.plot(*list(zip(*windows_points)), label=f'windows points')
+# plt.plot(*list(zip(*points)), label=f'scaled points')
+# plt.xlabel('device-speed')
+# plt.ylabel('pointer-speed')
+# plt.legend(loc='best')
+# plt.show()
+# exit()
+
+def get_device():
+    for i in sys.argv:
+        if str(i).startswith('device='):
+            print(str(i)[7::])
+            return str(i)[7::]
+
+
+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)
+    y = ((x-x0)*y1+(x1-x)*y0)/(x1-x0)
+    return y
+
+
+def sample_points(count):
+    # use linear extrapolation for last point to get better accuracy for lower points
+    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]
+
+# plt.plot(sample_points_x, sample_points_y, label=f'windows {sample_point_count} points')
+# plt.plot(*sample_points(1024), label=f'windows 1024 points')
+# plt.xlabel('device-speed')
+# plt.ylabel('pointer-speed')
+# plt.legend(loc='best')
+# plt.show()
+# exit()
+
+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}'")
+
+if find_arg("accel_profile"):
+    device = get_device()
+    print(f'Setting device:\'{device}\':accel_profile using hyprctl')
+    hyprctl(device, 'accel_profile', f'custom {step} {sample_points_str}')
+    # os.system(f'hyprctl keyword device:\'{device}\':accel_profile \'custom {step} {sample_points_str}\'')
+
+if find_arg("scroll_points"):
+    device = get_device()
+    print(f'Setting device:\'{device}\':scroll_points using hyprctl')
+    hyprctl(device, 'scroll_points', f'{step} {sample_points_str}')
+    # os.system(f'hyprctl keyword device:\'{device}\':scroll_points \'{step} {sample_points_str}\'')
+
index b10c1ab7e239b0c9c61b5c4ab2fc73e6dd5f7c4d..8e9d096f286325f54f634fa5ed31e64adb9357cf 100755 (executable)
@@ -10,7 +10,9 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then
         keyword general:border_size 2;\
         keyword decoration:rounding 0;\
         keyword group:groupbar:gradient_rounding 0;\
-        keyword group:groupbar:rounding 0"
+        keyword group:groupbar:rounding 0;\
+        keyword input:force_no_accel 1;\
+        keyword input:follow mouse 0;"
     exit
 fi
 hyprctl reload
index 385c8a770d42669f1047f24006ff440d4eea71fd..d7ced038f6b6e5adf5e4cb7a86cc85531ae78306 100755 (executable)
@@ -31,37 +31,3 @@ if NUM=$(hyprctl hyprsunset $CMD $DELTA); then
   fi
 fi
 
-
-# #!/bin/bash
-# CMD="$1"
-# DELTA="$2"
-# TOGGLE="$3"
-# if [ -z "$CMD" ]; then
-#   echo "Set or get gamma and color temperature through hyprsunset IPC socket"
-#   echo "Usage: sunset.sh <gamma/temperature> [+-][value] [toggle]"
-#   exit 1
-# fi
-# if [[ -n "$TOGGLE" ]]; then
-#   CUR=$(hyprctl hyprsunset "$CMD")
-#   FMT=$(LC_NUMERIC="en_US.UTF-8" printf "%.0f" "$CUR" 2>/dev/null)
-#   if [ "$FMT" = "$DELTA" ]; then
-#     if [ "$CMD" = "gamma" ]; then
-#       DELTA=100
-#     else
-#       DELTA=6500
-#     fi
-#   fi
-# fi
-# [ "$CMD" = "gamma" ] && LEN=3 || LEN=4
-# if [[ -n "$DELTA" ]]; then
-#   # rate limit and queue commands to workaround nvidia freezing on ctm spam
-#   flock /tmp/sunset.lock sleep 0.1
-#   # tell waybar to update after a change
-#   pkill -SIGRTMIN+"$LEN" waybar
-# fi
-# if NUM=$(hyprctl hyprsunset "$CMD" "$DELTA"); then
-#   if FMT=$(LC_NUMERIC="en_US.UTF-8" printf "%$LEN.0f" "$NUM" 2>/dev/null); then
-#     echo "$FMT"
-#   fi
-# fi
-
index 58e88393e5c23e4b26fe1da43f0e8fbcdeab825d..17cd30d8e75deb6a73b1559157eac0722ba699e1 100755 (executable)
@@ -38,7 +38,7 @@ pidof xembedsniproxy && pkill xembedsniproxy || xembedsniproxy > /dev/null 2>&1
 pidof udiskie && pkill udiskie || udiskie --no-automount --no-notify --tray > /dev/null 2>&1 &
 openrgb --startminimized -p sunset > /dev/null 2>&1 &
 ! pidof hypridle && hypridle &
-! pidof hyprsunset && hyprsunset &
+! pidof hyprsunset && hyprsunset &
 ! pidof clipse && clipse --listen
 
 #------------------------------------------------------ autorun flatpaks/other (delayed)
diff --git a/dot-config/hypr/sunsetr.toml b/dot-config/hypr/sunsetr.toml
deleted file mode 100644 (file)
index 12ce83c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# Sunsetr configuration
-sunset = "21:00:00"      # Time to transition to night mode (HH:MM:SS)
-sunrise = "06:00:00"     # Time to transition to day mode (HH:MM:SS)
-night_temp = 4000        # Color temperature after sunset (1000-20000) Kelvin
-night_gamma = 90.0       # Gamma percentage for night (0-200%)
-day_gamma = 100.0        # Gamma percentage for day (0-200%)
-start_hyprsunset = true  # Whether to start hyprsunset automatically
-                         # Set true if you're not using hyprsunset.service
-