From 6759e561c81b8e06b9b6351de5ae9dc3ee109852 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 9 Apr 2020 16:56:47 -0400 Subject: [PATCH 1/4] xdg material moved to zprofile --- .config/lf/lfrc | 2 +- .config/user-dirs.dirs | 2 -- .profile | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 616c5ab3..ea8a9ecb 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -2,7 +2,7 @@ # Basic vars set shell sh -set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope +set previewer ~/.config/lf/scope set shellopts '-eu' set ifs "\n" set scrolloff 10 diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs index f25c63a2..5a28707c 100644 --- a/.config/user-dirs.dirs +++ b/.config/user-dirs.dirs @@ -1,3 +1 @@ XDG_DESKTOP_DIR="$HOME/" -XDG_CONFIG_HOME="$HOME/.config" -XDG_DATA_HOME="$HOME/.local/share" diff --git a/.profile b/.profile index 0a5d5aec..7c1f9434 100644 --- a/.profile +++ b/.profile @@ -18,6 +18,8 @@ export STATUSBAR="${LARBSWM}blocks" eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)" # ~/ Clean-up: +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" #export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config" export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" From 475698e57d650456113f0a4b73f3a769ec996749 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 9 Apr 2020 16:56:59 -0400 Subject: [PATCH 2/4] will be replaced --- .config/lf/lfrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index ea8a9ecb..37662685 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -54,7 +54,6 @@ cmd bulkrename ${{ }} # Bindings -map c $lf -remote "send $id cd $(cut -d' ' -f2 ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf)" map $lf -remote "send $id select '$(fzf)'" map J $lf -remote "send $id cd $(cut -d' ' -f2 ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf)" map gh From 68acbc2bff1bd34cb9390e88c2022ebbcb8349bd Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 9 Apr 2020 17:03:51 -0400 Subject: [PATCH 3/4] volume script uses pulse by default --- .local/bin/statusbar/volume | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume index cd79de33..e248952d 100755 --- a/.local/bin/statusbar/volume +++ b/.local/bin/statusbar/volume @@ -1,20 +1,30 @@ #!/bin/sh +# Prints the current volume or 🔇 if muted. Uses PulseAudio by default, +# uncomment the ALSA lines if you remove PulseAudio. + case $BLOCK_BUTTON in - 1) setsid "$TERMINAL" -e alsamixer & ;; - 2) amixer sset Master toggle ;; - 4) amixer sset Master 5%+ >/dev/null 2>/dev/null ;; - 5) amixer sset Master 5%- >/dev/null 2>/dev/null ;; + # 1) setsid "$TERMINAL" -e alsamixer & ;; + # 2) amixer sset Master toggle ;; + # 4) amixer sset Master 5%+ >/dev/null 2>/dev/null ;; + # 5) amixer sset Master 5%- >/dev/null 2>/dev/null ;; + 1) setsid "$TERMINAL" -e pulsemixer & ;; + 2) pulsemixer --toggle-mute ;; + 4) pulsemixer --change-volume +5 ;; + 5) pulsemixer --change-volume -5 ;; 3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted. - Middle click to mute. - Scroll to change." esac -volstat="$(amixer get Master)" +volstat="$(pactl list sinks)" +# volstat="$(amixer get Master)" # ALSA only equivalent. -echo "$volstat" | grep "\[off\]" >/dev/null && printf "🔇\\n" && exit +echo "$volstat" | grep -q "Mute: yes" && printf "🔇\\n" && exit +# echo "$volstat" | grep "\[off\]" >/dev/null && printf "🔇\\n" && exit # ALSA -vol=$(echo "$volstat" | grep -o "\[[0-9]\+%\]" | sed "s/[^0-9]*//g;1q") +vol="$(echo "$volstat" | grep '^[[:space:]]Volume:' | sed "s,.* \([0-9]\+\)%.*,\1,;1q")" +# vol=$(echo "$volstat" | grep -o "\[[0-9]\+%\]" | sed "s/[^0-9]*//g;1q") # ALSA if [ "$vol" -gt "70" ]; then icon="🔊" From 35de64fb26a682cf99262e56534e26d0d9054b84 Mon Sep 17 00:00:00 2001 From: Jackson Law <178053+jlaw@users.noreply.github.com> Date: Thu, 9 Apr 2020 14:15:44 -0700 Subject: [PATCH 4/4] chore: Use $XDG_CONFIG_HOME for tmux (#549) --- .config/aliasrc | 1 + .tmux.conf => .config/tmux/tmux.conf | 0 2 files changed, 1 insertion(+) rename .tmux.conf => .config/tmux/tmux.conf (100%) diff --git a/.config/aliasrc b/.config/aliasrc index 64d45afd..90de3d9c 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -41,3 +41,4 @@ alias \ magit="nvim -c MagitOnly" \ ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" \ weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \ + tmux="tmux -f ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" diff --git a/.tmux.conf b/.config/tmux/tmux.conf similarity index 100% rename from .tmux.conf rename to .config/tmux/tmux.conf