Compare commits

...

13 Commits

16 changed files with 523 additions and 314 deletions

View File

@@ -1,5 +1,10 @@
{ {
"diagnostics": { "diagnostics": {
"globals": ["hl", "ipc", "mainMod"] "globals": ["hl", "ipc", "mainMod"]
},
"workspace": {
"library": [
"/usr/share/hypr/stubs"
]
} }
} }

11
basic/devices.lua Normal file
View File

@@ -0,0 +1,11 @@
hl.device({
name = "corsair-corsair-slipstream-wireless-usb-receiver-keyboard",
tags = "corsair-mouse"
})
local d = { inclusive = true, list = { "corsair-mouse" } }
hl.bind("2", hl.dsp.exec_cmd("playerctl play-pause"), { device = d })
hl.bind("3", hl.dsp.workspace.toggle_special("notes"), { device = d })
hl.bind("4", hl.dsp.workspace.toggle_special("music"), { device = d })
hl.bind("5", hl.dsp.workspace.toggle_special("magic"), { device = d })
hl.bind("6", hl.dsp.workspace.toggle_special("vesktop"), { device = d })

View File

@@ -2,31 +2,48 @@
--------------------- ---------------------
------@meta ------@meta
--## @declaration hl, ipc, mainMod --## @declaration hl, ipc, mainMod
local mainMod = "SUPER" -- Sets "Windows" key as main modifier local mainMod = "SUPER" -- Sets "Windows" key as main modifier
local ipc = "qs -c noctalia-shell ipc call " local ipc = "qs -c noctalia-shell ipc call "
local custom = require("custom-functions")
-- 1. Basic Binds local hyper = "MOD3"
hl.bind(mainMod .. " + Q ", hl.dsp.exec_cmd(terminal)) require("basic/submaps")
hl.bind(mainMod .. " + C ", hl.dsp.window.close()) ---- 1. WINDOW MANAGEMENT ----
hl.bind(mainMod .. " + SHIFT + CTRL + M ", hl.dsp.exit()) -- 1.1 Workspace movement and tiling rule
-- hl.bind(mainMod .. " + E ", hl.dsp.exec(fileManager))
-- Workspace movement and tiling rule
hl.bind(mainMod .. "+ P" ,hl.dsp.window.float({ action = "toggle" })) hl.bind(mainMod .. "+ P" ,hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. "+ P" ,hl.dsp.window.pin()) hl.bind(mainMod .. "+ P" ,hl.dsp.window.pin())
hl.bind(mainMod .. "+ SHIFT + BACKSLASH" ,hl.dsp.window.float({ action = "toggle"})) hl.bind(mainMod .. "+ SHIFT + BACKSLASH" ,hl.dsp.window.float({ action = "toggle"}))
hl.bind(mainMod .. "+ BACKSLASH" ,hl.dsp.layout ("togglesplit")) hl.bind(mainMod .. "+ BACKSLASH" ,hl.dsp.layout ("togglesplit"))
hl.bind(mainMod .. "+ CTRL + BACKSLASH " ,hl.dsp.window.pseudo({action = "toggle"})) hl.bind(mainMod .. "+ CTRL + BACKSLASH " ,hl.dsp.window.pseudo({action = "toggle"}))
hl.bind(mainMod .. " + C " ,hl.dsp.window.close())
hl.bind(mainMod .. " + SHIFT + CTRL + M " ,hl.dsp.exit())
hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })
-- 1.2 Layout management and advanced window management
hl.bind(mainMod .. "+ SHIFT + I" ,hl.dsp.layout("swapwithmaster master"))
hl.bind(mainMod .. "+ I" ,hl.dsp.layout("rollnext"))
hl.bind(mainMod .. "+ O" ,hl.dsp.layout("swapnext loop"))
hl.bind(mainMod .. "+ SHIFT + O" ,hl.dsp.layout("swapprev"))
hl.bind(mainMod .. "+ SEMICOLON" ,hl.dsp.layout("orientationcycle left center right"))
-- 1.3 resize with arrows
hl.bind(mainMod .. " + right " ,hl.dsp.window.resize({ x = 20, y = 0, relative = true}) , {repeating = true})
hl.bind(mainMod .. " + left " ,hl.dsp.window.resize({ x =-20, y = 0, relative = true}) , {repeating = true})
hl.bind(mainMod .. " + up " ,hl.dsp.window.resize({ x = 0, y = -20, relative = true}) , {repeating = true})
hl.bind(mainMod .. " + down " ,hl.dsp.window.resize({ x = 0, y = 20, relative = true}) , {repeating = true})
-- 1.4 Move active window to a workspace with mainMod + SHIFT + [0-9]
hl.bind(mainMod .. " + SHIFT + 1 ", hl.dsp.window.move({workspace = 1 }))
hl.bind(mainMod .. " + SHIFT + 2 ", hl.dsp.window.move({workspace = 2 }))
hl.bind(mainMod .. " + SHIFT + 3 ", hl.dsp.window.move({workspace = 3 }))
hl.bind(mainMod .. " + SHIFT + 4 ", hl.dsp.window.move({workspace = 4 }))
hl.bind(mainMod .. " + SHIFT + 5 ", hl.dsp.window.move({workspace = 5 }))
hl.bind(mainMod .. " + SHIFT + 6 ", hl.dsp.window.move({workspace = 6 }))
hl.bind(mainMod .. " + SHIFT + 7 ", hl.dsp.window.move({workspace = 7 }))
hl.bind(mainMod .. " + SHIFT + 8 ", hl.dsp.window.move({workspace = 8 }))
hl.bind(mainMod .. " + SHIFT + 9 ", hl.dsp.window.move({workspace = 9 }))
hl.bind(mainMod .. " + SHIFT + 0 ", hl.dsp.window.move({workspace = 10}))
-- 1.5 Move/resize windows with mainMod + LMB/RMB and dragging
hl.bind(mainMod .. " + mouse:272 ", hl.dsp.window.drag(), {mouse = true})
hl.bind(mainMod .. " + mouse:273 ", hl.dsp.window.resize(), {mouse = true})
-- hl.bind(mainMod .. " + SEMICOLON ", hl.dsp.exec_cmd( hyprctl general:layout master ) ---- 2. NAVIGATION ----
-- hl.bind(mainMod .. " + APOSTROPHE ", hl.dsp.exec_cmd( hyprctl general:layout dwindle )
-- Compiler window
-- hl.bind(mainMod .. " + SHIFT + A ", "tagwindow", "compiler")
--hl.bind(mainMod .. " + A ", hl.dsp.exec_cmd( $XDG_CONFIG_HOME/hypr/scripts/compile.sh)
-- 2. Navigation
-- 2.1 Vim Binds -- 2.1 Vim Binds
hl.bind(mainMod .. " + H " ,hl.dsp.focus( { direction = "left" })) hl.bind(mainMod .. " + H " ,hl.dsp.focus( { direction = "left" }))
hl.bind(mainMod .. " + L " ,hl.dsp.focus( { direction = "right" })) hl.bind(mainMod .. " + L " ,hl.dsp.focus( { direction = "right" }))
@@ -39,20 +56,15 @@ hl.bind(mainMod .. " + SHIFT + J" , hl.dsp.window.move( { direction = "down" }
-- 2.2 Workspace and monitor keys -- 2.2 Workspace and monitor keys
hl.bind(mainMod .. " + mouse_up" ,hl.dsp.focus ({ workspace = "m-1"})) hl.bind(mainMod .. " + mouse_up" ,hl.dsp.focus ({ workspace = "m-1"}))
hl.bind(mainMod .. " + mouse_down" ,hl.dsp.focus ({ workspace = "m+1"})) hl.bind(mainMod .. " + mouse_down" ,hl.dsp.focus ({ workspace = "m+1"}))
hl.bind(mainMod .. " + SHIFT + mouse_up " , hl.dsp.focus ({ workspace = "e-1"})) hl.bind(mainMod .. " + SHIFT + mouse_up " ,hl.dsp.focus ({ workspace = "e+1"}))
hl.bind(mainMod .. " + SHIFT + mouse_down " , hl.dsp.focus ({ workspace = "e+1"})) hl.bind(mainMod .. " + SHIFT + mouse_down " ,hl.dsp.focus ({ workspace = "e-1"}))
hl.bind(mainMod .. " + CTRL + right" ,hl.dsp.focus ({ workspace = "m+1"})) hl.bind(mainMod .. " + CTRL + right" ,hl.dsp.focus ({ workspace = "m+1"}))
hl.bind(mainMod .. " + CTRL + left" ,hl.dsp.focus ({ workspace = "m-1"})) hl.bind(mainMod .. " + CTRL + left" ,hl.dsp.focus ({ workspace = "m-1"}))
hl.bind(mainMod .. " + CTRL + l" ,hl.dsp.focus ({ workspace = "m+1"}))
hl.bind(mainMod .. " + CTRL + h" ,hl.dsp.focus ({ workspace = "m-1"}))
hl.bind(mainMod .. " + TAB " ,hl.dsp.focus ({ monitor = "-1"})) hl.bind(mainMod .. " + TAB " ,hl.dsp.focus ({ monitor = "-1"}))
hl.bind(mainMod .. " + SHIFT + TAB " ,hl.dsp.focus ({ monitor = "+1"})) hl.bind(mainMod .. " + SHIFT + TAB " ,hl.dsp.focus ({ monitor = "+1"}))
-- 2.3 Switch workspaces with mainMod + [0-9]
---- 3. resize with arrows
hl.bind(mainMod .. " + right " , hl.dsp.window.resize({ x = 20, y = 0, relative = true}) , {repeating = true})
hl.bind(mainMod .. " + left " , hl.dsp.window.resize({ x =-20, y = 0, relative = true}) , {repeating = true})
hl.bind(mainMod .. " + up " , hl.dsp.window.resize({ x = 0, y = -20, relative = true}) , {repeating = true})
hl.bind(mainMod .. " + down " , hl.dsp.window.resize({ x = 0, y = 20, relative = true}) , {repeating = true})
---- 4. Switch workspaces with mainMod + [0-9]
hl.bind(mainMod .. " + 1 " ,hl.dsp.focus({workspace = 1 })) hl.bind(mainMod .. " + 1 " ,hl.dsp.focus({workspace = 1 }))
hl.bind(mainMod .. " + 2 " ,hl.dsp.focus({workspace = 2 })) hl.bind(mainMod .. " + 2 " ,hl.dsp.focus({workspace = 2 }))
hl.bind(mainMod .. " + 3 " ,hl.dsp.focus({workspace = 3 })) hl.bind(mainMod .. " + 3 " ,hl.dsp.focus({workspace = 3 }))
@@ -64,230 +76,92 @@ hl.bind(mainMod .. " + 8 ", hl.dsp.focus({workspace = 8 }))
hl.bind(mainMod .. " + 9 " ,hl.dsp.focus({workspace = 9 })) hl.bind(mainMod .. " + 9 " ,hl.dsp.focus({workspace = 9 }))
hl.bind(mainMod .. " + 0 " ,hl.dsp.focus({workspace = 10})) hl.bind(mainMod .. " + 0 " ,hl.dsp.focus({workspace = 10}))
---- 5. Move actihe window to a workspace with mainMod + SHIFT + [0-9] ---- 3 SPECIAL WORKSPACES ----
hl.bind(mainMod .. " + SHIFT + 1 ", hl.dsp.window.move({workspace = 1 })) -- 3.2 Switch to special workspaces with mainMod + [S, B, G, N, U, R]
hl.bind(mainMod .. " + SHIFT + 2 ", hl.dsp.window.move({workspace = 2 }))
hl.bind(mainMod .. " + SHIFT + 3 ", hl.dsp.window.move({workspace = 3 }))
hl.bind(mainMod .. " + SHIFT + 4 ", hl.dsp.window.move({workspace = 4 }))
hl.bind(mainMod .. " + SHIFT + 5 ", hl.dsp.window.move({workspace = 5 }))
hl.bind(mainMod .. " + SHIFT + 6 ", hl.dsp.window.move({workspace = 6 }))
hl.bind(mainMod .. " + SHIFT + 7 ", hl.dsp.window.move({workspace = 7 }))
hl.bind(mainMod .. " + SHIFT + 8 ", hl.dsp.window.move({workspace = 8 }))
hl.bind(mainMod .. " + SHIFT + 9 ", hl.dsp.window.move({workspace = 9 }))
hl.bind(mainMod .. " + SHIFT + 0 ", hl.dsp.window.move({workspace = 10}))
---- 6. special workspace (scratchpad)
hl.bind(mainMod .. " + S " ,hl.dsp.workspace.toggle_special("magic")) hl.bind(mainMod .. " + S " ,hl.dsp.workspace.toggle_special("magic"))
hl.bind(mainMod .. " + B ", hl.dsp.workspace.toggle_special("magic2 ")) hl.bind(mainMod .. " + B " ,hl.dsp.workspace.toggle_special("book"))
hl.bind(mainMod .. " + X " ,hl.dsp.workspace.toggle_special("phantom")) hl.bind(mainMod .. " + X " ,hl.dsp.workspace.toggle_special("phantom"))
hl.bind(mainMod .. " + X ", hl.dsp.workspace.toggle_special("phantom ")) hl.bind(mainMod .. " + SHIFT + A" ,hl.dsp.workspace.toggle_special("gaming"))
hl.bind(mainMod .. " + A " ,hl.dsp.workspace.toggle_special("notes"))
hl.bind(mainMod .. " + U " ,hl.dsp.workspace.toggle_special("music"))
hl.bind(mainMod .. " + R " ,hl.dsp.workspace.toggle_special("music"))
-- 3.3 Move window to special workspaces with mainMod + SHIFT + [S, B, G, N, U, R]
hl.bind(mainMod .. " + SHIFT + S " ,hl.dsp.window.move({ workspace = "special:magic" })) hl.bind(mainMod .. " + SHIFT + S " ,hl.dsp.window.move({ workspace = "special:magic" }))
hl.bind(mainMod .. " + SHIFT + B " ,hl.dsp.window.move({ workspace = "special:book" })) hl.bind(mainMod .. " + SHIFT + B " ,hl.dsp.window.move({ workspace = "special:book" }))
hl.bind(mainMod .. " + SHIFT + G " ,hl.dsp.window.move({ workspace = "special:gaming" })) hl.bind(mainMod .. " + SHIFT + G " ,hl.dsp.window.move({ workspace = "special:gaming" }))
hl.bind(mainMod .. " + SHIFT + N " ,hl.dsp.window.move({ workspace = "special:notes" }))
hl.bind(mainMod .. " + SHIFT + U " ,hl.dsp.window.move({ workspace = "special:music" }))
hl.bind(mainMod .. " + SHIFT + R " ,hl.dsp.window.move({ workspace = "special:music" }))
-- 3.4 Launch applications in special workspaces with mainMod + [D, E, G, N]
hl.bind(mainMod .. " + D " ,function () hl.dispatch(hl.dsp.workspace.toggle_special("vesktop")) hl.exec_cmd("vesktop -m", {workspace ="special:vesktop silent"}) end)
hl.bind(mainMod .. " + E " ,function () hl.dispatch(hl.dsp.workspace.toggle_special("email")) hl.exec_cmd(email, {workspace ="special:email silent"}) end)
hl.bind(mainMod .. " + G " ,function () hl.dispatch(hl.dsp.workspace.toggle_special("gaming")) hl.exec_cmd("steam -forcedesktopscaling 0.5",{workspace ="special:gaming silent"}) end)
hl.bind(mainMod .. " + N " ,function () hl.dispatch(hl.dsp.workspace.toggle_special("notes")) end)-- TODO dont run if obsidian alr running
hl.bind(mainMod .. " + D " ,function () ---- 4. Multimedia keys for volume and LCD brightness ----
hl.dispatch(hl.dsp.workspace.toggle_special("vesktop")) hl.bind(mainMod .."+ CTRL + mouse_down" ,hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"))
hl.exec_cmd("vesktop -m", {workspace ="special:vesktop silent"}) hl.bind(mainMod .."+ CTRL + mouse_up" ,hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"))
end)
hl.bind(mainMod .. " + E " ,function ()
hl.dispatch(hl.dsp.workspace.toggle_special("email"))
hl.exec_cmd(email, {workspace ="special:email silent"})
end)
hl.bind(mainMod .. " + G " ,function ()
hl.dispatch(hl.dsp.workspace.toggle_special("gaming"))
hl.exec_cmd("steam -forcedesktopscaling 0.5",{workspace ="special:gaming silent"})
end)
hl.bind(mainMod .. " + N " ,function ()
hl.dispatch(hl.dsp.workspace.toggle_special("notes"))
-- TODO dont run if obsidian alr running
-- hl.exec_cmd(notes)
end)
-- 8. Move/resize windows with mainMod + LMB/RMB and dragging
hl.bind(mainMod .. " + mouse:272 ", hl.dsp.window.drag(), {mouse = true})
hl.bind(mainMod .. " + mouse:273 ", hl.dsp.window.resize(), {mouse = true})
---- 9. Multimedia keys for volume and LCD brightness
hl.bind("XF86AudioRaiseVolume" ,hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+")) hl.bind("XF86AudioRaiseVolume" ,hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"))
hl.bind("XF86AudioLowerVolume" ,hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-")) hl.bind("XF86AudioLowerVolume" ,hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"))
hl.bind("XF86AudioMute" ,hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle")) hl.bind("XF86AudioMute" ,hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"))
hl.bind("XF86AudioMicMute" ,hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle")) hl.bind("XF86AudioMicMute" ,hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"))
hl.bind("XF86MonBrightnessUp" ,hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+")) hl.bind("XF86MonBrightnessUp" ,hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"))
hl.bind("XF86MonBrightnessDown" ,hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-")) hl.bind("XF86MonBrightnessDown" ,hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"))
hl.bind("XF86AudioNext" ,hl.dsp.exec_cmd("playerctl next")) -- Requires playerctl
---- Requires playerctl
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"))
hl.bind("XF86AudioPause" ,hl.dsp.exec_cmd("playerctl play-pause")) hl.bind("XF86AudioPause" ,hl.dsp.exec_cmd("playerctl play-pause"))
hl.bind("XF86AudioPlay" ,hl.dsp.exec_cmd("playerctl play-pause")) hl.bind("XF86AudioPlay" ,hl.dsp.exec_cmd("playerctl play-pause"))
hl.bind("XF86AudioPrev" ,hl.dsp.exec_cmd("playerctl previous")) hl.bind("XF86AudioPrev" ,hl.dsp.exec_cmd("playerctl previous"))
hl.bind("ALT + mouse:274" ,hl.dsp.exec_cmd("playerctl play-pause")) hl.bind("ALT + mouse:274" ,hl.dsp.exec_cmd("playerctl play-pause"))
hl.bind(mainMod .. " + SPACE " ,hl.dsp.exec_cmd("playerctl play-pause")) hl.bind(mainMod .. " + SPACE " ,hl.dsp.exec_cmd("playerctl play-pause"))
---- 5. CUSTOM APPLICATION LAUNCHERS ----
---- 10. Application launching -- 5.1 Special Terminal Windows
hl.bind(mainMod .. " + Q " ,hl.dsp.exec_cmd(terminal))
hl.bind(mainMod .. " + SHIFT + Q " ,hl.dsp.exec_cmd(terminal .. " ssh -v sol"))
hl.bind(" ALT + Q " ,hl.dsp.exec_cmd(terminal , { tag = "popup" }))
hl.bind(mainMod .. " + W " ,hl.dsp.exec_cmd(terminal , { tag = "popup" }))
hl.bind(mainMod .. " + SHIFT + W " ,hl.dsp.exec_cmd(terminal .. " ssh -v sol" , { tag = "popup" }))
hl.bind(mainMod .. " + CTRL + W " ,hl.dsp.exec_cmd(terminal .. " ssh root@galaxy" ,{ tag = "popup" }))
-- 5.2 Application Launchers
hl.bind(mainMod .. " + SUPER_L" ,hl.dsp.exec_cmd(launcher .. " toggle") , { release = true }) hl.bind(mainMod .. " + SUPER_L" ,hl.dsp.exec_cmd(launcher .. " toggle") , { release = true })
hl.bind(mainMod .. " + F " ,hl.dsp.exec_cmd(browser)) hl.bind(mainMod .. " + F " ,hl.dsp.exec_cmd(browser))
hl.bind("ALT + C" ,hl.dsp.exec_cmd(ipc .. "plugin:clipper openPanel")) hl.bind(mainMod .. " + SHIFT + F " ,hl.dsp.exec_cmd("firefox -P popup --no-remote --name browser-popup"))
-- 5.3 Custom Terminal APplications with special window rules
hl.bind("code:148" ,hl.dsp.exec_cmd("kitty --class calc-term -o 'confirm_os_window_close 0' /home/venus/.cargo/bin/mathypad ")) hl.bind("code:148" ,hl.dsp.exec_cmd("kitty --class calc-term -o 'confirm_os_window_close 0' /home/venus/.cargo/bin/mathypad "))
hl.bind(mainMod .. " + escape" ,hl.dsp.exec_cmd("kitty btop" ,{ tag = "large-popup" }))
hl.bind("CTRL + SHIFT + ESCAPE" ,hl.dsp.exec_cmd("kitty btop" ,{ tag = "large-popup" }))
hl.bind(mainMod .. " + SHIFT + escape" ,hl.dsp.exec_cmd("kitty nvtop" ,{ tag = "large-popup" }))
hl.bind(mainMod .. "+ ALT + G" ,hl.dsp.exec_cmd("kitty agy" ,{ tag = "popup" }))
hl.bind(mainMod .. "+ CTRL + G" ,hl.dsp.exec_cmd("kitty agy" ,{ tag = "popup" }))
hl.bind(" ALT + Q " , hl.dsp.exec_cmd(terminal, {float = true, border_size = 2, size = {"(monitor_w * 0.8)", "(monitor_h * 0.7)"}})) ---- 6. CUSTOM SCRIPTS AND FUNCTIONS ----
hl.bind(mainMod .. " + W ", hl.dsp.exec_cmd(terminal, {float = true, border_size = 2, size = {"(monitor_w * 0.8)", "(monitor_h * 0.7)"}})) -- 6.1 custom key assignments
hl.config({ input = { kb_options = "caps:hyper", }})
hl.bind(hyper.. " + Hyper_L" ,function() hl.dispatch(hl.dsp.exec_cmd(ipc .. "plugin:clipper openPanel")) hl.dispatch(hl.dsp.submap("hyper-submap")) end)
-- TODO rework with LUA -- TODO fix remote screen and remote keyboard shortcuts
-- hl.bind(mainMod .. " + escape" ,hl.dsp.exec_cmd("kitty --class btop -o "confirm_os_window_close 0" /usr/bin/btop")) hl.bind(mainMod .. " + I" ,custom.remoteKM) -- Send Keyboard and Mouse input to phone via scrcpy
-- hl.bind(mainMod .. " + SHIFT + escape" ,hl.dsp.exec_cmd("kitty --class btop -o "confirm_os_window_close 0" /usr/bin/nvtop")) hl.bind(mainMod .. " + SHIFT + I" ,custom.remoteScreen) -- Open Phone Screen via scrcpy
hl.bind(mainMod .. " + escape" ,hl.dsp.exec_cmd("kitty btop" ,{float = true, border_size = 2, size = {"(monitor_w * 0.9)", "(monitor_h * 0.9)"}})) hl.bind(mainMod .. "+ grave" ,custom.ToggleOddessyConnection) -- Toggle Oddesy monitor connection in hyprland
hl.bind("CTRL + SHIFT + ESCAPE" ,hl.dsp.exec_cmd("kitty btop" ,{float = true, border_size = 2, size = {"(monitor_w * 0.9)", "(monitor_h * 0.9)"}}))
hl.bind(mainMod .. " + SHIFT + escape" ,hl.dsp.exec_cmd("kitty nvtop",{float = true, border_size = 2, size = {"(monitor_w * 0.9)", "(monitor_h * 0.9)"}}))
hl.bind(mainMod .. " + I" ,hl.dsp.exec_cmd("/home/venus/.config/scripts/connectPhone.sh "))
hl.bind(mainMod .. " + I" ,hl.dsp.exec_cmd("scrcpy --no-audio --no-video --keyboard=uhid --mouse=uhid"))
hl.bind(mainMod .. " + SHIFT + I" ,hl.dsp.exec_cmd("/home/venus/.config/scripts/connectPhone.sh "))
hl.bind(mainMod .. " + SHIFT + I" ,hl.dsp.exec_cmd("scrcpy --no-audio --keyboard=uhid --mouse=uhid"))
---- 7.
---- 10.1 Shortcuts
hl.bind(mainMod .. " + CTRL + L ", hl.dsp.exec_cmd(ipc .. "lockScreen lock"))
-- TODO Implement these
---- Change background opacity of terminal window
-- hl.bind(mainMod .. " + ALT + k ", hl.dsp.exec_cmd("kitty +kitten @ set-background-opacity -a 1"))
---- hande lid switch
-- bindl = , switch:Lid Switch, hl.dsp.exec_cmd( s$ipc lockScreen lock
---- 12. quick access to controls submap
hl.bind(mainMod .. " + comma" ,hl.dsp.exec_cmd(ipc .. "controlCenter toggle")) hl.bind(mainMod .. " + comma" ,hl.dsp.exec_cmd(ipc .. "controlCenter toggle"))
hl.bind(mainMod .. " + period" ,hl.dsp.exec_cmd(ipc .. "settings toggle")) hl.bind(mainMod .. " + period" ,hl.dsp.exec_cmd(ipc .. "settings toggle"))
hl.bind(mainMod .. " + CTRL + SHIFT + L " ,hl.dsp.exec_cmd(ipc .. "lockScreen lock"))
hl.bind("ALT + C" ,hl.dsp.exec_cmd(ipc .. "plugin:clipper openPanel"))
hl.bind("code:148" ,hl.dsp.exec_cmd(ipc .. "plugin:noctalia-calulator toggle"))
hl.bind("PRINT" ,hl.dsp.exec_cmd("hyprshot -m active -m window --output-folder ~/Images/Screenshots")) hl.bind("PRINT" ,hl.dsp.exec_cmd("hyprshot -m active -m window --output-folder ~/Images/Screenshots"))
hl.bind("SHIFT + PRINT" , hl.dsp.exec_cmd("hyprshot -m region --output-folder ~/Images/Screenshots")) hl.bind("SHIFT + PRINT" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit annotate"))
hl.bind("ALT + PRINT" , hl.dsp.exec_cmd("hyprshot -m active -m output --output-folder ~/Images/Screenshots"))
hl.bind(mainMod .. " + M ", function() hl.bind("ALT + PRINT" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit annotateWindow"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "controlCenter toggle ")) hl.bind("CTRL + PRINT" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit annotateFullscreen"))
hl.dispatch(hl.dsp.submap("quick-settings")) -- hl.bind("SHIFT + PRINT" , hl.dsp.exec_cmd("hyprshot -m region --output-folder ~/Images/Screenshots"))
end) -- hl.bind("ALT + PRINT" , hl.dsp.exec_cmd("hyprshot -m active -m output --output-folder ~/Images/Screenshots"))
--
---- 14. SUBMAP DISPATCHERS ----
hl.bind(mainMod .. " + O " ,hl.dsp.submap("open-apps")) hl.bind(mainMod .. " + O " ,hl.dsp.submap("open-apps"))
hl.bind(mainMod .. " + M " ,function() hl.dispatch(hl.dsp.exec_cmd(ipc .. "controlCenter toggle ")) hl.dispatch(hl.dsp.submap("quick-settings")) end)
---- 13. Mouse binds hl.bind(mainMod .. "+ PRINT" ,function() hl.exec_cmd(ipc .. "plugin:screen-toolkit toggle") hl.dispatch(hl.dsp.submap("screen-toolkit")) end)
hl.bind(mainMod .. " + T" ,function() hl.dispatch(hl.dsp.submap("timer")) hl.exec_cmd(ipc .. "plugin:timer toggle") end)
---- 14. submaps!
-- TODO write a timer submap that starts a timer of custom length when a key is pressed
hl.bind(mainMod .. " + T" ,function()
hl.dispatch(hl.dsp.submap("timer"))
hl.exec_cmd(ipc .. "plugin:timer toggle")
end)
hl.define_submap("timer", function ()
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "plugin:timer toggle"))
hl.bind("P" ,hl.dsp.exec_cmd(ipc .. "plugin:timer pause"))
hl.bind("R" ,hl.dsp.exec_cmd(ipc .. "plugin:timer reset"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "plugin:timer start 10"))
hl.bind("A" ,hl.dsp.exec_cmd(ipc .. "plugin:timer start 240"))
-- include the double escape or no?
hl.bind("catchall" ,function ()
hl.dispatch(hl.dsp.submap("reset"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "plugin:timer toggle "))
end)
end)
hl.define_submap("quick-settings", function ()
hl.bind("V" ,hl.dsp.exec_cmd("protonvpn-app & hyprctl dispatch submap vpn"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "settings toggle"))
hl.bind("C" ,hl.dsp.exec_cmd(ipc .. "plugin:clipper togglePanel "))
hl.bind("P" ,hl.dsp.exec_cmd(ipc .. "sessionMenu toggle"))
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "systemMonitor toggle"))
hl.bind("M" ,hl.dsp.exec_cmd(ipc .. "controlCenter toggle"))
hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND"))
hl.bind("A" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind("SHIFT + B" ,hl.dsp.exec_cmd(ipc .. "bar toggle"))
hl.bind("SHIFT + W" ,hl.dsp.exec_cmd(ipc .. "wifi toggle -- toggle wifi"))
hl.bind("I" ,hl.dsp.exec_cmd(ipc .. "wallpaper toggle"))
hl.bind(" L " ,hl.dsp.exec_cmd(ipc .. "sessionMenu toggle"))
hl.bind("B " ,hl.dsp.exec_cmd(ipc .. "battery togglePanel -- toggle battery panel"))
hl.bind("SHIFT + C " ,hl.dsp.exec_cmd(ipc .. "calendar toggle"))
-- Bind Submaps
hl.bind("L" ,hl.dsp.submap("layouts"))
hl.bind("N" ,function ()
hl.dispatch(hl.dsp.submap("notifications-sub"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "notifications toggleHistory"))
end)
hl.bind("B" ,function()
hl.dispatch(hl.dsp.submap("bt-sub"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "bluetooth togglePanel"))
end)
hl.bind("W" ,function ()
hl.dispatch(hl.dsp.submap("wifi-sub"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "network togglePanel"))
end)
-- TODO Implement layout switching
-- hl.bind(, L, hl.dsp.exec_cmd( notify-send "layout switching" & hyprctl dispatch submap layouts)
hl.bind("catchall" ,function ()
hl.dispatch(hl.dsp.submap("reset"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "controlCenter toggle "))
end)
end)
hl.define_submap("notifications-sub", function()
hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND"))
hl.bind("Q" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND"))
hl.bind("A" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind("C" ,hl.dsp.exec_cmd(ipc .. "notifications clear"))
hl.bind("CTRL + D" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind("SHIFT + D" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind(mainMod .. " + D " ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind("escape" ,function ()
hl.dispatch(hl.dsp.exec_cmd(ipc .. "notifications toggleHistory"))
hl.dispatch(hl.dsp.submap("reset"))
end)
end)
hl.define_submap("wifi-sub", "reset", function()
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "wifi toggle"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "wifi togglePanel"))
hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "wifi disable"))
hl.bind("E" ,hl.dsp.exec_cmd(ipc .. "wifi enable"))
hl.bind("R" ,hl.dsp.exec_cmd("sudo systemctl restart iwd"))
hl.bind("escape" ,hl.dsp.exec_cmd(ipc .. "network togglePanel"))
end)
hl.define_submap("bt-sub", function()
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "bluetooth toggle"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "bluetooth togglePanel"))
hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "bluetooth disable"))
hl.bind("E" ,hl.dsp.exec_cmd(ipc .. "bluetooth enable"))
hl.bind("H" ,hl.dsp.exec_cmd('bluetoothctl connect 88:92:CC:53:88:7E && notify-send "connected to headphones"'))
hl.bind("J" ,hl.dsp.exec_cmd('bluetoothctl disconnect 88:92:CC:53:88:7E && notify-send "disconnected from headphones"'))
hl.bind("SHIFT + H" ,hl.dsp.exec_cmd('bluetoothctl disconnect 88:92:CC:53:88:7E && notify-send "disconnected from headphones"'))
hl.bind("P" ,hl.dsp.exec_cmd('bluetoothctl connect 64:9D:38:E0:4D:02 && notify-send "Connected to phone"'))
hl.bind("M" ,hl.dsp.exec_cmd('bluetoothctl disconnect 64:9D:38:E0:4D:02 && notify-send "Disconnected from phone"'))
hl.bind("escape" ,function ()
hl.dispatch(hl.dsp.exec_cmd(ipc .. "bluetooth togglePanel"))
hl.dispatch(hl.dsp.submap("reset"))
end)
end)
-- TODO Implement a VPN subnet
hl.define_submap("open-apps", "reset", function()
hl.bind("S" ,hl.dsp.exec_cmd("signal-desktop"))
hl.bind("D" ,hl.dsp.exec_cmd("vesktop"))
hl.bind("F" ,hl.dsp.exec_cmd("firefox"))
hl.bind("M" ,hl.dsp.exec_cmd("feishin"))
hl.bind("R" ,hl.dsp.exec_cmd("calibre"))
hl.bind("E" ,hl.dsp.exec_cmd("darktable"))
hl.bind("catchall" ,hl.dsp.submap("reset"))
end)
--hl.define_submap("layouts, reset
-- hl.bind(, D, hl.dsp.exec_cmd( hyprctl general:layout dwindle)
-- hl.bind(, M, hl.dsp.exec_cmd( hyprctl general:layout master)
--hl.define_submap("reset
---- 13. Misc tools.
--- 14. Gestures
hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })
-- hl.gesture({ fingers = 2, direction = "pinch", action = "cursor_zoom", zoom_level = 2, mode = "mult"})
--hl.bind(ALT, SPACE, hl.dsp.exec_cmd( $menu)

View File

@@ -10,6 +10,7 @@ local colors = dofile(os.getenv("HOME") .. "/.config/hypr/noctalia/noctalia-colo
hl.config ({ hl.config ({
general = { general = {
-- Winodw Border and Gaps
gaps_in = 5, gaps_in = 5,
gaps_out = 4, gaps_out = 4,
border_size = 1, border_size = 1,
@@ -24,11 +25,12 @@ hl.config ({
-- Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on, -- Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on,
allow_tearing = false, allow_tearing = false,
layout = "dwindle", layout = "master",
}, },
-- https://wiki.hypr.land/Configuring/Variables/--decoration -- https://wiki.hypr.land/Configuring/Variables/--decoration
decoration = { decoration = {
-- Window rounding and shadow
rounding = 20, rounding = 20,
rounding_power = 2, rounding_power = 2,
-- Change transparency of focused and unfocused windows, -- Change transparency of focused and unfocused windows,
@@ -62,7 +64,7 @@ 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} } }) hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } })
-- Default springs -- Default springs
hl.curve("easy", { type = "spring", mass = 1, stiffness = 71.2633, dampening = 15.8273644 }) hl.curve("easy", { type = "spring", mass = 1, stiffness = 220, dampening = 26 })
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" }) 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" })

147
basic/submaps.lua Normal file
View File

@@ -0,0 +1,147 @@
local mainMod = "SUPER" -- Sets "Windows" key as main modifier
local ipc = "qs -c noctalia-shell ipc call "
local custom = require("custom-functions")
local function vim_motions_rebind_keys() -- Pressing H, J, K, L sends Left, Down, Up, Right to the active window
hl.bind("H", hl.dsp.send_shortcut({ mods = "", key = "Left"}))
hl.bind("J", hl.dsp.send_shortcut({ mods = "", key = "Down"}))
hl.bind("K", hl.dsp.send_shortcut({ mods = "", key = "Up"}))
hl.bind("L", hl.dsp.send_shortcut({ mods = "", key = "Right"}))
end
local function clipper_submap_keys() -- A submap for quick access to certain clipboard and screen tools. Pressing H, J, K, L sends Left, Down, Up, Right to the active window.
hl.bind("C" ,hl.dsp.exec_cmd(ipc .. "plugin:clipper openPanel"))
vim_motions_rebind_keys()
local function exit() hl.dispatch(hl.dsp.submap("reset")) hl.dispatch(hl.dsp.exec_cmd(ipc .. "plugin:clipper closePanel")) end
hl.bind("escape" ,exit )
hl.bind("MOD3" .. " + Hyper_L" ,exit )
end
hl.define_submap("hyper-submap", function()
clipper_submap_keys()
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "plugin:screen-toolkit toggle"))
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "plugin:timer toggle"))
hl.bind("M" ,hl.dsp.exec_cmd(ipc .. "controlCenter toggle"))
end)
hl.define_submap("screen-toolkit", "reset", function() -- Access the screen toolkit options
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit toggle"))
hl.bind("C" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit color"))
hl.bind("P" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit pallete"))
hl.bind("O" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit ocr"))
hl.bind("L" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit lens"))
hl.bind("A" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit annotate"))
hl.bind("SHIFT + A" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit annotateWindow"))
hl.bind("R" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit recordMp4"))
hl.bind("SHIFT + R" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit recordFullscreenMp4"))
hl.bind("catchall" ,function ()
hl.dispatch(hl.dsp.submap("reset"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "plugin:screen-toolkit toggle "))
end)
end)
hl.define_submap("timer", function () -- Open and create timers, pause, reset, and start timers.
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "plugin:timer toggle"))
hl.bind("P" ,hl.dsp.exec_cmd(ipc .. "plugin:timer pause"))
hl.bind("R" ,hl.dsp.exec_cmd(ipc .. "plugin:timer reset"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "plugin:timer start 10"))
hl.bind("A" ,hl.dsp.exec_cmd(ipc .. "plugin:timer start 240"))
-- include the double escape or no?
hl.bind("catchall" ,function ()
hl.dispatch(hl.dsp.submap("reset"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "plugin:timer toggle "))
end)
end)
hl.define_submap("quick-settings", function () -- An Interface for quickly accessing settings and toggling certain features.
hl.bind("V" ,hl.dsp.exec_cmd("protonvpn-app & hyprctl dispatch submap vpn"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "settings toggle"))
hl.bind("C" ,hl.dsp.exec_cmd(ipc .. "plugin:clipper togglePanel "))
hl.bind("P" ,hl.dsp.exec_cmd(ipc .. "sessionMenu toggle"))
hl.bind("R" ,hl.dsp.exec_cmd(ipc .. "systemMonitor toggle"))
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "plugin:timer toggle"))
hl.bind("M" ,hl.dsp.exec_cmd(ipc .. "controlCenter toggle"))
hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND"))
hl.bind("A" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind("SHIFT + B" ,hl.dsp.exec_cmd(ipc .. "bar toggle"))
hl.bind("SHIFT + W" ,hl.dsp.exec_cmd(ipc .. "wifi toggle -- toggle wifi"))
hl.bind("I" ,hl.dsp.exec_cmd(ipc .. "wallpaper toggle"))
hl.bind(" L " ,hl.dsp.exec_cmd(ipc .. "sessionMenu toggle"))
hl.bind("B " ,hl.dsp.exec_cmd(ipc .. "battery togglePanel -- toggle battery panel"))
hl.bind("SHIFT + C " ,hl.dsp.exec_cmd(ipc .. "calendar toggle"))
hl.bind("F" ,hl.dsp.exec_cmd(ipc .. "calendar toggle"))
-- Bind Submaps
hl.bind("L" ,hl.dsp.submap("layouts"))
hl.bind("N" ,function ()
hl.dispatch(hl.dsp.submap("notifications-sub"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "notifications toggleHistory"))
end)
hl.bind("B" ,function()
hl.dispatch(hl.dsp.submap("bt-sub"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "bluetooth togglePanel"))
end)
hl.bind("W" ,function ()
hl.dispatch(hl.dsp.submap("wifi-sub"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "network togglePanel"))
end)
-- TODO Implement layout switching
-- hl.bind(, L, hl.dsp.exec_cmd( notify-send "layout switching" & hyprctl dispatch submap layouts)
hl.bind("catchall" ,function ()
hl.dispatch(hl.dsp.submap("reset"))
hl.dispatch(hl.dsp.exec_cmd(ipc .. "controlCenter toggle "))
end)
end)
hl.define_submap("notifications-sub", function() -- Notifications submap for quick access to notification settings and actions.
hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND"))
hl.bind("Q" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND"))
hl.bind("A" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind("C" ,hl.dsp.exec_cmd(ipc .. "notifications clear"))
hl.bind("CTRL + D" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind("SHIFT + D" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind(mainMod .. " + D " ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll"))
hl.bind("escape" ,function ()
hl.dispatch(hl.dsp.exec_cmd(ipc .. "notifications toggleHistory"))
hl.dispatch(hl.dsp.submap("reset"))
end)
end)
hl.define_submap("wifi-sub", "reset", function() -- Wifi submap for quick access to wifi settings and actions.
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "wifi toggle"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "wifi togglePanel"))
hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "wifi disable"))
hl.bind("E" ,hl.dsp.exec_cmd(ipc .. "wifi enable"))
hl.bind("R" ,hl.dsp.exec_cmd("sudo systemctl restart iwd"))
hl.bind("escape" ,hl.dsp.exec_cmd(ipc .. "network togglePanel"))
end)
hl.define_submap("bt-sub", function() -- Bluetooth submap for quick access to bluetooth settings and actions.
hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "bluetooth toggle"))
hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "bluetooth togglePanel"))
hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "bluetooth disable"))
hl.bind("E" ,hl.dsp.exec_cmd(ipc .. "bluetooth enable"))
hl.bind("H" ,hl.dsp.exec_cmd('bluetoothctl connect 88:92:CC:53:88:7E && notify-send "connected to headphones"'))
hl.bind("B" ,hl.dsp.exec_cmd('bluetoothctl connect FC:91:5D:6A:2A:C5 && notify-send "connected to earbuds"'))
hl.bind("P" ,hl.dsp.exec_cmd('bluetoothctl connect 64:9D:38:E0:4D:02 && notify-send "Connected to phone"'))
hl.bind("SHIFT + B" ,hl.dsp.exec_cmd('bluetoothctl disconnect FC:91:5D:6A:2A:C5 && notify-send "disconnected from earbuds"'))
hl.bind("J" ,hl.dsp.exec_cmd('bluetoothctl disconnect 88:92:CC:53:88:7E && notify-send "disconnected from headphones"'))
hl.bind("SHIFT + H" ,hl.dsp.exec_cmd('bluetoothctl disconnect 88:92:CC:53:88:7E && notify-send "disconnected from headphones"'))
hl.bind("M" ,hl.dsp.exec_cmd('bluetoothctl disconnect 64:9D:38:E0:4D:02 && notify-send "Disconnected from phone"'))
hl.bind("escape" ,function ()
hl.dispatch(hl.dsp.exec_cmd(ipc .. "bluetooth togglePanel"))
hl.dispatch(hl.dsp.submap("reset"))
end)
end)
hl.define_submap("open-apps", "reset", function() -- Submap for quickly opening commonly used applications.
hl.bind("S" ,hl.dsp.exec_cmd("signal-desktop"))
hl.bind("D" ,hl.dsp.exec_cmd("vesktop"))
hl.bind("F" ,hl.dsp.exec_cmd("firefox"))
hl.bind("M" ,hl.dsp.exec_cmd("feishin"))
hl.bind("R" ,hl.dsp.exec_cmd("calibre"))
hl.bind("E" ,hl.dsp.exec_cmd("darktable"))
hl.bind("catchall" ,hl.dsp.submap("reset"))
end)
-- TODO Implement a VPN summap that allows quick connection to different VPN servers and toggling the VPN on/off.

View File

@@ -33,6 +33,10 @@ hl.config = {
}, },
} }
hl.env("XCURSOR_SIZE", "24")
hl.env("HYPRCURSOR_SIZE", "24")
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
hl.env("QT_QPA_PLATFORMTHEME", "qt6ct")
------------------- -------------------
--- PERMISSIONS --- --- PERMISSIONS ---
------------------- -------------------

