update configs and setup

This commit is contained in:
2024-04-02 17:26:01 +02:00
parent 2939a2e2e0
commit ccd1408417
44 changed files with 1705 additions and 1342 deletions
+12 -4
View File
@@ -1,5 +1,13 @@
#!/bin/bash
config_file=~/.config/hypr/hl-keybindings.conf
keybinds=$(grep -oP '(?<=bind = ).*' $config_file)
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
rofi -dmenu -p "Keybinds" <<< "$keybinds"
# Format JSON proper;y
JSON=$(hyprkeys --from-ctl --json | jq -r --slurp "[.[]][0]");
USER_SELECTED=$(echo $JSON | jq -r 'range(0, length) as $i | "\($i) \(.[$i].mods) \(.[$i].key) \(.[$i].dispatcher) \(.[$i].arg)"' | rofi -theme ~/.config/rofi/shortcuts/shortcuts.rasi -dmenu -p 'Keybinds' | awk -F ' ' '{print $1}')
if [ -z "$USER_SELECTED" ]; then
exit 0;
fi
EVENT=$(echo $JSON | jq -r "[.[]] | .[$USER_SELECTED]" | jq -r '"\(.dispatcher) \(.arg)"');
hyprctl dispatch "$EVENT";
+30
View File
@@ -0,0 +1,30 @@
@import "../config.rasi"
@import "../colors.rasi"
window {
width: 1024;
height: 768;
}
listview {
columns: 1;
lines: 5;
}
inputbar {
children: [ "textbox-prompt-colon", "entry"];
}
element {
orientation:horizontal;
children: ["element-icon", "element-text"];
}
element-icon {
size: 0;
}
element-text {
vertical-align: 0.5;
horizontal-align: 0.0;
background:red;
}