85 lines
4.7 KiB
Lua

local smw = require("plugins.split-monitor-workspaces")
local mainMod = "SUPER"
-- local home = os.getenv("HOME")
hl.bind("SUPER + Return", hl.dsp.exec_cmd("uwsm app ghostty"))
hl.bind("SUPER + ALT + Return", hl.dsp.exec_cmd("st"))
hl.bind("SUPER + SHIFT + Return", hl.dsp.exec_cmd("urxvt"))
hl.bind("SUPER + CTRL + SHIFT + Return", hl.dsp.exec_cmd("urxvt -bg 0 -fg 2 -cr blue -vb -sb -sr -st -bc -sl 5000 -fn 'xft:Bitstream Vera Sans Mono:size=14, xft:Hack Nerd Font Mono:size=12, xft:Font Awesome 6 Free:style=Solid'"))
-- hl.bind(" SUPER + SHIFT,Return,hl.dsp.exec_cmd("urxvt -bg 0 -fg 2 -cr blue -vb -sb -sr -st -bc -sl 5000 -fn "xft:Font Awesome:size=12"
-- hl.bind(" SUPER + SHIFT,Return,hl.dsp.exec_cmd("urxvt -bg 0 -fg 2 -cr blue -vb -sb -sr -st -bc -sl 5000
hl.bind("SUPER + P", hl.dsp.exec_cmd("rofi -show drun --with-images"))
hl.bind("SUPER + SHIFT + W", hl.dsp.exec_cmd("uwsm app librewolf-bin"))
hl.bind("SUPER + E", hl.dsp.exec_cmd("emopicker9000"))
hl.bind("SUPER + D", hl.dsp.exec_cmd("discord"))
-- hl.bind("SUPER + SHIFT +D", hl.dsp.exec_cmd("vesktop-bin"))
hl.bind("SUPER + M", hl.dsp.exec_cmd("[workspace 8 silent] spotify"))
hl.bind("SUPER + CTRL + N", hl.dsp.exec_cmd("/usr/bin/swaync-client -op"))
hl.bind("SUPER + SHIFT + Q", hl.dsp.window.close())
-- #hl.bind(" SUPER + P,pseudo,
-- #hl.bind(" SUPER + SHIFT,I,togglesplit,
hl.bind("SUPER + F", hl.dsp.window.fullscreen())
hl.bind(" SUPER + SHIFT + SPACE", hl.dsp.window.float())
hl.bind(" SUPER + SHIFT + E", hl.dsp.exec_cmd("uwsm stop -r"))
-- Toggle HyprSunset
hl.bind(mainMod .. " + SHIFT + H", hl.dsp.exec_cmd("~/.config/hypr/scripts/toggle-hyprsunset"), { description = "Toggle Hyprsunset" })
-- # Waybar
hl.bind("SUPER + B", hl.dsp.exec_cmd("pkill -10 waybar"))
hl.bind("SUPER + SHIFT + B", hl.dsp.exec_cmd("home" .. "/.local/bin/reset-waybar"))
-- # Notification
hl.bind("SUPER + SHIFT + T", hl.dsp.exec_cmd("swaync-client -op"))
-- # Screen Shots
hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd("grimshot '--notify save area' ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%M).png"))
-- # Special Workspaces - like scrathpad, but named
hl.bind("SUPER + SHIFT + GRAVE", hl.dsp.window.move({ workspace = "special:term"}))
hl.bind("SUPER + GRAVE", hl.dsp.workspace.toggle_special("term"))
-- # Background Selection
hl.bind(" SUPER + SHIFT + N", hl.dsp.exec_cmd("newbg"))
-- # Navigation
for i = 1, smw.get_amount_of_workspaces() do
local n = tostring(i)
if n == "10" then n = "0" end -- Optional if you configured 10 workspaces: bind workspace 10 to SUPER + 0
-- Switch to the Nth workspace on the currently focused monitor.
hl.bind(mainMod .. " +" .. n, smw.workspace(n))
-- Move the active window to the Nth workspace on the currently focused monitor silently (no focus change).
hl.bind(mainMod .. " + SHIFT +" .. n, smw.move_to_workspace_silent(n))
end
hl.bind("SUPER + SHIFT + right", hl.dsp.window.move({ monitor = "HDMI-A-1"})) -- Move active workspace to other monitor
hl.bind("SUPER + SHIFT + left", hl.dsp.window.move({ monitor = "DP-1"}))
-- hl.bind("SUPER + right", focusmonitor, +1) -- Switch monitor focus
-- hl.bind("SUPER + left, focusmonitor, -1) -- Switch monitor focus
hl.bind("SUPER + mouse_down", hl.dsp.focus({ workspace = "e+1"}))
hl.bind("SUPER + mouse_up", hl.dsp.focus({ workspace = "e-1"}))
hl.bind("SUPER + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- hl.bind("ALT + Tab", cyclenext)
-- hl.bind("ALT + Tab", bringactivetotop)
-- # Volume Control
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"))
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"))
hl.bind("XF86AudioMute", hl.dsp.exec_cmd(" wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"))
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"))
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"))
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"))
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"))
-- hl.bind(" SUPER + SHIFT + C", hl.dsp.exec_cmd("kitty -c '/home/ganome/.config/kitty/kittybg.conf' --class='kitty-bg' '/home/ganome/.local/bin/cava-float'"))
-- # Clipboard Shortcuts
hl.bind("SUPER + V", hl.dsp.exec_cmd("cliphist list | wofi --dmenu | cliphist decode | wl-copy"))
-- # Monitor Brightness
-- hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 5%-"))
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set +5%"))
-- # Keyboard Brightness
-- hl.bind("XF86KbdBrightnessUp", hl.dsp.exec_cmd("brightnessctl -d *::kbd_backlight set +20%"))
-- hl.bind(" ,XF86KbdBrightnessDown", hl.dsp.exec_cmd("brightnessctl -d *::kbd_backlight set 20%-"))