Compare commits

...
25 Commits
Author SHA1 Message Date
wyj 666ad77a02 update: spring parameter 2026-07-21 20:05:30 -04:00
wyj fade16974b update: spring change in 0.56.0 2026-07-20 21:00:51 -04:00
wyj deed6d81bc update: add hibiki rule 2026-07-18 15:59:28 -04:00
wyj 75ce12490b update: xwayland force zero factor 2026-07-09 18:10:24 -04:00
wyj c0201ea4e7 fix: exit hypridle battery script when BAT1 doesn't exist 2026-06-30 21:53:26 -04:00
wyj 320ad9df0f fix: fix hypridle dpms to lua 2026-06-30 02:52:47 -04:00
wyj b1534e45c4 update: add ATRI idle config 2026-06-29 06:01:51 -04:00
wyj 626a0fd769 fix: fix the M.autostart=nil problem 2026-06-29 06:01:35 -04:00
wyj e8594c54ef update: auto start pipewire on gentoo & openrc 2026-06-27 20:15:23 -04:00
wyj 38fd195673 update: make cursor larger on laptop 2026-06-21 13:10:50 -04:00
wyj dc123bba33 update: change shadow color 2026-06-21 10:16:17 -04:00
wyj f00c8affc4 feat: add module windowrule support 2026-06-14 04:28:35 -04:00
wyj e298b55cb7 style: re-format 2026-06-12 17:12:25 -04:00
wyj a0b22453eb new: add editorconfig 2026-06-12 16:31:48 -04:00
wyj 4bbae7a78c fix: fix vrr 2026-06-12 16:19:36 -04:00
wyj 4614859248 fix: fix systemd unit 2026-06-12 16:19:36 -04:00
wyj 87ecb55fd8 fix: avoid double waybar 2026-06-12 14:19:04 -04:00
wyj da74cab213 update: add ATRI specific starups 2026-06-07 17:46:17 -04:00
wyj 86e9b190af new: add locale setting 2026-06-07 16:57:01 -04:00
wyj 1e83dd2f5f update: increase dampening in spring curve 2026-06-06 17:06:35 -04:00
wyj 0cb5829923 feat: init plugins support 2026-06-06 17:01:55 -04:00
wyj 591515a149 fix: fix monitor config 2026-06-02 17:56:17 -04:00
wyj c4fbd94891 fix: fix input config 2026-05-30 17:48:21 -04:00
wyj 81a9d52938 clean: remove unneeded scripts 2026-05-30 14:42:41 -04:00
wyj bd95554e17 new: add rofi module 2026-05-30 14:38:05 -04:00
43 changed files with 1044 additions and 788 deletions
+8
View File
@@ -0,0 +1,8 @@
root = true
[*]
insert_file_newline=true
[*.lua]
indent_style = space
indent_size = 2
+17
View File
@@ -0,0 +1,17 @@
general {
ignore_dbus_inhibit = false
}
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
}
# dpms
listener {
timeout = 660
on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })'
on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })'
}
+2 -5
View File
@@ -30,12 +30,9 @@ listener {
# dpms # dpms
listener { listener {
# DPMS TIMEOUT
timeout = 660 timeout = 660
# DPMS ONTIMEOUT on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })'
on-timeout = hyprctl dispatch dpms off on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })'
# DPMS ONRESUME
on-resume = hyprctl dispatch dpms on
} }
# Suspend # Suspend
+2 -2
View File
@@ -13,8 +13,8 @@ M.curves = {
curve = { curve = {
type = "spring", type = "spring",
mass = 1, mass = 1,
stiffness = 50, stiffness = 500,
dampening = 6, dampening = 20,
}, },
}, },
} }
+20
View File
@@ -1 +1,21 @@
local settings = require("lua.lib.settings") local settings = require("lua.lib.settings")
local events = require("lua.lib.events")
local utils = require("lua.lib.utils")
local M = {}
M.autostart = {}
-- for openRC system
if settings["hostname"] == "optiplex-gentoo" and not settings["systemd"] then
M.autostart = {
function()
hl.exec_cmd("gentoo-pipewire-launcher")
end,
}
end
function M:load()
events.map("hyprland.start", self.autostart)
end
return utils.extend_config(M, "lua.user.conf.autostart")
+4
View File
@@ -1,9 +1,13 @@
local M = {} local M = {}
local utils = require("lua.lib.utils") local utils = require("lua.lib.utils")
local settings = require("lua.lib.settings")
require("lua.lib.globals") require("lua.lib.globals")
M.cursor = "Vimix-Hyprcursor" M.cursor = "Vimix-Hyprcursor"
M.size = 32 M.size = 32
if settings["profile"] == "laptop" then
M.size = 36
end
function M.fetch_Vimix_hyprcursor() function M.fetch_Vimix_hyprcursor()
if M.cursor == "Vimix-Hyprcursor" then if M.cursor == "Vimix-Hyprcursor" then
+1 -1
View File
@@ -40,7 +40,7 @@ M.confs = {
enabled = true, enabled = true,
range = 15, range = 15,
render_power = 2, render_power = 2,
color = 0xbb000000, color = colorscheme.crust.."bb",
offset = { 1, 1 }, offset = { 1, 1 },
}, },
}, },
+6
View File
@@ -1,3 +1,5 @@
local settings = require("lua.lib.settings")
local M = {} local M = {}
---@type table<string, string> ---@type table<string, string>
@@ -7,6 +9,10 @@ M.envs = {
QT_AUTO_SCREEN_SCALE_FACTOR = "1", QT_AUTO_SCREEN_SCALE_FACTOR = "1",
} }
if settings["locale"] and settings["locale"] ~= "" then
M.envs["LANG"] = settings["locale"]
end
function M.load() function M.load()
for name, value in pairs(M.envs) do for name, value in pairs(M.envs) do
hl.env(name, value) hl.env(name, value)
+15 -1
View File
@@ -1,7 +1,7 @@
local settings = require("lua.lib.settings") local settings = require("lua.lib.settings")
require("lua.lib.globals") require("lua.lib.globals")
require("lua.conf.monitor") require("lua.conf.monitor"):load()
require("lua.conf.wallpaper").load() require("lua.conf.wallpaper").load()
require("lua.conf.cursor").load() require("lua.conf.cursor").load()
@@ -12,7 +12,21 @@ require("lua.conf.layout").load()
require("lua.conf.misc").load() require("lua.conf.misc").load()
require("lua.conf.windowrules").load() require("lua.conf.windowrules").load()
require("lua.conf.layerrules").load() require("lua.conf.layerrules").load()
require("lua.conf.autostart"):load()
require("lua.binds").load() require("lua.binds").load()
require("lua.modules").load() require("lua.modules").load()
require("lua.plugins").load()
require("lua.animations").load() require("lua.animations").load()
if string.sub(settings["hostname"], 1, 4) == "ATRI" then
hl.on("hyprland.start", function()
hl.exec_cmd("kitty", {
workspace = "1 silent",
})
hl.exec_cmd("kitty -o font_size=10 btop", {
workspace = "2 silent",
})
hl.exec_cmd("sleep 1 && pw-play ~/.local/share/startupsounds/start-computeraif-14572.mp3")
end)
end
+9 -1
View File
@@ -1,5 +1,6 @@
local M = {} local M = {}
local settings = require("lua.lib.settings") local settings = require("lua.lib.settings")
local utils = require("lua.lib.utils")
M.confs = { M.confs = {
input = { touchpad = {} }, input = { touchpad = {} },
@@ -19,7 +20,14 @@ elseif settings["profile"] == "laptop" then
} }
end end
M.confs.input.touchpad.natural_scroll = settings["touchpad_natural_scroll"] --M.confs.input.touchpad.natural_scroll = settings["touchpad_natural_scroll"]
M.confs = utils.tbl_recursive_merge(M.confs, {
input = {
touchpad = {
natural_scroll = settings["touchpad_natural_scroll"],
},
},
})
M.confs.input.kb_layout = settings["kb_layout"] M.confs.input.kb_layout = settings["kb_layout"]
+9
View File
@@ -9,6 +9,15 @@ M.layer_rules = {
blur = true, blur = true,
}, },
{
name = "hibiki",
match = {
namespace = "^(hibiki)$",
},
blur = true,
ignore_alpha = 0.10,
},
{ {
name = "waybar-translucent-popups", name = "waybar-translucent-popups",
match = { match = {
+4 -1
View File
@@ -6,12 +6,15 @@ M.confs = {
misc = { misc = {
disable_hyprland_logo = true, disable_hyprland_logo = true,
disable_splash_rendering = true, disable_splash_rendering = true,
vrr = true, vrr = 3,
enable_swallow = true, enable_swallow = true,
swallow_regex = "^(kitty|Alacritty)$", swallow_regex = "^(kitty|Alacritty)$",
background_color = colorscheme.background, background_color = colorscheme.background,
font_family = settings["font_family"], font_family = settings["font_family"],
}, },
xwayland = {
force_zero_scaling = true,
},
} }
function M.load() function M.load()
+15 -2
View File
@@ -1,9 +1,22 @@
local settings = require("lua.lib.settings") local settings = require("lua.lib.settings")
local utils = require("lua.lib.utils")
local M = {}
M.monitors = {}
if settings["host"] == "laptop" then if settings["host"] == "laptop" then
hl.monitor({ M.monitors = table.insert({ {
output = "eDP-1", output = "eDP-1",
mode = "highres", mode = "highres",
scale = "auto", scale = "auto",
}) } })
end end
function M:load()
for _, monitor in ipairs(self.monitors) do
hl.monitor(monitor)
end
end
return utils.extend_config(M, "lua.user.conf.monitor")
+9
View File
@@ -12,6 +12,9 @@ settings["touchpad_natural_scroll"] = true
---@type string ---@type string
settings["kb_layout"] = "us" settings["kb_layout"] = "us"
---@type string
settings["locale"] = ""
---@type "dwindle"|"master"|"scrolling"|"monocle" ---@type "dwindle"|"master"|"scrolling"|"monocle"
settings["default_layout"] = "dwindle" settings["default_layout"] = "dwindle"
@@ -40,6 +43,12 @@ settings["modules"] = {
cliphist = true, cliphist = true,
pypr = true, pypr = true,
fcitx5 = false, fcitx5 = false,
rofi = true,
}
---@type table<string, boolean>
settings["plugins"] = {
hyprexpo = false,
} }
return require("lua.lib.utils").extend_config(settings, "lua.user.settings") return require("lua.lib.utils").extend_config(settings, "lua.user.settings")
+5
View File
@@ -1,7 +1,12 @@
local settings=require("lua.lib.settings")
local M = {} local M = {}
local function start_hypridle() local function start_hypridle()
if string.sub(settings["hostname"], 1, 4) == "ATRI" then
hl.exec_cmd("hypridle -c ~/.config/hypr/hypridle-ATRI.conf")
else
hl.exec_cmd("hypridle") hl.exec_cmd("hypridle")
end
end end
M.autostart = { M.autostart = {
+6
View File
@@ -38,6 +38,7 @@ M.autostart = {}
M.autostop = {} M.autostop = {}
M.binds = {} M.binds = {}
M.envs = {} M.envs = {}
M.windowrules = {}
local function collect_modules_prop(module, prop) local function collect_modules_prop(module, prop)
if module[prop] then if module[prop] then
@@ -51,6 +52,7 @@ for _, item in ipairs(modules) do
collect_modules_prop(module, "autostop") collect_modules_prop(module, "autostop")
collect_modules_prop(module, "binds") collect_modules_prop(module, "binds")
collect_modules_prop(module, "envs") collect_modules_prop(module, "envs")
collect_modules_prop(module, "windowrules")
end end
function M.load() function M.load()
@@ -61,6 +63,10 @@ function M.load()
for name, value in pairs(M.envs) do for name, value in pairs(M.envs) do
hl.env(name, value) hl.env(name, value)
end end
for _, rule in ipairs(M.windowrules) do
hl.window_rule(rule)
end
end end
return M return M
+10
View File
@@ -17,4 +17,14 @@ M.binds = {
}, },
} }
M.windowrules = {
{
name = "Pyprland rules",
match = {
class = "kitty-dropterm"
},
float = true,
}
}
return M return M
+28
View File
@@ -0,0 +1,28 @@
local bind = require("lua.lib.bind")
local M = {}
M.binds = {
{
keys = bind.with_leader("Space"),
dispatcher = hl.dsp.exec_cmd("rofi -show drun -replace -i"),
desc = "Rofi launcher",
},
{
keys = bind.with_leader("CTRL + W"),
dispatcher = hl.dsp.exec_cmd("~/dotfiles/hypr/scripts/wallpaper.sh select"),
desc = "Rofi wallpaper selector",
},
{
keys = bind.with_leader("Print"),
dispatcher = hl.dsp.exec_cmd("~/dotfiles/hypr/scripts/screenshot.sh"),
desc = "Rofi screenshot dialog",
},
{
keys = bind.with_leader("V"),
dispatcher = hl.dsp.exec_cmd("~/dotfiles/scripts/cliphist.sh"),
desc = "Rofi cliphist clipboard manager",
},
}
return M
+1 -1
View File
@@ -7,7 +7,7 @@ local M = {}
local function start_swaync() local function start_swaync()
if settings["systemd"] then if settings["systemd"] then
local unit = "swaync.service" local unit = "swaync.service"
local source = CONFIG_HOME .. "hypr/systemd/" .. unit local source = HYPR .. "/systemd/" .. unit
if systemd.ensure_user_unit(unit, source) then if systemd.ensure_user_unit(unit, source) then
hl.exec_cmd("systemctl --user start swaync") hl.exec_cmd("systemctl --user start swaync")
+1 -1
View File
@@ -8,7 +8,7 @@ local M = {}
local function start_swayosd() local function start_swayosd()
if settings["systemd"] then if settings["systemd"] then
local unit = "swayosd.service" local unit = "swayosd.service"
local source = CONFIG_HOME .. "hypr/systemd/" .. unit local source = HYPR .. "/systemd/" .. unit
if systemd.ensure_user_unit(unit, source) then if systemd.ensure_user_unit(unit, source) then
hl.exec_cmd("systemctl --user start swayosd") hl.exec_cmd("systemctl --user start swayosd")
+48
View File
@@ -0,0 +1,48 @@
local bind = require("lua.lib.bind")
local colorscheme = require("lua.conf.colorscheme")
local M = {}
M.autostart = {
function()
hl.exec_cmd("hyprctl plugin load /usr/lib/hyprland-plugins/hyprexpo.so")
end,
}
M.confs = {
plugin = {
hyprexpo = {
columns = 3,
gap_size = 5,
gap_size_outer = 0,
bg_col = colorscheme.background,
workspace_method = "center current",
skip_empty = false,
max_workspace = 0,
show_workspace_numbers = false,
workspace_number_color = colorscheme.foreground,
window_icon_enable = false,
window_icon_position = "bottom-right",
window_icon_size = 32,
label_enable = false,
label_text_mode = "id",
label_token_map = "",
selection_label_enable = false,
selection_label_token_map = "a,s,d,f,g,q,w,e,r,t,z,x,c,v,b",
gesture_distance = 300,
cancel_key = "escape",
},
},
}
M.binds = {
{
keys = bind.with_leader("F3"),
dispatcher = function()
hl.plugin.hyprexpo.expo("toggle")
end,
desc = "Toggle hyprexpo",
},
}
return M
+65
View File
@@ -0,0 +1,65 @@
local settings = require("lua.lib.settings")
require("lua.lib.globals")
local utils = require("lua.lib.utils")
local events = require("lua.lib.events")
local bind = require("lua.lib.bind")
local M = {}
local plugins = {}
local function is_plugin_exists(name)
return utils.is_file_exists(HYPR .. "/lua/plugins/" .. name .. ".lua")
end
local function load_plugin(name)
if not is_plugin_exists(name) then
return {}
end
local default_plug = require("lua.plugins." .. name)
local user_plugname = "lua.user.plugins." .. name
local plug = utils.extend_config(default_plug, user_plugname)
return plug
end
print("loading plugins...")
for name, enabled in pairs(settings.plugins) do
print("plugin " .. name .. " enabled is " .. tostring(enabled))
if enabled then
local plug = load_plugin(name)
print("plugin " .. name .. " loaded.")
table.insert(plugins, {
name = name,
config = plug,
})
end
end
M.autostart = {}
M.binds = {}
M.confs = {}
local function collect_plugins_prop(plugin, prop)
if plugin[prop] then
M[prop] = utils.list_extend(M[prop], plugin[prop])
end
end
for _, item in ipairs(plugins) do
local plugin = item.config
collect_plugins_prop(plugin, "autostart")
collect_plugins_prop(plugin, "binds")
collect_plugins_prop(plugin, "confs")
end
function M.load()
events.map("hyprland.start", M.autostart)
bind.map(M.binds)
hl.config(M.confs)
end
return M
-18
View File
@@ -1,18 +0,0 @@
import sys
import subprocess
import os
import json
import pathlib
import shutil
# Get script path
pathname = os.path.dirname(sys.argv[0])
homeFolder = os.path.expanduser('~') # Path to home folder
dotfiles = homeFolder + "/dotfiles/"
result = subprocess.run(["bash", dotfiles + "hypr/scripts/monitors.sh"], capture_output=True, text=True)
monitors_json = result.stdout.strip()
monitors_arr = json.loads(monitors_json)
for row in monitors_arr:
if row["focused"]:
print(row["id"])
+4
View File
@@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
if [[ ! -d /sys/class/power_supply/BAT1 ]]; then
exit 0
fi
# Get the current battery percentage # Get the current battery percentage
battery_percentage=$(cat /sys/class/power_supply/BAT1/capacity) battery_percentage=$(cat /sys/class/power_supply/BAT1/capacity)
+1 -1
View File
@@ -101,7 +101,7 @@ echo $newwall
# ----------------------------------------------------- # -----------------------------------------------------
# Reload waybar with new colors # Reload waybar with new colors
# ----------------------------------------------------- # -----------------------------------------------------
~/dotfiles/waybar/launch.sh #~/dotfiles/waybar/launch.sh
# ----------------------------------------------------- # -----------------------------------------------------
# Set the new wallpaper # Set the new wallpaper