View File

@@ -29,6 +29,26 @@ hl.window_rule({
}, },
workspace = "special:gaming" workspace = "special:gaming"
}) })
-- Catch any window launched with the initial class 'browser-popup' and tag it
hl.window_rule({
match = { initial_class = "^browser-popup$" },
tag = "popup"
})
hl.window_rule({
match = { tag = "popup" },
float = true,
border_size = 2,
size = {"(monitor_w * 0.5)", "(monitor_h * 0.7)"},
})
hl.window_rule({
match = { tag = "large-popup" },
float = true,
border_size = 2,
size = {"(monitor_w * 0.9)", "(monitor_h * 0.9)"},
})
hl.window_rule( { hl.window_rule( {
@@ -51,6 +71,10 @@ hl.window_rule( {
}, },
no_focus = true, no_focus = true,
}) })
hl.workspace_rule({
workspace = "s[true]",
gaps_out = 10
})
-- Hyprland-run hl.window_rule( -- Hyprland-run hl.window_rule(

View File

@@ -1,6 +1,89 @@
-- custom-functions.lua -- custom-functions.lua
local C = {} local C = {}
function C.startTimer()
-- TODO implement custom timer logic here function C.remoteKM()
hl.dsp.exec_cmd("/home/venus/.config/scripts/connectPhone.sh ")
hl.dsp.exec_cmd("scrcpy --no-audio --no-video --keyboard=uhid --mouse=uhid")
end end
function C.remoteScreen()
hl.dsp.exec_cmd("/home/venus/.config/scripts/connectPhone.sh ")
hl.dsp.exec_cmd("scrcpy --no-audio --keyboard=uhid --mouse=uhid")
end
local function OddesyConnectionStatus() -- returns connections status of oddesy monitor
local monitors = hl.get_monitors()
for _,m in ipairs(monitors) do
if m.description == "Samsung Electric Company Odyssey G95C HNTL300212" then
return true
end
end
return false
end
function C.ToggleOddessyConnection() -- Enables or disables oddessy monitor
local s = OddesyConnectionStatus()
if s then
hl.exec_cmd('notify-send "Disabled Oddesy"')
hl.monitor({ output = "DP-2", disabled = true })
else
hl.exec_cmd('notify-send "Enabled Oddesy"')
hl.monitor({ output = "DP-2", disabled = false })
end
end
local function fanState()
-- return the current fan profile in use
local handle = io.popen("fw-fanctl print")
if not handle then return "unknown" end
local result = handle:read("*a")
handle:close()
return "lazy"
end
function C.switchFanSate()
-- switch between lazy and performance fan profiles
if fanState() == "unknown" then
hl.exec_cmd('notify-send "fan profile unknown"')
return
elseif fanState() == "lazy" then
hl.exec_cmd("fw-fanctl set performance")
hl.exec_cmd('notify-send "fan profile set to performance"')
else
hl.exec_cmd("fw-fanctl set lazy")
hl.exec_cmd('notify-send "fan profile set to lazy"')
end
end
return C return C
-- local function CompilerWindowOpen()
-- local clients = hl.get_windows()
-- for _,w in ipairs(clients) do
-- if w.tags == "compiler" then
-- return w.stable_id
-- end
-- end
-- hl.exec_cmd("kitty", {
-- hl.dsp.window.tag = { action = "add", value = "compiler" },
-- })
-- return false
-- end
-- function C.RunDevelopementCode()
-- local o = CompilerWindowOpen()
-- if o then
-- hl.exec_cmd('notify-send "open"')
-- else
-- hl.exec_cmd('notify-send "none"')
-- end
-- -- if no tagged kitty window exists, create one
-- -- color the border red
-- -- if a tagged compiler window does exist
-- -- switch to that window and run the last command
-- -- expand later with dynamic analysis of commands
-- end

3
hyprland.conf Normal file
View File

@@ -0,0 +1,3 @@
source = /home/venus/.config/hypr/noctalia/noctalia-colors.conf

View File

@@ -12,39 +12,47 @@ _G.shellWrapper = "qs -c noctalia-shell"
_G.blkmanager = "udiskie" _G.blkmanager = "udiskie"
_G.email = "thunderbird" _G.email = "thunderbird"
_G.notes = "obsidian" _G.notes = "obsidian"
_G.functions = require("custom-functions")
hl.on("hyprland.start", function() hl.on("hyprland.start", function()
-- Force D-Bus and Systemd to catch the Wayland display variables instantly
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("systemctl --user start hyprpolkitagent")
hl.exec_cmd(menuBar) hl.exec_cmd(menuBar)
hl.exec_cmd("systemctl") --user start hyprpolkitagent) hl.exec_cmd("hyprshell run")
hl.exec_cmd("vicinae server") --no-window) TODO set up sddm to unlock keychain
-- hyprshell in systemd
hl.exec_cmd(blkmanager) hl.exec_cmd(blkmanager)
hl.exec_cmd(launcher .. "server") --no-window) TODO set up sddm to unlock keychain hl.exec_cmd("protonmail-bridge --no-window") -- TODO set up sddm to unlock keychain
hl.exec_cmd("hyprpm reload -n") hl.exec_cmd("hyprpm reload -n")
hl.exec_cmd("kdeconnectd") hl.exec_cmd("kdeconnectd")
-- hl.exec_cmd("hyprshell run &")
hl.exec_cmd("vesktop -m", {workspace ="special:vesktop silent"}) hl.exec_cmd("vesktop -m", {workspace ="special:vesktop silent"})
hl.exec_cmd(email, {workspace ="special:vesktop silent"}) hl.exec_cmd("feishin", {workspace ="special:music silent"})
hl.exec_cmd(notes, {workspace ="special:vesktop silent"}) -- hl.exec_cmd(email, {workspace ="special:email silent"})
hl.exec_cmd("steam --forcedesktopscaling 0.5", {workspace ="special:vesktop silent"}) hl.exec_cmd(notes, {workspace ="special:notes silent"})
hl.exec_cmd("protonmail-bridge") --no-window) TODO set up sddm to unlock keychain -- hl.exec_cmd("steam --forcedesktopscaling 0.5 -silent -no-browser", {workspace ="special:gaming silent"})
end) end)
hl.config({ hl.config({
general = { master = {
layout = "dwindle" orientation = "center",
} new_status = "master",
mfact = 0.50
},
}) })
hl.env("XCURSOR_SIZE", "24") hl.env("XCURSOR_SIZE", "24")
hl.env("HYPRCURSOR_SIZE", "24") hl.env("HYPRCURSOR_SIZE", "24")
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
local base = "/home/venus/.config/hypr"
local basic = base .. "/basic"
require("basic/looks") require("basic/looks")
require("basic/keybinds") require("basic/keybinds")
require("basic/vars") require("basic/vars")
require("basic/windows") require("basic/windows")
require("basic/devices")
-- require("plugins") -- require("plugins")
--require("monitors") require("monitors")
-- For Noctalia Color templates
-- require("noctalia").apply_theme()

