Renamed hyprland folder in /usr/share to hypr to override default hyprland configs
All checks were successful
bluebuild / Build Custom Image (recipe.yml) (push) Successful in 57s

This commit is contained in:
2025-05-14 13:43:23 -04:00
parent 6430da2b61
commit c4fbd9fa75
23 changed files with 16 additions and 16 deletions

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
HYPRCMDS=$(hyprctl -j clients | jq -j '.[] | "dispatch closewindow address:\(.address); "')
hyprctl --batch "$HYPRCMDS" >>/tmp/hyprexitwithgrace.log 2>&1
notify-send "power controls" "Closing Applications..."
sleep 2
COUNT=$(hyprctl clients | grep "class:" | wc -l)
if [ "$COUNT" -eq "0" ]; then
notify-send "power controls" "Closed Applications."
return
else
notify-send "power controls" "Some apps didn't close. Not shutting down."
exit 1
fi

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
/usr/share/hypr/scripts/hypr_power/hypr_close_clients
hyprctl dispatch exit

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
/usr/share/hypr/scripts/hypr_power/hypr_close_clients
systemctl reboot

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
/usr/share/hypr/scripts/hypr_power/hypr_close_clients
systemctl poweroff

View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
# nextcloud desktop
sleep 15 && flatpak run --branch=stable --arch=x86_64 --command=nextcloud --file-forwarding com.nextcloud.desktopclient.nextcloud

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
kwalletmanager5 &
sleep 1 && exec --no-startup-id /usr/lib/pam_kwallet_init
notify-send -e --expire-time=2000 'Kwallet has been loaded. Loading dependent apps...'
sleep 2 && hyprctl dispatch closewindow class:org.kde.kwalletmanager

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
BIN_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
LUA_PATH="${BIN_DIR}/?.lua;;" lua $1

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env lua
local menu = {}
function menu:clean_string(str)
str = string.gsub(str, "^%s+", "")
str = string.gsub(str, "%s+$", "")
return string.gsub(str, "[\n]+", " ")
end
function menu:bring_menu(prompt, options)
local options_string = ""
local length = 1
for _, value in pairs(options) do
options_string = options_string .. value .. "\n"
length = length + 1
end
options_string = options_string:sub(1, -2)
local command = "echo -e '" .. options_string .. "' | rofi -dmenu -i -p '" .. prompt .. "'"
local f = assert(io.popen(command, "r"))
local s = menu:clean_string(assert(f:read("*a")))
f:close()
return s
end
return menu

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env lua
local menu = require("menu")
local executable = {
["Shutdown"] = "/usr/share/hyprland/scripts/hypr_power/hypr_shutdown",
["Reboot"] = "/usr/share/hyprland/scripts/hypr_power/hypr_reboot",
["Log out"] = "/usr/share/hyprland/scripts/hypr_power/hypr_logout",
["Cancel"] = "",
}
local options = { "Shutdown", "Reboot", "Log out", "Cancel" }
local s = menu:bring_menu("Power menu", options)
os.execute(executable[s])