summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-29 15:52:38 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-29 15:52:38 +0900
commit6d4a3866ff2f5ecb0375d70a0a0d694b066a64df (patch)
tree119b64aa9d24317ed8014e999add916d2ee33f60
parent7bf3f2f31c74385b95f4068c5d7dacff720d7292 (diff)
updates
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua2
-rw-r--r--ar/.config/lf/lfrc10
-rwxr-xr-xar/.local/bin/cron/checkup2
-rwxr-xr-xar/.local/bin/dmenurecord35
-rwxr-xr-xar/.local/bin/mpvplay16
-rwxr-xr-xar/.local/bin/webcam1
6 files changed, 47 insertions, 19 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
index bd82542..7356619 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
@@ -34,7 +34,7 @@ return {
RGBA = true, -- #RGBA hex codes
RRGGBB = true, -- #RRGGBB hex codes
RRGGBBAA = true, -- #RRGGBBAA hex codes
- AARRGGBB = true, -- 0xAARRGGBB hex codes
+ AARRGGBB = false, -- 0xAARRGGBB hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions
css = true, -- Enable all CSS *features*:
diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc
index b5ef456..47522e0 100644
--- a/ar/.config/lf/lfrc
+++ b/ar/.config/lf/lfrc
@@ -257,12 +257,12 @@ cmd moveto ${{
cmd mpvdir ${{
if [ -n "$fx" ]; then
set -- $fx
- setsid -f mpv --really-quiet -- "$@"
+ setsid -f mpv --x11-name=video --really-quiet -- "$@"
else
for file in $(printf '%s\n' *.mp4 *.mkv *.avi *.flv *.webm *.mov *.mpg *.3gp *.ts *.rmvb | sort); do
[ -e "$file" ] && set -- "$@" "$file"
done
- [ -n "$1" ] && setsid -f mpv --really-quiet -- "$@"
+ [ -n "$1" ] && setsid -f mpv --x11-name=video --really-quiet -- "$@"
fi
lf -remote "send $id :clear; unselect; save-select"
@@ -275,7 +275,7 @@ cmd open ${{
case ${f##*.} in
doc|docx|xls|xlsx|odt|ppt|pptx) setsid -f libreoffice $fx >/dev/null 2>&1 ;;
ghw) setsid -f gtkwave $f >/dev/null 2>&1 ;;
- ts) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
+ ts) setsid -f mpv --x11-name=video $f -quiet >/dev/null 2>&1 ;;
*) setsid -f zathura $fx >/dev/null 2>&1 ;;
esac
;;
@@ -283,7 +283,7 @@ cmd open ${{
application/pgp-encrypted) $EDITOR $fx ;;
application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database) setsid -f firefox $fx >/dev/null 2>&1 ;;
application/x-hwp|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.openxmlformats-officedocument.wordprocessingml.document) libreoffice $fx ;;
- audio/*|video/x-ms-asf) mpv --audio-display=no $f ;;
+ audio/*|video/x-ms-asf) mpv --x11-name=music --audio-display=no $f ;;
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
image/svg+xml) display -- $f ;;
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|avif\|tif\|ico\)\(_large\)*$" |
@@ -297,7 +297,7 @@ cmd open ${{
text/html|text/xml) w3m $fx;;
text/troff) groff -mom $fx -Tpdf | zathura - ;;
text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;;
- video/*) setsid -f mpv -quiet $f >/dev/null 2>&1 ;;
+ video/*) setsid -f mpv --x11-name=video -quiet $f >/dev/null 2>&1 ;;
*) for f in $fx; do setsid -f ${OPENER:-xdg-open} $f >/dev/null 2>&1; done;;
esac
}}
diff --git a/ar/.local/bin/cron/checkup b/ar/.local/bin/cron/checkup
index dfdfc4a..801d406 100755
--- a/ar/.local/bin/cron/checkup
+++ b/ar/.local/bin/cron/checkup
@@ -5,8 +5,8 @@
notify-send "πŸ“¦ Repository Sync" "Checking for package updates..."
sudo pacman -Syyuw --noconfirm || notify-send "β›” Error downloading updates.
-
Check your internet connection, if pacman is already running, or run update manually to see errors."
+
pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}"
if pacman -Qu | grep -v "\[ignored\]"; then
diff --git a/ar/.local/bin/dmenurecord b/ar/.local/bin/dmenurecord
index 4e493c5..037930b 100755
--- a/ar/.local/bin/dmenurecord
+++ b/ar/.local/bin/dmenurecord
@@ -56,10 +56,34 @@ video() {
updateicon "⏺️"
}
+webcamselect() {
+ cameras=$(
+ v4l2-ctl --list-devices | awk '
+ BEGIN { RS=""; FS="\n" }
+ {
+ name = $1;
+ sub(/ \(.*$/, "", name);
+ gsub(/^[ \t]+|[ \t]+$/, "", name);
+ for (i=2; i<=NF; i++) {
+ if ($i ~ /\/dev\/video/) {
+ gsub(/^[ \t]+/, "", $i);
+ print name "|" $i;
+ break;
+ }
+ }
+ }'
+ )
+ names=$(echo "$cameras" | cut -d '|' -f1)
+ choice=$(echo "$names" | dmenu -i -p 'Choose a camera:')
+ camera=$(echo "$cameras" | awk -F '|' -v sel="$choice" '$1 == sel {print $2}')
+}
+
webcamhidef() {
+ [ -z "$camera" ] && exit
ffmpeg \
+ -display_hflip \
-f v4l2 \
- -i /dev/video0 \
+ -i "$camera" \
-video_size 1920x1080 \
"$recordings/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! >/tmp/recordingpid
@@ -67,9 +91,11 @@ webcamhidef() {
}
webcam() {
+ [ -z "$camera" ] && exit
ffmpeg \
+ -display_hflip \
-f v4l2 \
- -i /dev/video0 \
+ -i "$camera" \
-video_size 640x480 \
"$recordings/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! >/tmp/recordingpid
@@ -92,8 +118,9 @@ askrecording() {
audio) audio ;;
video) video ;;
*selected) videoselected ;;
- webcam) webcam ;;
- "webcam (hi-def)") webcamhidef ;;
+ webcam) webcamselect && webcam ;;
+ "webcam (hi-def)") webcamselect && webcamhidef ;;
+ *) exit ;;
esac
}
diff --git a/ar/.local/bin/mpvplay b/ar/.local/bin/mpvplay
index 08d43ed..f5a899e 100755
--- a/ar/.local/bin/mpvplay
+++ b/ar/.local/bin/mpvplay
@@ -12,7 +12,7 @@ loginurl() {
username="$(echo | dmenu -i -p "Enter a username:")"
[ -n "$username" ] && password="$(echo | dmenu -i -P -p "Enter a password:")" || exit
if [ -n "$username" ] && [ -n "$password" ]; then
- if ! mpv --ytdl-format='bestvideo[height<=1080]+bestaudio/best[height<=1080]' --ytdl-raw-options=username="$username",password="$password" "$url"; then
+ if ! mpv --x11-name=video --ytdl-format='bestvideo[height<=1080]+bestaudio/best[height<=1080]' --ytdl-raw-options=username="$username",password="$password" "$url"; then
notify-send "❌ Failed to play $url" "❗ Check your username or password"
exit 1
fi
@@ -24,7 +24,7 @@ play_url() {
[ -n "$url" ] && echo "$url" | grep -E '^https?://' >/dev/null || return 1
if yt-dlp --simulate --dump-json "$url" >/dev/null 2>&1; then
notify-send "πŸ“½οΈ Playing video from URL:" "$url"
- mpv --ytdl-format='bestvideo[height<=1080]+bestaudio/best[height<=1080]' "$url"
+ mpv --x11-name=video --ytdl-format='bestvideo[height<=1080]+bestaudio/best[height<=1080]' "$url"
else
loginurl
fi
@@ -34,14 +34,14 @@ play_media() {
if echo "$1" | grep -q ".*\.m3u$"; then
playlist_file="${1#--playlist=}"
if grep -q "/home/$USER/Private" "$playlist_file"; then
- mpv "$@" && check_unmount || exit
+ mpv --x11-name=video "$@" && check_unmount || exit
else
- $mount_script && mpv "$@" || exit
+ $mount_script && mpv --x11-name=video "$@" || exit
fi
elif echo "$1" | grep -q "/home/$USER/Private"; then
- mpv "$@" && check_unmount || exit
+ mpv --x11-name=video "$@" && check_unmount || exit
else
- $mount_script && mpv "$@" || exit
+ $mount_script && mpv --x11-name=video "$@" || exit
fi
}
@@ -172,9 +172,9 @@ EOF
# Play the file with mpv, resuming from the saved time position
if [ "$time_pos" -gt 0 ]; then
- mpv --start="$time_pos" "$file_path"
+ mpv --x11-name=video --start="$time_pos" "$file_path"
else
- mpv "$file_path"
+ mpv --x11-name=video "$file_path"
fi
}
diff --git a/ar/.local/bin/webcam b/ar/.local/bin/webcam
index 7800b46..0a4a297 100755
--- a/ar/.local/bin/webcam
+++ b/ar/.local/bin/webcam
@@ -44,4 +44,5 @@ mpv --untimed \
--profile=low-latency \
--input-conf=/dev/null \
--title=webcam \
+ --x11-name=webcam \
$flip "$camera"