Axarva / dotfiles-2.0

XMonad™️. Widgets go brr.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logging out scripts

iQiexie opened this issue · comments

Hello, sorry for a noob question (I'm new to Linux), but I really can't find how to choose a polybar option.

Whenever I hit mod+shift+q and click on the logout icon, I get the "Available options - yes/y/no/n" window and I can't choose any of them.

Clicking doesn't help, typing any of these options doesn't help and when I press enter, this window just terminates

Update: when I run eww scripts from their config folder (logout.sh) and type y, the following promt pops up

xmonad: no process found

I looked up the logout script and found out that it's running "killall xmonad" command. Is there a working alternative?

Found a solution.

First get the session number with running the command

loginctl session-status | head -n 1 | awk '{print $1}'

Then use loginctl terminate-session <session number>

You can turn it into a shell script

session=`loginctl session-status | head -n 1 | awk '{print $1}'`
loginctl terminate-session $session

Source: https://unix.stackexchange.com/questions/72203/logout-user-with-systemd

Hey, this might be dumb but i've run into this problem writing some scripts for myself in the past. The killall command is case sensitive, so if the system recognizes the WM processes as Xmonad the script isn't going to find any processes to terminate

Fixed.

im running into this problem as well. running killall xmonad outputs no process found and ps didn't find xmonad as well. i also tried running it but with Xmonad instead but it still couldn't find it. any ideas why this happens?