Update Hyprland config for Matugen and untrack generated files.

This commit is contained in:
trey committed 2026-11-23 20:09:57 -05:00
1 parent 60fe219ff7
commit 16cf5e0c2e
10 files changed
+47 -55

No files matched your search

+2
View File
@@ -1 +1,3 @@
*bak* *bak*
colors.lua
hyprpaper.conf
-5
View File
@@ -1,5 +0,0 @@
return {
active_border = "rgba(b4d088ff)",
inactive_border = "rgba(45483daa)",
shadow = "rgba(12140ebf)",
}
+18 -10
View File
@@ -290,7 +290,8 @@ function M.randomizeWallpaper()
-- Pick a unique random image for each monitor -- Pick a unique random image for each monitor
math.randomseed(os.time()) math.randomseed(os.time())
local used = {} local used = {}
local matugen_cmds = {} local primary_img = nil
local fallback_img = nil
local primary_logical_name = "eDP-1" local primary_logical_name = "eDP-1"
for _, mon in ipairs(monitors) do for _, mon in ipairs(monitors) do
if mon.description and mon.description:match("E3LMTF071391") then if mon.description and mon.description:match("E3LMTF071391") then
@@ -320,26 +321,24 @@ function M.randomizeWallpaper()
table.insert(conf_lines, "}") table.insert(conf_lines, "}")
table.insert(conf_lines, "") table.insert(conf_lines, "")
if not fallback_img then fallback_img = img end
local logical_name = mon.name local logical_name = mon.name
if mon.description then if mon.description then
if mon.description:match("E3LMTF071438") then logical_name = "DP-7" end if mon.description:match("E3LMTF071438") then logical_name = "DP-7" end
if mon.description:match("E3LMTF071391") then logical_name = "DP-8" end if mon.description:match("E3LMTF071391") then logical_name = "DP-8" end
end end
local matugen_cmd = "matugen image '" .. img .. "' -c /home/trey/src/dotfiles/matugen/matugen-" .. logical_name .. ".toml --source-color-index 0"
-- Push primary monitor to the end of the array so its global configs (like tmux) overwrite the others
if logical_name == primary_logical_name then if logical_name == primary_logical_name then
table.insert(matugen_cmds, matugen_cmd) primary_img = img
else
table.insert(matugen_cmds, 1, matugen_cmd)
end end
end end
end end
if #matugen_cmds > 0 then local matugen_img = primary_img or fallback_img
local all_cmds = table.concat(matugen_cmds, " ; ") if matugen_img then
local matugen_cmd = "matugen image '" .. matugen_img .. "' -c " .. home .. "/src/dotfiles/matugen/config.toml --source-color-index 0"
local reload_cmd = M.reloadAppsCmd() local reload_cmd = M.reloadAppsCmd()
hl.dispatch(hl.dsp.exec_cmd("bash -c \"" .. all_cmds .. " ; " .. reload_cmd .. "\"")) hl.dispatch(hl.dsp.exec_cmd("bash -c \"" .. matugen_cmd .. " ; " .. reload_cmd .. "\""))
end end
local c = io.open(home .. "/.config/hypr/hyprpaper.conf", "w") local c = io.open(home .. "/.config/hypr/hyprpaper.conf", "w")
@@ -409,4 +408,13 @@ function M.setupMonitors()
-- hl.dispatch(hl.dsp.exec_cmd("bash -c '" .. table.concat(waybar_cmds, "\n") .. "'")) -- hl.dispatch(hl.dsp.exec_cmd("bash -c '" .. table.concat(waybar_cmds, "\n") .. "'"))
end end
function M.fixHyprlock(clear_only)
if clear_only then
hl.clear_crashed_lockscreen()
else
hl.config({ misc = { allow_session_lock_restore = true } })
hl.dispatch(hl.dsp.exec_cmd("hyprlock"))
end
end
return M return M
+10 -1
View File
@@ -37,7 +37,14 @@ hl.env("XDG_SESSION_DESKTOP", "Hyprland")
----------------------------------------------------- -----------------------------------------------------
-- Appearance & Input (from appearance.conf & input.conf) -- Appearance & Input (from appearance.conf & input.conf)
----------------------------------------------------- -----------------------------------------------------
local colors = require("colors") local ok, colors = pcall(require, "colors")
if not ok then
colors = {
active_border = "rgba(ebdbb2ff)",
inactive_border = "rgba(504945aa)",
shadow = "rgba(1d2021bf)",
}
end
hl.config({ hl.config({
general = { general = {
@@ -223,6 +230,8 @@ bind("SUPER + E", dsp.exec_cmd("nautilus")) -- Win+E for Explorer
bind("SUPER + O", dsp.exec_cmd("ags request \"launcher:open\"")) -- Win+O for Open File bind("SUPER + O", dsp.exec_cmd("ags request \"launcher:open\"")) -- Win+O for Open File
bind("SUPER + SHIFT + O", dsp.exec_cmd("ags request \"launcher:openwith\"")) -- Win+Shift+O for Open With bind("SUPER + SHIFT + O", dsp.exec_cmd("ags request \"launcher:openwith\"")) -- Win+Shift+O for Open With
bind("SUPER + V", dsp.exec_cmd("ags request \"launcher:cliphist\"")) -- Win+V for Clipboard bind("SUPER + V", dsp.exec_cmd("ags request \"launcher:cliphist\"")) -- Win+V for Clipboard
bind("SUPER + X", dsp.exec_cmd("ags request \"close-notification\"")) -- Win+X for Close Notification
bind("SUPER + Y", dsp.exec_cmd("ags request \"close-all-notifications\"")) -- Win+Y for Close All Notifications
bind("SUPER + SHIFT + S", function() fn.focusOrLaunch("pavucontrol", "org.pulseaudio.pavucontrol", "org.pulseaudio.pavucontrol") end) bind("SUPER + SHIFT + S", function() fn.focusOrLaunch("pavucontrol", "org.pulseaudio.pavucontrol", "org.pulseaudio.pavucontrol") end)
-- Window control -- Window control
-20
View File
@@ -1,20 +0,0 @@
ipc = on
splash = false
wallpaper {
monitor = eDP-1
path = /home/trey/images/Seven Beats Music/2024-07-15.jpg
fit_mode = cover
}
wallpaper {
monitor = DP-7
path = /home/trey/images/Seven Beats Music/2024-12-09.jpg
fit_mode = cover
}
wallpaper {
monitor = DP-8
path = /home/trey/images/Seven Beats Music/2024-10-14.jpg
fit_mode = cover
}
+1 -1
View File
@@ -28,7 +28,7 @@ exec-once = uwsm app -- waybar
exec-once = uwsm app -- espanso start exec-once = uwsm app -- espanso start
# notification daemon # notification daemon
exec-once = uwsm app -- dunst # exec-once = uwsm app -- dunst
# systray apps # systray apps
exec-once = nm-applet exec-once = nm-applet
+2 -2
View File
@@ -44,8 +44,8 @@ bind = SUPER, J, fullscreen, 1
#bind = SUPER, J, fullscreen, 1 #bind = SUPER, J, fullscreen, 1
# #
bind = SUPER, X, exec, dunstctl close bind = SUPER, X, exec, ags request "close-notification"
bind = SUPER, Y, exec, dunstctl close-all bind = SUPER, Y, exec, ags request "close-all-notifications"
# workspace control # workspace control
bind = SUPER, right, exec, $next_ws bind = SUPER, right, exec, $next_ws
+5 -5
View File
@@ -14,15 +14,15 @@ if [[ "$(charging_status)" == "Charging" ]] && \
[[ -f /run/user/${UID}/battery_low ]]; then [[ -f /run/user/${UID}/battery_low ]]; then
logger "Power reconnected and above 5 percent, clearing nofication state." logger "Power reconnected and above 5 percent, clearing nofication state."
rm /run/user/${UID}/battery_low rm /run/user/${UID}/battery_low
for id in $(dunstctl history | jq '.data[0][] | select(.summary.data == "LOW BATTERY!")| .id.data' \ notify-send --urgency=normal \
| tee /tmp/dunst_history.json); do --icon=/usr/share/icons/breeze-dark/emblems/16/emblem-information.svg \
dunstify --close=${id} 'Battery Charging' \
done 'Power connected. Battery level is rising.'
elif [[ "$(charging_status)" == "Discharging" ]] && \ elif [[ "$(charging_status)" == "Discharging" ]] && \
[[ $(battery_percentage) -le 5 ]] && \ [[ $(battery_percentage) -le 5 ]] && \
[[ ! ( -f /run/user/${UID}/battery_low ) ]] ; then [[ ! ( -f /run/user/${UID}/battery_low ) ]] ; then
logger "Low power! Triggering notification...." logger "Low power! Triggering notification...."
dunstify --urgency=critical \ notify-send --urgency=critical \
--icon=/usr/share/icons/breeze-dark/emblems/16/emblem-warning.svg \ --icon=/usr/share/icons/breeze-dark/emblems/16/emblem-warning.svg \
'LOW BATTERY!' \ 'LOW BATTERY!' \
'Battery level is low, plug power quick!' 'Battery level is low, plug power quick!'
+1 -1
View File
@@ -32,7 +32,7 @@ uwsm-app -- hyprpaper &
uwsm-app -- espanso start & uwsm-app -- espanso start &
# notification daemon # notification daemon
uwsm-app -- dunst & # uwsm-app -- dunst &
# clipboard # clipboard
wl-paste --watch cliphist store & wl-paste --watch cliphist store &
+8 -10
View File
@@ -20,24 +20,22 @@ while true; do
if [ "$STATUS" == "Discharging" ] && [ "$CAPACITY" -le 5 ]; then if [ "$STATUS" == "Discharging" ] && [ "$CAPACITY" -le 5 ]; then
if [ ! -f "/run/user/${UID}/battery_low" ]; then if [ ! -f "/run/user/${UID}/battery_low" ]; then
logger "Low power! Triggering notification...." logger "Low power! Triggering notification...."
# -p returns the ID so we can close it later notify-send --urgency=critical \
NOTIF_ID=$(dunstify --urgency=critical \
-p \
--icon=/usr/share/icons/breeze-dark/emblems/16/emblem-warning.svg \ --icon=/usr/share/icons/breeze-dark/emblems/16/emblem-warning.svg \
"LOW BATTERY!" \ "LOW BATTERY!" \
"Battery level is at ${CAPACITY}%, plug power quick!") "Battery level is at ${CAPACITY}%, plug power quick!"
echo "$NOTIF_ID" > "/run/user/${UID}/battery_low" touch "/run/user/${UID}/battery_low"
fi fi
# Clear the notification if we plug back in and rise above 5% # Clear the notification state if we plug back in and rise above 5%
elif [ "$STATUS" == "Charging" ] && [ "$CAPACITY" -gt 5 ]; then elif [ "$STATUS" == "Charging" ] && [ "$CAPACITY" -gt 5 ]; then
if [ -f "/run/user/${UID}/battery_low" ]; then if [ -f "/run/user/${UID}/battery_low" ]; then
logger "Power reconnected and above 5 percent, clearing notification state." logger "Power reconnected and above 5 percent, clearing notification state."
NOTIF_ID=$(cat "/run/user/${UID}/battery_low") notify-send --urgency=normal \
if [ -n "$NOTIF_ID" ]; then --icon=/usr/share/icons/breeze-dark/emblems/16/emblem-information.svg \
dunstify --close=$NOTIF_ID "Battery Charging" \
fi "Power connected. Battery level is at ${CAPACITY}%."
rm -f "/run/user/${UID}/battery_low" rm -f "/run/user/${UID}/battery_low"
fi fi