Compare commits

...

14 Commits

Author SHA1 Message Date
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
39 changed files with 979 additions and 783 deletions
+8
View File
@@ -0,0 +1,8 @@
root = true
[*]
insert_file_newline=true
[*.lua]
indent_style = space
indent_size = 2
+1 -1
View File
@@ -14,7 +14,7 @@ M.curves = {
type = "spring",
mass = 1,
stiffness = 50,
dampening = 6,
dampening = 8,
},
},
}
+6
View File
@@ -1,3 +1,5 @@
local settings = require("lua.lib.settings")
local M = {}
---@type table<string, string>
@@ -7,6 +9,10 @@ M.envs = {
QT_AUTO_SCREEN_SCALE_FACTOR = "1",
}
if settings["locale"] and settings["locale"] ~= "" then
M.envs["LANG"] = settings["locale"]
end
function M.load()
for name, value in pairs(M.envs) do
hl.env(name, value)
+14 -1
View File
@@ -1,7 +1,7 @@
local settings = require("lua.lib.settings")
require("lua.lib.globals")
require("lua.conf.monitor")
require("lua.conf.monitor"):load()
require("lua.conf.wallpaper").load()
require("lua.conf.cursor").load()
@@ -15,4 +15,17 @@ require("lua.conf.layerrules").load()
require("lua.binds").load()
require("lua.modules").load()
require("lua.plugins").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 settings = require("lua.lib.settings")
local utils = require("lua.lib.utils")
M.confs = {
input = { touchpad = {} },
@@ -19,7 +20,14 @@ elseif settings["profile"] == "laptop" then
}
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"]
+1 -1
View File
@@ -6,7 +6,7 @@ M.confs = {
misc = {
disable_hyprland_logo = true,
disable_splash_rendering = true,
vrr = true,
vrr = 3,
enable_swallow = true,
swallow_regex = "^(kitty|Alacritty)$",
background_color = colorscheme.background,
+15 -2
View File
@@ -1,9 +1,22 @@
local settings = require("lua.lib.settings")
local utils = require("lua.lib.utils")
local M = {}
M.monitors = {}
if settings["host"] == "laptop" then
hl.monitor({
M.monitors = table.insert({ {
output = "eDP-1",
mode = "highres",
scale = "auto",
})
} })
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
settings["kb_layout"] = "us"
---@type string
settings["locale"] = ""
---@type "dwindle"|"master"|"scrolling"|"monocle"
settings["default_layout"] = "dwindle"
@@ -40,6 +43,12 @@ settings["modules"] = {
cliphist = true,
pypr = true,
fcitx5 = false,
rofi = true,
}
---@type table<string, boolean>
settings["plugins"] = {
hyprexpo = false,
}
return require("lua.lib.utils").extend_config(settings, "lua.user.settings")
+6
View File
@@ -38,6 +38,7 @@ M.autostart = {}
M.autostop = {}
M.binds = {}
M.envs = {}
M.windowrules = {}
local function collect_modules_prop(module, prop)
if module[prop] then
@@ -51,6 +52,7 @@ for _, item in ipairs(modules) do
collect_modules_prop(module, "autostop")
collect_modules_prop(module, "binds")
collect_modules_prop(module, "envs")
collect_modules_prop(module, "windowrules")
end
function M.load()
@@ -61,6 +63,10 @@ function M.load()
for name, value in pairs(M.envs) do
hl.env(name, value)
end
for _, rule in ipairs(M.windowrules) do
hl.window_rule(rule)
end
end
return M
+10
View File
@@ -17,4 +17,14 @@ M.binds = {
},
}
M.windowrules = {
{
name = "Pyprland rules",
match = {
class = "kitty-dropterm"
},
float = true,
}
}
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()
if settings["systemd"] then
local unit = "swaync.service"
local source = CONFIG_HOME .. "hypr/systemd/" .. unit
local source = HYPR .. "/systemd/" .. unit
if systemd.ensure_user_unit(unit, source) then
hl.exec_cmd("systemctl --user start swaync")
+1 -1
View File
@@ -8,7 +8,7 @@ local M = {}
local function start_swayosd()
if settings["systemd"] then
local unit = "swayosd.service"
local source = CONFIG_HOME .. "hypr/systemd/" .. unit
local source = HYPR .. "/systemd/" .. unit
if systemd.ensure_user_unit(unit, source) then
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"])
+1 -1
View File
@@ -101,7 +101,7 @@ echo $newwall
# -----------------------------------------------------
# Reload waybar with new colors
# -----------------------------------------------------
~/dotfiles/waybar/launch.sh
#~/dotfiles/waybar/launch.sh
# -----------------------------------------------------
# Set the new wallpaper