View File

@@ -1,7 +1,7 @@
background = rgba(121316ff) background = rgba(000000ff)
base = rgba(121316ff) base = rgba(000000ff)
text = rgba(e2e2e6ff) text = rgba(e8d8ffff)
alternate_base = rgba(43474eff) alternate_base = rgba(110d1aff)
bright_text = rgba(253140ff) bright_text = rgba(000000ff)
accent = rgba(9fcaffff) accent = rgba(b58fffff)
accent_secondary = rgba(bbc7dbff) accent_secondary = rgba(c79affff)

View File

@@ -1,11 +0,0 @@
# Generated with hyprdynamicmonitors freeze.
# This is a template that you can edit, it is just a starter that pulled your current monitor setup,
# adjust as needed.
# You can use templates here etc, see https://github.com/fiffeek/hyprdynamicmonitors/blob/main/examples/basic/hyprconfigs/template.go.tmpl.
# Monitors are given arbitrary tags (the "monitor" prefix and the ID coming from hyprland).
# If you are using tui to edit, leave this at the end of your file (the last monitor config applies)
# and leave the markers.
# <<<<< TUI AUTO START
monitor=desc:BOE 0x0BC9,2560x1600@165.00000,6540x-50,1.60000000,transform,0,vrr,0
monitor=desc:Invalid Vendor Codename - RTK TYPE-C 0000000000000,1920x1200@59.95000,8140x50,1.00000000,transform,0,vrr,0
# <<<<< TUI AUTO END

