From 64f31bf86c9a96394194f54da77e9ae153b92dcb Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Thu, 14 Oct 2021 20:44:40 +0200 Subject: [PATCH 01/32] Add some variables --- .config/wal/postrun | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.config/wal/postrun b/.config/wal/postrun index 85d9e3f..d9a9161 100755 --- a/.config/wal/postrun +++ b/.config/wal/postrun @@ -1,13 +1,16 @@ #!/bin/bash +dunstconf="${HOME}/.config/dunst/dunstrc" +zathuraconf="${HOME}/.config/zathura/zathurarc" + source "${HOME}/.cache/wal/colors.sh" -mkdir -p "${HOME}/.config/dunst" -mkdir -p "${HOME}/.config/zathura" -mv -n "${HOME}/.config/dunst/dunstrc" "${HOME}/.config/dunst/dunstrc.bak" -mv -n "${HOME}/.config/zathura/zathurarc" "${HOME}/.config/zathura/zathurarc.bak" -ln -sf "${HOME}/.cache/wal/dunstrc" "${HOME}/.config/dunst/dunstrc" -ln -sf "${HOME}/.cache/wal/zathurarc" "${HOME}/.config/zathura/zathurarc" +mkdir -p "$dunstconf" +mkdir -p "$zathuraconf" +mv -n "$dunstconf" "$dunstconf.bak" +mv -n "$zathuraconf" "$zathuraconf.bak" +ln -sf "${HOME}/.cache/wal/dunstrc" "$dunstconf" +ln -sf "${HOME}/.cache/wal/zathurarc" "$zathuraconf" fix_sequences() { e=$'\e' From 6faae93d1598e988c75086a36cc99c0eed834f2d Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Thu, 14 Oct 2021 20:46:07 +0200 Subject: [PATCH 02/32] Replicate tail functionality in awk --- .local/bin/displayselect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/displayselect b/.local/bin/displayselect index f9e8062..0b33f7b 100755 --- a/.local/bin/displayselect +++ b/.local/bin/displayselect @@ -14,9 +14,9 @@ twoscreen() { # If multi-monitor is selected and there are two screens. internal=$(echo "$screens" | grep -v "$external") res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \ - tail -n 1 | awk '{print $1}') + awk 'END {print $1}') res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \ - tail -n 1 | awk '{print $1}') + awk 'END {print $1}') res_ext_x=$(echo "$res_external" | sed 's/x.*//') res_ext_y=$(echo "$res_external" | sed 's/.*x//') From 40af3ab99263ebbf6790659414d2db3771fc0ac4 Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Thu, 14 Oct 2021 20:47:33 +0200 Subject: [PATCH 03/32] Use setsid --- .local/bin/samedir | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.local/bin/samedir b/.local/bin/samedir index 73facfd..82397d3 100755 --- a/.local/bin/samedir +++ b/.local/bin/samedir @@ -2,7 +2,4 @@ # Open a terminal window in the same directory as the currently active window. -PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3) -PID="$(pstree -lpA "$PID" | tail -n 1 | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')" -cd "$(readlink /proc/"$PID"/cwd)" || return 1 -"$TERMINAL" +setsid -f $TERMINAL >/dev/null 2>&1 From 7dbc757a64d8d21db29b208a22b6165e32719fab Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Thu, 14 Oct 2021 20:50:00 +0200 Subject: [PATCH 04/32] Add some conf file variables --- .local/bin/setbg | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.local/bin/setbg b/.local/bin/setbg index 7f997b7..b0938fd 100755 --- a/.local/bin/setbg +++ b/.local/bin/setbg @@ -9,6 +9,10 @@ # Location of link to wallpaper link. bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg" +# Configuration files of applications that have their themes changed by pywal. +dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" +zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" + trueloc="$(readlink -f "$1")" && case "$(file --mime-type -b "$trueloc")" in image/* ) ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." ;; @@ -18,12 +22,12 @@ esac # If pywal is installed, use it. if command -v wal >/dev/null 2>&1 ; then - wal -i "$(readlink -f $bgloc)" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 && - pidof dwm >/dev/null && xdotool key super+F12 + wal -i "$(readlink -f $bgloc)" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 && + pidof dwm >/dev/null && xdotool key super+F12 # If pywal is removed, return config files to normal. else - [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc.bak" ] && unlink "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" && mv "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc.bak" "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" - [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc.bak" ] && unlink "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" && mv "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc.bak" "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" + [ -f "$dunstconf.bak" ] && unlink "$dunstconf" && mv "$dunstconf.bak" "$dunstconf" + [ -f "$zathuraconf.bak" ] && unlink "$zathuraconf" && mv "$zathuraconf.bak" "$zathuraconf" fi xwallpaper --zoom "$bgloc" From 995cff49e6c1aca486ead9c1ced973d575d44e64 Mon Sep 17 00:00:00 2001 From: Colby Thomas Date: Sun, 17 Oct 2021 22:57:47 -0600 Subject: [PATCH 05/32] muting volume when 0%, space between icon and percentage --- .local/bin/statusbar/sb-volume | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume index 61588c3..dcfd0d6 100755 --- a/.local/bin/statusbar/sb-volume +++ b/.local/bin/statusbar/sb-volume @@ -19,10 +19,12 @@ vol="$(pamixer --get-volume)" if [ "$vol" -gt "70" ]; then icon="🔊" -elif [ "$vol" -lt "30" ]; then +elif [ "$vol" -gt "30" ]; then + icon="🔉" +elif [ "$vol" -gt "0" ]; then icon="🔈" else - icon="🔉" + echo 🔇 && exit fi -echo "$icon$vol%" +echo "$icon $vol%" From 96c782f5121d18896470582ead77dbeb8555265e Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 18 Oct 2021 08:50:15 -0400 Subject: [PATCH 06/32] l --- .local/bin/statusbar/sb-volume | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume index dcfd0d6..3cfdc45 100755 --- a/.local/bin/statusbar/sb-volume +++ b/.local/bin/statusbar/sb-volume @@ -27,4 +27,4 @@ else echo 🔇 && exit fi -echo "$icon $vol%" +echo "$icon$vol%" From 56caae7b0316eab26392090a62eb2bf4cd4887d5 Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Tue, 19 Oct 2021 16:53:06 +0200 Subject: [PATCH 07/32] Revert changes to displayselect (already best performance) --- .local/bin/displayselect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/displayselect b/.local/bin/displayselect index 0b33f7b..f9e8062 100755 --- a/.local/bin/displayselect +++ b/.local/bin/displayselect @@ -14,9 +14,9 @@ twoscreen() { # If multi-monitor is selected and there are two screens. internal=$(echo "$screens" | grep -v "$external") res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \ - awk 'END {print $1}') + tail -n 1 | awk '{print $1}') res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \ - awk 'END {print $1}') + tail -n 1 | awk '{print $1}') res_ext_x=$(echo "$res_external" | sed 's/x.*//') res_ext_y=$(echo "$res_external" | sed 's/.*x//') From 7c6b8a85b69dbc3dca55b28f4078ac86fc01cf48 Mon Sep 17 00:00:00 2001 From: Ethan Marshall Date: Wed, 20 Oct 2021 15:24:29 +0100 Subject: [PATCH 08/32] Small newsup fix (#1023) Only update titles which *exactly* match the title "newsboat" --- .local/bin/cron/newsup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup index cc50e78..ed266d7 100755 --- a/.local/bin/cron/newsup +++ b/.local/bin/cron/newsup @@ -5,7 +5,7 @@ /usr/bin/notify-send "📰 Updating RSS feeds..." -pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit +pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit echo 🔃 > /tmp/newsupdate pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" From 714aa92a9596352d4f70e35d212fe922c23348b4 Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Wed, 20 Oct 2021 16:27:40 +0200 Subject: [PATCH 09/32] ext: Remove in favor of atool (#1013) * ext: Give the ability to extract multiple files and wildcards * Variable renaming * Make user get prompted if extracted file overwrites another file * Deleted ext We have atool * Replace ext with aunpack --- .config/lf/lfrc | 2 +- .local/bin/ext | 45 --------------------------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100755 .local/bin/ext diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 4101338..9ec6830 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -36,7 +36,7 @@ cmd extract ${{ printf "%s\n\t" "$fx" printf "extract?[y/N]" read ans - [ $ans = "y" ] && ext $fx + [ $ans = "y" ] && aunpack $fx }} cmd delete ${{ diff --git a/.local/bin/ext b/.local/bin/ext deleted file mode 100755 index 6950ff6..0000000 --- a/.local/bin/ext +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -# A general, all-purpose extraction script. Not all extraction programs here -# are installed by LARBS automatically. -# -# Default behavior: Extract archive into new directory -# Behavior with `-c` option: Extract contents into current directory - -while getopts "hc" o; do case "${o}" in - c) extracthere="True" ;; - *) printf "Options:\\n -c: Extract archive into current directory rather than a new one.\\n" && exit 1 ;; -esac done - -if [ -z "$extracthere" ]; then - archive="$(readlink -f "$*")" && - directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" && - mkdir -p "$directory" && - cd "$directory" || exit 1 -else - archive="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)" -fi - -[ -z "$archive" ] && printf "Give archive to extract as argument.\\n" && exit 1 - -if [ -f "$archive" ] ; then - case "$archive" in - *.tar.bz2|*.tbz2) bsdtar -xf "$archive" ;; - *.tar.xz) bsdtar -xf "$archive" ;; - *.tar.gz|*.tgz) bsdtar -xf "$archive" ;; - *.tar.zst) bsdtar -xf "$archive" ;; - *.tar) bsdtar -xf "$archive" ;; - *.lzma) unlzma "$archive" ;; - *.bz2) bunzip2 "$archive" ;; - *.rar) unrar x -ad "$archive" ;; - *.gz) gunzip "$archive" ;; - *.zip) unzip "$archive" ;; - *.Z) uncompress "$archive" ;; - *.7z) 7z x "$archive" ;; - *.xz) unxz "$archive" ;; - *.exe) cabextract "$archive" ;; - *) printf "extract: '%s' - unknown archive method\\n" "$archive" ;; - esac -else - printf "File \"%s\" not found.\\n" "$archive" -fi From cb7879cd7ecc7d226bcb3f00c6cc0e343f03bff7 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 20 Oct 2021 10:32:46 -0400 Subject: [PATCH 10/32] unbreak samedir --- .local/bin/samedir | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.local/bin/samedir b/.local/bin/samedir index 82397d3..73facfd 100755 --- a/.local/bin/samedir +++ b/.local/bin/samedir @@ -2,4 +2,7 @@ # Open a terminal window in the same directory as the currently active window. -setsid -f $TERMINAL >/dev/null 2>&1 +PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3) +PID="$(pstree -lpA "$PID" | tail -n 1 | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')" +cd "$(readlink /proc/"$PID"/cwd)" || return 1 +"$TERMINAL" From 18dad565fa03801f12bc010324e578d32a4883e0 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 20 Oct 2021 10:50:13 -0400 Subject: [PATCH 11/32] inconsequential efficiency --- .local/bin/samedir | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.local/bin/samedir b/.local/bin/samedir index 73facfd..0a19707 100755 --- a/.local/bin/samedir +++ b/.local/bin/samedir @@ -2,7 +2,9 @@ # Open a terminal window in the same directory as the currently active window. -PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3) -PID="$(pstree -lpA "$PID" | tail -n 1 | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')" +PID=$(xprop -id "$(xprop -root | xprop -root | sed -n "/_NET_ACTIVE_WINDOW/ s/^.*# // p")" | sed -n "/PID/ s/^.*= // p") +PID="$(pstree -lpA "$PID")" +PID="${PID##*(}" +PID="${PID%)}" cd "$(readlink /proc/"$PID"/cwd)" || return 1 "$TERMINAL" From 0cc1758b0219704cf5a72b8e06150c54041a98e5 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 22 Oct 2021 16:50:26 -0400 Subject: [PATCH 12/32] ifinstalled better, close #1047 --- .local/bin/ifinstalled | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.local/bin/ifinstalled b/.local/bin/ifinstalled index 7a53b18..ff36466 100755 --- a/.local/bin/ifinstalled +++ b/.local/bin/ifinstalled @@ -5,9 +5,7 @@ # it informs the user that they need that command to continue. This is used in # various other scripts for clarity's sake. -for x in "$@";do - notify() { notify-send "📦 $x" "must be installed for this function." && exit 1 ;} - which_out="$( /usr/bin/which "$x" >/dev/null 2>&1 )" && exit 0 #you might have compiled the prog, and not install the repo pkg... - pkgname="$(pacman -Qqo "$which_out" >/dev/null 2>&1 )" #...thats why two variables. - pacman -Qq "$pkgname" >/dev/null 2>&1 || notify +for x in "$@"; do + { ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1 ;} && + notify-send "📦 $x" "must be installed for this function." && exit 1 ; done From 2ddfa7ab0f2597b26be9872e37d7374b75a72678 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 23 Oct 2021 10:27:45 -0400 Subject: [PATCH 13/32] better fix --- .local/bin/ifinstalled | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.local/bin/ifinstalled b/.local/bin/ifinstalled index ff36466..c192eba 100755 --- a/.local/bin/ifinstalled +++ b/.local/bin/ifinstalled @@ -6,6 +6,7 @@ # various other scripts for clarity's sake. for x in "$@"; do - { ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1 ;} && - notify-send "📦 $x" "must be installed for this function." && exit 1 ; + if ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1; then + notify-send "📦 $x" "must be installed for this function." && exit 1 ; + fi done From 90fa3d5b3be9a4c03150eb76d1dae94076f899f7 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 11 Nov 2021 10:14:08 -0500 Subject: [PATCH 14/32] manually set dpi --- .config/x11/xprofile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/x11/xprofile b/.config/x11/xprofile index f7182e1..846cb22 100755 --- a/.config/x11/xprofile +++ b/.config/x11/xprofile @@ -1,5 +1,8 @@ #!/bin/sh +DPI=96 + +xrandr --dpi "$DPI" # This file runs when a DM logs you into a graphical session. # If you use startx/xinit like a Chad, this file will also be sourced. From ab8ab913dab74ba8e94066b495969b01ecc2efd3 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 11 Nov 2021 11:32:36 -0500 Subject: [PATCH 15/32] fix #1011 --- .config/x11/xprofile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.config/x11/xprofile b/.config/x11/xprofile index 846cb22..6e95b15 100755 --- a/.config/x11/xprofile +++ b/.config/x11/xprofile @@ -1,19 +1,18 @@ #!/bin/sh -DPI=96 - -xrandr --dpi "$DPI" # This file runs when a DM logs you into a graphical session. # If you use startx/xinit like a Chad, this file will also be sourced. +xrandr --dpi 96 # Set DPI. User may want to use a larger number for larger screens. setbg & # set the background with the `setbg` script -#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & # Uncomment to use Xresources colors/settings on startup -mpd & # music player daemon-you might prefer it as a service though +#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup remaps & # run the remaps script, switching caps/esc and more; check it for more info -xcompmgr & # xcompmgr for transparency -dunst & # dunst for notifications -xset r rate 300 50 & # Speed xrate up -unclutter & # Remove mouse when idle + +autostart="mpd xcompmgr dunst unclutter" + +for program in $autostart; do + pidof -s "$program" || setsid -f "$program" +done >/dev/null 2>&1 # This line autostarts an instance of Pulseaudio that does not exit on idle. # This is "necessary" on Artix due to a current bug between PA and @@ -21,3 +20,6 @@ unclutter & # Remove mouse when idle pidof -s runit && ! pidof -s pulseaudio >/dev/null 2>&1 && setsid -f pulseaudio --start --exit-idle-time=-1 >/dev/null 2>&1 + +# Ensure that xrdb has finished running before moving on to start the WM/DE. +[ -n "$xrdbpid" ] && wait "$xrdbpid" From 11b7fb7b45cdd9af8d3ea3d570986dc03779ba2e Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 11 Nov 2021 12:47:17 -0500 Subject: [PATCH 16/32] some dunst and wal fixes, fix #1029 --- .config/dunst/dunstrc | 157 ++++------------------------------ .config/wal/postrun | 34 ++++---- .config/wal/templates/dunstrc | 157 ++++------------------------------ 3 files changed, 49 insertions(+), 299 deletions(-) diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index abf5586..3752b6e 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -1,152 +1,27 @@ [global] monitor = 0 follow = keyboard - geometry = "350x5-0+24" - indicate_hidden = yes - shrink = yes - transparency = 20 - notification_height = 0 - separator_height = 2 - padding = 0 - horizontal_padding = 8 - frame_width = 3 - frame_color = "#282828" - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Sort messages by urgency. - sort = yes - - idle_threshold = 120 - font = Monospace 14 - line_height = 0 - markup = full - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # %n progress value if set without any extra characters - # %% Literal % - # Markup is allowed + width = 370 + height = 350 + offset = 0x19 + padding = 2 + horizontal_padding = 2 + transparency = 25 + font = Monospace 12 format = "%s\n%b" - alignment = left - show_age_threshold = 60 - word_wrap = yes - ellipsize = middle - ignore_newline = no - stack_duplicates = true - hide_duplicate_count = true - show_indicators = yes - icon_position = left - max_icon_size = 40 - #icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/ - sticky_history = yes - history_length = 20 - dmenu = /usr/bin/dmenu -p dunst: - browser = /usr/bin/firefox -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed - always_run_script = true - - title = Dunst - class = Dunst - startup_notification = false - force_xinerama = false -[experimental] - per_monitor_dpi = false - -[shortcuts] - close = ctrl+space - close_all = ctrl+shift+space - history = ctrl+grave - context = ctrl+shift+period - [urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "#282828" - foreground = "#928374" - timeout = 5 - # Icon for notifications with low urgency, uncomment to enable - #icon = /path/to/icon + background = "#040509" + foreground = "#70896e" + timeout = 3 [urgency_normal] - background = "#458588" - foreground = "#ebdbb2" + foreground = "#a0c49e" + background = "#545069" timeout = 5 [urgency_critical] - background = "#cc2421" - foreground = "#ebdbb2" - frame_color = "#fabd2f" - timeout = 0 - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# Messages can be matched by "appname", "summary", "body", "icon", "category", -# "msg_urgency" and you can override the "timeout", "urgency", "foreground", -# "background", "new_icon" and "format". -# Shell-like globbing will get expanded. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[history-ignore] -# # This notification will not be saved in history -# summary = "foobar" -# history_ignore = yes - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -# vim: ft=cfg + background = "#4D314E" + foreground = "#a0c49e" + frame_color = "#544858" + timeout = 10 diff --git a/.config/wal/postrun b/.config/wal/postrun index d9a9161..7eb8d11 100755 --- a/.config/wal/postrun +++ b/.config/wal/postrun @@ -1,16 +1,17 @@ #!/bin/bash -dunstconf="${HOME}/.config/dunst/dunstrc" -zathuraconf="${HOME}/.config/zathura/zathurarc" +dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" +zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" -source "${HOME}/.cache/wal/colors.sh" +source "${XDG_CACHE_HOME:-$HOME/.cache}/wal/colors.sh" -mkdir -p "$dunstconf" -mkdir -p "$zathuraconf" -mv -n "$dunstconf" "$dunstconf.bak" -mv -n "$zathuraconf" "$zathuraconf.bak" -ln -sf "${HOME}/.cache/wal/dunstrc" "$dunstconf" -ln -sf "${HOME}/.cache/wal/zathurarc" "$zathuraconf" +mkdir -p "${dunstconf##*/}" "${zathuraconf##*/}" + +mv -n "$dunstconf" "$dunstconf.bak" +mv -n "$zathuraconf" "$zathuraconf.bak" + +ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/dunstrc" "$dunstconf" +ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/zathurarc" "$zathuraconf" fix_sequences() { e=$'\e' @@ -19,14 +20,13 @@ fix_sequences() { background_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]11[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" cursor_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]12[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" -for term in /dev/pts/{0..9}* -do -echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null -echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null -echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null -done + for term in /dev/pts/{0..9}*; do + echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null + echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null + echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null + done } -fix_sequences <"${HOME}/.cache/wal/sequences" +fix_sequences <"${XDG_CACHE_HOME:-$HOME/.cache}/wal/sequences" -pkill dunst; dunst & +pkill dunst; setsid -f dunst diff --git a/.config/wal/templates/dunstrc b/.config/wal/templates/dunstrc index 9a62500..5a2e020 100644 --- a/.config/wal/templates/dunstrc +++ b/.config/wal/templates/dunstrc @@ -1,152 +1,27 @@ [global] monitor = 0 follow = keyboard - geometry = "350x5-0+24" - indicate_hidden = yes - shrink = yes - transparency = 20 - notification_height = 0 - separator_height = 2 - padding = 0 - horizontal_padding = 8 - frame_width = 3 - frame_color = "{color4}" - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Sort messages by urgency. - sort = yes - - idle_threshold = 120 - font = Monospace 14 - line_height = 0 - markup = full - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # %n progress value if set without any extra characters - # %% Literal % - # Markup is allowed + width = 370 + height = 350 + offset = 0x19 + padding = 2 + horizontal_padding = 2 + transparency = 25 + font = Monospace 12 format = "%s\n%b" - alignment = left - show_age_threshold = 60 - word_wrap = yes - ellipsize = middle - ignore_newline = no - stack_duplicates = true - hide_duplicate_count = true - show_indicators = yes - icon_position = left - max_icon_size = 40 - #icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/ - sticky_history = yes - history_length = 20 - dmenu = /usr/bin/dmenu -p dunst: - browser = /usr/bin/firefox -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed - always_run_script = true - - title = Dunst - class = Dunst - startup_notification = false - force_xinerama = false -[experimental] - per_monitor_dpi = false - -[shortcuts] - close = ctrl+space - close_all = ctrl+shift+space - history = ctrl+grave - context = ctrl+shift+period - [urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "{background}" - foreground = "{foreground}" - timeout = 5 - # Icon for notifications with low urgency, uncomment to enable - #icon = /path/to/icon + background = "{color0}" # color0 + foreground = "{color8}" # color8 + timeout = 3 [urgency_normal] - background = "{background}" - foreground = "{foreground}" + foreground = "{color15}" # color15 + background = "{color4}" # color4 timeout = 5 [urgency_critical] - background = "{background}" - foreground = "{foreground}" - frame_color = "#fabd2f" - timeout = 0 - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# Messages can be matched by "appname", "summary", "body", "icon", "category", -# "msg_urgency" and you can override the "timeout", "urgency", "foreground", -# "background", "new_icon" and "format". -# Shell-like globbing will get expanded. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[history-ignore] -# # This notification will not be saved in history -# summary = "foobar" -# history_ignore = yes - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -# vim: ft=cfg + background = "{color1}" # color1 + foreground = "{color15}" # color15 + frame_color = "{color11}" # color11 + timeout = 10 From 6d805941def8ba2cf6589858dd87407f97c4abab Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 11 Nov 2021 12:49:57 -0500 Subject: [PATCH 17/32] postrun fix --- .config/wal/postrun | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/wal/postrun b/.config/wal/postrun index 7eb8d11..61d8a41 100755 --- a/.config/wal/postrun +++ b/.config/wal/postrun @@ -5,7 +5,7 @@ zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" source "${XDG_CACHE_HOME:-$HOME/.cache}/wal/colors.sh" -mkdir -p "${dunstconf##*/}" "${zathuraconf##*/}" +mkdir -p "${dunstconf%/*}" "${zathuraconf%/*}" mv -n "$dunstconf" "$dunstconf.bak" mv -n "$zathuraconf" "$zathuraconf.bak" From 18de46de1a9888073969973b56442ad4766071cf Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 11 Nov 2021 13:08:29 -0500 Subject: [PATCH 18/32] colors fix --- .config/dunst/dunstrc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 3752b6e..d03af62 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -11,17 +11,17 @@ format = "%s\n%b" [urgency_low] - background = "#040509" - foreground = "#70896e" + background = "#1d2021" + foreground = "#928374" timeout = 3 [urgency_normal] - foreground = "#a0c49e" - background = "#545069" + foreground = "#ebdbb2" + background = "#458588" timeout = 5 [urgency_critical] - background = "#4D314E" - foreground = "#a0c49e" - frame_color = "#544858" + background = "#1cc24d" + foreground = "#ebdbb2" + frame_color = "#fabd2f" timeout = 10 From ee0203f2ac5931bd87e07dc6d0105d62a8417367 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 12 Nov 2021 17:02:41 -0500 Subject: [PATCH 19/32] lf tweaks --- .config/lf/lfrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 9ec6830..ebe16fb 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -15,7 +15,7 @@ $lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope" # cmds/functions cmd open ${{ case $(file --mime-type $f -b) in - image/vnd.djvu|application/pdf|application/octet-stream) setsid -f zathura $fx >/dev/null 2>&1 ;; + image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;; text/*) $EDITOR $fx;; image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;; image/svg+xml) display -- $f ;; @@ -52,7 +52,7 @@ cmd moveto ${{ clear; tput cup $(($(tput lines)/3)); tput bold set -f clear; echo "Move to where?" - dest="$(sed -e 's/#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" && + dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" && for x in $fx; do eval mv -iv \"$x\" \"$dest\" done && @@ -63,7 +63,7 @@ cmd copyto ${{ clear; tput cup $(($(tput lines)/3)); tput bold set -f clear; echo "Copy to where?" - dest="$(sed -e 's/#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" && + dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" && for x in $fx; do eval cp -ivr \"$x\" \"$dest\" done && @@ -75,7 +75,7 @@ cmd bulkrename $vidir # Bindings map $lf -remote "send $id select '$(fzf)'" -map J $lf -remote "send $id cd $(sed -e 's/#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)" +map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)" map gh map g top map D delete From 5b31e04513b3dbf88d9137bff7ec4642250921d5 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 14 Nov 2021 14:39:04 -0500 Subject: [PATCH 20/32] pulseaudio replaced with pipewire --- .config/pipewire/pipewire.conf | 247 +++++++++++++++++++++++++++++++++ .config/x11/xprofile | 9 +- .local/bin/opout | 2 +- 3 files changed, 249 insertions(+), 9 deletions(-) create mode 100644 .config/pipewire/pipewire.conf diff --git a/.config/pipewire/pipewire.conf b/.config/pipewire/pipewire.conf new file mode 100644 index 0000000..c06a84c --- /dev/null +++ b/.config/pipewire/pipewire.conf @@ -0,0 +1,247 @@ +# Daemon config file for PipeWire version "0.3.40" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. + +context.properties = { + ## Configure properties in the system. + #library.name.system = support/libspa-support + #context.data-loop.library.name.system = support/libspa-support + #support.dbus = true + #link.max-buffers = 64 + link.max-buffers = 16 # version < 3 clients can't handle more + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + #clock.power-of-two-quantum = true + #log.level = 2 + #cpu.zero.denormals = true + + core.daemon = true # listening for socket connections + core.name = pipewire-0 # core name and socket name + + ## Properties for the DSP configuration. + #default.clock.rate = 48000 + #default.clock.allowed-rates = [ 48000 ] + #default.clock.quantum = 1024 + #default.clock.min-quantum = 32 + #default.clock.max-quantum = 8192 + #default.video.width = 640 + #default.video.height = 480 + #default.video.rate.num = 25 + #default.video.rate.denom = 1 + # + # These overrides are only applied when running in a vm. + vm.overrides = { + default.clock.min-quantum = 1024 + } +} + +context.spa-libs = { + # = + # + # Used to find spa factory names. It maps an spa factory name + # regular expression to a library name that should contain + # that factory. + # + audio.convert.* = audioconvert/libspa-audioconvert + api.alsa.* = alsa/libspa-alsa + api.v4l2.* = v4l2/libspa-v4l2 + api.libcamera.* = libcamera/libspa-libcamera + api.bluez5.* = bluez5/libspa-bluez5 + api.vulkan.* = vulkan/libspa-vulkan + api.jack.* = jack/libspa-jack + support.* = support/libspa-support + #videotestsrc = videotestsrc/libspa-videotestsrc + #audiotestsrc = audiotestsrc/libspa-audiotestsrc +} + +context.modules = [ + #{ name = + # [ args = { = ... } ] + # [ flags = [ [ ifexists ] [ nofail ] ] + #} + # + # Loads a module with the given parameters. + # If ifexists is given, the module is ignored when it is not found. + # If nofail is given, module initialization failures are ignored. + # + + # Uses RTKit to boost the data thread priority. + { name = libpipewire-module-rtkit + args = { + #nice.level = -11 + #rt.prio = 88 + #rt.time.soft = 2000000 + #rt.time.hard = 2000000 + } + flags = [ ifexists nofail ] + } + + # Set thread priorities without using RTKit. + #{ name = libpipewire-module-rt + # args = { + # nice.level = -11 + # rt.prio = 88 + # rt.time.soft = 2000000 + # rt.time.hard = 2000000 + # } + # flags = [ ifexists nofail ] + #} + + # The native communication protocol. + { name = libpipewire-module-protocol-native } + + # The profile module. Allows application to access profiler + # and performance data. It provides an interface that is used + # by pw-top and pw-profiler. + { name = libpipewire-module-profiler } + + # Allows applications to create metadata objects. It creates + # a factory for Metadata objects. + { name = libpipewire-module-metadata } + + # Creates a factory for making devices that run in the + # context of the PipeWire server. + { name = libpipewire-module-spa-device-factory } + + # Creates a factory for making nodes that run in the + # context of the PipeWire server. + { name = libpipewire-module-spa-node-factory } + + # Allows creating nodes that run in the context of the + # client. Is used by all clients that want to provide + # data to PipeWire. + { name = libpipewire-module-client-node } + + # Allows creating devices that run in the context of the + # client. Is used by the session manager. + { name = libpipewire-module-client-device } + + # The portal module monitors the PID of the portal process + # and tags connections with the same PID as portal + # connections. + { name = libpipewire-module-portal + flags = [ ifexists nofail ] + } + + # The access module can perform access checks and block + # new clients. + { name = libpipewire-module-access + args = { + # access.allowed to list an array of paths of allowed + # apps. + #access.allowed = [ + # /usr/bin/pipewire-media-session + #] + + # An array of rejected paths. + #access.rejected = [ ] + + # An array of paths with restricted access. + #access.restricted = [ ] + + # Anything not in the above lists gets assigned the + # access.force permission. + #access.force = flatpak + } + } + + # Makes a factory for wrapping nodes in an adapter with a + # converter and resampler. + { name = libpipewire-module-adapter } + + # Makes a factory for creating links between ports. + { name = libpipewire-module-link-factory } + + # Provides factories to make session manager objects. + { name = libpipewire-module-session-manager } +] + +context.objects = [ + #{ factory = + # [ args = { = ... } ] + # [ flags = [ [ nofail ] ] + #} + # + # Creates an object from a PipeWire factory with the given parameters. + # If nofail is given, errors are ignored (and no object is created). + # + #{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } } + #{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] } + #{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } } + #{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } } + #{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test } } + #{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } } + + # A default dummy driver. This handles nodes marked with the "node.always-driver" + # property when no other driver is currently active. JACK clients need this. + { factory = spa-node-factory + args = { + factory.name = support.node.driver + node.name = Dummy-Driver + node.group = pipewire.dummy + priority.driver = 20000 + } + } + { factory = spa-node-factory + args = { + factory.name = support.node.driver + node.name = Freewheel-Driver + priority.driver = 19000 + node.group = pipewire.freewheel + node.freewheel = true + } + } + # This creates a new Source node. It will have input ports + # that you can link, to provide audio for this source. + #{ factory = adapter + # args = { + # factory.name = support.null-audio-sink + # node.name = "my-mic" + # node.description = "Microphone" + # media.class = "Audio/Source/Virtual" + # audio.position = "FL,FR" + # } + #} + + # This creates a single PCM source device for the given + # alsa device path hw:0. You can change source to sink + # to make a sink in the same way. + #{ factory = adapter + # args = { + # factory.name = api.alsa.pcm.source + # node.name = "alsa-source" + # node.description = "PCM Source" + # media.class = "Audio/Source" + # api.alsa.path = "hw:0" + # api.alsa.period-size = 1024 + # api.alsa.headroom = 0 + # api.alsa.disable-mmap = false + # api.alsa.disable-batch = false + # audio.format = "S16LE" + # audio.rate = 48000 + # audio.channels = 2 + # audio.position = "FL,FR" + # } + #} +] + +context.exec = [ + #{ path = [ args = "" ] } + # + # Execute the given program with arguments. + # + # You can optionally start the session manager here, + # but it is better to start it as a systemd service. + # Run the session manager with -h for options. + # + #{ path = "/usr/bin/pipewire-media-session" args = "" } + # + # You can optionally start the pulseaudio-server here as well + # but it is better to start it as a systemd service. + # It can be interesting to start another daemon here that listens + # on another address with the -a option (eg. -a tcp:4713). + # + #{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" } +] diff --git a/.config/x11/xprofile b/.config/x11/xprofile index 6e95b15..72d6b33 100755 --- a/.config/x11/xprofile +++ b/.config/x11/xprofile @@ -8,18 +8,11 @@ setbg & # set the background with the `setbg` script #xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup remaps & # run the remaps script, switching caps/esc and more; check it for more info -autostart="mpd xcompmgr dunst unclutter" +autostart="mpd xcompmgr dunst unclutter pipewire" for program in $autostart; do pidof -s "$program" || setsid -f "$program" done >/dev/null 2>&1 -# This line autostarts an instance of Pulseaudio that does not exit on idle. -# This is "necessary" on Artix due to a current bug between PA and -# Chromium-based browsers where they fail to start PA and use dummy output. -pidof -s runit && - ! pidof -s pulseaudio >/dev/null 2>&1 && - setsid -f pulseaudio --start --exit-idle-time=-1 >/dev/null 2>&1 - # Ensure that xrdb has finished running before moving on to start the WM/DE. [ -n "$xrdbpid" ] && wait "$xrdbpid" diff --git a/.local/bin/opout b/.local/bin/opout index 7f452df..faf6575 100755 --- a/.local/bin/opout +++ b/.local/bin/opout @@ -4,7 +4,7 @@ # usually the pdf of a compiled document. I find this useful especially # running from vim. -basename="$(echo "${*}" | sed 's/\.[^\/.]*$//')" +basename="${1%.*}" case "${*}" in *.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;; From 499aeaed3a3d09e7fe2522ca561be95f42d09ef3 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 14 Nov 2021 19:52:19 -0500 Subject: [PATCH 21/32] fix #1037 --- .config/pipewire/pipewire.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/pipewire/pipewire.conf b/.config/pipewire/pipewire.conf index c06a84c..ae5c76e 100644 --- a/.config/pipewire/pipewire.conf +++ b/.config/pipewire/pipewire.conf @@ -236,12 +236,12 @@ context.exec = [ # but it is better to start it as a systemd service. # Run the session manager with -h for options. # - #{ path = "/usr/bin/pipewire-media-session" args = "" } + { path = "/usr/bin/pipewire-media-session" args = "" } # # You can optionally start the pulseaudio-server here as well # but it is better to start it as a systemd service. # It can be interesting to start another daemon here that listens # on another address with the -a option (eg. -a tcp:4713). # - #{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" } + { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" } ] From ed9a67ed6dbd408032f51f34a471362264c47e1c Mon Sep 17 00:00:00 2001 From: Future is FOSS <79040025+futureisfoss@users.noreply.github.com> Date: Sat, 4 Dec 2021 13:47:35 +0000 Subject: [PATCH 22/32] follow symlinks when detecting filetype in lf (#1052) fix bug in lf where symlinked files don't open in the expected program --- .config/lf/lfrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index ebe16fb..9d6ceba 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -14,7 +14,7 @@ $lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope" # cmds/functions cmd open ${{ - case $(file --mime-type $f -b) in + case $(file --mime-type "$(readlink -f $f)" -b) in image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;; text/*) $EDITOR $fx;; image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;; From a01c9f967b8801b9917be0f270f1cf9b9655e770 Mon Sep 17 00:00:00 2001 From: Fabian <58243358+FabianPaci@users.noreply.github.com> Date: Tue, 21 Dec 2021 02:11:17 +1100 Subject: [PATCH 23/32] Resets cursor position on file save (Issue #1040) (#1057) * Resets cursor position on file save (Issue #1040) * Resets cursor pos on save. (line and column) --- .config/nvim/init.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f93eed4..e32b8eb 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -111,10 +111,12 @@ set noshowcmd autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x! autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q! -" Automatically deletes all trailing whitespace and newlines at end of file on save. +" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position + autocmd BufWritePre * let currPos = getpos(".") autocmd BufWritePre * %s/\s\+$//e autocmd BufWritePre * %s/\n\+\%$//e autocmd BufWritePre *.[ch] %s/\%$/\r/e + autocmd BufWritePre * cal cursor(currPos[1], currPos[2]) " When shortcut files are updated, renew bash and ranger configs with new material: autocmd BufWritePost bm-files,bm-dirs !shortcuts From 58e1952ce22b364fc21763cc52e7a1418607db99 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 21 Dec 2021 13:03:43 -0500 Subject: [PATCH 24/32] otp script --- .local/bin/otp | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 .local/bin/otp diff --git a/.local/bin/otp b/.local/bin/otp new file mode 100755 index 0000000..3b31363 --- /dev/null +++ b/.local/bin/otp @@ -0,0 +1,53 @@ +#!/bin/sh + +# Get a one-time password, or add a OTP secret to your pass-otp store. + +# The assumption of this script is that all otp passwords are stored with the +# suffix `-otp`. This script automatically appends newly added otps as such. + +# For OTP passwords to be generated properly, it is important for the local +# computer to have its time properly synced. This can be done with the command +# below which requires the package `ntp`. + +ifinstalled pass pass-otp + +dir="${PASSWORD_STORE_DIR}" + +choice="$({ echo "🆕add" ; echo "🕙sync-time" ; ls ${dir}/*-otp.gpg ;} | sed "s/.*\///;s/-otp.gpg//" | dmenu -p "Pick a 2FA:")" + +case $choice in + 🆕add ) + ifinstalled maim zbar xclip || exit 1 + + temp="$dir/temp.png" + otp="otp-test-script" + trap 'shred -fu $temp; pass rm $otp' HUP INT QUIT TERM PWR EXIT + + notify-send "Scan the image." "Scan the OTP QR code." + + maim -s "$temp" || exit 1 + info="$(zbarimg -q "$temp")" + info="${info#QR-Code:}" + issuer="$(echo "$info" | grep -o "issuer=[A-z0-9]\+")" + name="${issuer#issuer=}" + + if echo "$info" | pass otp insert "$otp"; then + while true ; do + export name="$(prinf | dmenu -p "Give this One Time Password a one-word name:")" + echo "$name" | grep -q -- "^[A-z0-9-]\+$" && break + done + pass mv "$otp" "$name-otp" + notify-send "Successfully added." "$name-otp has been created." + else + notify-send "No OTP data found." "Try to scan the image again more precisely." + fi + + ;; + 🕙sync-time ) + ifinstalled ntp || exit 1 + notify-send -u low "🕙 Synchronizing Time..." "Synching time with remote NTP servers..." + updatedata="$(sudo ntpdate pool.ntp.org)" && + notify-send -u low "🕙 Synchronizing Time..." "Done. Time changed by ${updatedata#*offset }" + ;; + *) pass otp -c ${choice}-otp ;; +esac From ebcc52f1fb26304ad5adf0a6fd6c14f074f933c4 Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Fri, 21 Jan 2022 23:17:21 +0100 Subject: [PATCH 25/32] otp script: Printf is not needed here (#1062) --- .local/bin/otp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/otp b/.local/bin/otp index 3b31363..1726b1a 100755 --- a/.local/bin/otp +++ b/.local/bin/otp @@ -33,7 +33,7 @@ case $choice in if echo "$info" | pass otp insert "$otp"; then while true ; do - export name="$(prinf | dmenu -p "Give this One Time Password a one-word name:")" + export name="$(dmenu -p "Give this One Time Password a one-word name:")" echo "$name" | grep -q -- "^[A-z0-9-]\+$" && break done pass mv "$otp" "$name-otp" From c08c3a2fb0475472f2bfa74fad9ed4026afa2ef4 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 21 Jan 2022 19:27:56 -0500 Subject: [PATCH 26/32] fix #936 --- .config/shell/profile | 2 +- .local/bin/compiler | 2 +- .local/bin/sysact | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/shell/profile b/.config/shell/profile index 1057677..9515179 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -148,7 +148,7 @@ if pacman -Qs libxft-bgra >/dev/null 2>&1; then else echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm. Please run: - \033[32mparu -S libxft-bgra-git\033[0m + \033[32myay -S libxft-bgra-git\033[0m and replace \`libxft\`. Afterwards, you may start the graphical server by running \`startx\`." fi diff --git a/.local/bin/compiler b/.local/bin/compiler index faf37c9..3617765 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -37,7 +37,7 @@ case "$ext" in java) javac -d classes "$file" && java -cp classes "${1%.*}" ;; m) octave "$file" ;; md) if [ -x "$(command -v lowdown)" ]; then - lowdown -d nointem -e super "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf + lowdown --parse-no-intraemph "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf elif [ -x "$(command -v groffdown)" ]; then groffdown -i "$file" | groff > "$base.pdf" else diff --git a/.local/bin/sysact b/.local/bin/sysact index 451815d..2df325c 100755 --- a/.local/bin/sysact +++ b/.local/bin/sysact @@ -5,14 +5,14 @@ case "$(readlink -f /sbin/init)" in *) ctl='loginctl' ;; esac -case "$(printf "🔒 lock\n🚪 leave dwm\n♻️ renew dwm\n🐻 hibernate\n💤 sleep\n🔃 reboot\n🖥️shutdown\n📺 display off" | dmenu -i -p 'Action: ')" in +case "$(printf "🔒 lock\n🚪 leave dwm\n♻️ renew dwm\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | dmenu -i -p 'Action: ')" in '🔒 lock') slock ;; '🚪 leave dwm') kill -TERM "$(pgrep -u "$USER" "\bdwm$")" ;; '♻️ renew dwm') kill -HUP "$(pgrep -u "$USER" "\bdwm$")" ;; '🐻 hibernate') slock $ctl hibernate ;; '💤 sleep') slock $ctl suspend ;; - '🔃 reboot') $ctl reboot ;; - '🖥️shutdown') $ctl poweroff ;; + '🔃 reboot') $ctl reboot -i ;; + '🖥️shutdown') $ctl powerof -if ;; '📺 display off') xset dpms force off ;; *) exit 1 ;; esac From 87fe81bb9e4a22280339879c43e9ad08a2eef494 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 22 Jan 2022 02:00:46 -0500 Subject: [PATCH 27/32] a --- .local/bin/sysact | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/sysact b/.local/bin/sysact index 2df325c..b13690e 100755 --- a/.local/bin/sysact +++ b/.local/bin/sysact @@ -12,7 +12,7 @@ case "$(printf "🔒 lock\n🚪 leave dwm\n♻️ renew dwm\n🐻 hibernate\n '🐻 hibernate') slock $ctl hibernate ;; '💤 sleep') slock $ctl suspend ;; '🔃 reboot') $ctl reboot -i ;; - '🖥️shutdown') $ctl powerof -if ;; + '🖥️shutdown') $ctl poweroff -i ;; '📺 display off') xset dpms force off ;; *) exit 1 ;; esac From 0d01624c592996e734e35894d24cea9dae3688d1 Mon Sep 17 00:00:00 2001 From: Ginner <26798615+Ginner@users.noreply.github.com> Date: Tue, 25 Jan 2022 15:23:59 +0100 Subject: [PATCH 28/32] Fix case-matching (#1066) Case sensitivity prevents dmenuhandler from copying the URL to the clipboard. --- .local/bin/dmenuhandler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler index e5de8ef..ce9159d 100755 --- a/.local/bin/dmenuhandler +++ b/.local/bin/dmenuhandler @@ -5,7 +5,7 @@ feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}" case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dl\\nqueue yt-dl audio" | dmenu -i -p "Open it with?")" in - "copy url") echo "$feed" | xclip -selection clipboard ;; + "Copy URL") echo "$feed" | xclip -selection clipboard ;; mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;; "mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;; "mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;; From 07df38c057f397015d49f263d26b69d0e7837ced Mon Sep 17 00:00:00 2001 From: i-c-u-p <96894903+i-c-u-p@users.noreply.github.com> Date: Wed, 26 Jan 2022 15:07:42 +0000 Subject: [PATCH 29/32] typos (#1067) --- .config/lf/lfrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 9d6ceba..f87325d 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -94,8 +94,8 @@ map O $mimeopen --ask $f map A rename # at the very end map c push A # new rename map I push A # at the very beginning -map i push A # before extention -map a push A # after extention +map i push A # before extension +map a push A # after extension map B bulkrename map b $setbg $f From 786cee9303fb434d37f5949c31eeb083eb178369 Mon Sep 17 00:00:00 2001 From: Fabian <58243358+FabianPaci@users.noreply.github.com> Date: Fri, 28 Jan 2022 09:16:37 +1100 Subject: [PATCH 30/32] vimwiki chages (#1068) changed path to `.config` instead of `~` to avoid a messy `~`. Also added a carriage return to the `VimwikiIndex` map. --- .config/nvim/init.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index e32b8eb..6a96208 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -96,8 +96,8 @@ set noshowcmd " Ensure files are read as what I want: let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} - map v :VimwikiIndex - let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] + map v :VimwikiIndex + let g:vimwiki_list = [{'path': '.config/nvim/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff autocmd BufRead,BufNewFile *.tex set filetype=tex From c28d25c15261e417fd9a2e3c0424aa777f9ffd6a Mon Sep 17 00:00:00 2001 From: Arjun Karangiya Date: Sat, 29 Jan 2022 20:21:52 +0530 Subject: [PATCH 31/32] Move to data folder and need absolute path here (#1069) Vimwiki is not config but it's data so ".local/share/nvim" is more proper location for it. Here relative path was given so it tries to create new vimwiki folder when launched from other than home dir or changing current dir using `:cd ` inside vim when launching vimwiki. --- .config/nvim/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 6a96208..2fa101d 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -97,7 +97,7 @@ set noshowcmd " Ensure files are read as what I want: let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} map v :VimwikiIndex - let g:vimwiki_list = [{'path': '.config/nvim/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] + let g:vimwiki_list = [{'path': '~/.local/share/nvim/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff autocmd BufRead,BufNewFile *.tex set filetype=tex From 82b70e3a8e3aed45998c38024e8c3e16f9680cff Mon Sep 17 00:00:00 2001 From: Arjun Karangiya Date: Wed, 2 Feb 2022 19:55:48 +0530 Subject: [PATCH 32/32] Bug: initial value is wrong; it should be false, 0 (#1074) This caused no effect for the first call to ToggleHiddenAll(). The second call works as value was set correctly inside ToggleHiddenAll() on the first call. --- .config/nvim/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 2fa101d..09610fd 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -132,7 +132,7 @@ if &diff endif " Function for toggling the bottom statusbar: -let s:hidden_all = 1 +let s:hidden_all = 0 function! ToggleHiddenAll() if s:hidden_all == 0 let s:hidden_all = 1