cleaned up, added some noctalia support, modified workspace keybinds
This commit is contained in:
11
basic/devices.lua
Normal file
11
basic/devices.lua
Normal 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 })
|
||||
@@ -20,6 +20,14 @@ hl.bind(mainMod .. "+ SHIFT + BACKSLASH" ,hl.dsp.window.float({ action = "toggle
|
||||
hl.bind(mainMod .. "+ BACKSLASH" ,hl.dsp.layout ("togglesplit"))
|
||||
hl.bind(mainMod .. "+ CTRL + BACKSLASH " ,hl.dsp.window.pseudo({action = "toggle"}))
|
||||
|
||||
-- Layout management and advanced window management
|
||||
-- TODO implement logic for changing shortcuts based on current layout
|
||||
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"))
|
||||
|
||||
-- hl.bind(mainMod .. " + SEMICOLON ", hl.dsp.exec_cmd( hyprctl general:layout master )
|
||||
-- hl.bind(mainMod .. " + APOSTROPHE ", hl.dsp.exec_cmd( hyprctl general:layout dwindle )
|
||||
|
||||
@@ -85,11 +93,15 @@ hl.bind(mainMod .. " + B " , hl.dsp.workspace.toggle_special("book" ))
|
||||
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" ))
|
||||
|
||||
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 + 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" }))
|
||||
|
||||
hl.bind(mainMod .. " + D " ,function ()
|
||||
hl.dispatch(hl.dsp.workspace.toggle_special("vesktop"))
|
||||
@@ -114,12 +126,14 @@ 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("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("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("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"))
|
||||
hl.bind(mainMod .."+ CTRL + mouse_down", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"))
|
||||
hl.bind(mainMod .."+ CTRL + mouse_up", hl.dsp.exec_cmd("wpctl set-volume @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("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("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"))
|
||||
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"))
|
||||
|
||||
---- Requires playerctl
|
||||
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"))
|
||||
@@ -147,10 +161,9 @@ hl.bind(mainMod .. " + CTRL + W " , hl.dsp.exec_cmd(terminal .. " ssh root@gala
|
||||
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("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"))
|
||||
-- TODO fix remote screen and remote keyboard shortcuts
|
||||
hl.bind(mainMod .. " + I" ,custom.remoteKM)
|
||||
hl.bind(mainMod .. " + SHIFT + I" ,custom.remoteScreen)
|
||||
|
||||
|
||||
---- 10.1 Shortcuts
|
||||
@@ -241,6 +254,7 @@ hl.define_submap("quick-settings", function ()
|
||||
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 ()
|
||||
|
||||
@@ -10,6 +10,7 @@ local colors = dofile(os.getenv("HOME") .. "/.config/hypr/noctalia/noctalia-colo
|
||||
|
||||
hl.config ({
|
||||
general = {
|
||||
-- Winodw Border and Gaps
|
||||
gaps_in = 5,
|
||||
gaps_out = 4,
|
||||
border_size = 1,
|
||||
@@ -29,6 +30,7 @@ hl.config ({
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Variables/--decoration
|
||||
decoration = {
|
||||
-- Window rounding and shadow
|
||||
rounding = 20,
|
||||
rounding_power = 2,
|
||||
-- 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} } })
|
||||
|
||||
-- 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 = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||
|
||||
@@ -22,6 +22,15 @@ function C.RemoteToPhone()
|
||||
phoneSocket()
|
||||
end
|
||||
|
||||
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
|
||||
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
|
||||
@@ -76,5 +85,29 @@ function C.RunDevelopementCode()
|
||||
-- switch to that window and run the last command
|
||||
-- expand later with dynamic analysis of commands
|
||||
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
|
||||
|
||||
15
hyprland.lua
15
hyprland.lua
@@ -20,16 +20,18 @@ hl.on("hyprland.start", function()
|
||||
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("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("vicinae 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("kdeconnectd")
|
||||
hl.exec_cmd("vesktop -m", {workspace ="special:vesktop silent"})
|
||||
hl.exec_cmd(email, {workspace ="special:email silent"})
|
||||
hl.exec_cmd("feishin", {workspace ="special:music silent"})
|
||||
-- hl.exec_cmd(email, {workspace ="special:email silent"})
|
||||
hl.exec_cmd(notes, {workspace ="special:notes silent"})
|
||||
hl.exec_cmd("steam --forcedesktopscaling 0.5 -silent -no-browser", {workspace ="special:gaming 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)
|
||||
|
||||
hl.config({
|
||||
@@ -50,4 +52,7 @@ require("basic/vars")
|
||||
require("basic/windows")
|
||||
require("basic/devices")
|
||||
-- require("plugins")
|
||||
require("monitors")
|
||||
-- require("monitors")
|
||||
|
||||
-- For Noctalia Color templates
|
||||
-- require("noctalia").apply_theme()
|
||||
|
||||
@@ -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
|
||||
17
monitors.lua
17
monitors.lua
@@ -1,7 +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({
|
||||
-- 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
|
||||
output = "HEADLESS-2",
|
||||
mode = "2400x1080@60", -- 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
45
noctalia.lua
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user