z_mirror/dotfiles

git clone https://git.raiguard.me/z_mirror/dotfiles

Caleb Heuerfuzzel: Fix log out command on niri95e2418

noctalia
523 B23 linesraw
1#!/bin/sh
2
3entries="Lock screen\nLog out\nSuspend\nReboot\nShut down"
4
5selected=$(printf "$entries" | fuzzel -d -w 24 -l 5)
6
7case "$selected" in
8    "Lock screen")
9        exec swaylock;;
10    "Log out")
11        case "$XDG_CURRENT_DESKTOP" in
12            "sway")
13                swaymsg exit;;
14            "niri")
15                niri msg action quit -s;;
16        esac;;
17    "Suspend")
18        exec systemctl suspend;;
19    "Reboot")
20        exec systemctl reboot;;
21    "Shut down")
22        exec systemctl poweroff -i;;
23esac