diff options
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/dmlog | 17 | ||||
-rwxr-xr-x | .local/bin/dmpass | 6 |
2 files changed, 16 insertions, 7 deletions
diff --git a/.local/bin/dmlog b/.local/bin/dmlog index 3d6ccc1..a4c0182 100755 --- a/.local/bin/dmlog +++ b/.local/bin/dmlog @@ -62,11 +62,11 @@ sub action '-u', 'normal', 'shutdown', - ' G\'night, partner!' + ' G\'night, partner!' ); sleep 2; if (OS eq 'Linux') { - exec(LOGINCTL_PATH, 'suspend'); + exec('systemctl', 'suspend'); } exec(ACPI_PATH, '-s', '3'); } @@ -84,8 +84,15 @@ sub action if (confirm($var) == 1) { system(EMACS_PATH, '-e', '"(save-buffers-kill-terminal)"'); if (OS eq 'Linux') { - exec(LOGINCTL_PATH, 'reboot'); + exec('systemctl', 'reboot'); } + system( + NOTIF_PATH, + '-u', + 'normal', + 'shutdown', + ' Rebootin\', partner!' + ); exec(SHUTDOWN_PATH, '-r', 'now'); } } @@ -97,11 +104,11 @@ sub action '-u', 'normal', 'shutdown', - ' Farewell, partner!' + ' Farewell, partner!' ); sleep 2; if (OS eq 'Linux') { - exec(LOGINCTL_PATH, 'poweroff'); + exec('systemctl', 'poweroff'); } exec(SHUTDOWN_PATH, '-p', 'now'); } diff --git a/.local/bin/dmpass b/.local/bin/dmpass index 11725c7..6836d41 100755 --- a/.local/bin/dmpass +++ b/.local/bin/dmpass @@ -23,13 +23,15 @@ password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15 -m 0) [ -n "$password" ] || exit +p="$(pass show "$password")" + if [ $full -eq 1 ]; then id=$(printf "%s" "$password" | sed 's/.*___//') printf "%s\n" $id | { IFS= read -r pass; printf %s "$id"; } | $xdotool xdotool key Tab - pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool + printf "%s\n" "$p" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool xdotool key Return exit fi -pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool +printf "%s\n" "$p" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool |