aboutsummaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/audio_dl.sh12
-rwxr-xr-x.scripts/open_terminal8
-rwxr-xr-x.scripts/secondmonitor.sh2
3 files changed, 18 insertions, 4 deletions
diff --git a/.scripts/audio_dl.sh b/.scripts/audio_dl.sh
new file mode 100755
index 0000000..8e6c9eb
--- /dev/null
+++ b/.scripts/audio_dl.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+FILE=$@
+LINES=$(cat $FILE)
+
+counter=1
+for line in $LINES; do
+ youtube-dl -x --audio-format mp3 "https://www.youtube.com/watch?v=$line" || echo "$line" >> "$FILE""_failed"
+ counter=$((counter+1))
+ tail -n "+$counter" "$FILE" > "$FILE""_remaining"
+done
+rm "$FILE""_remaining"
diff --git a/.scripts/open_terminal b/.scripts/open_terminal
index 62ac7cc..c816a13 100755
--- a/.scripts/open_terminal
+++ b/.scripts/open_terminal
@@ -8,20 +8,20 @@ then
PID=$(xprop -id $ACTIVE_WINDOW | grep _NET_WM_PID | grep -oP "\d+")
if [[ "$PID" == "" ]]
then
- alacritty
+ WINIT_X11_SCALE_FACTOR=1.5 alacritty
fi
# Get first child of terminal
CHILD_PID=$(pgrep -P $PID)
if [[ "$PID" == "" ]]
then
- alacritty
+ WINIT_X11_SCALE_FACTOR=1.5 alacritty
fi
# Get current directory of child. The first child should be the shell.
pushd "/proc/${CHILD_PID}/cwd"
SHELL_CWD=$(pwd -P)
popd
# Start alacritty with the working directory
- alacritty --working-directory $SHELL_CWD
+ WINIT_X11_SCALE_FACTOR=1.5 alacritty --working-directory $SHELL_CWD
else
- alacritty
+ WINIT_X11_SCALE_FACTOR=1.5 alacritty
fi
diff --git a/.scripts/secondmonitor.sh b/.scripts/secondmonitor.sh
new file mode 100755
index 0000000..ca7fac6
--- /dev/null
+++ b/.scripts/secondmonitor.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+xrandr --output HDMI-0 --dpi 120 --mode 1920x1080 --pos 0x0 --rotate normal --output eDP-1-1 --dpi 120 --primary --mode 1920x1080 --pos 1920x679 --rotate normal