mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
seatd: remove loginctl
hardcoded
This commit is contained in:
parent
2e416c8842
commit
69df55f6ce
@ -108,7 +108,7 @@ cp -rfv ./home/.config/mpd/ ~/.config/mpd/
|
||||
cp -rfv ./home/.config/mpDris2/ ~/.config/mpDris2/
|
||||
cp -rfv ./home/.config/mpv/ ~/.config/mpv/
|
||||
cp -rfv ./home/.config/ncmpcpp/ ~/.config/ncmpcpp/
|
||||
cp -rfv ./home/.config/neofetch/ ~/.config/neofetch/
|
||||
# cp -rfv ./home/.config/neofetch/ ~/.config/neofetch/
|
||||
cp -rfv ./home/.config/newsboat/ ~/.config/newsboat/
|
||||
cp -rfv ./home/.config/nnn/ ~/.config/nnn/
|
||||
cp -rfv ./home/.config/npm/ ~/.config/npm/
|
||||
|
@ -29,15 +29,18 @@ case $session in
|
||||
bspwm ) exec bspwm ;;
|
||||
spectrwm ) exec spectrwm -c ~/.config/spectrwm/spectrwm-nord.conf ;;
|
||||
exwm )
|
||||
# In case no elogind
|
||||
# In case of using seatd. Flatpak apps won't work
|
||||
if [ -z "${XDG_RUNTIME_DIR}" ]
|
||||
then
|
||||
export XDG_RUNTIME_DIR="/tmp/$(mktemp -d $(id -u ${USER})-runtime-XXXXXX)"
|
||||
userid=$(id -u ${USER})
|
||||
export XDG_RUNTIME_DIR="$(mktemp -d /tmp/${userid}-runtime-XXXXXX)"
|
||||
if [ ! -d "${XDG_RUNTIME_DIR}" ]
|
||||
then
|
||||
mkdir "${XDG_RUNTIME_DIR}"
|
||||
mkdir -p "${XDG_RUNTIME_DIR}"
|
||||
chmod 0700 "${XDG_RUNTIME_DIR}"
|
||||
fi
|
||||
# Assure we use seatd
|
||||
# export LIBSEAT_BACKEND=seatd
|
||||
fi
|
||||
exec dbus-run-session emacs -mm --debug-init -l ~/.config/doom/exwm.el > "${XDG_RUNTIME_DIR}/exwm-$(date "+%Y-%m-%d").log" 2>&1 ;;
|
||||
* ) exec "$1" ;;
|
||||
|
@ -11,12 +11,12 @@
|
||||
},
|
||||
{
|
||||
"name": "Reboot",
|
||||
"exec": "loginctl reboot",
|
||||
"exec": "pkexec /usr/bin/reboot",
|
||||
"icon": "system-reboot"
|
||||
},
|
||||
{
|
||||
"name": "Shutdown",
|
||||
"exec": "loginctl poweroff",
|
||||
"exec": "pkexec /usr/bin/poweroff",
|
||||
"icon": "system-shutdown"
|
||||
}
|
||||
]
|
||||
|
@ -70,7 +70,7 @@ input type:keyboard {
|
||||
xkb_options grp:rshift_toggle
|
||||
}
|
||||
|
||||
input * xkb_numlock enable
|
||||
# input * xkb_numlock enable
|
||||
|
||||
# _______ _____ _____ _____
|
||||
# ___ |___ ___ /_______________ /______ _________ /_
|
||||
@ -229,12 +229,8 @@ bindsym $mod+Shift+r reload
|
||||
bindsym $mod+Mod1+q exec swaynag -t warning \
|
||||
-m "Logout" \
|
||||
-b "Exit session" "swaymsg exit" \
|
||||
-b "Suspend" "loginctl suspend" \
|
||||
-b "Hibernate" "loginctl hibernate" \
|
||||
-b "Hybrid sleep" "loginctl hybrid-sleep" \
|
||||
-b "Suspend then hibernate" "loginctl suspend-then-hibernate" \
|
||||
-b "Shutdown" "loginctl poweroff" \
|
||||
-b "Reboot" "loginctl reboot"
|
||||
-b "Shutdown" "pkexec /usr/bin/poweroff" \
|
||||
-b "Reboot" "pkexec /usr/bin/reboot"
|
||||
|
||||
#
|
||||
# Moving around:
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# require elogind or systemd
|
||||
PIDFILE="/run/user/$UID/wall.pid"
|
||||
PIDFILE="${XDG_RUNTIME_DIR}/wall.pid"
|
||||
|
||||
declare -a PIDs
|
||||
|
||||
|
@ -2,15 +2,20 @@
|
||||
|
||||
# Start user dbus session alongside a Wayland compositor
|
||||
|
||||
# In case no elogind
|
||||
# In case of using seatd (need the user to be in _seatd group)
|
||||
# Flatpak apps will not work because of hardcoded /run/user/$UID
|
||||
if [ -z "${XDG_RUNTIME_DIR}" ]
|
||||
then
|
||||
export XDG_RUNTIME_DIR="/tmp/$(mktemp -d $(id -u ${USER})-runtime-XXXXXX)"
|
||||
userid=$(id -u ${USER})
|
||||
export XDG_RUNTIME_DIR="$(mktemp -d /tmp/${userid}-runtime-XXXXXX)"
|
||||
if [ ! -d "${XDG_RUNTIME_DIR}" ]
|
||||
then
|
||||
mkdir "${XDG_RUNTIME_DIR}"
|
||||
mkdir -p "${XDG_RUNTIME_DIR}"
|
||||
chmod 0700 "${XDG_RUNTIME_DIR}"
|
||||
fi
|
||||
|
||||
# Assure we use seatd
|
||||
# export LIBSEAT_BACKEND=seatd
|
||||
fi
|
||||
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
|
1
system/etc/doas.conf
Normal file
1
system/etc/doas.conf
Normal file
@ -0,0 +1 @@
|
||||
permit persist :wheel as root
|
10
system/etc/polkit-1/rules.d/49-nopasswd.rules
Normal file
10
system/etc/polkit-1/rules.d/49-nopasswd.rules
Normal file
@ -0,0 +1,10 @@
|
||||
/* Allow running reboot, shutdown as normal user */
|
||||
/* of group wheel without sudo password */
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.policykit.exec" &&
|
||||
(action.lookup("program") == "/usr/bin/reboot" ||
|
||||
action.lookup("program") == "/usr/bin/poweroff") &&
|
||||
subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user