Compare commits
4 Commits
a92d475e60
...
baba42bff9
Author | SHA1 | Date |
---|---|---|
John Mertz | baba42bff9 | |
John Mertz | e474d0b057 | |
John Mertz | 0c915f4d17 | |
John Mertz | 627ee855a7 |
|
@ -59,7 +59,8 @@ Quick VPN switcher.
|
||||||
|
|
||||||
[**rofi/rofi-power-menu.sh**](https://git.john.me.tz/jpm/scripts/src/branch/master/rofi/rofi-power-menu.sh)
|
[**rofi/rofi-power-menu.sh**](https://git.john.me.tz/jpm/scripts/src/branch/master/rofi/rofi-power-menu.sh)
|
||||||
|
|
||||||
Lock, log out, restart Sway/i3, restart waybar, hibernate, reboot, shutdown.
|
Lock, toggle displays, reload yubico authenticator, log out, restart Sway/i3,
|
||||||
|
reload 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)
|
[**rofi/rofi-send-to-kodi.sh**](https://git.john.me.tz/jpm/scripts/src/branch/master/rofi/rofi-send-to-kodi.sh)
|
||||||
|
|
||||||
|
|
|
@ -12,17 +12,19 @@ fi
|
||||||
if [[ $WM == 'i3' ]]; then
|
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)
|
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
|
else
|
||||||
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)
|
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)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$res" == "🔒 Lock" ]; then
|
if [ "$res" == "🔒 Lock" ]; then
|
||||||
${WM}lock -c 323232
|
${WM}lock -c 1D2021
|
||||||
elif [ "$res" == "↩ Logout" ]; then
|
elif [ "$res" == "↩ Logout" ]; then
|
||||||
# Prevent auto-login
|
# Prevent auto-login
|
||||||
rm /home/jpm/.config/last_login_gui
|
rm /home/jpm/.config/last_login_gui
|
||||||
${WM} exit
|
${WM} exit
|
||||||
elif [ "$res" == "🖵 Toggle Displays" ]; then
|
elif [ "$res" == "🖵 Toggle Displays" ]; then
|
||||||
/home/jpm/scripts/sway/toggle_outputs.sh
|
/home/jpm/scripts/sway/toggle_outputs.sh
|
||||||
|
elif [ "$res" == "⚿ Yubico Authenticator" ]; then
|
||||||
|
/home/jpm/scripts/rofi/rofi-yubioath.sh
|
||||||
elif [ "$res" == "↻ Reload i3" ]; then
|
elif [ "$res" == "↻ Reload i3" ]; then
|
||||||
i3 reload
|
i3 reload
|
||||||
elif [ "$res" == "↹ Restart i3" ]; then
|
elif [ "$res" == "↹ Restart i3" ]; then
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/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 &
|
|
@ -30,8 +30,8 @@
|
||||||
# "width": __WIDTH__ (optional)
|
# "width": __WIDTH__ (optional)
|
||||||
my $waybar_template = "$ENV{'HOME'}/.config/waybar/config.template";
|
my $waybar_template = "$ENV{'HOME'}/.config/waybar/config.template";
|
||||||
|
|
||||||
# Temporary directory to save generated waybar config(s)
|
# Path to actual config file generated from template
|
||||||
my $waybar_temporary = '/tmp';
|
my $waybar_config = "$ENV{'HOME'}/.config/waybar/config";
|
||||||
|
|
||||||
# File to log and recover last used layout name
|
# File to log and recover last used layout name
|
||||||
my $last = "$ENV{'HOME'}/.config/last_display";
|
my $last = "$ENV{'HOME'}/.config/last_display";
|
||||||
|
@ -382,12 +382,8 @@ unless ($pid) {
|
||||||
open STDOUT, '>>/dev/null';
|
open STDOUT, '>>/dev/null';
|
||||||
open STDERR, '>>/dev/null';
|
open STDERR, '>>/dev/null';
|
||||||
# Write config to a temporary file
|
# Write config to a temporary file
|
||||||
my $tmp = $waybar_temporary . "/waybar-" . time() .".config";
|
open ($fh, '>', $waybar_config);
|
||||||
open ($fh, '>', $tmp);
|
|
||||||
print $fh $waybar;
|
print $fh $waybar;
|
||||||
close $fh;
|
close $fh;
|
||||||
`nohup waybar --config=$tmp >> waybar.log`;
|
`nohup waybar --config=$waybar_config >> waybar.log`;
|
||||||
|
|
||||||
# Remove config
|
|
||||||
unlink $tmp;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
if [ "$(pgrep -c htop)" -gt 0 ]; then
|
if [ "$(pgrep -c htop)" -gt 0 ]; then
|
||||||
pkill htop
|
pkill htop
|
||||||
else
|
else
|
||||||
/usr/bin/uxterm -e htop
|
/usr/bin/xterm -e htop
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
notify-send -t 3000 Disks \
|
notify-send Disks \
|
||||||
"$(lsblk -o NAME,SIZE,FSUSE%,MOUNTPOINT | grep -vP '^loop' | \
|
"$(lsblk -o NAME,SIZE,FSUSE%,MOUNTPOINT | grep -vP '^loop' | \
|
||||||
sed 's/MOUNTPOINT/MOUNT/' | sed -e 's/│ └─/+---/' | \
|
sed 's/MOUNTPOINT/MOUNT/' | sed -e 's/│ └─/+---/' | \
|
||||||
sed -e 's/ └─/+---/' | sed -e 's/├─/+-/' | sed -e 's/└─/+-/' | \
|
sed -e 's/ └─/+---/' | sed -e 's/├─/+-/' | sed -e 's/└─/+-/' | \
|
||||||
|
|
Loading…
Reference in New Issue