Compare commits
10 Commits
7dcd8f4b2b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 295a437043 | |||
| 908876a7b8 | |||
| 3cd3c9ba19 | |||
| 3980ba3064 | |||
| f012e0251e | |||
| eb59384d2e | |||
| 5c6f656127 | |||
| 67f633f389 | |||
| 3ebab9e327 | |||
| a2ac88ce59 |
@@ -5,3 +5,4 @@ require("hyprland.environment")
|
|||||||
require("hyprland.animations")
|
require("hyprland.animations")
|
||||||
require("hyprland.rules")
|
require("hyprland.rules")
|
||||||
require("hyprland.mcsr")
|
require("hyprland.mcsr")
|
||||||
|
require("hyprland.plugins")
|
||||||
|
|||||||
@@ -80,14 +80,14 @@ hl.animation({
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
speed = 3,
|
speed = 3,
|
||||||
bezier = "easeOut",
|
bezier = "easeOut",
|
||||||
style = "slidefade 15%"
|
style = "slide"
|
||||||
})
|
})
|
||||||
hl.animation({
|
hl.animation({
|
||||||
leaf = "specialWorkspace",
|
leaf = "specialWorkspace",
|
||||||
enabled = true,
|
enabled = true,
|
||||||
speed = 3,
|
speed = 3,
|
||||||
bezier = "easeOut",
|
bezier = "easeOut",
|
||||||
style = "slidefadevert 10%"
|
style = "slidevert 15%"
|
||||||
})
|
})
|
||||||
hl.animation({
|
hl.animation({
|
||||||
leaf = "zoomFactor",
|
leaf = "zoomFactor",
|
||||||
|
|||||||
@@ -6,28 +6,64 @@ function bind(keys, dispatcher, flags)
|
|||||||
hl.bind(keys, dispatcher, flags)
|
hl.bind(keys, dispatcher, flags)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Window management
|
-- Workspaces
|
||||||
bind("SUPER + Q", hl.dsp.window.close())
|
-- Super + num goes to workspace #num
|
||||||
|
for i = 1, 9 do
|
||||||
|
bind('SUPER + ' .. tostring(i), hl.dsp.focus({workspace = i}))
|
||||||
|
end
|
||||||
|
-- Super + num moves focused window to workspace #num
|
||||||
|
for i = 1, 9 do
|
||||||
|
bind("SUPER + SHIFT + " .. tostring(i), hl.dsp.window.move({workspace = i}))
|
||||||
|
end
|
||||||
|
|
||||||
bind("SUPER + M", hl.dsp.window.float())
|
-- Select windows ordered top to bottom, left to right
|
||||||
bind("SUPER + M", function ()
|
local function select_window(n)
|
||||||
local monitor = hl.get_active_monitor()
|
local workspace = hl.get_active_special_workspace()
|
||||||
local window = hl.get_active_window()
|
if workspace == nil then
|
||||||
if (monitor == nil or window == nil) then return end
|
workspace = hl.get_active_workspace()
|
||||||
if not window.floating then return end
|
end
|
||||||
hl.dispatch(hl.dsp.window.resize({
|
local windows = hl.get_windows({workspace = workspace})
|
||||||
x = monitor.width - monitor.height * 0.1,
|
|
||||||
y = monitor.height * 0.9
|
|
||||||
}))
|
|
||||||
hl.dispatch(hl.dsp.window.center())
|
|
||||||
end)
|
|
||||||
bind("SUPER + F", hl.dsp.window.fullscreen())
|
|
||||||
bind("SUPER + X", hl.dsp.layout("swapsplit"))
|
|
||||||
bind("SUPER + B", hl.dsp.layout("togglesplit"))
|
|
||||||
|
|
||||||
bind("SUPER + SPACE", hl.dsp.global("quickshell:peek_bar"))
|
-- fuckass language doesn't have normal for loops
|
||||||
bind("SUPER + SPACE", hl.dsp.global("quickshell:peek_bar"), {release = true})
|
local i = 1
|
||||||
bind("SUPER + SUPER_L", hl.dsp.exec_cmd("quickshell ipc call topbar toggle"))
|
while i <= #windows do
|
||||||
|
if windows[i].pinned then
|
||||||
|
table.remove(windows, i)
|
||||||
|
else
|
||||||
|
i=i+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
table.sort(
|
||||||
|
windows,
|
||||||
|
function (a, b)
|
||||||
|
return ((a.at.x^2 + a.at.y^2) * 1)
|
||||||
|
< ((b.at.x^2 + b.at.y^2) * 1)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
return windows[n]
|
||||||
|
end
|
||||||
|
local function focus_window(n)
|
||||||
|
local window = select_window(n)
|
||||||
|
if window ~= nil then
|
||||||
|
hl.dispatch(hl.dsp.focus({window = window}))
|
||||||
|
hl.dispatch(hl.dsp.window.alter_zorder({mode = 'top', window = window}))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local focus_window_keys = {
|
||||||
|
'A',
|
||||||
|
'O',
|
||||||
|
'E',
|
||||||
|
'U',
|
||||||
|
'SHIFT + A',
|
||||||
|
'SHIFT + O',
|
||||||
|
'SHIFT + E',
|
||||||
|
'SHIFT + U',
|
||||||
|
}
|
||||||
|
for i, key in ipairs(focus_window_keys) do
|
||||||
|
bind('SUPER + ' .. key, function() focus_window(i) end)
|
||||||
|
end
|
||||||
|
|
||||||
-- Move/resize windows
|
-- Move/resize windows
|
||||||
bind("SUPER + H", hl.dsp.window.move({direction = "l"}))
|
bind("SUPER + H", hl.dsp.window.move({direction = "l"}))
|
||||||
@@ -46,99 +82,78 @@ bind("SUPER + ALT + S", hl.dsp.window.resize({x = 50, y = 0, relative = true}),
|
|||||||
bind("SUPER + mouse:272", hl.dsp.window.drag(), ({mouse = true}))
|
bind("SUPER + mouse:272", hl.dsp.window.drag(), ({mouse = true}))
|
||||||
bind("SUPER + mouse:273", hl.dsp.window.resize(), ({mouse = true}))
|
bind("SUPER + mouse:273", hl.dsp.window.resize(), ({mouse = true}))
|
||||||
|
|
||||||
-- Select windows ordered top to bottom, left to right
|
-- Window management
|
||||||
local function select_window(n)
|
bind('SUPER + APOSTROPHE', hl.dsp.window.close())
|
||||||
local workspace = hl.get_active_special_workspace()
|
bind('SUPER + COMMA', hl.dsp.window.fullscreen())
|
||||||
if workspace == nil then
|
bind('SUPER + PERIOD', function()
|
||||||
workspace = hl.get_active_workspace()
|
-- Float window, resize to 90%, and center it
|
||||||
end
|
hl.dispatch(hl.dsp.window.float())
|
||||||
local windows = hl.get_windows({workspace = workspace})
|
local monitor = hl.get_active_monitor()
|
||||||
table.sort(
|
local window = hl.get_active_window()
|
||||||
windows,
|
if (monitor == nil or window == nil) then return end
|
||||||
function (a, b)
|
if not window.floating then return end
|
||||||
if a.at.x < b.at.x then
|
hl.dispatch(hl.dsp.window.resize({
|
||||||
return true
|
x = monitor.width - monitor.height * 0.1,
|
||||||
end
|
y = monitor.height * 0.9
|
||||||
if a.at.x > b.at.x then
|
}))
|
||||||
return false
|
hl.dispatch(hl.dsp.window.center())
|
||||||
end
|
end)
|
||||||
return a.at.y < b.at.y
|
bind('SUPER + P', hl.dsp.layout('togglesplit'))
|
||||||
end
|
bind('SUPER + Y', hl.dsp.layout('swapsplit'))
|
||||||
)
|
|
||||||
return windows[n]
|
|
||||||
end
|
|
||||||
local function focus_window(n)
|
|
||||||
local window = select_window(n)
|
|
||||||
if window ~= nil then
|
|
||||||
hl.dispatch(hl.dsp.focus({window = window}))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local function swap_window(n)
|
|
||||||
local window = select_window(n)
|
|
||||||
if window ~= nil then
|
|
||||||
hl.dispatch(hl.dsp.window.swap({target = window}))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
bind("SUPER + A", function() focus_window(1) end)
|
|
||||||
bind("SUPER + O", function() focus_window(2) end)
|
|
||||||
bind("SUPER + E", function() focus_window(3) end)
|
|
||||||
bind("SUPER + U", function() focus_window(4) end)
|
|
||||||
bind("SUPER + SHIFT + A", function() focus_window(5) end)
|
|
||||||
bind("SUPER + SHIFT + O", function() focus_window(6) end)
|
|
||||||
bind("SUPER + SHIFT + E", function() focus_window(7) end)
|
|
||||||
bind("SUPER + SHIFT + U", function() focus_window(8) end)
|
|
||||||
|
|
||||||
bind("SUPER + ALT + A", function() swap_window(1) end)
|
|
||||||
bind("SUPER + ALT + O", function() swap_window(2) end)
|
|
||||||
bind("SUPER + ALT + E", function() swap_window(3) end)
|
|
||||||
bind("SUPER + ALT + U", function() swap_window(4) end)
|
|
||||||
bind("SUPER + ALT + SHIFT + A", function() swap_window(5) end)
|
|
||||||
bind("SUPER + ALT + SHIFT + O", function() swap_window(6) end)
|
|
||||||
bind("SUPER + ALT + SHIFT + E", function() swap_window(7) end)
|
|
||||||
bind("SUPER + ALT + SHIFT + U", function() swap_window(8) end)
|
|
||||||
|
|
||||||
-- Workspaces
|
|
||||||
bind("SUPER + 1", hl.dsp.focus({workspace = 1}))
|
|
||||||
bind("SUPER + 2", hl.dsp.focus({workspace = 2}))
|
|
||||||
bind("SUPER + 3", hl.dsp.focus({workspace = 3}))
|
|
||||||
bind("SUPER + 4", hl.dsp.focus({workspace = 4}))
|
|
||||||
bind("SUPER + 5", hl.dsp.focus({workspace = 5}))
|
|
||||||
bind("SUPER + 6", hl.dsp.focus({workspace = 6}))
|
|
||||||
bind("SUPER + 7", hl.dsp.focus({workspace = 7}))
|
|
||||||
bind("SUPER + 8", hl.dsp.focus({workspace = 8}))
|
|
||||||
bind("SUPER + 9", hl.dsp.focus({workspace = 9}))
|
|
||||||
|
|
||||||
bind("SUPER + SHIFT + 1", hl.dsp.window.move({workspace = 1, follow = true}))
|
|
||||||
bind("SUPER + SHIFT + 2", hl.dsp.window.move({workspace = 2, follow = true}))
|
|
||||||
bind("SUPER + SHIFT + 3", hl.dsp.window.move({workspace = 3, follow = true}))
|
|
||||||
bind("SUPER + SHIFT + 4", hl.dsp.window.move({workspace = 4, follow = true}))
|
|
||||||
bind("SUPER + SHIFT + 5", hl.dsp.window.move({workspace = 5, follow = true}))
|
|
||||||
bind("SUPER + SHIFT + 6", hl.dsp.window.move({workspace = 6, follow = true}))
|
|
||||||
bind("SUPER + SHIFT + 7", hl.dsp.window.move({workspace = 7, follow = true}))
|
|
||||||
bind("SUPER + SHIFT + 8", hl.dsp.window.move({workspace = 8, follow = true}))
|
|
||||||
bind("SUPER + SHIFT + 9", hl.dsp.window.move({workspace = 9, follow = true}))
|
|
||||||
|
|
||||||
-- Multi-monitor
|
|
||||||
bind("SUPER + PERIOD", hl.dsp.focus({monitor = -1}))
|
|
||||||
bind("SUPER + P", hl.dsp.workspace.move({monitor = -1}))
|
|
||||||
|
|
||||||
-- Screen locking
|
|
||||||
bind("SUPER + ESCAPE", hl.dsp.exec_cmd("~/.config/scripts/lock.sh"), {locked = true})
|
|
||||||
bind("XF86Go", hl.dsp.exec_cmd("~/.config/scripts/idle-toggle.sh"))
|
|
||||||
bind("switch:on:Lid Switch", hl.dsp.exec_cmd(
|
|
||||||
"quickshell ipc call lock instalock; sleep 0.5; systemctl suspend"
|
|
||||||
))
|
|
||||||
|
|
||||||
-- Special workspace
|
-- Special workspace
|
||||||
bind("SUPER + V", hl.dsp.workspace.toggle_special())
|
bind("SUPER + SEMICOLON", function ()
|
||||||
bind("SUPER + W", function ()
|
|
||||||
if hl.get_active_special_workspace() == nil then
|
if hl.get_active_special_workspace() == nil then
|
||||||
hl.dispatch(hl.dsp.window.move({workspace = "special"}))
|
hl.dispatch(hl.dsp.window.move({workspace = "special"}))
|
||||||
else
|
else
|
||||||
hl.dispatch(hl.dsp.window.move({workspace = hl.get_active_workspace()}))
|
hl.dispatch(hl.dsp.window.move({workspace = hl.get_active_workspace()}))
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
bind('SUPER + Q', hl.dsp.workspace.toggle_special())
|
||||||
|
|
||||||
|
-- Multi monitor
|
||||||
|
bind("SUPER + J", hl.dsp.focus({monitor = -1}))
|
||||||
|
bind("SUPER + SHIFT + J", hl.dsp.window.move({monitor = -1}))
|
||||||
|
|
||||||
|
-- Screen locking
|
||||||
|
bind("SUPER + ESCAPE", hl.dsp.exec_cmd("~/.config/scripts/lock.sh"), {locked = true})
|
||||||
|
bind("SUPER + SHIFT + ESCAPE", hl.dsp.exec_cmd("quickshell ipc call lock open"))
|
||||||
|
bind("XF86Go", hl.dsp.exec_cmd("~/.config/scripts/idle-toggle.sh"))
|
||||||
|
bind("switch:on:Lid Switch", hl.dsp.exec_cmd(
|
||||||
|
"quickshell ipc call lock instalock; sleep 0.5; systemctl suspend"
|
||||||
|
))
|
||||||
|
|
||||||
|
-- Open favourites
|
||||||
|
bind("SUPER + G", hl.dsp.exec_cmd("zen-browser"))
|
||||||
|
bind("SUPER + R", hl.dsp.exec_cmd("keepassxc"))
|
||||||
|
bind("SUPER + L", hl.dsp.exec_cmd("kitty"))
|
||||||
|
|
||||||
|
-- Screen capturing
|
||||||
|
local zoom = 1
|
||||||
|
bind("SUPER + Z", function()
|
||||||
|
zoom = zoom + 1
|
||||||
|
hl.config({cursor = {zoom_factor = zoom, invisible = true}})
|
||||||
|
end)
|
||||||
|
bind ("SUPER + SHIFT + Z", function()
|
||||||
|
zoom = 1
|
||||||
|
hl.config({cursor = {zoom_factor = 1, invisible = false}})
|
||||||
|
end)
|
||||||
|
|
||||||
|
bind('SUPER + V', hl.dsp.exec_cmd(
|
||||||
|
'pgrep slurp || hyprshot -o ~/Pictures/Screenshots -z -s -m region'
|
||||||
|
))
|
||||||
|
bind('SUPER + ALT + V', hl.dsp.exec_cmd(
|
||||||
|
'pgrep slurp || hyprshot -o ~/Pictures/Screenshots -z -s -m window'
|
||||||
|
))
|
||||||
|
bind('SUPER + SHIFT + V', hl.dsp.exec_cmd(
|
||||||
|
'pgrep slurp || hyprshot -o ~/Pictures/Screenshots -z -s -m active -m output'
|
||||||
|
))
|
||||||
|
|
||||||
|
bind('SUPER + W', hl.dsp.exec_cmd('quickshell ipc call overlay open'))
|
||||||
|
bind('SUPER + M', hl.dsp.exec_cmd('wayscriber --active'))
|
||||||
|
bind('SUPER + ALT + M', hl.dsp.exec_cmd('wl-paste | satty -f -'))
|
||||||
|
bind("SHIFT + XF86Display", hl.dsp.exec_cmd("~/.config/scripts/vnc-toggle.sh"))
|
||||||
|
bind("XF86Display", hl.dsp.exec_cmd("pkill -x quickshell; quickshell"))
|
||||||
|
|
||||||
-- Adjust brightness
|
-- Adjust brightness
|
||||||
bind(
|
bind(
|
||||||
@@ -164,50 +179,26 @@ bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd(
|
|||||||
bind("XF86AudioLowerVolume", hl.dsp.exec_cmd(
|
bind("XF86AudioLowerVolume", hl.dsp.exec_cmd(
|
||||||
"pactl set-sink-volume @DEFAULT_SINK@ -1%"
|
"pactl set-sink-volume @DEFAULT_SINK@ -1%"
|
||||||
))
|
))
|
||||||
bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("quickshell ipc call osd open"))
|
|
||||||
bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("quickshell ipc call osd open"))
|
|
||||||
bind("XF86AudioMicMute", hl.dsp.exec_cmd("playerctl next"))
|
bind("XF86AudioMicMute", hl.dsp.exec_cmd("playerctl next"))
|
||||||
bind("XF86AudioMute", hl.dsp.exec_cmd("playerctl play-pause"))
|
bind("XF86AudioMute", hl.dsp.exec_cmd("playerctl play-pause"))
|
||||||
|
|
||||||
-- Screen capturing
|
-- Toggle bar
|
||||||
bind("SUPER + COMMA", hl.dsp.exec_cmd(
|
bind("SUPER + SPACE", hl.dsp.global("quickshell:peek_bar"))
|
||||||
"pgrep slurp || hyprshot -o ~/Pictures/Screenshots -z -s -m region"
|
bind("SUPER + SPACE", hl.dsp.global("quickshell:peek_bar"), {release = true})
|
||||||
))
|
bind("SUPER + SUPER_L", hl.dsp.exec_cmd("quickshell ipc call topbar toggle"), {device = {inclusive = false, list = {"zikway-hid-gamepad-keyboard"}}})
|
||||||
bind("SUPER + ALT + COMMA", hl.dsp.exec_cmd(
|
bind("SUPER + SUPER_R", hl.dsp.workspace.toggle_special(), {device = {inclusive = true, list = {"zikway-hid-gamepad-keyboard"}}})
|
||||||
"pgrep slurp || hyprshot -o ~/Pictures/Screenshots -z -s -m window"
|
|
||||||
))
|
-- Global back and forward binds
|
||||||
bind("SUPER + SHIFT + COMMA", hl.dsp.exec_cmd(
|
bind('ALT + SLASH', hl.dsp.send_shortcut({mods = 'ALT', key = 'LEFT'}))
|
||||||
"pgrep slurp || hyprshot -o ~/Pictures/Screenshots -z -s -m active -m output"
|
bind('ALT + EQUAL', hl.dsp.send_shortcut({mods = 'ALT', key = 'RIGHT'}))
|
||||||
))
|
|
||||||
local zoom = false
|
-- Switch keyboard layouts
|
||||||
bind("SUPER + SEMICOLON", function ()
|
bind('SUPER + RETURN', function()
|
||||||
if zoom then
|
if hl.get_config('input.kb_variant') == 'dvorak' then
|
||||||
hl.config({cursor = {zoom_factor = 1.0, invisible = false}})
|
hl.config({input = {kb_variant = ''}})
|
||||||
zoom = false
|
hl.exec_cmd('notify-send -i input-keyboard "Keyboard layout changed" "QWERTY"')
|
||||||
else
|
else
|
||||||
hl.config({cursor = {zoom_factor = 3.0, invisible = true}})
|
hl.config({input = {kb_variant = 'dvorak'}})
|
||||||
zoom = true
|
hl.exec_cmd('notify-send -i input-keyboard "Keyboard layout changed" "Dvorak"')
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
bind("SHIFT + XF86Display", hl.dsp.exec_cmd("~/.config/scripts/vnc-toggle.sh"))
|
|
||||||
bind("XF86Display", hl.dsp.exec_cmd("pkill -x quickshell; quickshell"))
|
|
||||||
bind("SUPER + D", hl.dsp.exec_cmd("wayscriber --active"))
|
|
||||||
bind("SUPER + SHIFT + D", hl.dsp.exec_cmd("wl-paste | satty -f -"))
|
|
||||||
|
|
||||||
-- Open favourites
|
|
||||||
bind("SUPER + G", hl.dsp.exec_cmd("zen-browser"))
|
|
||||||
bind("SUPER + C", hl.dsp.exec_cmd("vesktop"))
|
|
||||||
bind("SUPER + R", hl.dsp.exec_cmd("keepassxc"))
|
|
||||||
bind("SUPER + L", hl.dsp.exec_cmd("kitty"))
|
|
||||||
|
|
||||||
-- Pass keybinds to ninjabrainbot
|
|
||||||
bind("KP_HOME", hl.dsp.pass({window = "class:vesktop"}))
|
|
||||||
bind("KP_HOME", hl.dsp.pass({window = "class:vesktop"}), {release = true})
|
|
||||||
bind("KP_UP", hl.dsp.send_shortcut({mods = "CTRL + SHIFT", key = "M", window = "class:vesktop"}))
|
|
||||||
bind("KP_UP", hl.dsp.send_shortcut({mods = "CTRL + SHIFT", key = "M", window = "class:vesktop"}), {release = true})
|
|
||||||
bind("KP_PRIOR", hl.dsp.send_shortcut({mods = "CTRL + SHIFT", key = "D", window = "class:vesktop"}))
|
|
||||||
bind("KP_PRIOR", hl.dsp.send_shortcut({mods = "CTRL + SHIFT", key = "D", window = "class:vesktop"}), {release = true})
|
|
||||||
|
|
||||||
-- Remappings for prev and next
|
|
||||||
bind("ALT + SLASH", hl.dsp.send_shortcut({mods = "ALT", key = "LEFT"}))
|
|
||||||
bind("ALT + EQUAL", hl.dsp.send_shortcut({mods = "ALT", key = "RIGHT"}))
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ hl.config({
|
|||||||
repeat_delay = 600,
|
repeat_delay = 600,
|
||||||
touchpad = {
|
touchpad = {
|
||||||
natural_scroll = true
|
natural_scroll = true
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
general = {
|
general = {
|
||||||
gaps_in = 4,
|
gaps_in = 2,
|
||||||
gaps_out = 6,
|
gaps_out = 4,
|
||||||
float_gaps = 6,
|
float_gaps = 6,
|
||||||
border_size = 0,
|
border_size = 0,
|
||||||
layout = "dwindle",
|
layout = "dwindle",
|
||||||
@@ -18,24 +18,25 @@ hl.config({
|
|||||||
decoration = {
|
decoration = {
|
||||||
rounding = 12,
|
rounding = 12,
|
||||||
rounding_power = 3,
|
rounding_power = 3,
|
||||||
-- active_opacity = 0.95,
|
-- active_opacity = 0.9,
|
||||||
-- inactive_opacity = 0.9,
|
-- inactive_opacity = 0.9,
|
||||||
-- fullscreen_opacity = 1.0,
|
-- fullscreen_opacity = 1.0,
|
||||||
dim_special = 0,
|
dim_special = 0,
|
||||||
blur = {
|
blur = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
size = 8,
|
size = 4,
|
||||||
passes = 3,
|
passes = 3,
|
||||||
new_optimizations = true,
|
new_optimizations = true,
|
||||||
ignore_opacity = true,
|
ignore_opacity = true,
|
||||||
special = false,
|
special = true,
|
||||||
brightness = 0.2,
|
brightness = 0.8,
|
||||||
},
|
},
|
||||||
shadow = {
|
shadow = {
|
||||||
range = 12,
|
range = 12,
|
||||||
render_power = 3,
|
render_power = 3,
|
||||||
color = "#00000088",
|
color = "#00000088",
|
||||||
},
|
},
|
||||||
|
-- screen_shader = 'shader.frag',
|
||||||
},
|
},
|
||||||
dwindle = {
|
dwindle = {
|
||||||
preserve_split = true,
|
preserve_split = true,
|
||||||
@@ -64,6 +65,7 @@ hl.config({
|
|||||||
persistent_warps = true,
|
persistent_warps = true,
|
||||||
zoom_detached_camera = false,
|
zoom_detached_camera = false,
|
||||||
zoom_disable_aa = false,
|
zoom_disable_aa = false,
|
||||||
|
no_hardware_cursors = 1,
|
||||||
},
|
},
|
||||||
xwayland = {
|
xwayland = {
|
||||||
force_zero_scaling = true,
|
force_zero_scaling = true,
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ hl.on("hyprland.start", function()
|
|||||||
hl.exec_cmd("kanshi")
|
hl.exec_cmd("kanshi")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
hl.env("XCURSOR_SIZE", "22")
|
|
||||||
hl.env("XCURSOR_THEME", "GoogleDot-Black")
|
|
||||||
hl.env("GTK_THEME", "Graphite-Dark")
|
hl.env("GTK_THEME", "Graphite-Dark")
|
||||||
hl.env("GTK_ICON_THEME", "YAMIS")
|
hl.env("GTK_ICON_THEME", "YAMIS")
|
||||||
|
hl.env("XCURSOR_SIZE", "22")
|
||||||
|
hl.env("XCURSOR_THEME", "GoogleDot-black")
|
||||||
hl.env("HYPRCURSOR_SIZE", "22")
|
hl.env("HYPRCURSOR_SIZE", "22")
|
||||||
hl.env("HYPRCURSOR_THEME", "GoogleDot-hypr")
|
hl.env("HYPRCURSOR_THEME", "GoogleDot-hypr")
|
||||||
hl.env("QT_QPA_PLATFORMTHEME", "gtk3")
|
hl.env("QT_QPA_PLATFORMTHEME", "gtk3")
|
||||||
|
|||||||
38
hypr/hyprland/hardware/hummingbird.lua
Normal file
38
hypr/hyprland/hardware/hummingbird.lua
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
hl.config({
|
||||||
|
input = {
|
||||||
|
accel_profile = "flat",
|
||||||
|
sensitivity = 0,
|
||||||
|
follow_mouse = 2,
|
||||||
|
float_switch_override_focus = 0,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.device({
|
||||||
|
name = "tpps/2-elan-trackpoint",
|
||||||
|
sensitivity = 0.5,
|
||||||
|
enabled = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.device({
|
||||||
|
name = "elan067b:00-04f3:31f8-mouse",
|
||||||
|
sensitivity = 0.5,
|
||||||
|
enabled = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.device({
|
||||||
|
name = "pixart-hp-usb-optical-mouse",
|
||||||
|
enabled = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.monitor({
|
||||||
|
output = "eDP-1",
|
||||||
|
mode = "preferred",
|
||||||
|
scale = 1
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.monitor({
|
||||||
|
output = "",
|
||||||
|
mode = "preferred",
|
||||||
|
position = "auto",
|
||||||
|
scale = 1
|
||||||
|
})
|
||||||
2
hypr/hyprland/hardware/init.lua
Normal file
2
hypr/hyprland/hardware/init.lua
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
local hostname = io.popen('uname -n'):read('*l')
|
||||||
|
require('hyprland.hardware.' .. hostname)
|
||||||
16
hypr/hyprland/hardware/penguin.lua
Normal file
16
hypr/hyprland/hardware/penguin.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
hl.config({
|
||||||
|
input = {
|
||||||
|
accel_profile = "flat",
|
||||||
|
sensitivity = -0.8
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.device({
|
||||||
|
name = '-usb-optical-mouse',
|
||||||
|
sensitivity = -0.5
|
||||||
|
})
|
||||||
|
|
||||||
|
bind("KP_ADD", hl.dsp.exec_cmd("pkill -SIGUSR1 -x gpu-screen-reco"))
|
||||||
|
|
||||||
|
bind("SUPER + F7", hl.dsp.exec_cmd("pkill -x quickshell; quickshell"))
|
||||||
|
bind("SUPER + F4", hl.dsp.exec_cmd("playerctl next"))
|
||||||
@@ -5,15 +5,15 @@ end
|
|||||||
|
|
||||||
-- #MCSR
|
-- #MCSR
|
||||||
hl.define_submap("mcsr", function()
|
hl.define_submap("mcsr", function()
|
||||||
-- Tall macro
|
-- Eyezoom
|
||||||
hl.bind("KP_END", hl.dsp.window.fullscreen_state({internal = 0, client = 0}))
|
hl.bind("KP_END", hl.dsp.window.fullscreen_state({internal = 0, client = 0}), {ignore_mods = true})
|
||||||
hl.bind("KP_END", hl.dsp.window.float({action = "on"}))
|
hl.bind("KP_END", hl.dsp.window.float({action = "on"}), {ignore_mods = true})
|
||||||
hl.bind("KP_END", hl.dsp.window.resize({x = 1920, y = 16384}))
|
hl.bind("KP_END", hl.dsp.window.resize({x = 1920, y = 16384}), {ignore_mods = true})
|
||||||
hl.bind("KP_END", hl.dsp.window.move({x = 600, y = -7472}))
|
hl.bind("KP_END", hl.dsp.window.move({x = 600, y = -7472}), {ignore_mods = true})
|
||||||
hl.bind("KP_END", hl.dsp.exec_cmd("quickshell ipc call boateye open"))
|
hl.bind("KP_END", hl.dsp.exec_cmd("quickshell ipc call boateye open"), {ignore_mods = true})
|
||||||
hl.bind("KP_END", hl.dsp.exec_cmd("quickshell ipc call thin close"))
|
hl.bind("KP_END", hl.dsp.exec_cmd("quickshell ipc call thin close"), {ignore_mods = true})
|
||||||
|
|
||||||
-- Thin macro
|
-- Thin
|
||||||
hl.bind("KP_DOWN", hl.dsp.window.fullscreen_state({internal = 0, client = 0}))
|
hl.bind("KP_DOWN", hl.dsp.window.fullscreen_state({internal = 0, client = 0}))
|
||||||
hl.bind("KP_DOWN", hl.dsp.window.float({action = "on"}))
|
hl.bind("KP_DOWN", hl.dsp.window.float({action = "on"}))
|
||||||
hl.bind("KP_DOWN", hl.dsp.window.resize({x = 400, y = 1420}))
|
hl.bind("KP_DOWN", hl.dsp.window.resize({x = 400, y = 1420}))
|
||||||
@@ -21,25 +21,33 @@ hl.define_submap("mcsr", function()
|
|||||||
hl.bind("KP_DOWN", hl.dsp.exec_cmd("quickshell ipc call thin open"))
|
hl.bind("KP_DOWN", hl.dsp.exec_cmd("quickshell ipc call thin open"))
|
||||||
hl.bind("KP_DOWN", hl.dsp.exec_cmd("quickshell ipc call boateye close"))
|
hl.bind("KP_DOWN", hl.dsp.exec_cmd("quickshell ipc call boateye close"))
|
||||||
|
|
||||||
-- Wide macro
|
-- Wide
|
||||||
hl.bind("KP_NEXT", hl.dsp.window.fullscreen_state({internal = 0, client = 0}))
|
hl.bind("KP_NEXT", hl.dsp.window.fullscreen_state({internal = 0, client = 0}))
|
||||||
hl.bind("KP_NEXT", hl.dsp.window.float({action = "on"}))
|
hl.bind("KP_NEXT", hl.dsp.window.float({action = "on"}))
|
||||||
hl.bind("KP_NEXT", hl.dsp.window.resize({x = 2540, y = 400}))
|
hl.bind("KP_NEXT", hl.dsp.window.resize({x = 2540, y = 400}))
|
||||||
hl.bind("KP_NEXT", hl.dsp.window.center())
|
hl.bind("KP_NEXT", hl.dsp.window.center())
|
||||||
|
|
||||||
|
-- Fullscreen
|
||||||
|
hl.bind('5', hl.dsp.window.fullscreen())
|
||||||
|
hl.bind('5', hl.dsp.exec_cmd("quickshell ipc call boateye close; quickshell ipc call thin close"))
|
||||||
|
|
||||||
-- Search crafting mappings
|
-- Search crafting mappings
|
||||||
remap("mouse:275", "f3")
|
remap("mouse:275", "f3")
|
||||||
remap("1", "apostrophe")
|
remap("1", "apostrophe")
|
||||||
remap("apostrophe", "1")
|
remap("apostrophe", "1")
|
||||||
remap("k", "0")
|
remap("k", "0")
|
||||||
|
remap("0", "k")
|
||||||
remap("semicolon", "w")
|
remap("semicolon", "w")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- See https://github.com/hyprwm/Hyprland/discussions/15058
|
||||||
|
remap("mouse:275", "f3")
|
||||||
|
|
||||||
-- Close boateye
|
-- Close boateye
|
||||||
-- FIXME: use hl.on() to couple this to the actions of fullscreening/floating
|
-- FIXME: use hl.on() to couple this to the actions of fullscreening/floating
|
||||||
-- instead of the keybinds
|
-- instead of the keybinds
|
||||||
bind("SUPER + F", hl.dsp.exec_cmd("quickshell ipc call boateye close; quickshell ipc call thin close"))
|
bind("SUPER + SEMICOLON", hl.dsp.exec_cmd("quickshell ipc call boateye close; quickshell ipc call thin close"))
|
||||||
bind("SUPER + M", hl.dsp.exec_cmd("quickshell ipc call boateye close; quickshell ipc call thin close"))
|
bind("SUPER + J", hl.dsp.exec_cmd("quickshell ipc call boateye close; quickshell ipc call thin close"))
|
||||||
|
|
||||||
bind("KP_LEFT", hl.dsp.pass({window = "class:ninjabrainbot-Main"}))
|
bind("KP_LEFT", hl.dsp.pass({window = "class:ninjabrainbot-Main"}))
|
||||||
bind("KP_LEFT", hl.dsp.pass({window = "class:ninjabrainbot-Main"}), {release = true})
|
bind("KP_LEFT", hl.dsp.pass({window = "class:ninjabrainbot-Main"}), {release = true})
|
||||||
@@ -47,4 +55,5 @@ bind("KP_BEGIN", hl.dsp.pass({window = "class:ninjabrainbot-Main"}))
|
|||||||
bind("KP_BEGIN", hl.dsp.pass({window = "class:ninjabrainbot-Main"}), {release = true})
|
bind("KP_BEGIN", hl.dsp.pass({window = "class:ninjabrainbot-Main"}), {release = true})
|
||||||
bind("KP_RIGHT", hl.dsp.pass({window = "class:ninjabrainbot-Main"}))
|
bind("KP_RIGHT", hl.dsp.pass({window = "class:ninjabrainbot-Main"}))
|
||||||
bind("KP_RIGHT", hl.dsp.pass({window = "class:ninjabrainbot-Main"}), {release = true})
|
bind("KP_RIGHT", hl.dsp.pass({window = "class:ninjabrainbot-Main"}), {release = true})
|
||||||
|
bind("SHIFT + KP_BEGIN", hl.dsp.pass({window = "class:ninjabrainbot-Main"}))
|
||||||
|
bind("SHIFT + KP_BEGIN", hl.dsp.pass({window = "class:ninjabrainbot-Main"}), {release = true})
|
||||||
|
|||||||
23
hypr/hyprland/plugins.lua
Normal file
23
hypr/hyprland/plugins.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
if hl.plugin.gloview ~= nil then
|
||||||
|
hl.config({plugin = {
|
||||||
|
gloview = {
|
||||||
|
layout = 'rows',
|
||||||
|
blur = 1,
|
||||||
|
strip_all_card = true,
|
||||||
|
show_special = true,
|
||||||
|
above_namespaces = 'quickshell',
|
||||||
|
key_close = 'v',
|
||||||
|
key_next_workspace = 'l',
|
||||||
|
key_prev_workspace = 'k',
|
||||||
|
show_empty = true,
|
||||||
|
dynamic_workspaces = false,
|
||||||
|
}
|
||||||
|
}})
|
||||||
|
hl.bind('SUPER + K', hl.plugin.gloview.toggle, {submap_universal = true})
|
||||||
|
elseif hl.plugin.hyprexpo ~= nil then
|
||||||
|
hl.config({
|
||||||
|
hyprexpo = {
|
||||||
|
},
|
||||||
|
})
|
||||||
|
hl.bind('SUPER + K', function() hl.plugin.hyprexpo.expo('toggle') end)
|
||||||
|
end
|
||||||
@@ -4,6 +4,32 @@ hl.workspace_rule({ workspace = "f[1]s[false]", gaps_out = 0, gaps_in = 0 })
|
|||||||
hl.window_rule({ match = { float = false, workspace = "w[tv1]s[false]" }, border_size = 0 })
|
hl.window_rule({ match = { float = false, workspace = "w[tv1]s[false]" }, border_size = 0 })
|
||||||
hl.window_rule({ match = { float = false, workspace = "f[1]s[false]" }, border_size = 0 })
|
hl.window_rule({ match = { float = false, workspace = "f[1]s[false]" }, border_size = 0 })
|
||||||
|
|
||||||
|
-- For multiple monitors
|
||||||
|
function map_monitors()
|
||||||
|
local monitor_priority = {
|
||||||
|
["eDP-1"] = -1
|
||||||
|
}
|
||||||
|
local monitors = hl.get_monitors()
|
||||||
|
local nmonitors = #monitors
|
||||||
|
table.sort(monitors, function(a, b)
|
||||||
|
return (monitor_priority[a.name] or 0) > (monitor_priority[b.name] or 0)
|
||||||
|
end)
|
||||||
|
local workspace = 9
|
||||||
|
for i, monitor in ipairs(monitors) do
|
||||||
|
local lower_workspace = workspace + 1 - math.floor(9/nmonitors)
|
||||||
|
if i == nmonitors then
|
||||||
|
lower_workspace = 1
|
||||||
|
end
|
||||||
|
for j = workspace, lower_workspace, -1 do
|
||||||
|
hl.workspace_rule({workspace = tostring(j), monitor = monitor.name})
|
||||||
|
end
|
||||||
|
workspace = lower_workspace - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
map_monitors()
|
||||||
|
hl.on('monitor.added', map_monitors)
|
||||||
|
hl.on('monitor.removed', map_monitors)
|
||||||
|
|
||||||
-- Special workspace
|
-- Special workspace
|
||||||
hl.workspace_rule({ workspace = "s[true]", gaps_out = 64, gaps_in = 12})
|
hl.workspace_rule({ workspace = "s[true]", gaps_out = 64, gaps_in = 12})
|
||||||
|
|
||||||
@@ -44,7 +70,7 @@ hl.window_rule({
|
|||||||
class = "ninjabrainbot-Main"
|
class = "ninjabrainbot-Main"
|
||||||
},
|
},
|
||||||
float = true,
|
float = true,
|
||||||
move = {10, "monitor_h*0.5 - window_h*0.5"}
|
move = {6, "monitor_h*0.5 - window_h*0.5"}
|
||||||
})
|
})
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
match = {
|
match = {
|
||||||
@@ -53,11 +79,38 @@ hl.window_rule({
|
|||||||
float = true,
|
float = true,
|
||||||
size = { "monitor_w*0.95", "monitor_h*0.95"}
|
size = { "monitor_w*0.95", "monitor_h*0.95"}
|
||||||
})
|
})
|
||||||
|
hl.window_rule({
|
||||||
|
match = {
|
||||||
|
title = "monoverlay(-t)?"
|
||||||
|
},
|
||||||
|
float = true,
|
||||||
|
pin = true,
|
||||||
|
no_blur = true,
|
||||||
|
})
|
||||||
|
hl.window_rule({
|
||||||
|
match = {
|
||||||
|
title = "monoverlay-t"
|
||||||
|
},
|
||||||
|
decorate = false,
|
||||||
|
})
|
||||||
|
hl.window_rule({
|
||||||
|
match = {
|
||||||
|
title = '.*\'s Stream'
|
||||||
|
},
|
||||||
|
pin = true,
|
||||||
|
float = true
|
||||||
|
})
|
||||||
hl.layer_rule({
|
hl.layer_rule({
|
||||||
match = { namespace = "quickshell" },
|
match = { namespace = "quickshell" },
|
||||||
no_anim = true
|
no_anim = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
hl.on("window.open", function (window, active)
|
||||||
|
if hl.get_active_monitor().active_special_workspace ~= nil then
|
||||||
|
hl.dispatch(hl.dsp.window.move({workspace = hl.get_active_monitor().active_workspace, window = window}))
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
hl.on("window.active", function(window, active)
|
hl.on("window.active", function(window, active)
|
||||||
if window == nil or window.class == nil then
|
if window == nil or window.class == nil then
|
||||||
hl.dispatch(hl.dsp.submap("reset"))
|
hl.dispatch(hl.dsp.submap("reset"))
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
require('config.lazy')
|
require('config.lazy')
|
||||||
|
|
||||||
local cd = io.open("/tmp/fishwd", "r")
|
|
||||||
if cd ~= nil then
|
|
||||||
vim.cmd("cd " .. cd:read("a"))
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.lsp.enable({
|
vim.lsp.enable({
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"jdtls",
|
"jdtls",
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
# Setups
|
# Setups
|
||||||
format="$directory$git_branch$character"
|
format="$directory$git_branch$character"
|
||||||
right_format = "$sudo$cmd_duration"
|
|
||||||
# add_newline = false
|
# add_newline = false
|
||||||
|
|
||||||
# Other languages configurations:
|
# Other languages configurations:
|
||||||
|
|||||||
Reference in New Issue
Block a user