Compare commits

..

No commits in common. "baba42bff95aacfabe01799b0fc56d894b95a3de" and "a92d475e60e76cb7c0d18aa77cff9dd4cb4f5807" have entirely different histories.

6 changed files with 13 additions and 24 deletions

View File

@ -59,8 +59,7 @@ Quick VPN switcher.
[**rofi/rofi-power-menu.sh**](https://git.john.me.tz/jpm/scripts/src/branch/master/rofi/rofi-power-menu.sh)
Lock, toggle displays, reload yubico authenticator, log out, restart Sway/i3,
reload waybar, hibernate, reboot, shutdown.
Lock, log out, restart Sway/i3, restart waybar, hibernate, reboot, shutdown.
[**rofi/rofi-send-to-kodi.sh**](https://git.john.me.tz/jpm/scripts/src/branch/master/rofi/rofi-send-to-kodi.sh)

View File

@ -12,19 +12,17 @@ fi
if [[ $WM == 'i3' ]]; then
res=$(printf "🔒 Lock|↩ Logout|↻ Reload i3|↹ Restart i3|↯ Hibernate|🡙 Reboot|⏻ Shutdown" | rofi -sep "|" -dmenu -i -p 'Power: ' "" -columns 1 -rows 7 -width 32 -l 1 -hide-scrollbar -eh 1 -location 0 -padding 12 -opacity 100 -auto-select -no-fullscreen)
else
res=$(echo "🔒 Lock|🖵 Toggle Displays|⚿ Yubico Authenticator|↻ Reload Sway|↻ Reload Waybar|↩ Logout|↯ Hibernate|🡙 Reboot|⏻ Shutdown" | rofi -sep "|" -dmenu -i -p 'Power: ' "" -no-lazy-grab -auto-select -no-fullscreen)
res=$(echo "🔒 Lock|🖵 Toggle Displays|↩ Logout|↻ Reload Sway|↻ Reload Waybar|↯ Hibernate|🡙 Reboot|⏻ Shutdown" | rofi -sep "|" -dmenu -i -p 'Power: ' "" -no-lazy-grab -auto-select -no-fullscreen)
fi
if [ "$res" == "🔒 Lock" ]; then
${WM}lock -c 1D2021
${WM}lock -c 323232
elif [ "$res" == "↩ Logout" ]; then
# Prevent auto-login
rm /home/jpm/.config/last_login_gui
${WM} exit
elif [ "$res" == "🖵 Toggle Displays" ]; then
/home/jpm/scripts/sway/toggle_outputs.sh
elif [ "$res" == "⚿ Yubico Authenticator" ]; then
/home/jpm/scripts/rofi/rofi-yubioath.sh
elif [ "$res" == "↻ Reload i3" ]; then
i3 reload
elif [ "$res" == "↹ Restart i3" ]; then

View File

@ -1,12 +0,0 @@
#!/bin/bash
RUNNING=$(pgrep yubioath-deskto)
if [ "$RUNNING" ]; then
kill $RUNNING
sudo systemctl stop pcscd.socket
sudo systemctl restart pcscd.service
sudo systemctl start pcscd.socket
fi
QT_QPA_PLATFORMTHEME=qt5ct QT_QPA_PLATFORM=wayland QT_PLUGIN_PATH=/usr/lib/qt/plugins /usr/bin/yubioath-desktop &

View File

@ -30,8 +30,8 @@
# "width": __WIDTH__ (optional)
my $waybar_template = "$ENV{'HOME'}/.config/waybar/config.template";
# Path to actual config file generated from template
my $waybar_config = "$ENV{'HOME'}/.config/waybar/config";
# Temporary directory to save generated waybar config(s)
my $waybar_temporary = '/tmp';
# File to log and recover last used layout name
my $last = "$ENV{'HOME'}/.config/last_display";
@ -382,8 +382,12 @@ unless ($pid) {
open STDOUT, '>>/dev/null';
open STDERR, '>>/dev/null';
# Write config to a temporary file
open ($fh, '>', $waybar_config);
my $tmp = $waybar_temporary . "/waybar-" . time() .".config";
open ($fh, '>', $tmp);
print $fh $waybar;
close $fh;
`nohup waybar --config=$waybar_config >> waybar.log`;
`nohup waybar --config=$tmp >> waybar.log`;
# Remove config
unlink $tmp;
}

View File

@ -3,5 +3,5 @@
if [ "$(pgrep -c htop)" -gt 0 ]; then
pkill htop
else
/usr/bin/xterm -e htop
/usr/bin/uxterm -e htop
fi

View File

@ -1,6 +1,6 @@
#!/bin/bash
notify-send Disks \
notify-send -t 3000 Disks \
"$(lsblk -o NAME,SIZE,FSUSE%,MOUNTPOINT | grep -vP '^loop' | \
sed 's/MOUNTPOINT/MOUNT/' | sed -e 's/│ └─/+---/' | \
sed -e 's/ └─/+---/' | sed -e 's/├─/+-/' | sed -e 's/└─/+-/' | \