chore: Update keyboard shortcuts and start swhkd daemon

This commit is contained in:
Menno van Leeuwen 2024-08-25 05:06:05 +02:00
parent 1c5ccb3a1b
commit 28550ee13b
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -32,6 +32,23 @@ ensure_keyboard_shortcuts() {
printfe "%s\n" "green" " - Setting up swhkd configuration..." printfe "%s\n" "green" " - Setting up swhkd configuration..."
ensure_swhkd > $HOME/.config/swhkdrc ensure_swhkd > $HOME/.config/swhkdrc
# If swhkd is running, kill it
if pgrep -x "swhkd" > /dev/null; then
printfe "%s\n" "yellow" " - swhkd is running, killing it..."
sudo pkill swhkd
fi
# Same for swhks
if pgrep -x "swhks" > /dev/null; then
printfe "%s\n" "yellow" " - swhks is running, killing it..."
sudo pkill swhks
fi
# Start swhkd
printfe "%s\n" "green" " - starting swhkd..."
printfe "%s\n" "yellow" " Note: this will likely show a password prompt, please enter your password"
dotf hotkey-daemon &> /dev/null
# Retrieve current custom keybindings # Retrieve current custom keybindings
existing_bindings=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | tr -d "[]'") existing_bindings=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | tr -d "[]'")
new_bindings=() new_bindings=()