diff --git a/config/hypr/hyprland.lua b/config/hypr/hyprland.lua index 40a86de..5eef442 100644 --- a/config/hypr/hyprland.lua +++ b/config/hypr/hyprland.lua @@ -1,16 +1,40 @@ -- require("keybinds.lua") hl.monitor({ output = "desc:Lenovo Group Limited 0x41A0", mode = "highrr", position = "0x0", scale = "1.0" }) hl.monitor({ output = "desc:Samsung Display Corp. 0x4143", mode = "highrr", position = "0x0", scale = "2" }) -hl.monitor({ output = "desc:LG Electronics LG HDR 4K 406NTZN74597", mode = "preferred", position = "auto-right", scale = "1.333333" }) -hl.monitor({ output = "desc:Ancor Communications Inc ASUS MG28U 0x00009B77", mode = "preferred", position = "auto-right", scale = "1.333333" }) +hl.monitor({ + output = "desc:LG Electronics LG HDR 4K 406NTZN74597", + mode = "preferred", + position = "auto-right", + scale = + "1.333333" +}) +hl.monitor({ + output = "desc:Ancor Communications Inc ASUS MG28U 0x00009B77", + mode = "preferred", + position = "auto-right", + scale = + "1.333333" +}) -- hl.monitor({ output = "eDP-1", mode = "preferred", position = "0x0", scale = "1.0" }) -hl.monitor({ output = "desc:LG Electronics LG HDR WQHD 0x0006530C", mode = "preferred", position = "auto-up", scale = "1.333333" }) +hl.monitor({ + output = "desc:LG Electronics LG HDR WQHD 0x0006530C", + mode = "preferred", + position = "auto-up", + scale = + "1.333333" +}) hl.monitor({ output = "CAP Capture 0x00000001", mode = "1920x1080@60", position = "auto-down", scale = 1 }) hl.monitor({ output = "HDMI-A-1", mode = "1920x1080@60", position = "auto-down", scale = 1 }) -hl.monitor({ output = "desc:Ancor Communications Inc ASUS PB238 DCLMTF074371", mode = "preferred", position = "auto", scale = "1.0" }) +hl.monitor({ + output = "desc:Ancor Communications Inc ASUS PB238 DCLMTF074371", + mode = "preferred", + position = "auto", + scale = + "1.0" +}) hl.monitor({ output = "desc:Lenovo Group Limited L15 U133R0A2", mode = "preferred", position = "auto-left", scale = 1 }) hl.monitor({ output = "desc:Lenovo Group Limited M15 V30F2A15", mode = "preferred", position = "auto-left", scale = 1 }) hl.monitor({ output = "desc:Proteon TYPE-C 8R33926O00QS", mode = "preferred", position = "auto-right", scale = "1.0" }) @@ -18,8 +42,20 @@ hl.monitor({ output = "desc:Stargate Technology TYPE-C", mode = "preferred", pos hl.monitor({ output = "desc:GWD ARZOPA 000000000000", mode = "preferred", position = "auto-left", scale = "1.0" }) hl.monitor({ output = "desc:BNQ BenQ EX3203R 7CL00509019", mode = "preferred", position = "auto", scale = 1 }) hl.monitor({ output = "desc:BNQ BenQ EX3501R N4M05650019", mode = "preferred", position = "auto-right", scale = "1.0" }) -hl.monitor({ output = "desc:Dell Inc. DELL U3818DW 97F8P8AD0HEL", mode = "preferred", position = "auto-left", scale = "1.0" }) -hl.monitor({ output = "desc:Microstep MSI MAG342CQR DB6H252300057", mode = "preferred", position = "auto-right", scale = "1.0" }) +hl.monitor({ + output = "desc:Dell Inc. DELL U3818DW 97F8P8AD0HEL", + mode = "preferred", + position = "auto-left", + scale = + "1.0" +}) +hl.monitor({ + output = "desc:Microstep MSI MAG342CQR DB6H252300057", + mode = "preferred", + position = "auto-right", + scale = + "1.0" +}) hl.config({ input = { @@ -245,7 +281,7 @@ function fetch_or_launch(opts) })) end - hl.dispatch(hl.dsp.focus({window = client})) + hl.dispatch(hl.dsp.focus({ window = client })) local layout = client.layout if not (layout and layout.name == "master" and layout.is_master) then @@ -291,10 +327,11 @@ hl.bind(LEADER .. "S", hl.dsp.exec_raw("ostt launch --paste"), { description = " hl.bind(LEADER .. "I", function() sysinfo() end, { description = "Show system info" }) -- Open rofi on first press, closes it on second -hl.bind(LEADER .. "Space", hl.dsp.exec_raw("rofi -show combi --modes combi"), { release = true, description = "Open Application Menu" }) +hl.bind(LEADER .. "Space", hl.dsp.exec_raw("rofi -show combi --modes combi"), + { release = true, description = "Open Application Menu" }) hl.bind(LEADER .. "SHIFT + SPACE", hl.dsp.exec_cmd("~/.local/bin/hyprland-fetch-client"), { release = true, description = "Fetch client" }) -hl.bind(LEADER .. "CONTROL + SPACE", +hl.bind(LEADER .. "CONTROL + SPACE", hl.dsp.exec_cmd("~/.local/bin/hyprland-focus-client"), { release = true, description = "Focus client" } ) @@ -306,7 +343,8 @@ hl.bind(LEADER .. "slash", hl.bind(HYPR .. "V", hl.dsp.exec_cmd("pavucontrol"), { description = "Volume control" }) hl.bind(HYPR .. "B", hl.dsp.exec_cmd("blueberry"), { description = "Bluetooth manager" }) -hl.bind(HYPR .. "semicolon", hl.dsp.exec_cmd("~/.local/bin/set-wallpaper.sh categories/quotes"), { description = "get new wallpaper" }) +hl.bind(HYPR .. "semicolon", hl.dsp.exec_cmd("~/.local/bin/set-wallpaper.sh categories/quotes"), + { description = "get new wallpaper" }) hl.bind("Print", hl.dsp.exec_cmd("hyprshot -m window"), { description = "Take screenshot" }) hl.bind("SHIFT + Print", hl.dsp.exec_cmd("hyprshot -m region"), { description = "Take screenshot" }) @@ -367,12 +405,17 @@ hl.bind(HYPR .. "F", dispatch_focus_or_launch({ cmd = "pcmanfm", }), { description = "File Manager" }) -hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { repeating = true, description = "Volume down" }) -hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), { repeating = true, description = "Volume up" }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), + { repeating = true, description = "Volume down" }) +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), + { repeating = true, description = "Volume up" }) hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { description = "Toggle mute" }) -hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { description = "Toggle mic mute" }) -hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s 10%+"), { repeating = true, description = "Brightness up" }) -hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 10%-"), { repeating = true, description = "Brightness down" }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), + { description = "Toggle mic mute" }) +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s 10%+"), + { repeating = true, description = "Brightness up" }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 10%-"), + { repeating = true, description = "Brightness down" }) hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { description = "Play/pause media" }) hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { description = "Previous media" }) hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { description = "Next media" }) @@ -436,7 +479,7 @@ hl.bind(LEADER .. "comma", function() hl.dispatch(hl.dsp.layout("cyclenext")) hl.dispatch(hl.dsp.layout("swapwithmaster")) -- hl.dispatch(hl.dsp.layout("focus l")) -end, { description = "Layout: Cycle previous" }) +end, { description = "Layout: Cycle previous" }) hl.bind(LEADER .. "semicolon", hl.dsp.workspace.toggle_special("special")) hl.bind(LEADER .. "SHIFT + semicolon", hl.dsp.window.move({ workspace = "special:special", follow = false }), @@ -588,8 +631,9 @@ hl.bind(LEADER .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) -- Move/resize windows with mainMod + LMB/RMB and dragging hl.bind(LEADER .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) hl.bind(LEADER .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) -hl.bind("mouse:275", hl.dsp.exec_cmd("wl-copy $(wl-paste -p)"), { mouse = true }) -hl.bind("mouse:276", hl.dsp.exec_cmd("wtype -M ctrl -M shift v -m ctrl -m shift"), { mouse = true }) +hl.bind("mouse:275", hl.dsp.window.cycle_next({ next = true }), { click = true, description = "Window: Cycle next" }) +hl.bind("mouse:276", hl.dsp.window.cycle_next({ next = false }), { click = true, description = "Window: Cycle previous" }) + -- hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) -- hl.gesture({ fingers = 3, direction = "down", mods = "ALT", action = "close" }) @@ -601,8 +645,11 @@ hl.bind("mouse:276", hl.dsp.exec_cmd("wtype -M ctrl -M shift v -m ctrl -m shift" -- hl.gesture({ fingers = 2, direction = "pinch", action = "cursorZoom", zoom_level = 1, mode = "live" }) hl.workspace_rule({ workspace = "special:special", border_size = 3 }) -hl.window_rule({ match = { class = "(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float|org.pulseaudio.pavucontrol)" }, tag = -"+floating-window" }) +hl.window_rule({ + match = { class = "(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float|org.pulseaudio.pavucontrol)" }, + tag = + "+floating-window" +}) hl.window_rule({ name = "ostt floating windows", @@ -619,14 +666,14 @@ hl.window_rule({ }) hl.window_rule({ - match= {class="code"}, - fullscreen_state=1, + match = { class = "code" }, + fullscreen_state = 1, }) hl.window_rule({ -- Fix some dragging issues with XWayland - name = "fix-xwayland-drags", - match = { + name = "fix-xwayland-drags", + match = { class = "^$", title = "^$", xwayland = true, @@ -646,14 +693,14 @@ hl.window_rule({ match = { class = "^(gcr-prompter)$" }, tag = "+user-menu" }) hl.window_rule({ match = { tag = "user-menu" }, stay_focused = true, no_anim = true, float = true, center = true, size = { "monitor_w/3", "monitor_h/3" } }) hl.window_rule({ - name = "Picture in Picture windows", - match = { title = "^.*[Pp]icture[ -][Ii]n[ -][Pp]icture.*$" }, - float = true, - pin = true, - rounding = 7, - opacity = "1 1", - move = { "monitor_w-window_w-10", "monitor_h-window_h-10" }, - size = { "monitor_w/4", "monitor_h/4" }, + name = "Picture in Picture windows", + match = { title = "^.*[Pp]icture[ -][Ii]n[ -][Pp]icture.*$" }, + float = true, + pin = true, + rounding = 7, + opacity = "1 1", + move = { "monitor_w-window_w-10", "monitor_h-window_h-10" }, + size = { "monitor_w/4", "monitor_h/4" }, }) -- Cursor size