ArchLabs Linux

Rofi Lock Screen Script - v2

Hi there, I would like to share the following add-on to the rofi_run script:

nano ~/bin/rofi_run

to change

-lines 4 <<< " Lock| Logout| Reboot| Shutdown")" # line 89

to

-lines 5 <<< " Lock| Suspend| Logout| Reboot| Shutdown")" # new line 89

and put a

*Suspend) i3lock-fancy ; systemctl suspend ;; # new line 94

between

*Lock) i3lock-fancy ;; # line 93

and

*Reboot) systemctl reboot ;; # old line 94

Also I had to change line 79 in /usr/bin/i3lock-fancy with

sudo nano /usr/bin/i3lock-fancy

into

i3lock -i "$IMAGE"

because

i3lock -n -i "$IMAGE"

didn’t allow forking of i3lock, which made

systemctl suspend

difficult to invoce.

I suppose /usr/bin/i3lock-fancy will be reverted during a future

pacman -Syu

therefore I would like to ask if you can think of a different way to do a lock+suspend?

Why is there a -n (--nofork) in line 77 and 79, anyway?

Thx for input and thx for this awesome distro.

3 Likes

Top job @zaphod . Thx for sharing.

Greetings, @altman, thought “Suspend” feature might be interesting for other archlab-users… cu

Yep , pretty much it.