Finally figuring out dispatch
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
hl.on('hyprland.start', function()
|
hl.on('hyprland.start', function()
|
||||||
notify('Hyprland started', 5000)
|
|
||||||
exec 'uwsm-app -- hypridle'
|
exec 'uwsm-app -- hypridle'
|
||||||
exec 'uwsm-app -- mako'
|
exec 'uwsm-app -- mako'
|
||||||
exec 'uwsm-app -- fcitx5 --disable notificationitem'
|
exec 'uwsm-app -- fcitx5 --disable notificationitem'
|
||||||
@@ -11,7 +10,7 @@ hl.on('hyprland.start', function()
|
|||||||
|
|
||||||
for j = #monitors, 1, -1 do
|
for j = #monitors, 1, -1 do
|
||||||
local monitor = monitors[j]
|
local monitor = monitors[j]
|
||||||
hl.dsp.focus { workspace = 'name:Home_' .. j }
|
hl.dispatch(hl.dsp.focus { workspace = 'name:Home_' .. j })
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
+432
-111
@@ -3,43 +3,128 @@ require 'helpers'
|
|||||||
-- Media
|
-- Media
|
||||||
-- ==========================
|
-- ==========================
|
||||||
-- Only display the OSD on the currently focused monitor
|
-- Only display the OSD on the currently focused monitor
|
||||||
local osdclient = 'swayosd-client --monitor "$(hyprctl monitors -j | jq -r \'.[] | select(.focused == true).name\')"'
|
local osdclient =
|
||||||
|
'swayosd-client --monitor "$(hyprctl monitors -j | jq -r \'.[] | select(.focused == true).name\')"'
|
||||||
|
|
||||||
-- Laptop multimedia keys for volume and LCD brightness (with OSD)
|
-- Laptop multimedia keys for volume and LCD brightness (with OSD)
|
||||||
bindlr('XF86AudioRaiseVolume', exec(osdclient .. ' --output-volume raise'), 'Volume up')
|
bindlr(
|
||||||
bindlr('XF86AudioRaiseVolume', exec(osdclient .. ' --output-volume raise'), 'Volume up')
|
'XF86AudioRaiseVolume',
|
||||||
bindlr('XF86AudioLowerVolume', exec(osdclient .. ' --output-volume lower'), 'Volume down')
|
dispatch_exec(osdclient .. ' --output-volume raise'),
|
||||||
bindlr('XF86AudioMute', exec(osdclient .. ' --output-volume mute-toggle'), 'Mute')
|
'Volume up'
|
||||||
bindlr('XF86AudioMicMute', exec(osdclient .. ' --input-volume mute-toggle'), 'Mute microphone')
|
)
|
||||||
bindlr('XF86MonBrightnessUp', exec 'station-brightness-display +5%', 'Brightness up')
|
bindlr(
|
||||||
bindlr('XF86MonBrightnessDown', exec 'station-brightness-display 5%-', 'Brightness down')
|
'XF86AudioRaiseVolume',
|
||||||
bindlr('XF86KbdBrightnessUp', exec 'station-brightness-keyboard up', 'Keyboard brightness up')
|
dispatch_exec(osdclient .. ' --output-volume raise'),
|
||||||
bindlr('XF86KbdBrightnessDown', exec 'station-brightness-keyboard down', 'Keyboard brightness down')
|
'Volume up'
|
||||||
bindl('XF86KbdLightOnOff', exec 'station-brightness-keyboard cycle', 'Keyboard backlight cycle')
|
)
|
||||||
|
bindlr(
|
||||||
|
'XF86AudioLowerVolume',
|
||||||
|
dispatch_exec(osdclient .. ' --output-volume lower'),
|
||||||
|
'Volume down'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'XF86AudioMute',
|
||||||
|
dispatch_exec(osdclient .. ' --output-volume mute-toggle'),
|
||||||
|
'Mute'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'XF86AudioMicMute',
|
||||||
|
dispatch_exec(osdclient .. ' --input-volume mute-toggle'),
|
||||||
|
'Mute microphone'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'XF86MonBrightnessUp',
|
||||||
|
dispatch_exec 'station-brightness-display +5%',
|
||||||
|
'Brightness up'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'XF86MonBrightnessDown',
|
||||||
|
dispatch_exec 'station-brightness-display 5%-',
|
||||||
|
'Brightness down'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'XF86KbdBrightnessUp',
|
||||||
|
dispatch_exec 'station-brightness-keyboard up',
|
||||||
|
'Keyboard brightness up'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'XF86KbdBrightnessDown',
|
||||||
|
dispatch_exec 'station-brightness-keyboard down',
|
||||||
|
'Keyboard brightness down'
|
||||||
|
)
|
||||||
|
bindl(
|
||||||
|
'XF86KbdLightOnOff',
|
||||||
|
dispatch_exec 'station-brightness-keyboard cycle',
|
||||||
|
'Keyboard backlight cycle'
|
||||||
|
)
|
||||||
|
|
||||||
-- Precise 1% multimedia adjustments with Alt modifier
|
-- Precise 1% multimedia adjustments with Alt modifier
|
||||||
bindlr('ALT + XF86AudioRaiseVolume', exec '$osdclient --output-volume +1', 'Volume up precise')
|
bindlr(
|
||||||
bindlr('ALT + XF86AudioLowerVolume', exec '$osdclient --output-volume -1', 'Volume down precise')
|
'ALT + XF86AudioRaiseVolume',
|
||||||
bindlr('ALT + XF86MonBrightnessUp', exec 'station-brightness-display +1%', 'Brightness up precise')
|
dispatch_exec '$osdclient --output-volume +1',
|
||||||
bindlr('ALT + XF86MonBrightnessDown', exec 'station-brightness-display 1%-', 'Brightness down precise')
|
'Volume up precise'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'ALT + XF86AudioLowerVolume',
|
||||||
|
dispatch_exec '$osdclient --output-volume -1',
|
||||||
|
'Volume down precise'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'ALT + XF86MonBrightnessUp',
|
||||||
|
dispatch_exec 'station-brightness-display +1%',
|
||||||
|
'Brightness up precise'
|
||||||
|
)
|
||||||
|
bindlr(
|
||||||
|
'ALT + XF86MonBrightnessDown',
|
||||||
|
dispatch_exec 'station-brightness-display 1%-',
|
||||||
|
'Brightness down precise'
|
||||||
|
)
|
||||||
|
|
||||||
-- Requires playerctl
|
-- Requires playerctl
|
||||||
bindl('XF86AudioNext', exec(osdclient .. ' --playerctl next'), 'Next track')
|
bindl(
|
||||||
bindl('XF86AudioPause', exec(osdclient .. ' --playerctl play-pause'), 'Pause')
|
'XF86AudioNext',
|
||||||
bindl('XF86AudioPlay', exec(osdclient .. ' --playerctl play-pause'), 'Play')
|
dispatch_exec(osdclient .. ' --playerctl next'),
|
||||||
bindl('XF86AudioPrev', exec(osdclient .. ' --playerctl previous'), 'Previous track')
|
'Next track'
|
||||||
|
)
|
||||||
|
bindl(
|
||||||
|
'XF86AudioPause',
|
||||||
|
dispatch_exec(osdclient .. ' --playerctl play-pause'),
|
||||||
|
'Pause'
|
||||||
|
)
|
||||||
|
bindl(
|
||||||
|
'XF86AudioPlay',
|
||||||
|
dispatch_exec(osdclient .. ' --playerctl play-pause'),
|
||||||
|
'Play'
|
||||||
|
)
|
||||||
|
bindl(
|
||||||
|
'XF86AudioPrev',
|
||||||
|
dispatch_exec(osdclient .. ' --playerctl previous'),
|
||||||
|
'Previous track'
|
||||||
|
)
|
||||||
|
|
||||||
-- Switch audio output with Super + Mute
|
-- Switch audio output with Super + Mute
|
||||||
bindl('SUPER + XF86AudioMute', exec 'station-cmd-audio-switch', 'Switch audio output')
|
bindl(
|
||||||
|
'SUPER + XF86AudioMute',
|
||||||
|
dispatch_exec 'station-cmd-audio-switch',
|
||||||
|
'Switch audio output'
|
||||||
|
)
|
||||||
|
|
||||||
-- ==========================
|
-- ==========================
|
||||||
-- Copy & Paste
|
-- Copy & Paste
|
||||||
-- ==========================
|
-- ==========================
|
||||||
bind('SUPER + C', shortcut { mods = 'CTRL', key = 'Insert' }, 'Universal copy')
|
bind('SUPER + C', shortcut { mods = 'CTRL', key = 'Insert' }, 'Universal copy')
|
||||||
bind('SUPER + V', shortcut { mods = 'SHIFT', key = 'Insert' }, 'Universal paste')
|
bind(
|
||||||
|
'SUPER + V',
|
||||||
|
shortcut { mods = 'SHIFT', key = 'Insert' },
|
||||||
|
'Universal paste'
|
||||||
|
)
|
||||||
bind('SUPER + X', shortcut { mods = 'CRTL', key = 'X' }, 'Universal cut')
|
bind('SUPER + X', shortcut { mods = 'CRTL', key = 'X' }, 'Universal cut')
|
||||||
bind('SUPER + A', shortcut { mods = 'CTRL', key = 'A' }, 'Universal cut')
|
bind('SUPER + A', shortcut { mods = 'CTRL', key = 'A' }, 'Universal cut')
|
||||||
bind('SUPER + CTRL + V', exec 'station-launch-walker -m clipboard', 'Clipboard manager')
|
bind(
|
||||||
|
'SUPER + CTRL + V',
|
||||||
|
dispatch_exec 'station-launch-walker -m clipboard',
|
||||||
|
'Clipboard manager'
|
||||||
|
)
|
||||||
|
|
||||||
-- Close windows
|
-- Close windows
|
||||||
bind('SUPER + Q', hl.dsp.window.close(), 'Close window')
|
bind('SUPER + Q', hl.dsp.window.close(), 'Close window')
|
||||||
@@ -89,7 +174,10 @@ bind('SUPER + CTRL + L', function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hl.workspace_rule { workspace = 'name:' .. tostring(workspace.name), layout = next_layout }
|
hl.workspace_rule {
|
||||||
|
workspace = 'name:' .. tostring(workspace.name),
|
||||||
|
layout = next_layout,
|
||||||
|
}
|
||||||
|
|
||||||
notify(' Workspace layout set to ' .. next_layout)
|
notify(' Workspace layout set to ' .. next_layout)
|
||||||
end, 'Toggle workspace layout')
|
end, 'Toggle workspace layout')
|
||||||
@@ -123,94 +211,195 @@ bind('SUPER + J', function()
|
|||||||
hl.dispatch(hl.dsp.focus { direction = 'down' })
|
hl.dispatch(hl.dsp.focus { direction = 'down' })
|
||||||
end
|
end
|
||||||
end, 'Move window focus down')
|
end, 'Move window focus down')
|
||||||
bind('SUPER + SHIFT + H', hl.dsp.window.move { direction = 'left' }, 'Move window left')
|
bind(
|
||||||
bind('SUPER + SHIFT + L', hl.dsp.window.move { direction = 'right' }, 'Move window right')
|
'SUPER + SHIFT + H',
|
||||||
bind('SUPER + SHIFT + K', hl.dsp.window.move { direction = 'up' }, 'Move window up')
|
hl.dsp.window.move { direction = 'left' },
|
||||||
bind('SUPER + SHIFT + J', hl.dsp.window.move { direction = 'down' }, 'Move window down')
|
'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
|
-- Control scratchpad
|
||||||
bind('SUPER + S', hl.dsp.workspace.toggle_special 'scratchpad', 'Toggle scratchpad')
|
bind(
|
||||||
bind('SUPER + ALT + S', hl.dsp.window.move { workspace = 'special:scratchpad' }, 'Move window to scratchpad')
|
'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'
|
||||||
|
)
|
||||||
bind('SUPER + N', function()
|
bind('SUPER + N', function()
|
||||||
hl.dispatch(hl.dsp.workspace.toggle_special 'prod')
|
hl.dispatch(hl.dsp.workspace.toggle_special 'prod')
|
||||||
local windows = hl.get_windows { workspace = 'special:prod' }
|
local windows = hl.get_windows { workspace = 'special:prod' }
|
||||||
if #windows == 0 then
|
if #windows == 0 then
|
||||||
hl.exec_cmd 'station-launch-or-focus ^superProductivity$ "uwsm-app -- super-productivity"'
|
hl.dispatch_exec_cmd 'station-launch-or-focus ^superProductivity$ "uwsm-app -- super-productivity"'
|
||||||
hl.exec_cmd 'uwsm-app -- xdg-terminal-exec --app-id=org.station.notes nvim ~/Notes'
|
hl.dispatch_exec_cmd 'uwsm-app -- xdg-terminal-exec --app-id=org.station.notes nvim ~/Notes'
|
||||||
end
|
end
|
||||||
end, 'Toggle productivity workspace')
|
end, 'Toggle productivity workspace')
|
||||||
bind('SUPER + M', function()
|
bind('SUPER + M', function()
|
||||||
hl.dispatch(hl.dsp.workspace.toggle_special 'music')
|
hl.dispatch(hl.dsp.workspace.toggle_special 'music')
|
||||||
local windows = hl.get_windows { workspace = 'special:music' }
|
local windows = hl.get_windows { workspace = 'special:music' }
|
||||||
if #windows == 0 then
|
if #windows == 0 then
|
||||||
hl.exec_cmd 'station-launch-or-focus spotify'
|
hl.dispatch_exec_cmd 'station-launch-or-focus spotify'
|
||||||
hl.exec_cmd 'station-launch-or-focus psysonic'
|
hl.dispatch_exec_cmd 'station-launch-or-focus psysonic'
|
||||||
end
|
end
|
||||||
end, 'Toggle music workspace')
|
end, 'Toggle music workspace')
|
||||||
bind('SUPER + D', function()
|
bind('SUPER + D', function()
|
||||||
hl.dispatch(hl.dsp.workspace.toggle_special 'comms')
|
hl.dispatch(hl.dsp.workspace.toggle_special 'comms')
|
||||||
local windows = hl.get_windows { workspace = 'special:comms' }
|
local windows = hl.get_windows { workspace = 'special:comms' }
|
||||||
if #windows == 0 then
|
if #windows == 0 then
|
||||||
hl.exec_cmd 'station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"'
|
hl.dispatch_exec_cmd 'station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"'
|
||||||
hl.exec_cmd 'station-launch-or-focus ^chrome-web.whatsapp.com__-Default$ "station-launch-webapp https://web.whatsapp.com"'
|
hl.dispatch_exec_cmd 'station-launch-or-focus ^chrome-web.whatsapp.com__-Default$ "station-launch-webapp https://web.whatsapp.com"'
|
||||||
hl.exec_cmd 'station-launch-or-focus ^chrome-discord.com__channels_@me-Default$ "station-launch-webapp https://discord.com/channels/@me"'
|
hl.dispatch_exec_cmd 'station-launch-or-focus ^chrome-discord.com__channels_@me-Default$ "station-launch-webapp https://discord.com/channels/@me"'
|
||||||
end
|
end
|
||||||
end, 'Toggle comms workspace')
|
end, 'Toggle comms workspace')
|
||||||
|
|
||||||
-- Cycle through applications on active workspace
|
-- Cycle through applications on active workspace
|
||||||
bind('SUPER + TAB', hl.dsp.window.cycle_next { tiled = true, next = true }, 'Cycle to next window')
|
bind(
|
||||||
bind('SUPER + SHIFT + TAB', hl.dsp.window.cycle_next { tiled = true, next = false }, 'Cycle to prev window')
|
'SUPER + TAB',
|
||||||
|
hl.dsp.window.cycle_next { tiled = true, next = true },
|
||||||
|
'Cycle to next window'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + TAB',
|
||||||
|
hl.dsp.window.cycle_next { tiled = true, next = false },
|
||||||
|
'Cycle to prev window'
|
||||||
|
)
|
||||||
-- bind("SUPER + TAB", /*bringactivetotop*/, "Reveal active window on top")
|
-- bind("SUPER + TAB", /*bringactivetotop*/, "Reveal active window on top")
|
||||||
-- bind("SUPER SHIFT + TAB", /*bringactivetotop*/, "Reveal active window on top")
|
-- bind("SUPER SHIFT + TAB", /*bringactivetotop*/, "Reveal active window on top")
|
||||||
|
|
||||||
-- Resize active window
|
-- Resize active window
|
||||||
bind('SUPER + code:20', hl.dsp.window.resize { x = -100, y = 0 }, 'Expand window left')
|
bind(
|
||||||
bind('SUPER + code:21', hl.dsp.window.resize { x = 100, y = 0 }, 'Shrink window left')
|
'SUPER + code:20',
|
||||||
bind('SUPER + SHIFT + code:20', hl.dsp.window.resize { x = 0, y = -100 }, 'Shrink window up')
|
hl.dsp.window.resize { x = -100, y = 0 },
|
||||||
bind('SUPER + SHIFT + code:21', hl.dsp.window.resize { x = 0, y = 100 }, 'Expand window down')
|
'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
|
-- Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
bind('SUPER + mouse:272', hl.dsp.window.drag(), 'Move window', { mouse = true })
|
bind('SUPER + mouse:272', hl.dsp.window.drag(), 'Move window', { mouse = true })
|
||||||
bind('SUPER + mouse:273', hl.dsp.window.resize(), 'Resize 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
|
-- Toggle current window to be a group or stack in other window manager lingo
|
||||||
bind('SUPER + G', hl.dsp.group.toggle(), 'Toggle window to a group')
|
bind('SUPER + G', hl.dsp.group.toggle(), 'Toggle window to a group')
|
||||||
|
|
||||||
-- Move to the next tab group window
|
-- Move to the next tab group window
|
||||||
bind('SUPER + bracketleft', hl.dsp.group.prev(), 'Move to previous window in the group')
|
bind(
|
||||||
bind('SUPER + bracketright', hl.dsp.group.next(), 'Move to next window in the group')
|
'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
|
-- Move current window in the tab group
|
||||||
bind('SUPER + SHIFT + bracketleft', hl.dsp.group.move_window { direction = 'left' }, 'Move window left in group')
|
bind(
|
||||||
bind('SUPER + SHIFT + bracketright', hl.dsp.group.move_window { direction = 'right' }, 'Move window right in group')
|
'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
|
-- Move current window out of the tab group
|
||||||
bind('SUPER + CTRL + bracketleft', hl.dsp.window.move { out_of_group = 'left' }, 'Move window out of group left')
|
bind(
|
||||||
bind('SUPER + CTRL + bracketright', hl.dsp.window.move { out_of_group = 'right' }, 'Move window out of group right')
|
'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
|
-- Move current window into an existing tab group or create a new one
|
||||||
bind('SUPER + SHIFT + CTRL + bracketleft', hl.dsp.window.move { into_or_create_group = 'left' }, 'Move window into group left')
|
bind(
|
||||||
bind('SUPER + SHIFT + CTRL + bracketright', hl.dsp.window.move { into_or_create_group = 'right' }, 'Move window into group right')
|
'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
|
-- Utilities
|
||||||
-- ==========================
|
-- ==========================
|
||||||
-- Menus
|
-- Menus
|
||||||
bind('SUPER + SPACE', exec 'station-launch-walker', 'Launch apps')
|
bind('SUPER + SPACE', dispatch_exec 'station-launch-walker', 'Launch apps')
|
||||||
bind('SUPER + CTRL + E', exec 'station-launch-walker -m symbols', 'Emoji picker')
|
bind(
|
||||||
bind('SUPER + CTRL + C', exec 'station-menu capture', 'Capture menu')
|
'SUPER + CTRL + E',
|
||||||
bind('SUPER + CTRL + O', exec 'station-menu toggle', 'Toggle menu')
|
dispatch_exec 'station-launch-walker -m symbols',
|
||||||
bind('SUPER + ALT + SPACE', exec 'station-menu', 'Station menu')
|
'Emoji picker'
|
||||||
bind('SUPER + ESCAPE', exec 'station-menu system', 'System menu')
|
)
|
||||||
bindl('XF86PowerOff', exec 'station-menu system', 'Power menu')
|
bind('SUPER + CTRL + C', dispatch_exec 'station-menu capture', 'Capture menu')
|
||||||
bind('SUPER + K', exec 'station-menu-keybindings', 'Show key bindings')
|
bind('SUPER + CTRL + O', dispatch_exec 'station-menu toggle', 'Toggle menu')
|
||||||
bind('XF86Calculator', exec 'gnome-calculator', 'Calculator')
|
bind('SUPER + ALT + SPACE', dispatch_exec 'station-menu', 'Station menu')
|
||||||
|
bind('SUPER + ESCAPE', dispatch_exec 'station-menu system', 'System menu')
|
||||||
|
bindl('XF86PowerOff', dispatch_exec 'station-menu system', 'Power menu')
|
||||||
|
bind('SUPER + K', dispatch_exec 'station-menu-keybindings', 'Show key bindings')
|
||||||
|
bind('XF86Calculator', dispatch_exec 'gnome-calculator', 'Calculator')
|
||||||
|
|
||||||
-- Aesthetics
|
-- Aesthetics
|
||||||
bind('SUPER + SHIFT + SPACE', exec 'station-toggle-waybar', 'Toggle top bar')
|
bind(
|
||||||
bind('SUPER + CTRL + SPACE', exec 'station-menu background', 'Theme background menu')
|
'SUPER + SHIFT + SPACE',
|
||||||
-- bind("SUPER SHIFT CTRL + SPACE", exec("station-menu theme"), "Theme menu")
|
dispatch_exec 'station-toggle-waybar',
|
||||||
bind('SUPER + BACKSPACE', exec 'hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r \'.address\')" opaque toggle', 'Toggle window transparency')
|
'Toggle top bar'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + CTRL + SPACE',
|
||||||
|
dispatch_exec 'station-menu background',
|
||||||
|
'Theme background menu'
|
||||||
|
)
|
||||||
|
-- bind("SUPER SHIFT CTRL + SPACE", dispatch_exec("station-menu theme"), "Theme menu")
|
||||||
|
bind(
|
||||||
|
'SUPER + BACKSPACE',
|
||||||
|
dispatch_exec 'hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r \'.address\')" opaque toggle',
|
||||||
|
'Toggle window transparency'
|
||||||
|
)
|
||||||
bind('SUPER + SHIFT + BACKSPACE', function()
|
bind('SUPER + SHIFT + BACKSPACE', function()
|
||||||
local gaps = hl.get_config 'general.gaps_out'
|
local gaps = hl.get_config 'general.gaps_out'
|
||||||
if gaps.top == 0 then
|
if gaps.top == 0 then
|
||||||
@@ -233,78 +422,210 @@ bind('SUPER + SHIFT + BACKSPACE', function()
|
|||||||
end, 'Toggle window gaps')
|
end, 'Toggle window gaps')
|
||||||
|
|
||||||
-- Notifications
|
-- Notifications
|
||||||
bind('SUPER + COMMA', exec 'makoctl dismiss', 'Dismiss last notification')
|
bind(
|
||||||
bind('SUPER + SHIFT + COMMA', exec 'makoctl dismiss --all', 'Dismiss all notifications')
|
'SUPER + COMMA',
|
||||||
bind('SUPER + CTRL + COMMA', exec 'station-toggle-notification-silencing', 'Toggle silencing notifications')
|
dispatch_exec 'makoctl dismiss',
|
||||||
bind('SUPER + ALT + COMMA', exec 'makoctl invoke', 'Invoke last notification')
|
'Dismiss last notification'
|
||||||
bind('SUPER + SHIFT + ALT + COMMA', exec 'makoctl restore', 'Restore last notification')
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + COMMA',
|
||||||
|
dispatch_exec 'makoctl dismiss --all',
|
||||||
|
'Dismiss all notifications'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + CTRL + COMMA',
|
||||||
|
dispatch_exec 'station-toggle-notification-silencing',
|
||||||
|
'Toggle silencing notifications'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + ALT + COMMA',
|
||||||
|
dispatch_exec 'makoctl invoke',
|
||||||
|
'Invoke last notification'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + ALT + COMMA',
|
||||||
|
dispatch_exec 'makoctl restore',
|
||||||
|
'Restore last notification'
|
||||||
|
)
|
||||||
|
|
||||||
-- Toggles
|
-- Toggles
|
||||||
bind('SUPER + CTRL + I', exec 'station-toggle-idle', 'Toggle locking on idle')
|
bind(
|
||||||
bind('SUPER + CTRL + N', exec 'station-toggle-nightlight', 'Toggle nightlight')
|
'SUPER + CTRL + I',
|
||||||
|
dispatch_exec 'station-toggle-idle',
|
||||||
|
'Toggle locking on idle'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + CTRL + N',
|
||||||
|
dispatch_exec 'station-toggle-nightlight',
|
||||||
|
'Toggle nightlight'
|
||||||
|
)
|
||||||
|
|
||||||
-- Captures
|
-- Captures
|
||||||
bind('PRINT', exec 'station-cmd-screenshot', 'Screenshot')
|
bind('PRINT', dispatch_exec 'station-cmd-screenshot', 'Screenshot')
|
||||||
bind('ALT + PRINT', exec 'station-menu screenrecord', 'Screenrecording')
|
bind(
|
||||||
bind('SUPER + PRINT', exec 'pkill hyprpicker || hyprpicker -a', 'Color picker')
|
'ALT + PRINT',
|
||||||
|
dispatch_exec 'station-menu screenrecord',
|
||||||
|
'Screenrecording'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + PRINT',
|
||||||
|
dispatch_exec 'pkill hyprpicker || hyprpicker -a',
|
||||||
|
'Color picker'
|
||||||
|
)
|
||||||
|
|
||||||
-- File sharing
|
-- File sharing
|
||||||
-- bind("SUPER CTRL + S", exec("station-menu share"), "Share")
|
-- bind("SUPER CTRL + S", dispatch_exec("station-menu share"), "Share")
|
||||||
|
|
||||||
-- Waybar-less information
|
-- Waybar-less information
|
||||||
bind('SUPER + CTRL + ALT + T', exec 'notify " $(date +"%A %H:%M — %d %B W%V %Y")"', 'Show time')
|
bind(
|
||||||
bind('SUPER + CTRL + ALT + B', exec 'notify-send " Battery is at $(station-battery-remaining)%"', 'Show battery remaining')
|
'SUPER + CTRL + ALT + T',
|
||||||
|
dispatch_exec 'notify " $(date +"%A %H:%M — %d %B W%V %Y")"',
|
||||||
|
'Show time'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + CTRL + ALT + B',
|
||||||
|
dispatch_exec 'notify-send " Battery is at $(station-battery-remaining)%"',
|
||||||
|
'Show battery remaining'
|
||||||
|
)
|
||||||
bind('SUPER + CTRL + ALT + W', function()
|
bind('SUPER + CTRL + ALT + W', function()
|
||||||
local window = hl.get_active_window()
|
local window = hl.get_active_window()
|
||||||
notify('Window: ' .. window.title .. '\nClass: ' .. window.class)
|
notify('Window: ' .. window.title .. '\nClass: ' .. window.class)
|
||||||
end, 'Show active window name and class')
|
end, 'Show active window name and class')
|
||||||
|
|
||||||
-- Control panels
|
-- Control panels
|
||||||
bind('SUPER + CTRL + A', exec 'station-launch-audio', 'Audio controls')
|
bind('SUPER + CTRL + A', dispatch_exec 'station-launch-audio', 'Audio controls')
|
||||||
bind('SUPER + CTRL + B', exec 'station-launch-bluetooth', 'Bluetooth controls')
|
bind(
|
||||||
bind('SUPER + CTRL + W', exec 'station-launch-wifi', 'Wifi controls')
|
'SUPER + CTRL + B',
|
||||||
bind('SUPER + CTRL + T', exec 'station-launch-tui btop', 'Activity')
|
dispatch_exec 'station-launch-bluetooth',
|
||||||
|
'Bluetooth controls'
|
||||||
|
)
|
||||||
|
bind('SUPER + CTRL + W', dispatch_exec 'station-launch-wifi', 'Wifi controls')
|
||||||
|
bind('SUPER + CTRL + T', dispatch_exec 'station-launch-tui btop', 'Activity')
|
||||||
|
|
||||||
-- Dictation
|
-- Dictation
|
||||||
-- bind("SUPER CTRL + X", exec("voxtype record toggle"), "Toggle dictation")
|
-- bind("SUPER CTRL + X", dispatch_exec("voxtype record toggle"), "Toggle dictation")
|
||||||
|
|
||||||
-- Zoom
|
-- Zoom
|
||||||
bind('SUPER + CTRL + Z', exec "hyprctl keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float + 1')", 'Zoom in')
|
bind(
|
||||||
bind('SUPER + CTRL + ALT + Z', exec 'hyprctl keyword cursor:zoom_factor 1', 'Reset zoom')
|
'SUPER + CTRL + Z',
|
||||||
|
dispatch_exec "hyprctl keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float + 1')",
|
||||||
|
'Zoom in'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + CTRL + ALT + Z',
|
||||||
|
dispatch_exec 'hyprctl keyword cursor:zoom_factor 1',
|
||||||
|
'Reset zoom'
|
||||||
|
)
|
||||||
|
|
||||||
-- Lock system
|
-- Lock system
|
||||||
-- bind("SUPER CTRL + L", exec("station-lock-screen"), "Lock system")
|
-- bind("SUPER CTRL + L", dispatch_exec("station-lock-screen"), "Lock system")
|
||||||
|
|
||||||
-- ==========================
|
-- ==========================
|
||||||
-- Applications
|
-- Applications
|
||||||
-- ==========================
|
-- ==========================
|
||||||
bind('SUPER + RETURN', exec 'uwsm-app -- xdg-terminal-exec', 'Terminal')
|
bind(
|
||||||
bind('SUPER + ALT + RETURN', exec 'uwsm-app -- xdg-terminal-exec --dir="$(station-cmd-terminal-cwd)" tmux new', 'Tmux')
|
'SUPER + RETURN',
|
||||||
bind('SUPER + SHIFT + F', exec 'uwsm-app -- nautilus --new-window', 'File manager')
|
dispatch_exec 'uwsm-app -- xdg-terminal-exec',
|
||||||
bind('SUPER + ALT + SHIFT + F', exec 'uwsm-app -- nautilus --new-window "$(station-cmd-terminal-cwd)"', 'File manager (cwd)')
|
'Terminal'
|
||||||
bind('SUPER + SHIFT + B', exec 'station-launch-browser', 'Browser')
|
)
|
||||||
bind('SUPER + SHIFT + ALT + B', exec 'station-launch-browser --private', 'Browser (private)')
|
bind(
|
||||||
bind('SUPER + SHIFT + S', exec 'station-launch-or-focus spotify', 'Spotify')
|
'SUPER + ALT + RETURN',
|
||||||
bind('SUPER + SHIFT + M', exec 'station-launch-or-focus psysonic', 'Music')
|
dispatch_exec 'uwsm-app -- xdg-terminal-exec --dir="$(station-cmd-terminal-cwd)" tmux new',
|
||||||
-- bind("SUPER SHIFT + D", exec("station-launch-tui lazydocker"), "Docker")
|
'Tmux'
|
||||||
bind('SUPER + SHIFT + G', exec 'station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"', 'Signal')
|
)
|
||||||
bind('SUPER + SHIFT + D', exec 'station-launch-or-focus ^chrome-discord.com__channels_@me-Default$ "uwsm-app -- discord"', 'Discord')
|
bind(
|
||||||
bind('SUPER + SHIFT + W', exec 'station-launch-or-focus ^chrome-web.whatsapp.com__-Default$ "uwsm-app -- whatsapp"', 'Whatsapp')
|
'SUPER + SHIFT + F',
|
||||||
bind('SUPER + SHIFT + P', exec 'station-launch-or-focus ^superProductivity$ "uwsm-app -- super-productivity"', 'Super Productivity')
|
dispatch_exec 'uwsm-app -- nautilus --new-window',
|
||||||
bind('SUPER + SHIFT + N', exec 'uwsm-app -- xdg-terminal-exec --app-id=org.station.notes nvim ~/Tower/Documents/Notes', 'Editor')
|
'File manager'
|
||||||
-- bind("SUPER SHIFT + W", exec("uwsm-app -- typora --enable-wayland-ime"), "Typora")
|
)
|
||||||
bind('SUPER + SHIFT + SLASH', exec 'Enpass showassistant', 'Passwords')
|
bind(
|
||||||
bind('SUPER + SHIFT + E', exec 'station-launch-or-focus mailspring', 'Email')
|
'SUPER + ALT + SHIFT + F',
|
||||||
|
dispatch_exec 'uwsm-app -- nautilus --new-window "$(station-cmd-terminal-cwd)"',
|
||||||
|
'File manager (cwd)'
|
||||||
|
)
|
||||||
|
bind('SUPER + SHIFT + B', dispatch_exec 'station-launch-browser', 'Browser')
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + ALT + B',
|
||||||
|
dispatch_exec 'station-launch-browser --private',
|
||||||
|
'Browser (private)'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + S',
|
||||||
|
dispatch_exec 'station-launch-or-focus spotify',
|
||||||
|
'Spotify'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + M',
|
||||||
|
dispatch_exec 'station-launch-or-focus psysonic',
|
||||||
|
'Music'
|
||||||
|
)
|
||||||
|
-- bind("SUPER SHIFT + D", dispatch_exec("station-launch-tui lazydocker"), "Docker")
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + G',
|
||||||
|
dispatch_exec 'station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"',
|
||||||
|
'Signal'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + D',
|
||||||
|
dispatch_exec 'station-launch-or-focus ^chrome-discord.com__channels_@me-Default$ "uwsm-app -- discord"',
|
||||||
|
'Discord'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + W',
|
||||||
|
dispatch_exec 'station-launch-or-focus ^chrome-web.whatsapp.com__-Default$ "uwsm-app -- whatsapp"',
|
||||||
|
'Whatsapp'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + P',
|
||||||
|
dispatch_exec 'station-launch-or-focus ^superProductivity$ "uwsm-app -- super-productivity"',
|
||||||
|
'Super Productivity'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + N',
|
||||||
|
dispatch_exec 'uwsm-app -- xdg-terminal-exec --app-id=org.station.notes nvim ~/Tower/Documents/Notes',
|
||||||
|
'Editor'
|
||||||
|
)
|
||||||
|
-- bind("SUPER SHIFT + W", dispatch_exec("uwsm-app -- typora --enable-wayland-ime"), "Typora")
|
||||||
|
bind('SUPER + SHIFT + SLASH', dispatch_exec 'Enpass showassistant', 'Passwords')
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + E',
|
||||||
|
dispatch_exec 'station-launch-or-focus mailspring',
|
||||||
|
'Email'
|
||||||
|
)
|
||||||
|
|
||||||
bind('SUPER + SHIFT + A', exec 'station-launch-webapp "https://gemini.google.com/app"', 'ChatGPT')
|
bind(
|
||||||
bind('SUPER + SHIFT + C', exec 'station-launch-webapp "https://tower.scarif.space/apps/calendar"', 'Calendar')
|
'SUPER + SHIFT + A',
|
||||||
bind('SUPER + SHIFT + Y', exec 'station-launch-or-focus-webapp "YouTube" "https://youtube.com/"', 'YouTube')
|
dispatch_exec 'station-launch-webapp "https://gemini.google.com/app"',
|
||||||
bind('SUPER + SHIFT + ALT + G', exec 'station-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/"', 'WhatsApp')
|
'ChatGPT'
|
||||||
bind('SUPER + SHIFT + CTRL + G', exec 'station-launch-or-focus-webapp "Google Maps" "https://maps.google.com"', 'Google Maps')
|
)
|
||||||
-- bind("SUPER SHIFT + P", exec("station-launch-or-focus-webapp "Google Photos" "https://photos.google.com/""), "Google Photos")
|
bind(
|
||||||
-- bind("SUPER SHIFT + X", exec("station-launch-webapp "https://x.com/""), "X")
|
'SUPER + SHIFT + C',
|
||||||
-- bind("SUPER SHIFT ALT + X", exec("station-launch-webapp "https://x.com/compose/post""), "X Post")
|
dispatch_exec 'station-launch-webapp "https://tower.scarif.space/apps/calendar"',
|
||||||
|
'Calendar'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + Y',
|
||||||
|
dispatch_exec 'station-launch-or-focus-webapp "YouTube" "https://youtube.com/"',
|
||||||
|
'YouTube'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + ALT + G',
|
||||||
|
dispatch_exec 'station-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/"',
|
||||||
|
'WhatsApp'
|
||||||
|
)
|
||||||
|
bind(
|
||||||
|
'SUPER + SHIFT + CTRL + G',
|
||||||
|
dispatch_exec 'station-launch-or-focus-webapp "Google Maps" "https://maps.google.com"',
|
||||||
|
'Google Maps'
|
||||||
|
)
|
||||||
|
-- bind("SUPER SHIFT + P", dispatch_exec("station-launch-or-focus-webapp "Google Photos" "https://photos.google.com/""), "Google Photos")
|
||||||
|
-- bind("SUPER SHIFT + X", dispatch_exec("station-launch-webapp "https://x.com/""), "X")
|
||||||
|
-- bind("SUPER SHIFT ALT + X", dispatch_exec("station-launch-webapp "https://x.com/compose/post""), "X Post")
|
||||||
|
|
||||||
-- Add extra bindings
|
-- Add extra bindings
|
||||||
bind('SUPER + SHIFT + R', exec 'ghostty -e ssh scarif', 'SSH to scarif')
|
bind(
|
||||||
|
'SUPER + SHIFT + R',
|
||||||
|
dispatch_exec 'ghostty -e ssh scarif',
|
||||||
|
'SSH to scarif'
|
||||||
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
DEFAULT_LAYOUT = 'master'
|
DEFAULT_LAYOUT = 'master'
|
||||||
|
|
||||||
exec = hl.dsp.exec_cmd
|
dispatch_exec = hl.dsp.exec_cmd
|
||||||
|
exec = hl.exec_cmd
|
||||||
shortcut = hl.dsp.send_shortcut
|
shortcut = hl.dsp.send_shortcut
|
||||||
|
|
||||||
function bind(key, cmd, desc, opts)
|
function bind(key, cmd, desc, opts)
|
||||||
|
|||||||
Reference in New Issue
Block a user