Configuring hypr
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("uwsm-app -- hypridle")
|
||||
hl.exec_cmd("uwsm-app -- mako")
|
||||
hl.exec_cmd("uwsm-app -- hyprsunset")
|
||||
hl.exec_cmd("uwsm-app -- fcitx5 --disable notificationitem")
|
||||
hl.exec_cmd("Enpass -minimize")
|
||||
hl.exec_cmd("nextcloud")
|
||||
hl.exec_cmd("station-bg-random")
|
||||
hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1")
|
||||
hl.exec_cmd("dbus-update-activation-environment --systemd --all")
|
||||
end)
|
||||
+164
-279
@@ -4,367 +4,252 @@
|
||||
-- Only display the OSD on the currently focused monitor
|
||||
local osdclient = "swayosd-client --monitor \"$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')\""
|
||||
|
||||
local exec = hl.dsp.exec_cmd
|
||||
local shortcut = hl.dsp.send_shortcut
|
||||
|
||||
local function bind(key, cmd, desc, opts)
|
||||
opts = opts or {}
|
||||
opts.desc = desc
|
||||
hl.bind(key, cmd, opts)
|
||||
end
|
||||
|
||||
local function bindl(key, cmd, desc, opts)
|
||||
opts = opts or {}
|
||||
opts.locked = true
|
||||
bind(key, cmd, desc, opts)
|
||||
end
|
||||
|
||||
local function bindlr(key, cmd, desc, opts)
|
||||
opts = opts or {}
|
||||
opts.repeating = true
|
||||
bindl(key, cmd, desc, opts)
|
||||
end
|
||||
|
||||
-- Laptop multimedia keys for volume and LCD brightness (with OSD)
|
||||
hl.bind(
|
||||
"XF86AudioRaiseVolume",
|
||||
hl.dsp.exec_cmd(osdclient .. " --output-volume raise"),
|
||||
{ locked = true, repeating = true, description = "Volume up" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioRaiseVolume",
|
||||
hl.dsp.exec_cmd(osdclient .. " --output-volume raise"),
|
||||
{ locked = true, repeating = true, description = "Volume up" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioLowerVolume",
|
||||
hl.dsp.exec_cmd(osdclient .. " --output-volume lower"),
|
||||
{ locked = true, repeating = true, description = "Volume down" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioMute",
|
||||
hl.dsp.exec_cmd(osdclient .. " --output-volume mute-toggle"),
|
||||
{ locked = true, repeating = true, description = "Mute" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioMicMute",
|
||||
hl.dsp.exec_cmd(osdclient .. " --input-volume mute-toggle"),
|
||||
{ locked = true, repeating = true, description = "Mute microphone" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86MonBrightnessUp",
|
||||
hl.dsp.exec_cmd("station-brightness-display +5%"),
|
||||
{ locked = true, repeating = true, description = "Brightness up" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86MonBrightnessDown",
|
||||
hl.dsp.exec_cmd("station-brightness-display 5%-"),
|
||||
{ locked = true, repeating = true, description = "Brightness down" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86KbdBrightnessUp",
|
||||
hl.dsp.exec_cmd("station-brightness-keyboard up"),
|
||||
{ locked = true, repeating = true, description = "Keyboard brightness up" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86KbdBrightnessDown",
|
||||
hl.dsp.exec_cmd("station-brightness-keyboard down"),
|
||||
{ locked = true, repeating = true, description = "Keyboard brightness down" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86KbdLightOnOff",
|
||||
hl.dsp.exec_cmd("station-brightness-keyboard cycle"),
|
||||
{ locked = true, description = "Keyboard backlight cycle" }
|
||||
)
|
||||
bindlr("XF86AudioRaiseVolume", exec(osdclient .. " --output-volume raise"), "Volume up")
|
||||
bindlr("XF86AudioRaiseVolume", exec(osdclient .. " --output-volume raise"), "Volume up")
|
||||
bindlr("XF86AudioLowerVolume", exec(osdclient .. " --output-volume lower"), "Volume down")
|
||||
bindlr("XF86AudioMute", exec(osdclient .. " --output-volume mute-toggle"), "Mute")
|
||||
bindlr("XF86AudioMicMute", exec(osdclient .. " --input-volume mute-toggle"), "Mute microphone")
|
||||
bindlr("XF86MonBrightnessUp", exec("station-brightness-display +5%"), "Brightness up")
|
||||
bindlr("XF86MonBrightnessDown", exec("station-brightness-display 5%-"), "Brightness down")
|
||||
bindlr("XF86KbdBrightnessUp", exec("station-brightness-keyboard up"), "Keyboard brightness up")
|
||||
bindlr("XF86KbdBrightnessDown", exec("station-brightness-keyboard down"), "Keyboard brightness down")
|
||||
bindl("XF86KbdLightOnOff", exec("station-brightness-keyboard cycle"), "Keyboard backlight cycle")
|
||||
|
||||
-- Precise 1% multimedia adjustments with Alt modifier
|
||||
hl.bind(
|
||||
"ALT + XF86AudioRaiseVolume",
|
||||
hl.dsp.exec_cmd("$osdclient --output-volume +1"),
|
||||
{ locked = true, repeating = true, description = "Volume up precise" }
|
||||
)
|
||||
hl.bind(
|
||||
"ALT + XF86AudioLowerVolume",
|
||||
hl.dsp.exec_cmd("$osdclient --output-volume -1"),
|
||||
{ locked = true, repeating = true, description = "Volume down precise" }
|
||||
)
|
||||
hl.bind(
|
||||
"ALT + XF86MonBrightnessUp",
|
||||
hl.dsp.exec_cmd("station-brightness-display +1%"),
|
||||
{ locked = true, repeating = true, description = "Brightness up precise" }
|
||||
)
|
||||
hl.bind(
|
||||
"ALT + XF86MonBrightnessDown",
|
||||
hl.dsp.exec_cmd("station-brightness-display 1%-"),
|
||||
{ locked = true, repeating = true, description = "Brightness down precise" }
|
||||
)
|
||||
bindlr("ALT + XF86AudioRaiseVolume", exec("$osdclient --output-volume +1"), "Volume up precise")
|
||||
bindlr("ALT + XF86AudioLowerVolume", exec("$osdclient --output-volume -1"), "Volume down precise")
|
||||
bindlr("ALT + XF86MonBrightnessUp", exec("station-brightness-display +1%"), "Brightness up precise")
|
||||
bindlr("ALT + XF86MonBrightnessDown", exec("station-brightness-display 1%-"), "Brightness down precise")
|
||||
|
||||
-- Requires playerctl
|
||||
hl.bind(
|
||||
"XF86AudioNext",
|
||||
hl.dsp.exec_cmd(osdclient .. " --playerctl next"),
|
||||
{ locked = true, description = "Next track" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioPause",
|
||||
hl.dsp.exec_cmd(osdclient .. " --playerctl play-pause"),
|
||||
{ locked = true, description = "Pause" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioPlay",
|
||||
hl.dsp.exec_cmd(osdclient .. " --playerctl play-pause"),
|
||||
{ locked = true, description = "Play" }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioPrev",
|
||||
hl.dsp.exec_cmd(osdclient .. " --playerctl previous"),
|
||||
{ locked = true, description = "Previous track" }
|
||||
)
|
||||
bindl("XF86AudioNext", exec(osdclient .. " --playerctl next"), "Next track")
|
||||
bindl("XF86AudioPause", exec(osdclient .. " --playerctl play-pause"), "Pause")
|
||||
bindl("XF86AudioPlay", exec(osdclient .. " --playerctl play-pause"), "Play")
|
||||
bindl("XF86AudioPrev", exec(osdclient .. " --playerctl previous"), "Previous track")
|
||||
|
||||
-- Switch audio output with Super + Mute
|
||||
hl.bind(
|
||||
"SUPER + XF86AudioMute",
|
||||
hl.dsp.exec_cmd("station-cmd-audio-switch"),
|
||||
{ locked = true, description = "Switch audio output" }
|
||||
)
|
||||
bindl("SUPER + XF86AudioMute", exec("station-cmd-audio-switch"), "Switch audio output")
|
||||
|
||||
-- ==========================
|
||||
-- Copy & Paste
|
||||
-- ==========================
|
||||
hl.bind("SUPER + C", hl.dsp.send_shortcut({ mods = "CTRL", key = "Insert" }), { description = "Universal copy" })
|
||||
hl.bind("SUPER + V", hl.dsp.send_shortcut({ mods = "SHIFT", key = "Insert" }), { description = "Universal paste" })
|
||||
hl.bind("SUPER + X", hl.dsp.send_shortcut({ mods = "CRTL", key = "X" }), { description = "Universal cut" })
|
||||
hl.bind("SUPER + A", hl.dsp.send_shortcut({ mods = "CTRL", key = "A" }), { description = "Universal cut" })
|
||||
hl.bind(
|
||||
"SUPER + CTRL + V",
|
||||
hl.dsp.exec_cmd("station-launch-walker -m clipboard"),
|
||||
{ description = "Clipboard manager" }
|
||||
)
|
||||
bind("SUPER + C", shortcut({ mods = "CTRL", key = "Insert" }), "Universal copy")
|
||||
bind("SUPER + V", shortcut({ mods = "SHIFT", key = "Insert" }), "Universal paste")
|
||||
bind("SUPER + X", shortcut({ mods = "CRTL", key = "X" }), "Universal cut")
|
||||
bind("SUPER + A", shortcut({ mods = "CTRL", key = "A" }), "Universal cut")
|
||||
bind("SUPER + CTRL + V", exec("station-launch-walker -m clipboard"), "Clipboard manager")
|
||||
|
||||
-- Close windows
|
||||
hl.bind("SUPER + Q", hl.dsp.window.close(), { description = "Close window" })
|
||||
bind("SUPER + Q", hl.dsp.window.close(), "Close window")
|
||||
|
||||
-- ==========================
|
||||
-- Tiling
|
||||
-- ==========================
|
||||
hl.bind("SUPER + P", hl.dsp.window.pseudo()--[[# dwindle]], { description = "Pseudo window" })
|
||||
hl.bind("SUPER + F", hl.dsp.window.fullscreen(0), { description = "Full screen" })
|
||||
hl.bind("SUPER + CTRL + F", hl.dsp.window.fullscreen(1), { description = "Full width" })
|
||||
hl.bind("SUPER + T", hl.dsp.exec_cmd("station-hyprland-window-pop"), { description = "Pop window out (float & pin)" })
|
||||
hl.bind(
|
||||
"SUPER + CTRL + L",
|
||||
hl.dsp.exec_cmd("station-hyprland-workspace-layout-toggle"),
|
||||
{ description = "Toggle workspace layout" }
|
||||
)
|
||||
bind("SUPER + P", hl.dsp.window.pseudo()--[[# dwindle]], "Pseudo window")
|
||||
bind("SUPER + F", hl.dsp.window.fullscreen(0), "Full screen")
|
||||
bind("SUPER + CTRL + F", hl.dsp.window.fullscreen(1), "Full width")
|
||||
bind("SUPER + T", exec("station-hyprland-window-pop"), "Pop window out (float & pin)")
|
||||
bind("SUPER + CTRL + L", exec("station-hyprland-workspace-layout-toggle"), "Toggle workspace layout")
|
||||
|
||||
-- Move focus with SUPER + arrow keys
|
||||
hl.bind("SUPER + H", hl.dsp.focus({ direction = "left" }), { description = "Move window focus left" })
|
||||
hl.bind("SUPER + L", hl.dsp.focus({ direction = "right" }), { description = "Move window focus right" })
|
||||
hl.bind("SUPER + K", hl.dsp.focus({ direction = "up" }), { description = "Move window focus up" })
|
||||
hl.bind("SUPER + J", hl.dsp.focus({ direction = "down" }), { description = "Move window focus down" })
|
||||
hl.bind("SUPER + SHIFT + H", hl.dsp.window.move({ direction = "left" }), { description = "Move window left" })
|
||||
hl.bind("SUPER + SHIFT + L", hl.dsp.window.move({ direction = "right" }), { description = "Move window right" })
|
||||
hl.bind("SUPER + SHIFT + K", hl.dsp.window.move({ direction = "up" }), { description = "Move window up" })
|
||||
hl.bind("SUPER + SHIFT + J", hl.dsp.window.move({ direction = "down" }), { description = "Move window down" })
|
||||
bind("SUPER + H", hl.dsp.focus({ direction = "left" }), "Move window focus left")
|
||||
bind("SUPER + L", hl.dsp.focus({ direction = "right" }), "Move window focus right")
|
||||
bind("SUPER + K", hl.dsp.focus({ direction = "up" }), "Move window focus up")
|
||||
bind("SUPER + J", hl.dsp.focus({ direction = "down" }), "Move window focus down")
|
||||
bind("SUPER + SHIFT + H", hl.dsp.window.move({ direction = "left" }), "Move window left")
|
||||
bind("SUPER + SHIFT + L", hl.dsp.window.move({ direction = "right" }), "Move window right")
|
||||
bind("SUPER + SHIFT + K", hl.dsp.window.move({ direction = "up" }), "Move window up")
|
||||
bind("SUPER + SHIFT + J", hl.dsp.window.move({ direction = "down" }), "Move window down")
|
||||
|
||||
-- Control scratchpad
|
||||
hl.bind("SUPER + S", hl.dsp.workspace.toggle_special("scratchpad"), { description = "Toggle scratchpad" })
|
||||
hl.bind(
|
||||
"SUPER + ALT + S",
|
||||
hl.dsp.window.move({ workspace = "special:scratchpad" }),
|
||||
{ description = "Move window to scratchpad" }
|
||||
)
|
||||
bind("SUPER + S", hl.dsp.workspace.toggle_special("scratchpad"), "Toggle scratchpad")
|
||||
bind("SUPER + ALT + S", hl.dsp.window.move({ workspace = "special:scratchpad" }), "Move window to scratchpad")
|
||||
|
||||
-- Cycle through applications on active workspace
|
||||
hl.bind("SUPER + TAB", hl.dsp.window.cycle_next({ next = true }), { description = "Cycle to next window" })
|
||||
hl.bind("SUPER + SHIFT + TAB", hl.dsp.window.cycle_next({ next = false }), { description = "Cycle to prev window" })
|
||||
-- hl.bind("SUPER + TAB", /*bringactivetotop*/, { description = "Reveal active window on top" })
|
||||
-- hl.bind("SUPER SHIFT + TAB", /*bringactivetotop*/, { description = "Reveal active window on top" })
|
||||
bind("SUPER + TAB", hl.dsp.window.cycle_next({ next = true }), "Cycle to next window")
|
||||
bind("SUPER + SHIFT + TAB", hl.dsp.window.cycle_next({ next = false }), "Cycle to prev window")
|
||||
-- bind("SUPER + TAB", /*bringactivetotop*/, "Reveal active window on top")
|
||||
-- bind("SUPER SHIFT + TAB", /*bringactivetotop*/, "Reveal active window on top")
|
||||
|
||||
-- Resize active window
|
||||
hl.bind("SUPER + code:20", hl.dsp.window.resize({ x = -100, y = 0 }), { description = "Expand window left" })
|
||||
hl.bind("SUPER + code:21", hl.dsp.window.resize({ x = 100, y = 0 }), { description = "Shrink window left" })
|
||||
hl.bind("SUPER + SHIFT + code:20", hl.dsp.window.resize({ x = 0, y = -100 }), { description = "Shrink window up" })
|
||||
hl.bind("SUPER + SHIFT + code:21", hl.dsp.window.resize({ x = 0, y = 100 }), { description = "Expand window down" })
|
||||
bind("SUPER + code:20", hl.dsp.window.resize({ x = -100, y = 0 }), "Expand window left")
|
||||
bind("SUPER + code:21", hl.dsp.window.resize({ x = 100, y = 0 }), "Shrink window left")
|
||||
bind("SUPER + SHIFT + code:20", hl.dsp.window.resize({ x = 0, y = -100 }), "Shrink window up")
|
||||
bind("SUPER + SHIFT + code:21", hl.dsp.window.resize({ x = 0, y = 100 }), "Expand window down")
|
||||
|
||||
-- Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
hl.bind("SUPER + mouse:272", hl.dsp.window.drag(), { mouse = true, description = "Move window" })
|
||||
hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), { mouse = true, description = "Move window" })
|
||||
bind("SUPER + mouse:272", hl.dsp.window.drag(), "Move window", { mouse = true })
|
||||
bind("SUPER + mouse:273", hl.dsp.window.resize(), "Resize window", { mouse = true })
|
||||
|
||||
-- Toggle current window to be a group or stack in other window manager lingo
|
||||
hl.bind("SUPER + G", hl.dsp.group.toggle())
|
||||
bind("SUPER + G", hl.dsp.group.toggle(), "Toggle window to a group")
|
||||
|
||||
-- Move to the next tab group window
|
||||
hl.bind("SUPER + bracketleft", hl.dsp.group.prev())
|
||||
hl.bind("SUPER + bracketright", hl.dsp.group.next())
|
||||
bind("SUPER + bracketleft", hl.dsp.group.prev(), "Move to previous window in the group")
|
||||
bind("SUPER + bracketright", hl.dsp.group.next(), "Move to next window in the group")
|
||||
|
||||
-- Move current window in the tab group
|
||||
hl.bind("SUPER + SHIFT + bracketleft", hl.dsp.group.move_window({ direction = "left" }))
|
||||
hl.bind("SUPER + SHIFT + bracketright", hl.dsp.group.move_window({ direction = "right" }))
|
||||
bind("SUPER + SHIFT + bracketleft", hl.dsp.group.move_window({ direction = "left" }), "Move window left in group")
|
||||
bind("SUPER + SHIFT + bracketright", hl.dsp.group.move_window({ direction = "right" }), "Move window right in group")
|
||||
|
||||
-- Move current window out of the tab group
|
||||
hl.bind("SUPER + CTRL + bracketleft", hl.dsp.window.move({ out_of_group = "left" }))
|
||||
hl.bind("SUPER + CTRL + bracketright", hl.dsp.window.move({ out_of_group = "right" }))
|
||||
bind("SUPER + CTRL + bracketleft", hl.dsp.window.move({ out_of_group = "left" }), "Move window out of group left")
|
||||
bind("SUPER + CTRL + bracketright", hl.dsp.window.move({ out_of_group = "right" }), "Move window out of group right")
|
||||
|
||||
-- Move current window into an existing tab group or create a new one
|
||||
hl.bind("SUPER + SHIFT + CTRL + bracketleft", hl.dsp.window.move({ into_or_create_group = "left" }))
|
||||
hl.bind("SUPER + SHIFT + CTRL + bracketright", hl.dsp.window.move({ into_or_create_group = "right" }))
|
||||
bind(
|
||||
"SUPER + SHIFT + CTRL + bracketleft",
|
||||
hl.dsp.window.move({ into_or_create_group = "left" }),
|
||||
"Move window into group left"
|
||||
)
|
||||
bind(
|
||||
"SUPER + SHIFT + CTRL + bracketright",
|
||||
hl.dsp.window.move({ into_or_create_group = "right" }),
|
||||
"Move window into group right"
|
||||
)
|
||||
|
||||
-- ==========================
|
||||
-- Utilities
|
||||
-- ==========================
|
||||
-- Menus
|
||||
hl.bind("SUPER + SPACE", hl.dsp.exec_cmd("station-launch-walker"), { description = "Launch apps" })
|
||||
hl.bind("SUPER + CTRL + E", hl.dsp.exec_cmd("station-launch-walker -m symbols"), { description = "Emoji picker" })
|
||||
hl.bind("SUPER + CTRL + C", hl.dsp.exec_cmd("station-menu capture"), { description = "Capture menu" })
|
||||
hl.bind("SUPER + CTRL + O", hl.dsp.exec_cmd("station-menu toggle"), { description = "Toggle menu" })
|
||||
hl.bind("SUPER + ALT + SPACE", hl.dsp.exec_cmd("station-menu"), { description = "Station menu" })
|
||||
hl.bind("SUPER + ESCAPE", hl.dsp.exec_cmd("station-menu system"), { description = "System menu" })
|
||||
hl.bind("XF86PowerOff", hl.dsp.exec_cmd("station-menu system"), { locked = true, description = "Power menu" })
|
||||
hl.bind("SUPER + K", hl.dsp.exec_cmd("station-menu-keybindings"), { description = "Show key bindings" })
|
||||
hl.bind("XF86Calculator", hl.dsp.exec_cmd("gnome-calculator"), { description = "Calculator" })
|
||||
bind("SUPER + SPACE", exec("station-launch-walker"), "Launch apps")
|
||||
bind("SUPER + CTRL + E", exec("station-launch-walker -m symbols"), "Emoji picker")
|
||||
bind("SUPER + CTRL + C", exec("station-menu capture"), "Capture menu")
|
||||
bind("SUPER + CTRL + O", exec("station-menu toggle"), "Toggle menu")
|
||||
bind("SUPER + ALT + SPACE", exec("station-menu"), "Station menu")
|
||||
bind("SUPER + ESCAPE", exec("station-menu system"), "System menu")
|
||||
bindl("XF86PowerOff", exec("station-menu system"), "Power menu")
|
||||
bind("SUPER + K", exec("station-menu-keybindings"), "Show key bindings")
|
||||
bind("XF86Calculator", exec("gnome-calculator"), "Calculator")
|
||||
|
||||
-- Aesthetics
|
||||
hl.bind("SUPER + SHIFT + SPACE", hl.dsp.exec_cmd("station-toggle-waybar"), { description = "Toggle top bar" })
|
||||
hl.bind("SUPER + CTRL + SPACE", hl.dsp.exec_cmd("station-menu background"), { description = "Theme background menu" })
|
||||
-- hl.bind("SUPER SHIFT CTRL + SPACE", hl.dsp.exec_cmd("station-menu theme"), { description = "Theme menu" })
|
||||
hl.bind(
|
||||
bind("SUPER + SHIFT + SPACE", exec("station-toggle-waybar"), "Toggle top bar")
|
||||
bind("SUPER + CTRL + SPACE", exec("station-menu background"), "Theme background menu")
|
||||
-- bind("SUPER SHIFT CTRL + SPACE", exec("station-menu theme"), "Theme menu")
|
||||
bind(
|
||||
"SUPER + BACKSPACE",
|
||||
hl.dsp.exec_cmd("hyprctl dispatch setprop \"address:$(hyprctl activewindow -j | jq -r '.address')\" opaque toggle"),
|
||||
{ description = "Toggle window transparency" }
|
||||
exec("hyprctl dispatch setprop \"address:$(hyprctl activewindow -j | jq -r '.address')\" opaque toggle"),
|
||||
"Toggle window transparency"
|
||||
)
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + BACKSPACE",
|
||||
hl.dsp.exec_cmd("station-hyprland-window-gaps-toggle"),
|
||||
{ description = "Toggle window gaps" }
|
||||
)
|
||||
hl.bind(
|
||||
bind("SUPER + SHIFT + BACKSPACE", exec("station-hyprland-window-gaps-toggle"), "Toggle window gaps")
|
||||
bind(
|
||||
"SUPER + CTRL + Backspace",
|
||||
hl.dsp.exec_cmd("station-hyprland-window-single-square-aspect-toggle"),
|
||||
{ description = "Toggle single-window square aspect" }
|
||||
exec("station-hyprland-window-single-square-aspect-toggle"),
|
||||
"Toggle single-window square aspect"
|
||||
)
|
||||
|
||||
-- Notifications
|
||||
hl.bind("SUPER + COMMA", hl.dsp.exec_cmd("makoctl dismiss"), { description = "Dismiss last notification" })
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + COMMA",
|
||||
hl.dsp.exec_cmd("makoctl dismiss --all"),
|
||||
{ description = "Dismiss all notifications" }
|
||||
)
|
||||
hl.bind(
|
||||
"SUPER + CTRL + COMMA",
|
||||
hl.dsp.exec_cmd("station-toggle-notification-silencing"),
|
||||
{ description = "Toggle silencing notifications" }
|
||||
)
|
||||
hl.bind("SUPER + ALT + COMMA", hl.dsp.exec_cmd("makoctl invoke"), { description = "Invoke last notification" })
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + ALT + COMMA",
|
||||
hl.dsp.exec_cmd("makoctl restore"),
|
||||
{ description = "Restore last notification" }
|
||||
)
|
||||
bind("SUPER + COMMA", exec("makoctl dismiss"), "Dismiss last notification")
|
||||
bind("SUPER + SHIFT + COMMA", exec("makoctl dismiss --all"), "Dismiss all notifications")
|
||||
bind("SUPER + CTRL + COMMA", exec("station-toggle-notification-silencing"), "Toggle silencing notifications")
|
||||
bind("SUPER + ALT + COMMA", exec("makoctl invoke"), "Invoke last notification")
|
||||
bind("SUPER + SHIFT + ALT + COMMA", exec("makoctl restore"), "Restore last notification")
|
||||
|
||||
-- Toggles
|
||||
hl.bind("SUPER + CTRL + I", hl.dsp.exec_cmd("station-toggle-idle"), { description = "Toggle locking on idle" })
|
||||
hl.bind("SUPER + CTRL + N", hl.dsp.exec_cmd("station-toggle-nightlight"), { description = "Toggle nightlight" })
|
||||
bind("SUPER + CTRL + I", exec("station-toggle-idle"), "Toggle locking on idle")
|
||||
bind("SUPER + CTRL + N", exec("station-toggle-nightlight"), "Toggle nightlight")
|
||||
|
||||
-- Captures
|
||||
hl.bind("PRINT", hl.dsp.exec_cmd("station-cmd-screenshot"), { description = "Screenshot" })
|
||||
hl.bind("ALT + PRINT", hl.dsp.exec_cmd("station-menu screenrecord"), { description = "Screenrecording" })
|
||||
hl.bind("SUPER + PRINT", hl.dsp.exec_cmd("pkill hyprpicker || hyprpicker -a"), { description = "Color picker" })
|
||||
bind("PRINT", exec("station-cmd-screenshot"), "Screenshot")
|
||||
bind("ALT + PRINT", exec("station-menu screenrecord"), "Screenrecording")
|
||||
bind("SUPER + PRINT", exec("pkill hyprpicker || hyprpicker -a"), "Color picker")
|
||||
|
||||
-- File sharing
|
||||
-- hl.bind("SUPER CTRL + S", hl.dsp.exec_cmd("station-menu share"), { description = "Share" })
|
||||
-- bind("SUPER CTRL + S", exec("station-menu share"), "Share")
|
||||
|
||||
-- Waybar-less information
|
||||
hl.bind(
|
||||
"SUPER + CTRL + ALT + T",
|
||||
hl.dsp.exec_cmd('notify-send " $(date +"%A %H:%M — %d %B W%V %Y")"'),
|
||||
{ description = "Show time" }
|
||||
)
|
||||
hl.bind(
|
||||
bind("SUPER + CTRL + ALT + T", exec('notify-send " $(date +"%A %H:%M — %d %B W%V %Y")"'), "Show time")
|
||||
bind(
|
||||
"SUPER + CTRL + ALT + B",
|
||||
hl.dsp.exec_cmd('notify-send " Battery is at $(station-battery-remaining)%"'),
|
||||
{ description = "Show battery remaining" }
|
||||
exec('notify-send " Battery is at $(station-battery-remaining)%"'),
|
||||
"Show battery remaining"
|
||||
)
|
||||
hl.bind(
|
||||
bind(
|
||||
"SUPER + CTRL + ALT + W",
|
||||
hl.dsp.exec_cmd('notify-send "$(hyprctl activewindow -j | jq -r \'"Window: (.title)\nClass: (.class)"\')"'),
|
||||
{ description = "Show active window name and class" }
|
||||
exec('notify-send "$(hyprctl activewindow -j | jq -r \'"Window: (.title)\nClass: (.class)"\')"'),
|
||||
"Show active window name and class"
|
||||
)
|
||||
|
||||
-- Control panels
|
||||
hl.bind("SUPER + CTRL + A", hl.dsp.exec_cmd("station-launch-audio"), { description = "Audio controls" })
|
||||
hl.bind("SUPER + CTRL + B", hl.dsp.exec_cmd("station-launch-bluetooth"), { description = "Bluetooth controls" })
|
||||
hl.bind("SUPER + CTRL + W", hl.dsp.exec_cmd("station-launch-wifi"), { description = "Wifi controls" })
|
||||
hl.bind("SUPER + CTRL + T", hl.dsp.exec_cmd("station-launch-tui btop"), { description = "Activity" })
|
||||
bind("SUPER + CTRL + A", exec("station-launch-audio"), "Audio controls")
|
||||
bind("SUPER + CTRL + B", exec("station-launch-bluetooth"), "Bluetooth controls")
|
||||
bind("SUPER + CTRL + W", exec("station-launch-wifi"), "Wifi controls")
|
||||
bind("SUPER + CTRL + T", exec("station-launch-tui btop"), "Activity")
|
||||
|
||||
-- Dictation
|
||||
-- hl.bind("SUPER CTRL + X", hl.dsp.exec_cmd("voxtype record toggle"), { description = "Toggle dictation" })
|
||||
-- bind("SUPER CTRL + X", exec("voxtype record toggle"), "Toggle dictation")
|
||||
|
||||
-- Zoom
|
||||
hl.bind(
|
||||
bind(
|
||||
"SUPER + CTRL + Z",
|
||||
hl.dsp.exec_cmd("hyprctl keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float + 1')"),
|
||||
{ description = "Zoom in" }
|
||||
)
|
||||
hl.bind(
|
||||
"SUPER + CTRL + ALT + Z",
|
||||
hl.dsp.exec_cmd("hyprctl keyword cursor:zoom_factor 1"),
|
||||
{ description = "Reset zoom" }
|
||||
exec("hyprctl keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float + 1')"),
|
||||
"Zoom in"
|
||||
)
|
||||
bind("SUPER + CTRL + ALT + Z", exec("hyprctl keyword cursor:zoom_factor 1"), "Reset zoom")
|
||||
|
||||
-- Lock system
|
||||
-- hl.bind("SUPER CTRL + L", hl.dsp.exec_cmd("station-lock-screen"), { description = "Lock system" })
|
||||
-- bind("SUPER CTRL + L", exec("station-lock-screen"), "Lock system")
|
||||
|
||||
-- ==========================
|
||||
-- Applications
|
||||
-- ==========================
|
||||
hl.bind("SUPER + RETURN", hl.dsp.exec_cmd("uwsm-app -- xdg-terminal-exec"), { description = "Terminal" })
|
||||
hl.bind(
|
||||
"SUPER + ALT + RETURN",
|
||||
hl.dsp.exec_cmd('uwsm-app -- xdg-terminal-exec --dir="$(station-cmd-terminal-cwd)" tmux new'),
|
||||
{ description = "Tmux" }
|
||||
)
|
||||
hl.bind("SUPER + SHIFT + F", hl.dsp.exec_cmd("uwsm-app -- nautilus --new-window"), { description = "File manager" })
|
||||
hl.bind(
|
||||
bind("SUPER + RETURN", exec("uwsm-app -- xdg-terminal-exec"), "Terminal")
|
||||
bind("SUPER + ALT + RETURN", exec('uwsm-app -- xdg-terminal-exec --dir="$(station-cmd-terminal-cwd)" tmux new'), "Tmux")
|
||||
bind("SUPER + SHIFT + F", exec("uwsm-app -- nautilus --new-window"), "File manager")
|
||||
bind(
|
||||
"SUPER + ALT + SHIFT + F",
|
||||
hl.dsp.exec_cmd('uwsm-app -- nautilus --new-window "$(station-cmd-terminal-cwd)"'),
|
||||
{ description = "File manager (cwd)" }
|
||||
exec('uwsm-app -- nautilus --new-window "$(station-cmd-terminal-cwd)"'),
|
||||
"File manager (cwd)"
|
||||
)
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + B",
|
||||
hl.dsp.exec_cmd("/home/chris/.local/bin/station-launch-browser"),
|
||||
{ description = "Browser" }
|
||||
)
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + ALT + B",
|
||||
hl.dsp.exec_cmd("station-launch-browser --private"),
|
||||
{ description = "Browser (private)" }
|
||||
)
|
||||
hl.bind("SUPER + SHIFT + M", hl.dsp.exec_cmd("station-launch-or-focus spotify"), { description = "Music" })
|
||||
hl.bind("SUPER + SHIFT + N", hl.dsp.exec_cmd("station-launch-editor"), { description = "Editor" })
|
||||
-- hl.bind("SUPER SHIFT + D", hl.dsp.exec_cmd("station-launch-tui lazydocker"), { description = "Docker" })
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + G",
|
||||
hl.dsp.exec_cmd('station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"'),
|
||||
{ description = "Signal" }
|
||||
)
|
||||
hl.bind(
|
||||
bind("SUPER + SHIFT + B", exec("/home/chris/.local/bin/station-launch-browser"), "Browser")
|
||||
bind("SUPER + SHIFT + ALT + B", exec("station-launch-browser --private"), "Browser (private)")
|
||||
bind("SUPER + SHIFT + M", exec("station-launch-or-focus spotify"), "Music")
|
||||
bind("SUPER + SHIFT + N", exec("station-launch-editor"), "Editor")
|
||||
-- bind("SUPER SHIFT + D", exec("station-launch-tui lazydocker"), "Docker")
|
||||
bind("SUPER + SHIFT + G", exec('station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"'), "Signal")
|
||||
bind(
|
||||
"SUPER + SHIFT + O",
|
||||
hl.dsp.exec_cmd('station-launch-or-focus ^obsidian$ "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime"'),
|
||||
{ description = "Obsidian" }
|
||||
exec('station-launch-or-focus ^obsidian$ "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime"'),
|
||||
"Obsidian"
|
||||
)
|
||||
-- hl.bind("SUPER SHIFT + W", hl.dsp.exec_cmd("uwsm-app -- typora --enable-wayland-ime"), { description = "Typora" })
|
||||
hl.bind("SUPER + SHIFT + SLASH", hl.dsp.exec_cmd("Enpass showassistant"), { description = "Passwords" })
|
||||
hl.bind("SUPER + SHIFT + E", hl.dsp.exec_cmd("station-launch-or-focus mailspring"), { description = "Email" })
|
||||
-- bind("SUPER SHIFT + W", exec("uwsm-app -- typora --enable-wayland-ime"), "Typora")
|
||||
bind("SUPER + SHIFT + SLASH", exec("Enpass showassistant"), "Passwords")
|
||||
bind("SUPER + SHIFT + E", exec("station-launch-or-focus mailspring"), "Email")
|
||||
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + A",
|
||||
hl.dsp.exec_cmd('station-launch-webapp "https://gemini.google.com/app"'),
|
||||
{ description = "ChatGPT" }
|
||||
)
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + C",
|
||||
hl.dsp.exec_cmd('station-launch-webapp "https://tower.scarif.space/apps/calendar"'),
|
||||
{ description = "Calendar" }
|
||||
)
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + Y",
|
||||
hl.dsp.exec_cmd('station-launch-or-focus-webapp "YouTube" "https://youtube.com/"'),
|
||||
{ description = "YouTube" }
|
||||
)
|
||||
hl.bind(
|
||||
"SUPER + SHIFT + ALT + G",
|
||||
hl.dsp.exec_cmd('station-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/"'),
|
||||
{ description = "WhatsApp" }
|
||||
)
|
||||
hl.bind(
|
||||
bind("SUPER + SHIFT + A", exec('station-launch-webapp "https://gemini.google.com/app"'), "ChatGPT")
|
||||
bind("SUPER + SHIFT + C", exec('station-launch-webapp "https://tower.scarif.space/apps/calendar"'), "Calendar")
|
||||
bind("SUPER + SHIFT + Y", exec('station-launch-or-focus-webapp "YouTube" "https://youtube.com/"'), "YouTube")
|
||||
bind("SUPER + SHIFT + ALT + G", exec('station-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/"'), "WhatsApp")
|
||||
bind(
|
||||
"SUPER + SHIFT + CTRL + G",
|
||||
hl.dsp.exec_cmd('station-launch-or-focus-webapp "Google Maps" "https://maps.google.com"'),
|
||||
{ description = "Google Maps" }
|
||||
exec('station-launch-or-focus-webapp "Google Maps" "https://maps.google.com"'),
|
||||
"Google Maps"
|
||||
)
|
||||
-- hl.bind("SUPER SHIFT + P", hl.dsp.exec_cmd("station-launch-or-focus-webapp "Google Photos" "https://photos.google.com/""), { description = "Google Photos" })
|
||||
-- hl.bind("SUPER SHIFT + X", hl.dsp.exec_cmd("station-launch-webapp "https://x.com/""), { description = "X" })
|
||||
-- hl.bind("SUPER SHIFT ALT + X", hl.dsp.exec_cmd("station-launch-webapp "https://x.com/compose/post""), { description = "X Post" })
|
||||
-- bind("SUPER SHIFT + P", exec("station-launch-or-focus-webapp "Google Photos" "https://photos.google.com/""), "Google Photos")
|
||||
-- bind("SUPER SHIFT + X", exec("station-launch-webapp "https://x.com/""), "X")
|
||||
-- bind("SUPER SHIFT ALT + X", exec("station-launch-webapp "https://x.com/compose/post""), "X Post")
|
||||
|
||||
-- Add extra bindings
|
||||
hl.bind("SUPER + SHIFT + R", hl.dsp.exec_cmd("ghostty -e ssh scarif"), { description = "SSH to scarif" })
|
||||
bind("SUPER + SHIFT + R", exec("ghostty -e ssh scarif"), "SSH to scarif")
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
require("autostart")
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("uwsm-app -- hypridle")
|
||||
hl.exec_cmd("uwsm-app -- mako")
|
||||
hl.exec_cmd("uwsm-app -- hyprsunset")
|
||||
hl.exec_cmd("uwsm-app -- fcitx5 --disable notificationitem")
|
||||
hl.exec_cmd("Enpass -minimize")
|
||||
hl.exec_cmd("nextcloud")
|
||||
hl.exec_cmd("station-bg-random")
|
||||
hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1")
|
||||
hl.exec_cmd("dbus-update-activation-environment --systemd --all")
|
||||
end)
|
||||
|
||||
require("bindings")
|
||||
require("envs")
|
||||
require("looknfeel")
|
||||
|
||||
@@ -26,7 +26,7 @@ hl.config({
|
||||
allow_tearing = false,
|
||||
|
||||
-- layout = scrolling, # Change to niri-like side-scrolling layout
|
||||
layout = dwindle,
|
||||
layout = "dwindle",
|
||||
},
|
||||
|
||||
-- https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
|
||||
Reference in New Issue
Block a user