diff options
author | Julian T <julian@jtle.dk> | 2020-07-06 23:19:37 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-07-06 23:19:37 +0200 |
commit | 93824ffa357d728ff3c79191ead00103c642fb2e (patch) | |
tree | 90c5db394ccb7e42ac74ed77175af184d50d899e /scripts/Scripts | |
parent | 910c6316e6606308e2340a64a8ebae9c6926c12e (diff) |
Added more lc commands
Diffstat (limited to 'scripts/Scripts')
-rwxr-xr-x | scripts/Scripts/lc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/Scripts/lc b/scripts/Scripts/lc index 484f531..8fa73f2 100755 --- a/scripts/Scripts/lc +++ b/scripts/Scripts/lc @@ -3,7 +3,7 @@ LOGFILE=.lc.log DMENU="rofi -dmenu" -Commands="common update poweroff suspend set-keyboard caps-lock battery cups-website vim emacs htop scrot overleaf-render overleaf win pass wall stat mic mail" +Commands="sync lock common update poweroff suspend set-keyboard caps-lock battery cups-website vim emacs htop scrot overleaf-render overleaf win pass wall stat mic mail region" statScripts="ram.sh status.sh net.sh mic.sh" handle_stuff() { @@ -35,11 +35,17 @@ handle_stuff() { if [ "$1" = "poweroff" ]; then poweroff fi + if [ "$1" = "lock" ]; then + xscreensaver-command --lock + fi # Mics if [ "$1" = "p" ] || [ "$1" = "scrot" ]; then scrot /tmp/%Y-%m-%d-%T-screenshot.png fi + if [ "$1" = "region" ]; then + import /tmp/$(date -Iseconds)-screenshot.png + fi if [ "$1" = "overleaf-render" ]; then st sh ~/Documents/overleafRenderer/compile.sh @@ -58,10 +64,6 @@ handle_stuff() { if [ "$1" = "mic" ]; then amixer set Capture toggle fi - if [ "$1" = "mail" ]; then - Scripts/mailSync - dunstify "Mail" "$(notmuch count tag:unread and tag:inbox) unread mail" - fi # Launch if [ "$1" = "vi" ] || [ "$1" = "vim" ]; then @@ -90,6 +92,11 @@ handle_stuff() { python3 Scripts/commondocs.py ~/commondocs.json $(python3 Scripts/commondocs.py ~/commondocs.json | $DMENU) fi + if [ "$1" = "sync" ]; then + ./Scripts/sync.sh + dunstify "Sync complete" "Sync completed at $(date)" + fi + # Calc if [ "$(echo $1 | head -c 1)" = "=" ]; then calc="$(echo $1 | cut -c 2-)" |