From 50a442998bf622f670ff7b33b251a3c13760420c Mon Sep 17 00:00:00 2001 From: Yunus Kahveci Date: Thu, 16 Jul 2020 21:32:02 +0200 Subject: [PATCH 1/8] 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(-) 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 From 0a5afc8767339beafc58d5f4a42c8285d1f61992 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Sat, 25 Jul 2020 13:33:31 -0400 Subject: [PATCH 2/8] Fix dmenurecord breakage (#773) * Fixes breakage Referencing issue * Missed an alsa reference --- .local/bin/dmenurecord | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From d2dfd16fbebbcbd46d69da1984ec51f5f9f4d439 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Sun, 26 Jul 2020 06:56:11 -0400 Subject: [PATCH 3/8] 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(-) 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 From 94c6f3cdded77a9e97cccefef9ac0c6ccd28244d Mon Sep 17 00:00:00 2001 From: Hekuran <62762955+narukeh@users.noreply.github.com> Date: Sun, 26 Jul 2020 14:25:24 +0200 Subject: [PATCH 4/8] sort and add src & dt (#768) * sort and add src; dt I sorted them by category, so it isn't confusing, and also added `~/.local/src` & `~/.local/share`, and changed `~` for `$HOME`. * sort alphabetically sort alphabetically --- .config/directories | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/directories b/.config/directories index 7f55c5c..b3807cd 100644 --- a/.config/directories +++ b/.config/directories @@ -3,9 +3,11 @@ cac ${XDG_CACHE_HOME:-$HOME/.cache} cf ${XDG_CONFIG_HOME:-$HOME/.config} D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} d ${XDG_DOCUMENTS_DIR:-$HOME/Documents} +dt ${XDG_DATA_HOME:-$HOME/.local/share} h $HOME m ${XDG_MUSIC_DIR:-$HOME/Music} mn /mnt pp ${XDG_PICTURES_DIR:-$HOME/Pictures} -sc ~/.local/bin +sc $HOME/.local/bin +src $HOME/.local/src vv ${XDG_VIDEOS_DIR:-$HOME/Videos} From 536ec1a09b59ddc44036f81cc29a69a3f3cce5a9 Mon Sep 17 00:00:00 2001 From: Alexander Goussas Date: Sun, 26 Jul 2020 05:28:00 -0700 Subject: [PATCH 5/8] 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(-) 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 From 11b04f4788af8fb13db2794dcd0635a6bd54c19e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20Tomi=C4=87?= Date: Tue, 28 Jul 2020 13:54:49 +0200 Subject: [PATCH 6/8] Mount CIFS share with read/write permissions (#776) --- .local/bin/dmenumountcifs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 } 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: [PATCH 7/8] Make kbselect independent from xkblayout-state (#775) --- .local/bin/statusbar/kbselect | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 4589bb0a8b04473ccc0c027c0ba835acdf289689 Mon Sep 17 00:00:00 2001 From: Yacine Date: Tue, 28 Jul 2020 17:52:56 +0200 Subject: [PATCH 8/8] Let zathura use the normal clipboard (#757) Letting zathura use the standard clipboard by default makes using it more intuitive. We just have to select the zone to copy with our cursor and then it is directly usable with a CTRL-V in any windows. --- .config/zathura/zathurarc | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index 9fa50ca..dc45337 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -1,6 +1,7 @@ set statusbar-h-padding 0 set statusbar-v-padding 0 set page-padding 1 +set selection-clipboard clipboard map u scroll half-up map d scroll half-down map D toggle_page_mode