feat(binds): add view keybinds script
This commit is contained in:
@@ -33,7 +33,6 @@ hl.on("hyprland.start", function()
|
|||||||
hl.exec_cmd("/usr/lib/xdg-desktop-portal-hyprland &")
|
hl.exec_cmd("/usr/lib/xdg-desktop-portal-hyprland &")
|
||||||
hl.exec_cmd("/usr/lib/xdg-desktop-portal &")
|
hl.exec_cmd("/usr/lib/xdg-desktop-portal &")
|
||||||
hl.exec_cmd("hyprpaper")
|
hl.exec_cmd("hyprpaper")
|
||||||
hl.exec_cmd("hypridle")
|
|
||||||
hl.exec_cmd("nextcloud")
|
hl.exec_cmd("nextcloud")
|
||||||
hl.exec_cmd("waybar")
|
hl.exec_cmd("waybar")
|
||||||
hl.exec_cmd("hyprctl setcursor breeze 24")
|
hl.exec_cmd("hyprctl setcursor breeze 24")
|
||||||
|
|||||||
4
.config/hypr/hyprpaper.conf
Normal file
4
.config/hypr/hyprpaper.conf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ipc = on
|
||||||
|
preload = /home/dylan/.wallpapers/monochrome.png
|
||||||
|
wallpaper = ,/home/dylan/.wallpapers/monochrome.png
|
||||||
|
splash = false
|
||||||
@@ -70,8 +70,5 @@ hl.bind("ALT" .. " + " .. "TAB", hl.dsp.window.cycle_next(), { description = "Cy
|
|||||||
hl.bind("SUPER" .. " + " .. "F", hl.dsp.exec_cmd(fileManager), { description = "File manager" })
|
hl.bind("SUPER" .. " + " .. "F", hl.dsp.exec_cmd(fileManager), { description = "File manager" })
|
||||||
hl.bind("SUPER" .. " + " .. "D", hl.dsp.exec_cmd(menu), { description = "App launcher" })
|
hl.bind("SUPER" .. " + " .. "D", hl.dsp.exec_cmd(menu), { description = "App launcher" })
|
||||||
hl.bind("SUPER" .. " + " .. "B", hl.dsp.exec_cmd(browser), { description = "Browser" })
|
hl.bind("SUPER" .. " + " .. "B", hl.dsp.exec_cmd(browser), { description = "Browser" })
|
||||||
hl.bind(
|
hl.bind("SUPER + SHIFT + S", hl.dsp.exec_cmd('grim -g "$(slurp -d)" - | wl-copy'), { description = "Screenshot region to clipboard" })
|
||||||
"SUPER + SHIFT + S",
|
hl.bind(mainMod .. " + slash", hl.dsp.exec_cmd(os.getenv("HOME") .. "/.config/hypr/scripts/show-binds.sh"), { description = "Show keybind cheat sheet" })
|
||||||
hl.dsp.exec_cmd('grim -g "$(slurp -d)" - | wl-copy'),
|
|
||||||
{ description = "Screenshot region to clipboard" }
|
|
||||||
)
|
|
||||||
|
|||||||
19
.config/hypr/scripts/show-binds.sh
Executable file
19
.config/hypr/scripts/show-binds.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
hyprctl -j binds | jq -r '
|
||||||
|
def mods(m):
|
||||||
|
[ if m >= 64 then "SUPER" else empty end,
|
||||||
|
if (m % 16) >= 8 then "ALT" else empty end,
|
||||||
|
if (m % 8) >= 4 then "CTRL" else empty end,
|
||||||
|
if (m % 2) >= 1 then "SHIFT" else empty end ] | join("+");
|
||||||
|
[ .[] | select(.has_description)
|
||||||
|
| { k: "\(if .modmask > 0 then mods(.modmask) + "+" else "" end)\(.key)",
|
||||||
|
d: .description } ]
|
||||||
|
| sort_by(.k)
|
||||||
|
| (map(.k | length) | max) as $w
|
||||||
|
| .[] | "\(.k + (" " * ($w - (.k | length)))) \(.d)"
|
||||||
|
' | pr -2 -t -w 160 \
|
||||||
|
| yad --text-info \
|
||||||
|
--title="Hyprland Keybinds" \
|
||||||
|
--width=1250 --height=560 --center \
|
||||||
|
--fontname="monospace 10" \
|
||||||
|
--no-buttons --wrap=false
|
||||||
Reference in New Issue
Block a user