diff options
| author | jason | 2017-04-20 16:36:34 -0600 |
|---|---|---|
| committer | jason | 2017-04-21 11:39:13 -0600 |
| commit | cfce7547cd36c8ab7f53fb620e0297e722761d8d (patch) | |
| tree | efedc1d027779445575e55af2805386702e50513 /scripts/bin | |
| parent | f176cf30293cf2793f83026a3587752b69b128a9 (diff) | |
| download | dotfiles-cfce7547cd36c8ab7f53fb620e0297e722761d8d.tar.gz dotfiles-cfce7547cd36c8ab7f53fb620e0297e722761d8d.zip | |
Update move in scripts, add bin scripts
Diffstat (limited to 'scripts/bin')
| -rwxr-xr-x | scripts/bin/fix_screens_at_work.sh | 11 | ||||
| -rwxr-xr-x | scripts/bin/notifyvolume | 3 | ||||
| -rwxr-xr-x | scripts/bin/run-once | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/scripts/bin/fix_screens_at_work.sh b/scripts/bin/fix_screens_at_work.sh new file mode 100755 index 0000000..5fa27a7 --- /dev/null +++ b/scripts/bin/fix_screens_at_work.sh | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | #xrandr --setprovideroutputsource 1 0 | ||
| 4 | #xrandr --output DP-2 --mode 1920x1200 | ||
| 5 | xrandr --output DP-4 --right-of DP-2 --auto --primary --mode 2560x1440 | ||
| 6 | xrandr --output DVI-I-1-1 --below DP-4 --auto | ||
| 7 | |||
| 8 | # For some reason, occasionally this needs to be executed twice | ||
| 9 | xmodmap ~/.Xmodmap-pckeyboard_fix | ||
| 10 | sleep 1 | ||
| 11 | xmodmap ~/.Xmodmap-pckeyboard_fix | ||
diff --git a/scripts/bin/notifyvolume b/scripts/bin/notifyvolume new file mode 100755 index 0000000..0da7337 --- /dev/null +++ b/scripts/bin/notifyvolume | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | exec /usr/bin/notify-send -t 1000 -i volume-knob "Volume $(amixer -q | grep -A5 Master | grep '%' | cut -d'[' -f2 | cut -d']' -f1)" | ||
diff --git a/scripts/bin/run-once b/scripts/bin/run-once new file mode 100755 index 0000000..56f3709 --- /dev/null +++ b/scripts/bin/run-once | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #! /bin/bash | ||
| 2 | |||
| 3 | # Run program unless it's already running. | ||
| 4 | |||
| 5 | if [ -z "`ps -Af | grep -o -w ".*$1" | grep -v grep | grep -v run-once`" ]; then | ||
| 6 | $@ | ||
| 7 | fi \ No newline at end of file | ||