Compare commits

...
8 Commits
Author SHA1 Message Date
chris 467ae5e678 Testing 2026-10-04 11:06:32 +01:00
chris 45a612b227 Add rbw config 2026-10-02 14:24:34 +01:00
chris b24b0dcba9 Better git alias 2026-09-30 17:25:03 +01:00
chris 9b7e3507d8 Refactoring 2026-09-30 17:03:12 +01:00
chris 657851bc02 Move windows to existing monitors 2026-09-29 17:15:31 +01:00
chris 015118d74a Update opacity 2026-09-29 15:46:15 +01:00
chris a73c80531b Fix keybinds 2026-09-27 18:45:57 +01:00
chris e9d4fd2851 Hyprland improvements 2026-09-27 17:06:16 +01:00
13 changed files with 304 additions and 121 deletions
+2 -21
View File
@@ -61,13 +61,13 @@ hl.window_rule {
-- Only a subtle opacity change, but not for video sites
hl.window_rule {
opacity = '1.0 0.97',
opacity = '1.0 0.8',
match = {
tag = 'chromium-based-browser',
},
}
hl.window_rule {
opacity = '1.0 0.97',
opacity = '1.0 0.8',
match = {
tag = 'firefox-based-browser',
},
@@ -165,25 +165,6 @@ hl.window_rule {
},
}
-- 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)$',
},
}
-- Float Nextcloud
hl.window_rule {
float = true,
+49 -1
View File
@@ -5,6 +5,13 @@ hl.on('hyprland.start', function()
exec 'nextcloud'
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()
@@ -16,6 +23,47 @@ 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
-37
View File
@@ -232,43 +232,6 @@ bind(
'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.dispatch_exec_cmd 'station-launch-or-focus ^superProductivity$ "uwsm-app -- super-productivity"'
hl.dispatch_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.dispatch_exec_cmd 'station-launch-or-focus spotify'
hl.dispatch_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.dispatch_exec_cmd 'station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"'
hl.dispatch_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-discord.com__channels_@me-Default$ "station-launch-webapp https://discord.com/channels/@me"'
end
end, 'Toggle comms workspace')
-- Cycle through applications on active workspace
bind(
'SUPER + TAB',
+5 -1
View File
@@ -1,5 +1,9 @@
DEFAULT_LAYOUT = 'master'
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
@@ -73,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
+1
View File
@@ -7,4 +7,5 @@ require 'looknfeel'
require 'input'
require 'windows'
require 'monitors'
require 'scratchpad'
+103 -19
View File
@@ -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
+3 -3
View File
@@ -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',
+60
View File
@@ -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
View File
@@ -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',
}
+60 -22
View File
@@ -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()
local active_workspace = active_window.workspace
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] })
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
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
end
if is_laptop_screen_focused() then
hl.workspace_rule { workspace = 'name:' .. tostring(workspace.name), layout = 'monocle' }
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
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
View File
@@ -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}
+2
View File
@@ -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" \