14
monitors.lua Normal file
View File

@@ -0,0 +1,14 @@
-- hl.monitor({
-- -- Use 'desc:' followed by your monitor's exact string from hyprctl
-- output="desc:Samsung Electric Company Odyssey G95C HNTL300212",
-- mode = "5120x1440@240", -- Explicitly lock the ultrawide canvas & high refresh rate
-- scale = 1,
-- vrr = true
-- })
hl.monitor({
output = "HEADLESS-2",
mode = "3840x1080@59.97Hz", -- Adjust to your phone's native resolution
position = "auto", -- Or specific coordinates like "1920x0"
scale = 2 -- Increase if the UI is too small to read
})

45
noctalia.lua Normal file
View File

@@ -0,0 +1,45 @@
-- Generated by Noctalia
local primary = "rgb(c8c4d7)"
local surface = "rgb(141314)"
local secondary = "rgb(c9c5cd)"
local error = "rgb(ffb4ab)"
local function apply_theme()
hl.config({
general = {
col = {
active_border = primary,
inactive_border = surface,
},
},
group = {
col = {
border_active = secondary,
border_inactive = surface,
border_locked_active = error,
border_locked_inactive = surface,
},
groupbar = {
col = {
active = secondary,
inactive = surface,
locked_active = error,
locked_inactive = surface,
},
},
},
})
end
return {
colors = {
primary = primary,
surface = surface,
secondary = secondary,
error = error,
},
apply_theme = apply_theme
}

View File

@@ -1,9 +1,9 @@
$primary = rgb(9fcaff) $primary = rgb(b58fff)
$surface = rgb(121316) $surface = rgb(000000)
$secondary = rgb(bbc7db) $secondary = rgb(c79aff)
$error = rgb(ffb4ab) $error = rgb(ff6f9b)
$tertiary = rgb(d7bee4) $tertiary = rgb(d8b4ff)
$surface_lowest = rgb(0d0e11) $surface_lowest = rgb(030205)
general { general {
col.active_border = $primary col.active_border = $primary

View File

@@ -2,11 +2,11 @@
-- Automatically generated by Noctalia user-templates -- Automatically generated by Noctalia user-templates
local colors = { local colors = {
background = "#121316", background = "#000000",
primary = "#9fcaff", primary = "#b58fff",
tertiary = "#d7bee4", tertiary = "#d8b4ff",
secondary = "#bbc7db", secondary = "#c79aff",
error = "#ffb4ab", error = "#ff6f9b",
} }
return colors return colors