Recent Posts

Pages: 1 ... 8 9 [10]
91
I've Got a Life / Re: Current lava flow from Hawaii's Kilauea Volcano
« Last post by PackRat on February 04, 2017, 05:45:23 PM »
Yes, some days "the mountain wins" as the saying goes.
92
I've Got a Life / Re: Current lava flow from Hawaii's Kilauea Volcano
« Last post by hakerdefo on February 04, 2017, 05:29:35 PM »
24 years mining, construction, some research.

Two heart attacks forced me into retirement.
24 years in mining and construction!
That is a tough work, isn't it?
93
Scripts / Re: vsido-exit (systemd based logout script for VSIDO)
« Last post by hakerdefo on February 04, 2017, 05:17:39 PM »
Thanks for the ideas PackRat. Assigning commands to variables can make editing the script easy. And I'm in the process of updating the script so these suggestions will be implemented in the new version.
Cheers!!!
94
I've Got a Life / Re: Current lava flow from Hawaii's Kilauea Volcano
« Last post by PackRat on February 04, 2017, 05:12:15 PM »
24 years mining, construction, some research.

Two heart attacks forced me into retirement.
95
I've Got a Life / Re: Current lava flow from Hawaii's Kilauea Volcano
« Last post by hakerdefo on February 04, 2017, 04:49:32 PM »
That is awesome site!
@PackRat You used to work in Geology?
96
I've Got a Life / Current lava flow from Hawaii's Kilauea Volcano
« Last post by PackRat on February 04, 2017, 04:01:05 PM »
A very rare geologic occurrance -


USGS Interview

crazy stuff; miss working with those USGS people.
97
Scripts / Re: vsido-exit (systemd based logout script for VSIDO)
« Last post by PackRat on February 04, 2017, 03:50:38 PM »
^ thanks, nice work writing the script.

Some simple tweaking - a bit of over-engineering for a script like this, but I wanted some practice.

Two changes:

the logout command is now:

Code: [Select]
loginctl terminate-session "$XDG_SESSION_ID
so no more parsing through awk. And the commands are now set up as variables so all a user/administrator has to do is change the variable to whatever custom command they want to use.

Code: [Select]
#!/usr/bin/env bash

LOGOUT="loginctl terminate-session "$XDG_SESSION_ID""
SUSPEND="systemctl suspend"
REBOOT="systemctl reboot"
POWEROFF="systemctl poweroff"

