diff options
Diffstat (limited to '')
-rwxr-xr-x | scripts/mpc-play-pause.sh | 4 | ||||
-rwxr-xr-x | scripts/nsp-console.sh | 2 | ||||
-rwxr-xr-x | scripts/screenlock.sh | 2 | ||||
-rwxr-xr-x | scripts/toggle-compton.sh | 6 | ||||
-rwxr-xr-x | scripts/toggle-redshift.sh | 6 | ||||
-rwxr-xr-x | scripts/toggle-touchpad.sh | 2 | ||||
-rwxr-xr-x | scripts/toggle-trackpoint.sh | 2 | ||||
-rwxr-xr-x | scripts/xmobar/fcitx.sh | 19 | ||||
-rwxr-xr-x | scripts/xshot-select-upload.sh | 2 | ||||
-rwxr-xr-x | scripts/xshot-select.sh | 2 | ||||
-rwxr-xr-x | scripts/xshot-upload.sh | 2 | ||||
-rwxr-xr-x | scripts/xshot.sh | 2 |
12 files changed, 25 insertions, 26 deletions
diff --git a/scripts/mpc-play-pause.sh b/scripts/mpc-play-pause.sh index 3fb4f3b..887ba5b 100755 --- a/scripts/mpc-play-pause.sh +++ b/scripts/mpc-play-pause.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env bash +#!/bin/sh -if mpc | grep -q "playing" +if mpc | grep -q '\[playing\]' then mpc --no-status pause else diff --git a/scripts/nsp-console.sh b/scripts/nsp-console.sh index 5d19f46..8923ea2 100755 --- a/scripts/nsp-console.sh +++ b/scripts/nsp-console.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh if tmux list-sessions | grep -q "scratchpad" then diff --git a/scripts/screenlock.sh b/scripts/screenlock.sh index 28dbe0c..fda4556 100755 --- a/scripts/screenlock.sh +++ b/scripts/screenlock.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh i3lock \ --no-unlock-indicator \ diff --git a/scripts/toggle-compton.sh b/scripts/toggle-compton.sh index 91ebc4d..ee3c880 100755 --- a/scripts/toggle-compton.sh +++ b/scripts/toggle-compton.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -if [[ $(pgrep 'compton') ]] +if ! pgrep compton then - pkill "compton" -else compton -b --config "${XDG_CONFIG_HOME}/compton.conf" +else + pkill compton fi diff --git a/scripts/toggle-redshift.sh b/scripts/toggle-redshift.sh index 8ba6b60..4dbcc38 100755 --- a/scripts/toggle-redshift.sh +++ b/scripts/toggle-redshift.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -if [[ $(pgrep 'redshift') ]] +if ! pgrep redshift then - pkill "redshift" -else redshift -c "${XDG_CONFIG_HOME}/redshift.conf" & disown redshift +else + pkill redshift fi diff --git a/scripts/toggle-touchpad.sh b/scripts/toggle-touchpad.sh index 5a30528..7a82391 100755 --- a/scripts/toggle-touchpad.sh +++ b/scripts/toggle-touchpad.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh ID=$(xinput list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}') STATE=$(xinput list-props "$ID" | awk '/Device Enabled/ {print $4}') diff --git a/scripts/toggle-trackpoint.sh b/scripts/toggle-trackpoint.sh index b0b3501..2d54670 100755 --- a/scripts/toggle-trackpoint.sh +++ b/scripts/toggle-trackpoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh ID=$(xinput list | grep -Eo 'TrackPoint\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}') STATE=$(xinput list-props "$ID" | awk '/Device Enabled/ {print $4}') diff --git a/scripts/xmobar/fcitx.sh b/scripts/xmobar/fcitx.sh index ddf1826..5538f50 100755 --- a/scripts/xmobar/fcitx.sh +++ b/scripts/xmobar/fcitx.sh @@ -1,16 +1,15 @@ -#!/usr/bin/env bash +#!/bin/sh -status="$(fcitx-remote)" -set out +STATUS="$(fcitx-remote)" -if [[ "$status" = 0 ]] +if [ "$STATUS" = 0 ] then - out="Off" -elif [[ "$status" = 1 ]] + OUT="Off" +elif [ "$STATUS" = 1 ] then - out="Disabled" -else - out="Enabled" + OUT="Disabled" +else + OUT="Enabled" fi -echo -e "$out" +echo "$OUT" diff --git a/scripts/xshot-select-upload.sh b/scripts/xshot-select-upload.sh index e846800..777eb87 100755 --- a/scripts/xshot-select-upload.sh +++ b/scripts/xshot-select-upload.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh PIC="${HOME}/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" diff --git a/scripts/xshot-select.sh b/scripts/xshot-select.sh index 53ad782..fc714c8 100755 --- a/scripts/xshot-select.sh +++ b/scripts/xshot-select.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh PIC="${HOME}/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" diff --git a/scripts/xshot-upload.sh b/scripts/xshot-upload.sh index 91c23f4..0dcd1ec 100755 --- a/scripts/xshot-upload.sh +++ b/scripts/xshot-upload.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh PIC="${HOME}/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" diff --git a/scripts/xshot.sh b/scripts/xshot.sh index d7984e3..0fbe40e 100755 --- a/scripts/xshot.sh +++ b/scripts/xshot.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh PIC="${HOME}/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" |