From 50a442998bf622f670ff7b33b251a3c13760420c Mon Sep 17 00:00:00 2001 From: Yunus Kahveci Date: Thu, 16 Jul 2020 21:32:02 +0200 Subject: Improved latency in camtoggle script (#766) After I had 2 seconds of latency with this script on my machine, I decided to improve it using an article from the arch wiki (https://wiki.archlinux.org/index.php/Webcam_setup#mpv) --- .local/bin/camtoggle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.local') diff --git a/.local/bin/camtoggle b/.local/bin/camtoggle index 05679c0..d29a8b4 100755 --- a/.local/bin/camtoggle +++ b/.local/bin/camtoggle @@ -1,2 +1,2 @@ #!/bin/sh -pkill -f /dev/video || mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --geometry=-0-0 --autofit=30% --title="mpvfloat" /dev/video0 +pkill -f /dev/video || mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --geometry=-0-0 --autofit=30% --title="mpvfloat" --profile=low-latency --untimed /dev/video0 -- cgit v1.3.1 From 0a5afc8767339beafc58d5f4a42c8285d1f61992 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Sat, 25 Jul 2020 13:33:31 -0400 Subject: Fix dmenurecord breakage (#773) * Fixes breakage Referencing issue * Missed an alsa reference --- .local/bin/dmenurecord | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.local') diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord index 49a2fbf..5d5e851 100755 --- a/.local/bin/dmenurecord +++ b/.local/bin/dmenurecord @@ -33,7 +33,7 @@ screencast() { \ -framerate 60 \ -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ -i "$DISPLAY" \ - -f alsa -i default \ + -f pulseaudio -i default \ -r 30 \ -c:v h264 -crf 0 -preset ultrafast -c:a aac \ "$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & @@ -72,7 +72,7 @@ webcam() { ffmpeg \ audio() { \ ffmpeg \ - -f alsa -i default \ + -f pulseaudio -i default \ -c:a flac \ "$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & echo $! > /tmp/recordingpid -- cgit v1.3.1 From d2dfd16fbebbcbd46d69da1984ec51f5f9f4d439 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Sun, 26 Jul 2020 06:56:11 -0400 Subject: Revert changes to dmenurecord (#774) Seems that @drakenewell will need to provide more details about his issue. Someone commented that it broke for them which somewhat makes sense because alsa is lower level and might as well use it. --- .local/bin/dmenurecord | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.local') diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord index 5d5e851..49a2fbf 100755 --- a/.local/bin/dmenurecord +++ b/.local/bin/dmenurecord @@ -33,7 +33,7 @@ screencast() { \ -framerate 60 \ -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ -i "$DISPLAY" \ - -f pulseaudio -i default \ + -f alsa -i default \ -r 30 \ -c:v h264 -crf 0 -preset ultrafast -c:a aac \ "$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & @@ -72,7 +72,7 @@ webcam() { ffmpeg \ audio() { \ ffmpeg \ - -f pulseaudio -i default \ + -f alsa -i default \ -c:a flac \ "$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & echo $! > /tmp/recordingpid -- cgit v1.3.1 From 536ec1a09b59ddc44036f81cc29a69a3f3cce5a9 Mon Sep 17 00:00:00 2001 From: Alexander Goussas Date: Sun, 26 Jul 2020 05:28:00 -0700 Subject: redirect stdout to /dev/null (#772) * pacman -Qq outputs to stdout * redirect stdout to /dev/null as well Co-authored-by: Alexander Goussas --- .local/bin/ifinstalled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.local') diff --git a/.local/bin/ifinstalled b/.local/bin/ifinstalled index e2013a4..be3ac24 100755 --- a/.local/bin/ifinstalled +++ b/.local/bin/ifinstalled @@ -6,6 +6,6 @@ # various other scripts for clarity's sake. for x in "$@";do - pacman -Qq "$x" 2>/dev/null || + pacman -Qq "$x" >/dev/null 2>&1 || { notify-send "📦 $x" "must be installed for this function." && exit 1 ;} done -- cgit v1.3.1 From 11b04f4788af8fb13db2794dcd0635a6bd54c19e Mon Sep 17 00:00:00 2001 From: Petar Tomić Date: Tue, 28 Jul 2020 13:54:49 +0200 Subject: Mount CIFS share with read/write permissions (#776) --- .local/bin/dmenumountcifs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.local') diff --git a/.local/bin/dmenumountcifs b/.local/bin/dmenumountcifs index 99be72f..46c2b57 100755 --- a/.local/bin/dmenumountcifs +++ b/.local/bin/dmenumountcifs @@ -1,5 +1,5 @@ #!/bin/sh -# Gives a dmenu prompt to mount unmounted local NAS shares. +# Gives a dmenu prompt to mount unmounted local NAS shares for read/write. # Requirements - "%wheel ALL=(ALL) NOPASSWD: ALL" # # Browse for mDNS/DNS-SD services using the Avahi daemon... @@ -12,7 +12,7 @@ share2mnt=//"$srvname".local/"$share" sharemount() { mounted=$(mount -v | grep "$share2mnt") || ([ ! -d /mnt/"$share" ] && sudo mkdir /mnt/"$share") - [ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="" /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0 + [ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="",noperm /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0 notify-send "Netshare $share already mounted"; exit 1 } -- cgit v1.3.1 From 2a1b7fc3d1f758c7625fb5ab66e5f770b3f3b864 Mon Sep 17 00:00:00 2001 From: "M. Yas. Davoodeh" <30480116+MYDavoodeh@users.noreply.github.com> Date: Tue, 28 Jul 2020 20:22:33 +0430 Subject: Make kbselect independent from xkblayout-state (#775) --- .local/bin/statusbar/kbselect | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.local') diff --git a/.local/bin/statusbar/kbselect b/.local/bin/statusbar/kbselect index d7313c6..f0c923f 100755 --- a/.local/bin/statusbar/kbselect +++ b/.local/bin/statusbar/kbselect @@ -1,14 +1,14 @@ #!/bin/sh # works on any init system -# requirements: dmenu, xorg-setxkbmap, xkblayout-state (https://github.com/nonpop/xkblayout-state) -kb="$(xkblayout-state print "%s")" || exit 1 +# requirements: dmenu, xorg-setxkbmap +kb="$(setxkbmap -query | grep -oP 'layout:\s*\K\w+')" || exit 1 case $BLOCK_BUTTON in 1) kb_choice="$(awk '/! layout/{flag=1; next} /! variant/{flag=0} flag {print $2, "- " $1}' /usr/share/X11/xkb/rules/base.lst | dmenu -l 15)" kb="$(echo "$kb_choice" | awk '{print $3}')" setxkbmap "$kb" pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";; - 3) notify-send "⌨ Keyboard/language module" "$(xkblayout-state print "\- Current layout: %s (%n)") + 3) notify-send "⌨ Keyboard/language module" "$(printf "%s" "\- Current layout: $(setxkbmap -query | grep -oP 'layout:\s*\K\w+')") - Left click to change keyboard.";; 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac -- cgit v1.3.1