diff options
| author | jason | 2019-07-22 14:36:17 -0600 |
|---|---|---|
| committer | jason | 2019-07-22 14:36:17 -0600 |
| commit | 5cf3d4c49b30c69d792ff6230f65a45f459e3bce (patch) | |
| tree | d4e1e19b66c1940b6b194d41d2ebb72b6add484a /scripts | |
| parent | 308fd99861a1f4ac3f5b87d36abfe8e02df224b0 (diff) | |
| parent | 20a617b529a3319977b97da75e87126201357f85 (diff) | |
| download | dotfiles-5cf3d4c49b30c69d792ff6230f65a45f459e3bce.tar.gz dotfiles-5cf3d4c49b30c69d792ff6230f65a45f459e3bce.zip | |
Merge branch 'master' of jason.zzq.org:repos/dotfiles
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/bin/fix_screens_at_work.sh | 27 | ||||
| -rwxr-xr-x | scripts/pny | 22 |
2 files changed, 40 insertions, 9 deletions
diff --git a/scripts/bin/fix_screens_at_work.sh b/scripts/bin/fix_screens_at_work.sh index a4f20a6..b2f5c35 100755 --- a/scripts/bin/fix_screens_at_work.sh +++ b/scripts/bin/fix_screens_at_work.sh | |||
| @@ -1,11 +1,20 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | #xrandr --setprovideroutputsource 1 0 | 3 | # #xrandr --setprovideroutputsource 1 0 |
| 4 | #xrandr --output DP-2 --mode 1920x1200 | 4 | # #xrandr --output DP-2 --mode 1920x1200 |
| 5 | xrandr --output DP-4 --right-of DP-2 --auto --primary #--mode 2560x1440 | 5 | # xrandr --output DP-4 --right-of DP-2 --auto --primary #--mode 2560x1440 |
| 6 | xrandr --output DVI-I-1-1 --below DP-4 --auto | 6 | # xrandr --output DVI-I-1-1 --below DP-4 --auto |
| 7 | 7 | ||
| 8 | # For some reason, occasionally this needs to be executed twice | 8 | # # For some reason, occasionally this needs to be executed twice |
| 9 | xmodmap ~/.Xmodmap-pckeyboard_fix | 9 | # xmodmap ~/.Xmodmap-pckeyboard_fix |
| 10 | sleep 1 | 10 | # sleep 1 |
| 11 | xmodmap ~/.Xmodmap-pckeyboard_fix | 11 | # xmodmap ~/.Xmodmap-pckeyboard_fix |
| 12 | |||
| 13 | # With USB monitor | ||
| 14 | xrandr --output DVI-I-2-1 --mode 1920x1080 --pos 2280x1440 --rotate normal --output eDP-1-1 --primary --mode 1920x1080 --pos 0x144 --rotate normal --output HDMI-0 --off --output DP-3 --off --output DP-2 --off --output DP-1 --off --output DP-0 --mode 2560x1440 --pos 1920x0 --rotate normal | ||
| 15 | |||
| 16 | # Without usb monitor | ||
| 17 | #xrandr --output eDP-1-1 --primary --mode 1920x1080 --pos 0x256 --rotate normal --output HDMI-0 --off --output DP-3 --off --output DP-2 --off --output DP-1 --off --output DP-0 --mode 2560x1440 --pos 1920x0 --rotate normal | ||
| 18 | |||
| 19 | feh --bg-scale ~/Sync/wallpaper/wallhaven-3601.jpg | ||
| 20 | xmodmap ~/.Xmodmap | ||
diff --git a/scripts/pny b/scripts/pny new file mode 100755 index 0000000..f8da92c --- /dev/null +++ b/scripts/pny | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | if [[ $1 == "mount" ]]; then | ||
| 4 | DEVICE=`dmesg | tail | grep 'Attached SCSI' | sed -n 's/.*: \[\(sd[a-z]\)\] Attac.*/\1/p'` | ||
| 5 | |||
| 6 | if [[ $DEVICE == "" ]]; then | ||
| 7 | echo "Error finding device" | ||
| 8 | exit 1 | ||
| 9 | fi | ||
| 10 | |||
| 11 | echo "Mounting /dev/${DEVICE}1" | ||
| 12 | |||
| 13 | sudo cryptsetup luksOpen /dev/${DEVICE}1 usbkey | ||
| 14 | sudo mount -o user,exec /dev/mapper/usbkey /home/jason/sdb | ||
| 15 | elif [[ $1 == "unmount" ]]; then | ||
| 16 | echo "Unmounting /dev/mapper/usbkey" | ||
| 17 | |||
| 18 | sudo umount /dev/mapper/usbkey | ||
| 19 | sudo cryptsetup luksClose /dev/mapper/usbkey | ||
| 20 | else | ||
| 21 | echo "mount or unmount?" | ||
| 22 | fi | ||