summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ar/.config/x11/xprofile4
-rwxr-xr-xar/.local/bin/mpvplay2
2 files changed, 5 insertions, 1 deletions
diff --git a/ar/.config/x11/xprofile b/ar/.config/x11/xprofile
index 2f34def..460c0f5 100644
--- a/ar/.config/x11/xprofile
+++ b/ar/.config/x11/xprofile
@@ -1,6 +1,8 @@
#!/bin/sh
-xrandr --auto --dpi 96 # adjust the number based on your resolution and size of the screen
+sleep 1
+xrandr --dpi 96 # adjust the number based on your resolution and size of the screen
+setmonitor
setbg & # set the background with the `setbg` script
# fcitx5 & # set the input method
diff --git a/ar/.local/bin/mpvplay b/ar/.local/bin/mpvplay
index 294d59e..32d229f 100755
--- a/ar/.local/bin/mpvplay
+++ b/ar/.local/bin/mpvplay
@@ -14,7 +14,9 @@ play_url() {
if ! mpv "$url"; then
notify-send "🔑 Authentication required"
username="$(echo | dmenu -i -p "Enter a username:")"
+ [ -z "$username" ] && exit 1
password="$(echo | dmenu -i -P -p "Enter a password:")"
+ [ -z "$password" ] && exit 1
[ -n "$username" ] && [ -n "$password" ] && mpv --ytdl-raw-options=username="$username",password="$password" "$url" ||
notify-send "❌ Failed to play $url" "❗ Check your username or password"
fi