{
pkgs,
...
}:
{
environment = {
etc = {
"xdg/rofi".source = ./config;
"xdg/scripts/wayland-disconnect.sh" = {
text = ''
#!/usr/bin/env bash
selected=$(printf "Lock\0icon\x1fsystem-lock-screen
Update\0icon\x1fsystem-software-update
Shutdown\0icon\x1fsystem-shutdown
Reboot\0icon\x1fsystem-reboot
Exit hyprland\0icon\x1fsystem-log-out
Reload hyprland\0icon\x1fsystem-log-out" | ${pkgs.rofi}/bin/rofi -dmenu -show-icons -i -theme /etc/xdg/rofi/disconnect.rasi -p System)
echo "$selected"
case $selected in
"Lock")
${pkgs.hyprlock}/bin/hyprlock
;;
"Update")
kitty /usr/local/share/dotfiles/scripts/update.sh
;;
"Shutdown")
systemctl poweroff
;;
"Reboot")
reboot
;;
"Exit hyprland")
hyprctl dispatch exit
;;
"Reload hyprland")
hyprctl reload
;;
esac
'';
mode = "0755";
};
"xdg/scripts/wayland-mpv.sh" = {
text = ''
#!/usr/bin/env bash
cd -- "$(dirname -- "$0")" || exit
## if not $1
if [[ -z $1 ]]
then
_LINES=$(curl "http://10.0.0.1:2013" 2>/dev/null | sed -e "s|.*/dev/null | sed -e "s|.*