vslo_menu (){
vslo_ttle="vsido-logout"
vslo_clas="$vslo_ttle"
vslo_wico="/usr/share/pixmaps/logout_window_small.png"
vslo_wico_big="/usr/share/pixmaps/logout_window_big.png"
type xtrlock >/dev/null 2>&1
RETVAL=$?
if ! [[ "$RETVAL" == 0 ]]; then
type dm-tool >/dev/null 2>&1
RETVAL=$?
if ! [[ "$RETVAL" == 0 ]]; then
type slock >/dev/null 2>&1
RETVAL=$?
if ! [[ "$RETVAL" == 0 ]]; then
type i3lock >/dev/null 2>&1
RETVAL=$?
if ! [[ "$RETVAL" == 0 ]]; then
type light-locker >/dev/null 2>&1
RETVAL=$?
if ! [[ "$RETVAL" == 0 ]]; then
type xscreensaver >/dev/null 2>&1
RETVAL=$?
if ! [[ "$RETVAL" == 0 ]]; then
vslo_main=$(yad --class="$vslo_clas" --title="$vslo_ttle" --window-icon="$vslo_wico" --center --fixed --on-top --buttons-layout=center --button="Cancel!!Cancel:1" --button="Logout!!Logout of VSIDO:3" --button="Suspend!!Suspend VSIDO:4" --button="Reboot!!Reboot VSIDO:5" --button="Shutdown!!Shutdown VSIDO:6")
fi
fi
fi
fi
fi
fi
vslo_main=$(yad --class="$vslo_clas" --title="$vslo_ttle" --window-icon="$vslo_wico" --center --fixed --on-top --buttons-layout=center --button="Cancel!!Cancel:1" --button="Lock Screen!!Lock the screen:2" --button="Logout!!Logout of VSIDO:3" --button="Suspend!!Suspend VSIDO:4" --button="Reboot!!Reboot VSIDO:5" --button="Shutdown!!Shutdown VSIDO:6")
vslo_main=$?
case "$vslo_main" in
1)
exit 1
;;
2)
type xtrlock >/dev/null 2>&1
RETVAL=$?
if [[ "$RETVAL" == 0 ]]; then
xtrlock -b
exit 0
fi
type dm-tool >/dev/null 2>&1
RETVAL=$?
if [[ "$RETVAL" == 0 ]]; then
dm-tool lock
exit 0
fi
type slock >/dev/null 2>&1
RETVAL=$?
if [[ "$RETVAL" == 0 ]]; then
slock
exit 0
fi
type i3lock >/dev/null 2>&1
RETVAL=$?
if [[ "$RETVAL" == 0 ]]; then
i3lock
exit 0
fi
type light-locker >/dev/null 2>&1
RETVAL=$?
if [[ "$RETVAL" == 0 ]]; then
light-locker-command -l
exit 0
fi
type xscreensaver >/dev/null 2>&1
RETVAL=$?
if [[ "$RETVAL" == 0 ]]; then
xscrsav=$(which xscreensaver)
active_xscrsav=$(pidof "$xscrsav")
if [[ -z "$active_xscrsav" ]]; then
xscreensaver -no-splash &
sleep 1
xscreensaver-command -lock
exit 0
fi
fi
xscrsav_user=$(ps -p "$active_xscrsav" -o ruser=)
xscrsav_user_id=$(id -u "$xscrsav_user")
current_user_id=$(id -u)
if [[ "$xscrsav_user_id" == "$current_user_id" ]]; then
xscreensaver-command -lock
exit 0
fi
if [[ "$current_user_id" == 0 ]]; then
su "$xscrsav_user" -c "xscreensaver-command -lock"
exit 0
fi
yad --title="$vslo_ttle" --class="$vslo_clas" --window-icon="$vslo_wico" --borders=20 --center --fixed --image="$vslo_wico_big" --on-top --button=gtk-ok --text="xscreensaver was started by another user.\nso current user can't use the lock function.\nauto-start xscreensaver with your session.\n"
exit 0
;;
3)
$LOGOUT
exit 0
;;
4)
$SUSPEND
exit 0
;;
5)
$REBOOT
exit 0
;;
6)
$POWEROFF
exit 0
;;
130)
exit 1
;;
252)
exit 1
;;
esac
}
while :
do
vslo_menu
done

@hackerdefo - or anyone that likes to see the icons in the dialog box, I shrank the icons to 22x22 and think it looks better. The icons do not overpower the text in the dialog box.
98
Artwork & Screenshots / Re: February 20017 Screenshot Thread
« Last post by PackRat on February 04, 2017, 03:41:59 PM »
^ That's brutal; definitely one thing I'll never miss about living in Minnesota. Only overnight freezing here -

99
Artwork & Screenshots / Re: February 20017 Screenshot Thread
« Last post by jedi on February 04, 2017, 11:53:32 AM »
Thanks PackRat...

Cold days up here, and colder nights...

100
Scripts / Re: vsido-exit (systemd based logout script for VSIDO)
« Last post by hakerdefo on February 03, 2017, 07:56:04 PM »
Quote
I know it works with spectrwm, I'm curious if it works with dwm. Did you try it with your dwm build?

Jwm.  I did a quick build this morning before work.

I installed dwm, the script works as intended; good deal, dwm doesn't always work well with session management tools.

That's fantabulous  8)

I would again say this script wouldn't have been possible without PackRat.
It was his idea (Remember, he started the thread at code challenge).
And when I was happy and content with,
Code: [Select]
fluxbox-remote exitfor logout, it was PackRat who pushed me further  8)
And not to forget all the testing he has done  8)
Thanks a metric ton PackRat  :)

Cheers!!!
Pages: 1 ... 8 9 [10]