update configs and setup
This commit is contained in:
@@ -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";
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user