From: Andre Ramnitz Date: Mon, 7 Oct 2024 22:54:30 +0000 (+0200) Subject: hypr: tweak colors and mouse acceleration profile X-Git-Tag: v0.2~14 X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=41e48dc6c10e28e375e88ab62bb39a68c41ec4ca;p=dotfiles.git hypr: tweak colors and mouse acceleration profile --- diff --git a/config/dot-config/hypr/hyprland.conf b/config/dot-config/hypr/hyprland.conf index 162c4fcd..f8f639fd 100644 --- a/config/dot-config/hypr/hyprland.conf +++ b/config/dot-config/hypr/hyprland.conf @@ -51,6 +51,7 @@ exec-once = ~/.config/hypr/scripts/startup.sh # exec-once = hypridle exec-once = foot -s exec-shutdown = pkill -f '/usr/lib/python-exec/python3.12/python /home/andy/.config/hypr/scripts/gammarelay-auto-temp.py' +# exec = python ~/.config/hypr/scripts/macos_like_accel.py razer-razer-basilisk-v3 # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf @@ -79,9 +80,9 @@ general { gaps_in = 4 gaps_out = 8 col.active_border = 0xff$base0C - col.inactive_border = 0x33$base0C 0x44$base0C 135deg + col.inactive_border = 0x77$base04 col.nogroup_border_active = 0xff$base08 - col.nogroup_border = 0x33$base08 0x44$base08 135deg + col.nogroup_border = 0x77$base08 layout = master @@ -178,16 +179,16 @@ misc { device { name = razer-razer-basilisk-v3 sensitivity = 0 - accel_profile = custom 0.3431164009 0.000 0.291 0.582 1.019 1.456 1.894 2.370 3.035 3.700 4.364 5.029 5.694 6.358 7.023 7.688 8.353 9.017 9.682 10.347 11.720 + 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 } group { merge_groups_on_drag = 0 insert_after_current = 0 - col.border_active = 0xff$base0A 0xff$base04 90deg - col.border_inactive = 0xff$base0A 0xff$base02 270deg - col.border_locked_active = 0xff$base0B 0xff$base04 90deg - col.border_locked_inactive = 0xff$base0B 0xff$base02 270deg + col.border_active = 0xff$base0A + col.border_inactive = 0xAA$base0A + col.border_locked_active = 0xff$base09 + col.border_locked_inactive = 0x77$base09 groupbar { enabled = 0 height = 22 @@ -208,13 +209,13 @@ plugin { bar_text_font = Iosevka Nerd Font Propo bar_text_size = 12 bar_height = 24 - bar_color = 0xee$base01 - col.text = 0xff$base07 + bar_color = 0xff$base01 + col.text = 0xff$base05 bar_part_of_window = 1 bar_precedence_over_border = 1 # hyprbars-button = color, size, icon, on-click - hyprbars-button = 0x70eb6f92, 20, 󰖭, hyprctl dispatch killactive - hyprbars-button = 0x80f6c177, 20, 󰁌, hyprctl dispatch fullscreen 1 + hyprbars-button = 0x70$base08, 20, 󰖭, hyprctl dispatch killactive + hyprbars-button = 0x90$base0A, 20, 󰁌, hyprctl dispatch fullscreen 1 } } diff --git a/config/dot-config/hypr/scripts/custom-accel-macos.py b/config/dot-config/hypr/scripts/custom-accel-macos.py new file mode 100644 index 00000000..48024009 --- /dev/null +++ b/config/dot-config/hypr/scripts/custom-accel-macos.py @@ -0,0 +1,98 @@ +#!/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('') + 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: