diff --git a/.config/gnome-settings/elgato/dec_brightness.py b/.config/gnome-settings/elgato/dec_brightness.py index e3dcaeb..9382947 100755 --- a/.config/gnome-settings/elgato/dec_brightness.py +++ b/.config/gnome-settings/elgato/dec_brightness.py @@ -2,8 +2,8 @@ import leglight -LEFT_KEYLIGHT_IP = "192.168.20.72" -RIGHT_KEYLIGHT_IP = "192.168.20.73" +LEFT_KEYLIGHT_IP = "192.168.190.62" +RIGHT_KEYLIGHT_IP = "192.168.190.63" left = leglight.LegLight(LEFT_KEYLIGHT_IP, port=9123) right = leglight.LegLight(RIGHT_KEYLIGHT_IP, port=9123) diff --git a/.config/gnome-settings/elgato/inc_brightness.py b/.config/gnome-settings/elgato/inc_brightness.py index 8500c6a..21a5ae0 100755 --- a/.config/gnome-settings/elgato/inc_brightness.py +++ b/.config/gnome-settings/elgato/inc_brightness.py @@ -2,8 +2,8 @@ import leglight -LEFT_KEYLIGHT_IP = "192.168.20.72" -RIGHT_KEYLIGHT_IP = "192.168.20.73" +LEFT_KEYLIGHT_IP = "192.168.190.62" +RIGHT_KEYLIGHT_IP = "192.168.190.63" left = leglight.LegLight(LEFT_KEYLIGHT_IP, port=9123) right = leglight.LegLight(RIGHT_KEYLIGHT_IP, port=9123) diff --git a/.config/gnome-settings/elgato/toggle_keylights.py b/.config/gnome-settings/elgato/toggle_keylights.py index 286227e..f6f7413 100755 --- a/.config/gnome-settings/elgato/toggle_keylights.py +++ b/.config/gnome-settings/elgato/toggle_keylights.py @@ -2,8 +2,8 @@ import leglight -LEFT_KEYLIGHT_IP = "192.168.20.72" -RIGHT_KEYLIGHT_IP = "192.168.20.73" +LEFT_KEYLIGHT_IP = "192.168.190.62" +RIGHT_KEYLIGHT_IP = "192.168.190.63" left = leglight.LegLight(LEFT_KEYLIGHT_IP, port=9123) right = leglight.LegLight(RIGHT_KEYLIGHT_IP, port=9123) diff --git a/.config/gnome-settings/key-bindings.ini b/.config/gnome-settings/key-bindings.ini index 2155d22..23eeb14 100644 --- a/.config/gnome-settings/key-bindings.ini +++ b/.config/gnome-settings/key-bindings.ini @@ -55,7 +55,7 @@ toggle-tiled-left=@as [] toggle-tiled-right=@as [] [org/gnome/settings-daemon/plugins/media-keys] -custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom9/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom10/'] +custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom9/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom10/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/'] email=['e'] help=@as [] home=['f'] @@ -114,21 +114,26 @@ command='alacritty' name='Terminal (2)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7] -binding='l' -command='/home/alexander/.pyenv/versions/utils/bin/python /home/alexander/.config/gnome-settings/elgato/toggle_keylights.py' -name='Toggle Keylights in the Office' +binding='l' +command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/toggle_keylights.py' +name='Toggle Keylights in the Office (1)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8] -binding='Up' -command='/home/alexander/.pyenv/versions/utils/bin/python /home/alexander/.config/gnome-settings/elgato/inc_brightness.py' -name='Increase Brightness of Keylights in the Office' +binding='Slash' +command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/toggle_keylights.py' +name='Toggle Keylights in the Office (2)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom9] -binding='Down' -command='/home/alexander/.pyenv/versions/utils/bin/python /home/alexander/.config/gnome-settings/elgato/dec_brightness.py' -name='Decrease Brightness of Keylights in the Office' +binding='Period' +command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/inc_brightness.py' +name='Increase Brightness of Keylights in the Office' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom10] +binding='Comma' +command='/home/alexander/.local/share/elgato/bin/python /home/alexander/.config/gnome-settings/elgato/dec_brightness.py' +name='Decrease Brightness of Keylights in the Office' + +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11] binding='u' command='/usr/bin/flatpak run com.spotify.Client' name='Spotify' diff --git a/.local/share/dotfiles/setup.sh b/.local/share/dotfiles/setup.sh index 3b06fca..1ee569a 100755 --- a/.local/share/dotfiles/setup.sh +++ b/.local/share/dotfiles/setup.sh @@ -25,6 +25,17 @@ git --git-dir=$XDG_DATA_HOME/dotfiles/ --work-tree=$HOME config --local status.s [ -d "$XDG_DATA_HOME/gnupg" ] && chmod 700 $XDG_DATA_HOME/gnupg +if _command_exists python3; then + + # Set up a Python venv to host the scripts controlling the Elgato keylights in my office + python3 -m venv $XDG_DATA_HOME/elgato + $XDG_DATA_HOME/elgato/bin/pip list + $XDG_DATA_HOME/elgato/bin/pip install --upgrade pip setuptools + $XDG_DATA_HOME/elgato/bin/pip install leglight + +fi + + if _command_exists pip; then # Ensure `pipx` is installed in the user's local environment