summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-12-09 18:27:45 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-12-09 18:27:45 -0500
commita8a22fd752cc2a095be34c5f9007c4f6516831c5 (patch)
tree697944764f5fc27d677e39773fb6c25837227bf3
parentcfb2e53ee1bbe747a10ceb3e0eca25daa454382b (diff)
downloadscripts-a8a22fd752cc2a095be34c5f9007c4f6516831c5.tar.xz
scripts-a8a22fd752cc2a095be34c5f9007c4f6516831c5.zip
fixed docking detach not being able to see screen
-rwxr-xr-xthemer.sh4
-rwxr-xr-xtoggle-docked.sh57
-rwxr-xr-xyt.sh4
3 files changed, 22 insertions, 43 deletions
diff --git a/themer.sh b/themer.sh
index f195d1a..07d7182 100755
--- a/themer.sh
+++ b/themer.sh
@@ -8,7 +8,7 @@ add_theme() {
[ ! -d "$outdir" ] && mkdir -p "$outdir"
sxiv -rot "$indir" | while read infile; do
outfile=$outdir/$(basename "$infile" | tr ' ' '_' | tr '[:upper:]' '[:lower:]')
- convert "$infile" -geometry '1920x1080^' -gravity center -crop 1920x1080+0+0 "$outfile"
+ convert "$infile" -geometry '2560x1440^' -gravity center -crop 2560x1440+0+0 "$outfile"
wpg -a "$outfile"
done
}
@@ -17,7 +17,7 @@ set_theme() {
theme=$(sxiv -rot ~/.config/wpg/wallpapers)
[ -z "$theme" ] && exit 4
wpg -s "$theme"
- #convert -verbose -background black -vignette 100x65000 "$theme" ~/.local/share/wallpapers/lock.png &
+ #convert -verbose -background black -vignette 100x65000 "$theme" ~/pictures/wallpapers/lock.png &
}
reapply_theme() {
diff --git a/toggle-docked.sh b/toggle-docked.sh
index 54551a1..6a97907 100755
--- a/toggle-docked.sh
+++ b/toggle-docked.sh
@@ -1,47 +1,26 @@
#!/bin/sh
-hasVGA=$(xrandr | grep VGA-0 | cut -w -f2)
+big=2560x1440
+little=1920x1080
+is_docked=$(xrandr | grep DP-2 | cut -w -f2)
-if [ "$hasVGA" = "connected" ]; then
+if [ "$is_docked" = "connected" ]; then
xrandr \
- --output VGA-0 \
- --mode 1024x768 \
- --pos 1920x0 \
- --rotate normal \
- --dpi 82 \
- --output DP-0 \
- --off \
- --output DP-1 \
- --off \
- --output DP-2 \
- --off \
- --output DP-3 \
- --primary \
- --mode 1920x1080 \
- --pos 0x0 \
- --rotate normal \
- --dpi 96 \
- --output DP-4 \
- --off
- killall xautolock
+ --output DP-0 --off \
+ --output DP-1 --off \
+ --output DP-2 --primary --mode $big --pos 0x0 --rotate normal --dpi 96 \
+ --output DP-3 --scale-from $big --same-as DP-2 --rotate normal \
+ --output DP-4 --off \
+ --output VGA-0 --off \
+ && killall xautolock
autolocker.sh -d &
else
xrandr \
- --output VGA-0 \
- --off \
- --output DP-0 \
- --off \
- --output DP-1 \
- --off \
- --output DP-2 \
- --off \
- --output DP-3 \
- --primary \
- --mode 1920x1080 \
- --pos 0x0 \
- --rotate normal \
- --dpi 96 \
- --output DP-4 \
- --off
- killall xautolock
+ --output DP-0 --off \
+ --output DP-1 --off \
+ --output DP-2 --off \
+ --output DP-3 --primary --mode $little --pos 0x0 --rotate normal --dpi 96 \
+ --output DP-4 --off \
+ --output VGA-0 --off \
+ && killall xautolock
autolocker.sh &
fi
diff --git a/yt.sh b/yt.sh
index 2ec834e..8fcf8c5 100755
--- a/yt.sh
+++ b/yt.sh
@@ -86,7 +86,7 @@ download_video() {
-q \
--add-metadata \
-o "$DOWNLOAD_DIR/%(title)s_%(id)s.%(ext)s" \
- $url && notify-send "Video download done." "$info" &
+ "$url" && notify-send "Video download done." "$info" &
}
@@ -102,7 +102,7 @@ download_audio() {
-x \
--audio-format flac \
--audio-quality 0 \
- $url && notify-send "Audio download done." "$info" &
+ "$url" && notify-send "Audio download done." "$info" &
}