lots of shit

This commit is contained in:
2024-08-25 03:32:39 +02:00
parent e37329013a
commit 5db877355c
36 changed files with 1070 additions and 372 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env zsh
source ~/dotfiles/bin/helpers/functions.sh
source $HOME/dotfiles/bin/helpers/functions.sh
# Ensure jq is installed
if ! command -v jq &> /dev/null; then
@ -17,7 +17,21 @@ fi
shortcuts=$(jq -r '.shortcuts' "${shortcuts_file}")
ensure_swhkd() {
shortcuts_keys=($(cat "$DOTFILES_CONFIG" | shyaml keys config.keybinds))
for key in "${shortcuts_keys[@]}"; do
shortcut=$(cat "$DOTFILES_CONFIG" | shyaml get-value config.keybinds.$key.shortcut)
command=$(cat "$DOTFILES_CONFIG" | shyaml get-value config.keybinds.$key.command)
echo "$shortcut"
echo " $command"
echo
done
}
ensure_keyboard_shortcuts() {
printfe "%s\n" "green" " - Setting up swhkd configuration..."
ensure_swhkd > $HOME/dotfiles/config/swhkd/swhkdrc
# Retrieve current custom keybindings
existing_bindings=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | tr -d "[]'")
new_bindings=()