2023-11-10 16:12:15 -05:00
|
|
|
#!/bin/bash
|
|
|
|
# _ _ _ _ _
|
|
|
|
# | | _____ _ _| |__ (_)_ __ __| (_)_ __ __ _ ___
|
|
|
|
# | |/ / _ \ | | | '_ \| | '_ \ / _` | | '_ \ / _` / __|
|
|
|
|
# | < __/ |_| | |_) | | | | | (_| | | | | | (_| \__ \
|
|
|
|
# |_|\_\___|\__, |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___/
|
|
|
|
# |___/ |___/
|
|
|
|
# by Stephan Raabe (2023)
|
|
|
|
# -----------------------------------------------------
|
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# Define keybindings.conf location
|
|
|
|
# -----------------------------------------------------
|
|
|
|
config_file=~/dotfiles/hypr/conf/keybindings.conf
|
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# Parse keybindings
|
|
|
|
# -----------------------------------------------------
|
|
|
|
keybinds=$(grep -oP '(?<=bind = ).*' $config_file)
|
|
|
|
keybinds=$(echo "$keybinds" | sed 's/$mainMod/SUPER/g'| sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
|
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# Show keybindings in rofi
|
|
|
|
# -----------------------------------------------------
|
2023-11-26 04:44:19 -05:00
|
|
|
rofi -dmenu -i -replace -p "Keybinds" -config ~/dotfiles/rofi/config-compact.rasi <<< "$keybinds"
|