Compare commits
10
Commits
b1da548292
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
467ae5e678 | ||
|
|
45a612b227 | ||
|
|
b24b0dcba9 | ||
|
|
9b7e3507d8 | ||
|
|
657851bc02 | ||
|
|
015118d74a | ||
|
|
a73c80531b | ||
|
|
e9d4fd2851 | ||
|
|
c9bf4908e9 | ||
|
|
e9254d1270 |
@@ -1,6 +1,7 @@
|
||||
column_width = 160
|
||||
column_width = 80
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 4
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "None"
|
||||
collapse_simple_statement = "Never"
|
||||
|
||||
+47
-130
@@ -1,83 +1,78 @@
|
||||
-- Browser types
|
||||
local function add_tag_to_matching_class(class, tag)
|
||||
hl.window_rule {
|
||||
name = 'chromium-browser-tags',
|
||||
tag = '+chromium-based-browser',
|
||||
tag = '+' .. tag,
|
||||
match = {
|
||||
class = '((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium)',
|
||||
},
|
||||
}
|
||||
hl.window_rule {
|
||||
name = 'firefox-tags',
|
||||
tag = '+firefox-based-browser',
|
||||
match = {
|
||||
class = '([fF]irefox|zen|librewolf)',
|
||||
class = class,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
local function add_tag_to_matching_tag(match_tag, tag)
|
||||
hl.window_rule {
|
||||
name = 'chromium-browser-opacity-tags',
|
||||
tag = '-default-opacity',
|
||||
tag = '+' .. tag,
|
||||
match = {
|
||||
tag = 'chromium-based-browser',
|
||||
tag = match_tag,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
local function remove_tag_from_matching_class(class, tag)
|
||||
hl.window_rule {
|
||||
name = 'firefox-browser-opacity-tags',
|
||||
tag = '-default-opacity',
|
||||
tag = '-' .. tag,
|
||||
match = {
|
||||
tag = 'firefox-based-browser',
|
||||
class = class,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
local function remove_tag_from_matching_tag(match_tag, tag)
|
||||
hl.window_rule {
|
||||
tag = '-' .. tag,
|
||||
match = {
|
||||
tag = match_tag,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
add_tag_to_matching_class(
|
||||
'((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium)',
|
||||
'chromium-based-browser'
|
||||
)
|
||||
add_tag_to_matching_class('([fF]irefox|zen|librewolf)', 'firefox-based-browser')
|
||||
remove_tag_from_matching_tag('chromium-based-browser', 'default-opacity')
|
||||
remove_tag_from_matching_tag('firefox-based-browser', 'default-opacity')
|
||||
|
||||
-- Video apps: remove chromium browser tag so they don't get opacity applied
|
||||
hl.window_rule {
|
||||
name = 'video-apps-no-browser-tag',
|
||||
tag = '-chromium-based-browser',
|
||||
match = {
|
||||
class = '(chrome-youtube.com__-Default|chrome-app.zoom.us__wc_home-Default)',
|
||||
},
|
||||
}
|
||||
hl.window_rule {
|
||||
name = 'video-apps-no-opacity-tag',
|
||||
tag = '-default-opacity',
|
||||
match = {
|
||||
class = '(chrome-youtube.com__-Default|chrome-app.zoom.us__wc_home-Default)',
|
||||
},
|
||||
}
|
||||
remove_tag_from_matching_class(
|
||||
'(chrome-youtube.com__-Default|chrome-app.zoom.us__wc_home-Default)',
|
||||
'chromium-based-browser'
|
||||
)
|
||||
remove_tag_from_matching_class(
|
||||
'(chrome-youtube.com__-Default|chrome-app.zoom.us__wc_home-Default)',
|
||||
'default-opacity'
|
||||
)
|
||||
|
||||
-- Force chromium-based browsers into a tile to deal with --app bug
|
||||
hl.window_rule {
|
||||
name = 'chromium-tile',
|
||||
tile = true,
|
||||
match = {
|
||||
tag = 'chromium-based-browser',
|
||||
},
|
||||
match = { tag = 'chromium-based-browser' },
|
||||
}
|
||||
|
||||
-- Only a subtle opacity change, but not for video sites
|
||||
hl.window_rule {
|
||||
name = 'chromium-browser-subtle-opacity',
|
||||
opacity = '1.0 0.97',
|
||||
opacity = '1.0 0.8',
|
||||
match = {
|
||||
tag = 'chromium-based-browser',
|
||||
},
|
||||
}
|
||||
hl.window_rule {
|
||||
name = 'firefox-browser-subtle-opacity',
|
||||
opacity = '1.0 0.97',
|
||||
opacity = '1.0 0.8',
|
||||
match = {
|
||||
tag = 'firefox-based-browser',
|
||||
},
|
||||
}
|
||||
|
||||
hl.window_rule {
|
||||
name = 'geforce-now',
|
||||
idle_inhibit = 'fullscreen',
|
||||
match = {
|
||||
class = 'GeForceNOW',
|
||||
},
|
||||
}
|
||||
|
||||
-- Remove 1px border around hyprshot screenshots
|
||||
hl.layer_rule {
|
||||
name = 'no-anim-for-selection',
|
||||
@@ -88,8 +83,6 @@ hl.layer_rule {
|
||||
-- Jetbrains
|
||||
-- Fix splash screen showing in weird places and prevent annoying focus takeovers
|
||||
hl.window_rule {
|
||||
name = 'jetbrains-splash',
|
||||
tag = '+jetbrains-splash',
|
||||
center = true,
|
||||
no_focus = true,
|
||||
border_size = 0,
|
||||
@@ -102,7 +95,6 @@ hl.window_rule {
|
||||
|
||||
-- Center popups/find windows
|
||||
hl.window_rule {
|
||||
name = 'jetbrains-popups',
|
||||
center = true,
|
||||
stay_focused = true,
|
||||
border_size = 0,
|
||||
@@ -172,42 +164,9 @@ hl.window_rule {
|
||||
tag = 'pip',
|
||||
},
|
||||
}
|
||||
-- Retroarch
|
||||
hl.window_rule {
|
||||
name = 'retroarch-fullscreen',
|
||||
fullscreen = true,
|
||||
tag = '-default-opacity',
|
||||
opacity = '1 1',
|
||||
idle_inhibit = 'fullscreen',
|
||||
match = {
|
||||
class = 'com.libretro.RetroArch',
|
||||
},
|
||||
}
|
||||
-- Scratchpad apps
|
||||
hl.window_rule {
|
||||
name = 'spotify-scratchpad',
|
||||
workspace = 'special:music',
|
||||
match = {
|
||||
class = 'Spotify|psysonic',
|
||||
},
|
||||
}
|
||||
hl.window_rule {
|
||||
name = 'comms-scratchpad',
|
||||
workspace = 'special:comms',
|
||||
match = {
|
||||
class = '^(chrome-discord.com__channels_@me-Default|chrome-web.whatsapp.com__-Default|signal)$',
|
||||
},
|
||||
}
|
||||
hl.window_rule {
|
||||
name = 'superproductivity-scratchpad',
|
||||
workspace = 'special:prod',
|
||||
match = {
|
||||
class = '^(superproductivity|org.station.notes)$',
|
||||
},
|
||||
}
|
||||
|
||||
-- Float Nextcloud
|
||||
hl.window_rule {
|
||||
name = 'nextcloud-float',
|
||||
float = true,
|
||||
match = {
|
||||
class = 'com.nextcloud.desktopclient.nextcloud',
|
||||
@@ -215,7 +174,6 @@ hl.window_rule {
|
||||
}
|
||||
-- Position drawing
|
||||
hl.window_rule {
|
||||
name = 'krita-drawing',
|
||||
tag = '-default-opacity',
|
||||
opacity = '1 1',
|
||||
no_initial_focus = true,
|
||||
@@ -227,24 +185,7 @@ hl.window_rule {
|
||||
modal = true,
|
||||
},
|
||||
}
|
||||
-- Float Steam
|
||||
-- hl.window_rule {
|
||||
-- name = 'steam-float',
|
||||
-- float = true,
|
||||
-- no_initial_focus = true,
|
||||
-- idle_inhibit = 'fullscreen',
|
||||
-- match = {
|
||||
-- class = 'steam',
|
||||
-- },
|
||||
-- }
|
||||
-- hl.window_rule {
|
||||
-- name = 'steam-app-center',
|
||||
-- center = true,
|
||||
-- match = {
|
||||
-- class = 'steam',
|
||||
-- title = 'Steam',
|
||||
-- },
|
||||
-- }
|
||||
|
||||
hl.window_rule {
|
||||
name = 'steam-opacity',
|
||||
tag = '-default-opacity',
|
||||
@@ -261,27 +202,11 @@ hl.window_rule {
|
||||
title = 'Friends List',
|
||||
},
|
||||
}
|
||||
-- Float Lunar Client
|
||||
hl.window_rule {
|
||||
name = 'atlauncher-float',
|
||||
float = true,
|
||||
center = true,
|
||||
size = { 1100, 700 },
|
||||
tag = '-default-opacity',
|
||||
opacity = '1 1',
|
||||
idle_inhibit = 'fullscreen',
|
||||
match = {
|
||||
class = 'atlauncher',
|
||||
},
|
||||
}
|
||||
-- Floating windows
|
||||
hl.window_rule {
|
||||
name = 'floating-window-tags',
|
||||
tag = '+floating-window',
|
||||
match = {
|
||||
class = '(org.station.bluetui|org.station.impala|org.station.wiremix|org.station.btop|org.station.terminal|org.station.bash|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Station|About|TUI.float|imv|mpv)',
|
||||
},
|
||||
}
|
||||
add_tag_to_matching_class(
|
||||
'(org.station.bluetui|org.station.impala|org.station.wiremix|org.station.btop|org.station.terminal|org.station.bash|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Station|About|TUI.float|imv|mpv)',
|
||||
'floating-window'
|
||||
)
|
||||
hl.window_rule {
|
||||
name = 'floating-dialog-tags',
|
||||
tag = '+floating-window',
|
||||
@@ -343,14 +268,6 @@ hl.window_rule {
|
||||
tag = 'noidle',
|
||||
},
|
||||
}
|
||||
-- Prevent Telegram from stealing focus on new messages
|
||||
hl.window_rule {
|
||||
name = 'telegram-no-focus-steal',
|
||||
focus_on_activate = false,
|
||||
match = {
|
||||
class = 'org.telegram.desktop',
|
||||
},
|
||||
}
|
||||
-- Define terminal tag to style them uniformly
|
||||
hl.window_rule {
|
||||
name = 'terminal-tags',
|
||||
|
||||
@@ -2,23 +2,68 @@ hl.on('hyprland.start', function()
|
||||
exec 'uwsm-app -- hypridle'
|
||||
exec 'uwsm-app -- mako'
|
||||
exec 'uwsm-app -- fcitx5 --disable notificationitem'
|
||||
exec 'uwsm-app -- Enpass -minimize'
|
||||
exec 'uwsm-app -- steam'
|
||||
exec 'nextcloud'
|
||||
exec 'station-bg-random'
|
||||
exec '/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1'
|
||||
exec 'dbus-update-activation-environment --systemd --all'
|
||||
exec 'station-bg-set'
|
||||
-- hl.dispatch(
|
||||
-- dispatch_exec(
|
||||
-- 'station-launch-tui btop',
|
||||
-- { move = { workspace = 'special:monitor' } }
|
||||
-- )
|
||||
-- )
|
||||
|
||||
local monitors = hl.get_monitors()
|
||||
|
||||
for j = #monitors, 1, -1 do
|
||||
local monitor = monitors[j]
|
||||
hl.dsp.focus { workspace = 'name:Home_' .. j }
|
||||
hl.dispatch(hl.dsp.focus { workspace = 'name:Home_' .. j })
|
||||
end
|
||||
end)
|
||||
|
||||
hl.on('config.reloaded', function()
|
||||
toggle_laptop_monitor()
|
||||
exec 'station-bg-random'
|
||||
|
||||
-- exec(
|
||||
-- 'station-launch-tui btop',
|
||||
-- { move = { workspace = 'special:monitor' } }
|
||||
-- )
|
||||
end)
|
||||
|
||||
local events = {
|
||||
'config.props_refreshed',
|
||||
'config.reloaded',
|
||||
'hyprland.shutdown',
|
||||
'hyprland.start',
|
||||
'keybinds.submap',
|
||||
'layer.closed',
|
||||
'layer.opened',
|
||||
'monitor.added',
|
||||
'monitor.focused',
|
||||
'monitor.layout_changed',
|
||||
'monitor.removed',
|
||||
'screenshare.state',
|
||||
'window.active',
|
||||
'window.class',
|
||||
'window.close',
|
||||
'window.destroy',
|
||||
'window.fullscreen',
|
||||
'window.kill',
|
||||
'window.move_to_workspace',
|
||||
'window.open',
|
||||
'window.open_early',
|
||||
'window.pin',
|
||||
'window.urgent',
|
||||
'workspace.active',
|
||||
'workspace.created',
|
||||
'workspace.move_to_monitor',
|
||||
'workspace.removed',
|
||||
'workspace.special_active',
|
||||
}
|
||||
|
||||
for _, event in ipairs(events) do
|
||||
hl.on(event, function(data)
|
||||
notify('event: ' .. event, 5000)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
+415
-131
@@ -3,43 +3,128 @@ require 'helpers'
|
||||
-- Media
|
||||
-- ==========================
|
||||
-- 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)
|
||||
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')
|
||||
bindlr(
|
||||
'XF86AudioRaiseVolume',
|
||||
dispatch_exec(osdclient .. ' --output-volume raise'),
|
||||
'Volume up'
|
||||
)
|
||||
bindlr(
|
||||
'XF86AudioRaiseVolume',
|
||||
dispatch_exec(osdclient .. ' --output-volume raise'),
|
||||
'Volume up'
|
||||
)
|
||||
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
|
||||
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')
|
||||
bindlr(
|
||||
'ALT + XF86AudioRaiseVolume',
|
||||
dispatch_exec '$osdclient --output-volume +1',
|
||||
'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
|
||||
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')
|
||||
bindl(
|
||||
'XF86AudioNext',
|
||||
dispatch_exec(osdclient .. ' --playerctl next'),
|
||||
'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
|
||||
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
|
||||
-- ==========================
|
||||
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 + 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
|
||||
bind('SUPER + Q', hl.dsp.window.close(), 'Close window')
|
||||
@@ -89,7 +174,10 @@ bind('SUPER + CTRL + L', function()
|
||||
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)
|
||||
end, 'Toggle workspace layout')
|
||||
@@ -123,94 +211,158 @@ bind('SUPER + J', function()
|
||||
hl.dispatch(hl.dsp.focus { direction = 'down' })
|
||||
end
|
||||
end, '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
|
||||
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')
|
||||
bind('SUPER + N', function()
|
||||
hl.dispatch(hl.dsp.workspace.toggle_special 'prod')
|
||||
local windows = hl.get_windows { workspace = 'special:prod' }
|
||||
if #windows == 0 then
|
||||
hl.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'
|
||||
end
|
||||
end, 'Toggle productivity workspace')
|
||||
bind('SUPER + M', function()
|
||||
hl.dispatch(hl.dsp.workspace.toggle_special 'music')
|
||||
local windows = hl.get_windows { workspace = 'special:music' }
|
||||
if #windows == 0 then
|
||||
hl.exec_cmd 'station-launch-or-focus spotify'
|
||||
hl.exec_cmd 'station-launch-or-focus psysonic'
|
||||
end
|
||||
end, 'Toggle music workspace')
|
||||
bind('SUPER + D', function()
|
||||
hl.dispatch(hl.dsp.workspace.toggle_special 'comms')
|
||||
local windows = hl.get_windows { workspace = 'special:comms' }
|
||||
if #windows == 0 then
|
||||
hl.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.exec_cmd 'station-launch-or-focus ^chrome-discord.com__channels_@me-Default$ "station-launch-webapp https://discord.com/channels/@me"'
|
||||
end
|
||||
end, 'Toggle comms workspace')
|
||||
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'
|
||||
)
|
||||
|
||||
-- Cycle through applications on active workspace
|
||||
bind('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',
|
||||
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 SHIFT + TAB", /*bringactivetotop*/, "Reveal active window on top")
|
||||
|
||||
-- Resize active window
|
||||
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')
|
||||
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
|
||||
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
|
||||
bind('SUPER + G', hl.dsp.group.toggle(), 'Toggle window to a group')
|
||||
|
||||
-- Move to the next tab group window
|
||||
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')
|
||||
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
|
||||
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')
|
||||
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
|
||||
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')
|
||||
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
|
||||
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')
|
||||
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
|
||||
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')
|
||||
bind('SUPER + SPACE', dispatch_exec 'station-launch-walker', 'Launch apps')
|
||||
bind(
|
||||
'SUPER + CTRL + E',
|
||||
dispatch_exec 'station-launch-walker -m symbols',
|
||||
'Emoji picker'
|
||||
)
|
||||
bind('SUPER + CTRL + C', dispatch_exec 'station-menu capture', 'Capture menu')
|
||||
bind('SUPER + CTRL + O', dispatch_exec 'station-menu toggle', 'Toggle menu')
|
||||
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
|
||||
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', exec 'hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r \'.address\')" opaque toggle', 'Toggle window transparency')
|
||||
bind(
|
||||
'SUPER + SHIFT + SPACE',
|
||||
dispatch_exec 'station-toggle-waybar',
|
||||
'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()
|
||||
local gaps = hl.get_config 'general.gaps_out'
|
||||
if gaps.top == 0 then
|
||||
@@ -233,78 +385,210 @@ bind('SUPER + SHIFT + BACKSPACE', function()
|
||||
end, 'Toggle window gaps')
|
||||
|
||||
-- Notifications
|
||||
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')
|
||||
bind(
|
||||
'SUPER + COMMA',
|
||||
dispatch_exec 'makoctl dismiss',
|
||||
'Dismiss 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
|
||||
bind('SUPER + CTRL + I', exec 'station-toggle-idle', 'Toggle locking on idle')
|
||||
bind('SUPER + CTRL + N', exec 'station-toggle-nightlight', 'Toggle nightlight')
|
||||
bind(
|
||||
'SUPER + CTRL + I',
|
||||
dispatch_exec 'station-toggle-idle',
|
||||
'Toggle locking on idle'
|
||||
)
|
||||
bind(
|
||||
'SUPER + CTRL + N',
|
||||
dispatch_exec 'station-toggle-nightlight',
|
||||
'Toggle nightlight'
|
||||
)
|
||||
|
||||
-- Captures
|
||||
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')
|
||||
bind('PRINT', dispatch_exec 'station-cmd-screenshot', 'Screenshot')
|
||||
bind(
|
||||
'ALT + PRINT',
|
||||
dispatch_exec 'station-menu screenrecord',
|
||||
'Screenrecording'
|
||||
)
|
||||
bind(
|
||||
'SUPER + PRINT',
|
||||
dispatch_exec 'pkill hyprpicker || hyprpicker -a',
|
||||
'Color picker'
|
||||
)
|
||||
|
||||
-- File sharing
|
||||
-- bind("SUPER CTRL + S", exec("station-menu share"), "Share")
|
||||
-- bind("SUPER CTRL + S", dispatch_exec("station-menu share"), "Share")
|
||||
|
||||
-- Waybar-less information
|
||||
bind('SUPER + CTRL + ALT + T', exec 'notify " $(date +"%A %H:%M — %d %B W%V %Y")"', 'Show time')
|
||||
bind('SUPER + CTRL + ALT + B', exec 'notify-send " Battery is at $(station-battery-remaining)%"', 'Show battery remaining')
|
||||
bind(
|
||||
'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()
|
||||
local window = hl.get_active_window()
|
||||
notify('Window: ' .. window.title .. '\nClass: ' .. window.class)
|
||||
end, 'Show active window name and class')
|
||||
|
||||
-- Control panels
|
||||
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')
|
||||
bind('SUPER + CTRL + A', dispatch_exec 'station-launch-audio', 'Audio controls')
|
||||
bind(
|
||||
'SUPER + CTRL + B',
|
||||
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
|
||||
-- bind("SUPER CTRL + X", exec("voxtype record toggle"), "Toggle dictation")
|
||||
-- bind("SUPER CTRL + X", dispatch_exec("voxtype record toggle"), "Toggle dictation")
|
||||
|
||||
-- Zoom
|
||||
bind('SUPER + CTRL + Z', 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')
|
||||
bind(
|
||||
'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
|
||||
-- bind("SUPER CTRL + L", exec("station-lock-screen"), "Lock system")
|
||||
-- bind("SUPER CTRL + L", dispatch_exec("station-lock-screen"), "Lock system")
|
||||
|
||||
-- ==========================
|
||||
-- Applications
|
||||
-- ==========================
|
||||
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', exec 'uwsm-app -- nautilus --new-window "$(station-cmd-terminal-cwd)"', 'File manager (cwd)')
|
||||
bind('SUPER + SHIFT + B', exec 'station-launch-browser', 'Browser')
|
||||
bind('SUPER + SHIFT + ALT + B', exec 'station-launch-browser --private', 'Browser (private)')
|
||||
bind('SUPER + SHIFT + S', exec 'station-launch-or-focus spotify', 'Spotify')
|
||||
bind('SUPER + SHIFT + M', exec 'station-launch-or-focus psysonic', 'Music')
|
||||
-- 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 + D', exec 'station-launch-or-focus ^chrome-discord.com__channels_@me-Default$ "uwsm-app -- discord"', 'Discord')
|
||||
bind('SUPER + SHIFT + W', exec 'station-launch-or-focus ^chrome-web.whatsapp.com__-Default$ "uwsm-app -- whatsapp"', 'Whatsapp')
|
||||
bind('SUPER + SHIFT + P', exec 'station-launch-or-focus ^superProductivity$ "uwsm-app -- super-productivity"', 'Super Productivity')
|
||||
bind('SUPER + SHIFT + N', exec 'uwsm-app -- xdg-terminal-exec --app-id=org.station.notes nvim ~/Tower/Documents/Notes', 'Editor')
|
||||
-- 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')
|
||||
bind(
|
||||
'SUPER + RETURN',
|
||||
dispatch_exec 'uwsm-app -- xdg-terminal-exec',
|
||||
'Terminal'
|
||||
)
|
||||
bind(
|
||||
'SUPER + ALT + RETURN',
|
||||
dispatch_exec 'uwsm-app -- xdg-terminal-exec --dir="$(station-cmd-terminal-cwd)" tmux new',
|
||||
'Tmux'
|
||||
)
|
||||
bind(
|
||||
'SUPER + SHIFT + F',
|
||||
dispatch_exec 'uwsm-app -- nautilus --new-window',
|
||||
'File manager'
|
||||
)
|
||||
bind(
|
||||
'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('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', 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("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")
|
||||
bind(
|
||||
'SUPER + SHIFT + A',
|
||||
dispatch_exec 'station-launch-webapp "https://gemini.google.com/app"',
|
||||
'ChatGPT'
|
||||
)
|
||||
bind(
|
||||
'SUPER + SHIFT + C',
|
||||
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
|
||||
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,11 @@
|
||||
DEFAULT_LAYOUT = 'master'
|
||||
|
||||
exec = hl.dsp.exec_cmd
|
||||
LAPTOP_MONITOR_NAME = 'BOE NE160QDM-NZ6'
|
||||
LEFT_MONITOR_NAME = 'Samsung Electric Company LU28R55 HNMN500475'
|
||||
RIGHT_MONITOR_NAME = 'Samsung Electric Company LU28R55 HNMN500462'
|
||||
|
||||
dispatch_exec = hl.dsp.exec_cmd
|
||||
exec = hl.exec_cmd
|
||||
shortcut = hl.dsp.send_shortcut
|
||||
|
||||
function bind(key, cmd, desc, opts)
|
||||
@@ -72,6 +77,6 @@ end
|
||||
function is_laptop_screen_focused()
|
||||
local monitor = hl.get_active_monitor()
|
||||
|
||||
return monitor and monitor.description == 'BOE NE160QDM-NZ6'
|
||||
return monitor and monitor.description == LAPTOP_MONITOR_NAME
|
||||
end
|
||||
|
||||
|
||||
@@ -7,4 +7,5 @@ require 'looknfeel'
|
||||
require 'input'
|
||||
require 'windows'
|
||||
require 'monitors'
|
||||
require 'scratchpad'
|
||||
|
||||
|
||||
+103
-19
@@ -25,8 +25,7 @@ hl.config {
|
||||
-- Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false,
|
||||
|
||||
-- layout = scrolling, # Change to niri-like side-scrolling layout
|
||||
layout = 'master',
|
||||
layout = DEFAULT_LAYOUT,
|
||||
},
|
||||
|
||||
-- https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
@@ -119,6 +118,7 @@ hl.config {
|
||||
cursor = {
|
||||
hide_on_key_press = true,
|
||||
warp_on_change_workspace = 1,
|
||||
no_hardware_cursors = 1,
|
||||
},
|
||||
|
||||
-- Auto toggle scratchpad on switching workspace from scratchpad
|
||||
@@ -138,31 +138,115 @@ hl.config {
|
||||
}
|
||||
|
||||
-- Default curves and animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/
|
||||
hl.curve('easeOutQuint', { type = 'bezier', points = { { 0.23, 1 }, { 0.32, 1 } } })
|
||||
hl.curve('easeInOutCubic', { type = 'bezier', points = { { 0.65, 0.05 }, { 0.36, 1 } } })
|
||||
hl.curve(
|
||||
'easeOutQuint',
|
||||
{ type = 'bezier', points = { { 0.23, 1 }, { 0.32, 1 } } }
|
||||
)
|
||||
hl.curve(
|
||||
'easeInOutCubic',
|
||||
{ type = 'bezier', points = { { 0.65, 0.05 }, { 0.36, 1 } } }
|
||||
)
|
||||
hl.curve('linear', { type = 'bezier', points = { { 0, 0 }, { 1, 1 } } })
|
||||
hl.curve('almostLinear', { type = 'bezier', points = { { 0.5, 0.5 }, { 0.75, 1 } } })
|
||||
hl.curve(
|
||||
'almostLinear',
|
||||
{ type = 'bezier', points = { { 0.5, 0.5 }, { 0.75, 1 } } }
|
||||
)
|
||||
hl.curve('quick', { type = 'bezier', points = { { 0.15, 0 }, { 0.1, 1 } } })
|
||||
|
||||
-- Default springs
|
||||
hl.curve('easy', { type = 'spring', mass = 1, stiffness = 71.2633, dampening = 15.8273644 })
|
||||
hl.curve(
|
||||
'easy',
|
||||
{ type = 'spring', mass = 1, stiffness = 71.2633, dampening = 15.8273644 }
|
||||
)
|
||||
|
||||
hl.animation { leaf = 'global', enabled = true, speed = 10, bezier = 'default' }
|
||||
hl.animation { leaf = 'border', enabled = true, speed = 5.39, bezier = 'easeOutQuint' }
|
||||
hl.animation {
|
||||
leaf = 'border',
|
||||
enabled = true,
|
||||
speed = 5.39,
|
||||
bezier = 'easeOutQuint',
|
||||
}
|
||||
hl.animation { leaf = 'windows', enabled = true, speed = 4.79, spring = 'easy' }
|
||||
hl.animation { leaf = 'windowsIn', enabled = true, speed = 4.1, spring = 'easy', style = 'popin 87%' }
|
||||
hl.animation { leaf = 'windowsOut', enabled = true, speed = 1.49, bezier = 'linear', style = 'popin 87%' }
|
||||
hl.animation { leaf = 'fadeIn', enabled = true, speed = 1.73, bezier = 'almostLinear' }
|
||||
hl.animation { leaf = 'fadeOut', enabled = true, speed = 1.46, bezier = 'almostLinear' }
|
||||
hl.animation {
|
||||
leaf = 'windowsIn',
|
||||
enabled = true,
|
||||
speed = 4.1,
|
||||
spring = 'easy',
|
||||
style = 'popin 87%',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'windowsOut',
|
||||
enabled = true,
|
||||
speed = 1.49,
|
||||
bezier = 'linear',
|
||||
style = 'popin 87%',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'fadeIn',
|
||||
enabled = true,
|
||||
speed = 1.73,
|
||||
bezier = 'almostLinear',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'fadeOut',
|
||||
enabled = true,
|
||||
speed = 1.46,
|
||||
bezier = 'almostLinear',
|
||||
}
|
||||
hl.animation { leaf = 'fade', enabled = true, speed = 3.03, bezier = 'quick' }
|
||||
hl.animation { leaf = 'layers', enabled = true, speed = 3.81, bezier = 'easeOutQuint' }
|
||||
hl.animation { leaf = 'layersIn', enabled = true, speed = 4, bezier = 'easeOutQuint', style = 'fade' }
|
||||
hl.animation { leaf = 'layersOut', enabled = true, speed = 1.5, bezier = 'linear', style = 'fade' }
|
||||
hl.animation { leaf = 'fadeLayersIn', enabled = true, speed = 1.79, bezier = 'almostLinear' }
|
||||
hl.animation { leaf = 'fadeLayersOut', enabled = true, speed = 1.39, bezier = 'almostLinear' }
|
||||
hl.animation { leaf = 'workspaces', enabled = true, speed = 1.94, bezier = 'almostLinear', style = 'fade' }
|
||||
hl.animation { leaf = 'workspacesIn', enabled = true, speed = 1.21, bezier = 'almostLinear', style = 'fade' }
|
||||
hl.animation { leaf = 'workspacesOut', enabled = true, speed = 1.94, bezier = 'almostLinear', style = 'fade' }
|
||||
hl.animation {
|
||||
leaf = 'layers',
|
||||
enabled = true,
|
||||
speed = 3.81,
|
||||
bezier = 'easeOutQuint',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'layersIn',
|
||||
enabled = true,
|
||||
speed = 4,
|
||||
bezier = 'easeOutQuint',
|
||||
style = 'fade',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'layersOut',
|
||||
enabled = true,
|
||||
speed = 1.5,
|
||||
bezier = 'linear',
|
||||
style = 'fade',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'fadeLayersIn',
|
||||
enabled = true,
|
||||
speed = 1.79,
|
||||
bezier = 'almostLinear',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'fadeLayersOut',
|
||||
enabled = true,
|
||||
speed = 1.39,
|
||||
bezier = 'almostLinear',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'workspaces',
|
||||
enabled = true,
|
||||
speed = 1.94,
|
||||
bezier = 'almostLinear',
|
||||
style = 'fade',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'workspacesIn',
|
||||
enabled = true,
|
||||
speed = 1.21,
|
||||
bezier = 'almostLinear',
|
||||
style = 'fade',
|
||||
}
|
||||
hl.animation {
|
||||
leaf = 'workspacesOut',
|
||||
enabled = true,
|
||||
speed = 1.94,
|
||||
bezier = 'almostLinear',
|
||||
style = 'fade',
|
||||
}
|
||||
hl.animation { leaf = 'zoomFactor', enabled = true, speed = 7, bezier = 'quick' }
|
||||
|
||||
-- Style Gum confirm to match terminal theme
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
-- List current monitors and resolutions possible: hyprctl monitors
|
||||
|
||||
hl.monitor {
|
||||
output = 'desc:Samsung Electric Company LU28R55 HNMN500475',
|
||||
output = 'desc:' .. LEFT_MONITOR_NAME,
|
||||
mode = '3840x2160@30',
|
||||
position = '0x0',
|
||||
scale = 1.5,
|
||||
}
|
||||
hl.monitor {
|
||||
output = 'desc:Samsung Electric Company LU28R55 HNMN500462',
|
||||
output = 'desc:' .. RIGHT_MONITOR_NAME,
|
||||
mode = '3840x2160@30',
|
||||
position = '2560x0',
|
||||
scale = 1.5,
|
||||
}
|
||||
hl.monitor {
|
||||
output = 'desc:BOE NE160QDM-NZ6',
|
||||
output = 'desc:' .. LAPTOP_MONITOR_NAME,
|
||||
mode = '2560x1600',
|
||||
position = '5120x720',
|
||||
scale = 'auto',
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
-- Scratchpad apps
|
||||
hl.window_rule {
|
||||
workspace = 'special:music',
|
||||
match = {
|
||||
class = 'Spotify|psysonic',
|
||||
},
|
||||
}
|
||||
hl.window_rule {
|
||||
workspace = 'special:comms',
|
||||
match = {
|
||||
class = '^(chrome-discord.com__channels_@me-Default|chrome-web.whatsapp.com__-Default|signal)$',
|
||||
},
|
||||
}
|
||||
hl.window_rule {
|
||||
workspace = 'special:prod',
|
||||
match = {
|
||||
class = '^(superproductivity|org.station.notes)$',
|
||||
},
|
||||
}
|
||||
|
||||
-- Control 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'
|
||||
)
|
||||
bind('SUPER + N', function()
|
||||
hl.dispatch(hl.dsp.workspace.toggle_special 'prod')
|
||||
local windows = hl.get_windows { workspace = 'special:prod' }
|
||||
if #windows == 0 then
|
||||
exec 'station-launch-or-focus ^superProductivity$ "uwsm-app -- super-productivity"'
|
||||
exec 'uwsm-app -- xdg-terminal-exec --app-id=org.station.notes nvim ~/Notes'
|
||||
end
|
||||
end, 'Toggle productivity workspace')
|
||||
bind('SUPER + M', function()
|
||||
hl.dispatch(hl.dsp.workspace.toggle_special 'music')
|
||||
local windows = hl.get_windows { workspace = 'special:music' }
|
||||
if #windows == 0 then
|
||||
exec 'station-launch-or-focus spotify'
|
||||
exec 'station-launch-or-focus psysonic'
|
||||
end
|
||||
end, 'Toggle music workspace')
|
||||
bind('SUPER + D', function()
|
||||
hl.dispatch(hl.dsp.workspace.toggle_special 'comms')
|
||||
local windows = hl.get_windows { workspace = 'special:comms' }
|
||||
if #windows == 0 then
|
||||
exec 'station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"'
|
||||
exec 'station-launch-or-focus ^chrome-web.whatsapp.com__-Default$ "station-launch-webapp https://web.whatsapp.com"'
|
||||
exec 'station-launch-or-focus ^chrome-discord.com__channels_@me-Default$ "station-launch-webapp https://discord.com/channels/@me"'
|
||||
end
|
||||
end, 'Toggle comms workspace')
|
||||
bind('SUPER + X', function()
|
||||
hl.dispatch(hl.dsp.workspace.toggle_special 'monitor')
|
||||
end, 'Toggle monitor workspace')
|
||||
|
||||
+17
-16
@@ -1,31 +1,32 @@
|
||||
-- See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
-- Tag all windows for default opacity (apps can override with -default-opacity tag)
|
||||
hl.window_rule({
|
||||
name = "default-opacity",
|
||||
tag = "+default-opacity",
|
||||
match = { class = ".*" },
|
||||
})
|
||||
hl.window_rule {
|
||||
name = 'default-opacity',
|
||||
tag = '+default-opacity',
|
||||
match = { class = '.*' },
|
||||
}
|
||||
|
||||
-- Fix some dragging issues with XWayland
|
||||
hl.window_rule({
|
||||
name = "xwayland-dragging",
|
||||
hl.window_rule {
|
||||
name = 'xwayland-dragging',
|
||||
match = {
|
||||
class = "^$",
|
||||
title = "^$",
|
||||
class = '^$',
|
||||
title = '^$',
|
||||
xwayland = true,
|
||||
float = true,
|
||||
fullscreen = false,
|
||||
pin = false,
|
||||
},
|
||||
no_focus = true,
|
||||
})
|
||||
}
|
||||
|
||||
-- App-specific tweaks (may remove default-opacity tag)
|
||||
require("apps")
|
||||
require 'apps'
|
||||
|
||||
-- Apply default opacity after apps have had a chance to opt out
|
||||
hl.window_rule({
|
||||
name = "apply-opacity",
|
||||
match = { tag = "default-opacity" },
|
||||
opacity = "0.97 0.9",
|
||||
})
|
||||
hl.window_rule {
|
||||
name = 'apply-opacity',
|
||||
match = { tag = 'default-opacity' },
|
||||
opacity = '0.97 0.8',
|
||||
}
|
||||
|
||||
|
||||
+57
-19
@@ -12,21 +12,17 @@ local function setup_monitors()
|
||||
local monitors = hl.get_monitors()
|
||||
local monitor_count = #monitors
|
||||
|
||||
-- Move active window to a workspace with SUPER + SHIFT + [1-5]
|
||||
for i = 1, #workspace_map do
|
||||
for j = monitor_count, 1, -1 do
|
||||
local monitor = monitors[j]
|
||||
-- local workspace_id = "name:" .. workspace_map[i] .. "_" .. j
|
||||
local workspace_id = (i - 1) * monitor_count + j
|
||||
local workspace_name = workspace_map[i] .. '_' .. j
|
||||
hl.workspace_rule {
|
||||
-- workspace = (i - 1) * monitor_count + j,
|
||||
-- default_name = workspace_name,
|
||||
workspace = 'name:' .. workspace_name,
|
||||
monitor = monitor.name,
|
||||
default = i == 1,
|
||||
}
|
||||
|
||||
-- Move to a workspace with SUPER + [1-5]
|
||||
hl.bind(
|
||||
'SUPER + code:1' .. (i - 1),
|
||||
hl.dsp.focus { workspace = 'name:' .. workspace_name },
|
||||
@@ -34,15 +30,51 @@ local function setup_monitors()
|
||||
)
|
||||
end
|
||||
|
||||
-- Move active window to a workspace with SUPER + SHIFT + [1-5]
|
||||
hl.bind('SUPER + SHIFT + code:1' .. (i - 1), function()
|
||||
notify('Moving', 2000)
|
||||
local active_window = hl.get_active_window()
|
||||
if active_window then
|
||||
local active_workspace = active_window.workspace
|
||||
if active_workspace then
|
||||
local active_workspace_name = active_workspace.name
|
||||
local monitor_suffix = active_workspace_name:match '_(%d+)$' or '1'
|
||||
local new_workspace = 'name:' .. workspace_map[i] .. '_' .. monitor_suffix
|
||||
-- local new_workspace = (i - 1) * monitor_count + active_workspace.id
|
||||
hl.dispatch(hl.dsp.window.move { workspace = new_workspace, window = active_window, follow = false })
|
||||
end, { description = 'Move window to workspace ' .. workspace_map[i] })
|
||||
local monitor_suffix = active_workspace_name:match '_(%d+)$'
|
||||
or '1'
|
||||
local new_workspace = 'name:'
|
||||
.. workspace_map[i]
|
||||
.. '_'
|
||||
.. monitor_suffix
|
||||
hl.dispatch(hl.dsp.window.move {
|
||||
workspace = new_workspace,
|
||||
window = active_window,
|
||||
follow = false,
|
||||
})
|
||||
end
|
||||
end
|
||||
end, {
|
||||
description = 'Move window to workspace ' .. workspace_map[i],
|
||||
})
|
||||
end
|
||||
|
||||
-- When removing a monitor move all windows to existing monitors
|
||||
local windows = hl.get_windows()
|
||||
for i = 1, #windows do
|
||||
local window = windows[i]
|
||||
if window and window.workspace then
|
||||
local workspace_name = window.workspace.name
|
||||
local monitor_suffix = workspace_name:match '_(%d+)$' or '0'
|
||||
if tonumber(monitor_suffix) > monitor_count then
|
||||
local new_workspace = 'name:'
|
||||
.. workspace_name:match '^%w+'
|
||||
.. '_1'
|
||||
|
||||
hl.dispatch(hl.dsp.window.move {
|
||||
workspace = new_workspace,
|
||||
window = window,
|
||||
follow = false,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -53,21 +85,27 @@ hl.on('config.reloaded', setup_monitors)
|
||||
hl.bind('switch:off:Lid Switch', setup_monitors)
|
||||
hl.bind('switch:on:Lid Switch', setup_monitors)
|
||||
|
||||
function set_laptop_workspace_to_monocle()
|
||||
local workspace = get_active_workspace()
|
||||
local function set_laptop_workspaces_to_monocle()
|
||||
local workspaces = hl.get_workspaces()
|
||||
|
||||
if not workspace then
|
||||
return
|
||||
for i = 1, #workspaces do
|
||||
local workspace = workspaces[i]
|
||||
if
|
||||
not workspace.special
|
||||
and workspace.monitor
|
||||
and workspace.monitor.description == LAPTOP_MONITOR_NAME
|
||||
then
|
||||
hl.workspace_rule {
|
||||
workspace = 'name:' .. tostring(workspace.name),
|
||||
layout = 'monocle',
|
||||
}
|
||||
end
|
||||
|
||||
if is_laptop_screen_focused() then
|
||||
hl.workspace_rule { workspace = 'name:' .. tostring(workspace.name), layout = 'monocle' }
|
||||
end
|
||||
end
|
||||
|
||||
hl.on('monitor.focused', set_laptop_workspace_to_monocle)
|
||||
hl.on('monitor.focused', set_laptop_workspaces_to_monocle)
|
||||
|
||||
hl.on('config.reloaded', set_laptop_workspace_to_monocle)
|
||||
hl.on('config.reloaded', set_laptop_workspaces_to_monocle)
|
||||
|
||||
hl.on('window.open', function()
|
||||
local windows = hl.get_windows()
|
||||
|
||||
+1
-1
Submodule .config/nvim updated: 7ffe25702f...d0225e35a0
@@ -0,0 +1 @@
|
||||
{"email":"stofflees@gmail.com","sso_id":null,"base_url":"https://vault.scarif.space","identity_url":null,"ui_url":null,"notifications_url":null,"lock_timeout":3600,"sync_interval":3600,"pinentry":"pinentry","client_cert_path":null}
|
||||
@@ -193,8 +193,10 @@ alias \
|
||||
g="git" \
|
||||
ga="git add" \
|
||||
dga="dgit add -f" \
|
||||
dgA="dgit add -A" \
|
||||
dgc="dgit commit" \
|
||||
dgcm="dgit commit -m" \
|
||||
dgcam="dgit commit -a -m" \
|
||||
dgs="dgit status" \
|
||||
dgd="dgit diff" \
|
||||
dgdc="dgit diff --cached" \
|
||||
|
||||
Reference in New Issue
Block a user