From ea3e1e14cc49d68c9900fb05d9ee7bb9e719688e Mon Sep 17 00:00:00 2001 From: Joey-Pepperoni <91891926+Joey-Pepperoni@users.noreply.github.com> Date: Sun, 29 Oct 2023 07:21:47 -0500 Subject: [PATCH 01/19] Update sb-music (#1367) The s/\\&/&/g operation only effect is to add "amp;" after any ampersand in the artist or song name. "&" displays just fine anyways, so there's no reason to include an operation to replace it. --- .local/bin/statusbar/sb-music | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music index d164b4be..266b9160 100755 --- a/.local/bin/statusbar/sb-music +++ b/.local/bin/statusbar/sb-music @@ -1,6 +1,6 @@ #!/bin/sh -filter() { sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;} +filter() { sed "/^volume:/d;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;} pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 & From 031938a792ac3107a512e89504929ef9e3e8ed6a Mon Sep 17 00:00:00 2001 From: Dominik Date: Sat, 4 Nov 2023 13:33:18 +0100 Subject: [PATCH 02/19] Update dmenurecord (#1370) --- .local/bin/dmenurecord | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord index 990b7b3c..ca6b0117 100755 --- a/.local/bin/dmenurecord +++ b/.local/bin/dmenurecord @@ -9,7 +9,7 @@ # # If there is already a running instance, user will be prompted to end it. -getdim() { xrandr | sed -n "s/\s*\([0-9]\+x[0-9]\+\).*\*.*/\1/p" ;} +getdim() { xrandr | grep -oP '(?<=current ).*(?=,)' | tr -d ' ' ;} updateicon() { \ echo "$1" > /tmp/recordingicon From 50e72a1a0306d4343360b31f941ef73b4c2e8ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20AKY=C3=9CZ?= Date: Mon, 13 Nov 2023 16:30:08 +0300 Subject: [PATCH 03/19] An unnecessary(?), small improvement for lf mkdir command (#1372) The new method is more robust and better handles directory names with spaces and special characters. It's more minimal. --- .config/lf/lfrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index e104591b..e783d728 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -50,7 +50,7 @@ cmd open ${{ esac }} -cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')" +cmd mkdir $mkdir -p "$@" cmd extract ${{ clear; tput cup $(($(tput lines)/3)); tput bold @@ -139,7 +139,7 @@ map D delete map E extract map C copyto map M moveto -map push :mkdir +map push :mkdir"" map reload map set hidden! map shell From 0db54f96180c312bcefb7931632d5f8005e0772b Mon Sep 17 00:00:00 2001 From: thirtysix <109920169+thirtysixpw@users.noreply.github.com> Date: Wed, 15 Nov 2023 04:34:29 +0300 Subject: [PATCH 04/19] Fix pdf and plain text previws in lf (#1369) * Fix pdf and plain text previws in lf Pdf previws don't appear because are generated with wrong filename. Plain text previws with `bat` don't respect terminal theme and have annoying border. * Revert pdf cache filename to work properly --- .config/lf/scope | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.config/lf/scope b/.config/lf/scope index cc556697..16fca21e 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -13,10 +13,6 @@ image() { fi } -ifub() { - [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1 -} - # Note that the cache file name is a function of file information, meaning if # an image appears in multiple places across the machine, it will not have to # be regenerated once seen. @@ -32,7 +28,7 @@ case "$(file --dereference --brief --mime-type -- "$1")" in image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;; text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; text/troff) man ./ "$1" | col -b ;; - text/* | */xml | application/json | application/x-ndjson) bat --terminal-width "$(($4-2))" -f "$1" ;; + text/* | */xml | application/json | application/x-ndjson) bat -p --theme ansi --terminal-width "$(($4-2))" -f "$1" ;; audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; video/* ) CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" From 52fab9d50a898cf1818fffdc1eacb46e336c0eac Mon Sep 17 00:00:00 2001 From: thirtysix <109920169+thirtysixpw@users.noreply.github.com> Date: Wed, 15 Nov 2023 04:35:14 +0300 Subject: [PATCH 05/19] Make shell profile POSIX, remove unnecessary variable fallbacks (#1368) --- .config/shell/profile | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.config/shell/profile b/.config/shell/profile index 55089430..872e312a 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -1,14 +1,12 @@ -#!/bin/zsh +#!/bin/sh +# shellcheck disable=SC2155 -# profile file. Runs on login. Environmental variables are set here. +# Profile file, runs on login. Environmental variables are set here. -# If you don't plan on reverting to bash, you can remove the link in ~/.profile -# to clean up. +# Add all directories in `~/.local/bin` to $PATH +export PATH="$PATH:$(find ~/.local/bin -type d | paste -sd ':' -)" -# Adds `~/.local/bin` to $PATH -export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}" - -unsetopt PROMPT_SP +unsetopt PROMPT_SP 2>/dev/null # Default programs: export EDITOR="nvim" @@ -52,7 +50,7 @@ export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history" export DICS="/usr/share/stardict/dic/" export SUDO_ASKPASS="$HOME/.local/bin/dmenupass" export FZF_DEFAULT_OPTS="--layout=reverse --height 40%" -export LESS=-R +export LESS="R" export LESS_TERMCAP_mb="$(printf '%b' '')" export LESS_TERMCAP_md="$(printf '%b' '')" export LESS_TERMCAP_me="$(printf '%b' '')" @@ -61,15 +59,15 @@ export LESS_TERMCAP_se="$(printf '%b' '')" export LESS_TERMCAP_us="$(printf '%b' '')" export LESS_TERMCAP_ue="$(printf '%b' '')" export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null" -export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme. -export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads. +export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme. +export MOZ_USE_XINPUT2=1 # Mozilla smooth scrolling/touchpads. export AWT_TOOLKIT="MToolkit wmname LG3D" # May have to install wmname -export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm +export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm -[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && setsid shortcuts >/dev/null 2>&1 +[ ! -f "$XDG_CONFIG_HOME/shell/shortcutrc" ] && setsid -f shortcuts >/dev/null 2>&1 # Start graphical server on user's current tty if not already running. [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" # Switch escape and caps if tty and no passwd required: -sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null +sudo -n loadkeys "$XDG_DATA_HOME/larbs/ttymaps.kmap" 2>/dev/null From bbcbac64faac20b2aaa0ac9293af6577b176a6d4 Mon Sep 17 00:00:00 2001 From: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com> Date: Wed, 15 Nov 2023 01:35:53 +0000 Subject: [PATCH 06/19] Fix unsupported characters in vim-airline (#1317) --- .config/nvim/init.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 5b0bd4e7..8346777b 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -67,6 +67,14 @@ set noshowcmd nm i :call ToggleIPA() imap i :call ToggleIPA()a nm q :call ToggleProse() + +" vim-airline + if !exists('g:airline_symbols') + let g:airline_symbols = {} + endif + let g:airline_symbols.colnr = ' C:' + let g:airline_symbols.linenr = ' L:' + let g:airline_symbols.maxlinenr = '☰ ' " Shortcutting split navigation, saving a keypress: map h From 07952026753f1bbeaf5b6c4eb5414a9c51536041 Mon Sep 17 00:00:00 2001 From: Luciano Date: Tue, 14 Nov 2023 22:37:39 -0300 Subject: [PATCH 07/19] lf-scope: adds SVG preview creating cache. (#1360) --- .config/lf/scope | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/lf/scope b/.config/lf/scope index 16fca21e..8265a879 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -25,6 +25,11 @@ case "$(file --dereference --brief --mime-type -- "$1")" in CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" [ ! -f "$CACHE" ] && djvused "$1" -e 'select 1; save-page-with /dev/stdout' | convert -density 200 - "$CACHE.jpg" > /dev/null 2>&1 image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" ;; +image/svg+xml) + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + [ ! -f "$CACHE" ] && inkscape --convert-dpi-method=none -o "$CACHE.png" --export-overwrite -D --export-png-color-mode=RGBA_16 "$1" + image "$CACHE.png" "$2" "$3" "$4" "$5" "$1" + ;; image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;; text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; text/troff) man ./ "$1" | col -b ;; From 7a96fb100cf385e05c211937b509d2bf166299e6 Mon Sep 17 00:00:00 2001 From: Jameson <108906685+2084x@users.noreply.github.com> Date: Sun, 31 Dec 2023 04:04:51 +1100 Subject: [PATCH 08/19] script fixes (#1386) * fix typo in lfub * use setsid when editing scripts * fix immediate exit on middle click --------- Co-authored-by: 2084x <2084x@noreply.codeberg.org> --- .local/bin/lfub | 2 +- .local/bin/statusbar/sb-battery | 2 +- .local/bin/statusbar/sb-clock | 2 +- .local/bin/statusbar/sb-cpu | 2 +- .local/bin/statusbar/sb-cpubars | 2 +- .local/bin/statusbar/sb-disk | 2 +- .local/bin/statusbar/sb-doppler | 2 +- .local/bin/statusbar/sb-forecast | 2 +- .local/bin/statusbar/sb-help-icon | 2 +- .local/bin/statusbar/sb-internet | 2 +- .local/bin/statusbar/sb-kbselect | 2 +- .local/bin/statusbar/sb-mailbox | 2 +- .local/bin/statusbar/sb-memory | 2 +- .local/bin/statusbar/sb-moonphase | 2 +- .local/bin/statusbar/sb-music | 2 +- .local/bin/statusbar/sb-nettraf | 2 +- .local/bin/statusbar/sb-news | 4 ++-- .local/bin/statusbar/sb-pacpackages | 2 +- .local/bin/statusbar/sb-price | 2 +- .local/bin/statusbar/sb-tasks | 2 +- .local/bin/statusbar/sb-torrent | 2 +- .local/bin/statusbar/sb-volume | 2 +- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.local/bin/lfub b/.local/bin/lfub index 9012f506..f9bb2df9 100755 --- a/.local/bin/lfub +++ b/.local/bin/lfub @@ -1,6 +1,6 @@ #!/bin/sh -# This is a wrapper script for lb that allows it to create image previews with +# This is a wrapper script for lf that allows it to create image previews with # ueberzug. This works in concert with the lf configuration file and the # lf-cleaner script. diff --git a/.local/bin/statusbar/sb-battery b/.local/bin/statusbar/sb-battery index 93cbe088..79030bcc 100755 --- a/.local/bin/statusbar/sb-battery +++ b/.local/bin/statusbar/sb-battery @@ -13,7 +13,7 @@ case $BLOCK_BUTTON in - Scroll to change adjust xbacklight." ;; 4) xbacklight -inc 10 ;; 5) xbacklight -dec 10 ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac # Loop through all attached batteries and format the info diff --git a/.local/bin/statusbar/sb-clock b/.local/bin/statusbar/sb-clock index 93f8aea9..ac12aac1 100755 --- a/.local/bin/statusbar/sb-clock +++ b/.local/bin/statusbar/sb-clock @@ -23,7 +23,7 @@ case $BLOCK_BUTTON in 2) setsid -f "$TERMINAL" -e calcurse ;; 3) notify-send "πŸ“… Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` - Middle click opens calcurse if installed" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac date "+%Y %b %d (%a) $icon%I:%M%p" diff --git a/.local/bin/statusbar/sb-cpu b/.local/bin/statusbar/sb-cpu index 1572b527..5b8fb933 100755 --- a/.local/bin/statusbar/sb-cpu +++ b/.local/bin/statusbar/sb-cpu @@ -6,7 +6,7 @@ case $BLOCK_BUTTON in 3) notify-send "πŸ–₯ CPU module " "\- Shows CPU temperature. - Click to show intensive processes. - Middle click to open htop." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac sensors | awk '/Core 0/ {print "🌑" $3}' diff --git a/.local/bin/statusbar/sb-cpubars b/.local/bin/statusbar/sb-cpubars index 297424e7..40158934 100755 --- a/.local/bin/statusbar/sb-cpubars +++ b/.local/bin/statusbar/sb-cpubars @@ -12,7 +12,7 @@ case $BLOCK_BUTTON in 2) setsid -f "$TERMINAL" -e htop ;; 3) notify-send "πŸͺ¨ CPU load module" "Each bar represents one CPU core";; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac # id total idle diff --git a/.local/bin/statusbar/sb-disk b/.local/bin/statusbar/sb-disk index e947509d..7f3ff798 100755 --- a/.local/bin/statusbar/sb-disk +++ b/.local/bin/statusbar/sb-disk @@ -11,7 +11,7 @@ case $BLOCK_BUTTON in 1) notify-send "πŸ’½ Disk space" "$(df -h --output=target,used,size)" ;; 3) notify-send "πŸ’½ Disk module" "\- Shows used hard drive space. - Click to show all disk info." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac case "$location" in diff --git a/.local/bin/statusbar/sb-doppler b/.local/bin/statusbar/sb-doppler index f58b744e..a687c681 100755 --- a/.local/bin/statusbar/sb-doppler +++ b/.local/bin/statusbar/sb-doppler @@ -274,7 +274,7 @@ case $BLOCK_BUTTON in 3) notify-send "πŸ—ΊοΈ Doppler RADAR module" "\- Left click for local Doppler RADAR. - Middle click to update RADAR location. After $secs seconds, new clicks will also automatically update the doppler RADAR." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac echo πŸŒ… diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast index d8a16aad..52256019 100755 --- a/.local/bin/statusbar/sb-forecast +++ b/.local/bin/statusbar/sb-forecast @@ -45,7 +45,7 @@ case $BLOCK_BUTTON in β˜”: Chance of rain/snow πŸ₯Ά: Daily low 🌞: Daily high" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac checkforecast || getforecast diff --git a/.local/bin/statusbar/sb-help-icon b/.local/bin/statusbar/sb-help-icon index 8fa4a52c..8372e6f8 100755 --- a/.local/bin/statusbar/sb-help-icon +++ b/.local/bin/statusbar/sb-help-icon @@ -13,5 +13,5 @@ case $BLOCK_BUTTON in 2) restartwm ;; 3) notify-send "❓ Help module" "\- Left click to open LARBS guide. - Middle click to refresh window manager." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac; echo "❓" diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index 5440a52d..6d0c5133 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -14,7 +14,7 @@ case $BLOCK_BUTTON in 🌐: ethernet working πŸ”’: vpn is active " ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac # Wifi diff --git a/.local/bin/statusbar/sb-kbselect b/.local/bin/statusbar/sb-kbselect index ab2140c3..df455c14 100755 --- a/.local/bin/statusbar/sb-kbselect +++ b/.local/bin/statusbar/sb-kbselect @@ -11,7 +11,7 @@ case $BLOCK_BUTTON in pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";; 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" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac echo "$kb" diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox index 88522f25..7483aa48 100755 --- a/.local/bin/statusbar/sb-mailbox +++ b/.local/bin/statusbar/sb-mailbox @@ -10,7 +10,7 @@ case $BLOCK_BUTTON in - Shows πŸ”ƒ if syncing mail - Left click opens neomutt - Middle click syncs mail" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)" diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory index 01d3daf9..8178b10b 100755 --- a/.local/bin/statusbar/sb-memory +++ b/.local/bin/statusbar/sb-memory @@ -6,7 +6,7 @@ case $BLOCK_BUTTON in 3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total. - Click to show memory hogs. - Middle click to open htop." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac free --mebi | sed -n '2{p;q}' | awk '{printf ("🧠%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}' diff --git a/.local/bin/statusbar/sb-moonphase b/.local/bin/statusbar/sb-moonphase index 99adaee8..d496ae22 100755 --- a/.local/bin/statusbar/sb-moonphase +++ b/.local/bin/statusbar/sb-moonphase @@ -33,5 +33,5 @@ case $BLOCK_BUTTON in - πŸŒ–: Waning Gibbous - πŸŒ—: Last Quarter - 🌘: Waning Crescent" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music index 266b9160..6734eeb7 100755 --- a/.local/bin/statusbar/sb-music +++ b/.local/bin/statusbar/sb-music @@ -14,6 +14,6 @@ case $BLOCK_BUTTON in - Scroll changes track.";; # right click, pause/unpause 4) mpc prev | filter ;; # scroll up, previous 5) mpc next | filter ;; # scroll down, next - 6) mpc status | filter ; "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) mpc status | filter ; setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; *) mpc status | filter ;; esac diff --git a/.local/bin/statusbar/sb-nettraf b/.local/bin/statusbar/sb-nettraf index 178f6773..08cb8299 100755 --- a/.local/bin/statusbar/sb-nettraf +++ b/.local/bin/statusbar/sb-nettraf @@ -8,7 +8,7 @@ case $BLOCK_BUTTON in 1) setsid -f "$TERMINAL" -e bmon ;; 3) notify-send "🌐 Network traffic module" "πŸ”»: Traffic received πŸ”Ί: Traffic transmitted" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac update() { diff --git a/.local/bin/statusbar/sb-news b/.local/bin/statusbar/sb-news index fe701db6..cc481e1e 100755 --- a/.local/bin/statusbar/sb-news +++ b/.local/bin/statusbar/sb-news @@ -5,13 +5,13 @@ case $BLOCK_BUTTON in 1) setsid "$TERMINAL" -e newsboat ;; - 2) setsid -f newsup >/dev/null exit ;; + 2) setsid -f newsup >/dev/null && exit ;; 3) notify-send "πŸ“° News module" "\- Shows unread news items - Shows πŸ”ƒ if updating with \`newsup\` - Left click opens newsboat - Middle click syncs RSS feeds Note: Only one instance of newsboat (including updates) may be running at a time." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print "πŸ“°" $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)" diff --git a/.local/bin/statusbar/sb-pacpackages b/.local/bin/statusbar/sb-pacpackages index 37ebed32..6acdce68 100755 --- a/.local/bin/statusbar/sb-pacpackages +++ b/.local/bin/statusbar/sb-pacpackages @@ -23,7 +23,7 @@ case $BLOCK_BUTTON in 3) notify-send "🎁 Upgrade module" "πŸ“¦: number of upgradable packages - Left click to upgrade packages - Middle click to show upgradable packages" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/πŸ“¦/;s/^πŸ“¦0$//g" diff --git a/.local/bin/statusbar/sb-price b/.local/bin/statusbar/sb-price index f95c8152..611ec36f 100755 --- a/.local/bin/statusbar/sb-price +++ b/.local/bin/statusbar/sb-price @@ -44,7 +44,7 @@ case $BLOCK_BUTTON in - Shows πŸ”ƒ if updating prices. - Last updated: $uptime" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac [ -n "$updateme" ] && diff --git a/.local/bin/statusbar/sb-tasks b/.local/bin/statusbar/sb-tasks index 586300ee..4beb2d09 100755 --- a/.local/bin/statusbar/sb-tasks +++ b/.local/bin/statusbar/sb-tasks @@ -13,7 +13,7 @@ case $BLOCK_BUTTON in 1) setsid -f "$TERMINAL" -e tsp -l ;; 3) notify-send "Tasks module" "πŸ€–: number of running/queued background tasks - Left click opens tsp" ;; # Right click - 2) $EDITOR "$0" ;; # Middle click + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac [ "$num" != "0(0)" ] && diff --git a/.local/bin/statusbar/sb-torrent b/.local/bin/statusbar/sb-torrent index 08c9173c..493631bc 100755 --- a/.local/bin/statusbar/sb-torrent +++ b/.local/bin/statusbar/sb-torrent @@ -23,5 +23,5 @@ Module shows number of torrents: πŸ”½: downloading βœ…: done 🌱: done and seeding" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume index fa0abcd5..e66dea77 100755 --- a/.local/bin/statusbar/sb-volume +++ b/.local/bin/statusbar/sb-volume @@ -10,7 +10,7 @@ case $BLOCK_BUTTON in 3) notify-send "πŸ“’ Volume module" "\- Shows volume πŸ”Š, πŸ”‡ if muted. - Middle click to mute. - Scroll to change." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" From cf4a12acb3a70951fd59d67e0738bf3ab2d1045c Mon Sep 17 00:00:00 2001 From: ewof Date: Thu, 28 Mar 2024 09:13:34 -0400 Subject: [PATCH 09/19] Update xinitrc (#1402) --- .config/x11/xinitrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc index e99da8cc..b183f251 100755 --- a/.config/x11/xinitrc +++ b/.config/x11/xinitrc @@ -15,4 +15,4 @@ else fi # Activate dbus variables dbus-update-activation-environment --all -ssh-agent dwm +dbus-launch ssh-agent dwm From b545443993b1fed2665a9359033ccd2fea5efb8f Mon Sep 17 00:00:00 2001 From: fennomaani <160141733+fennomaani@users.noreply.github.com> Date: Sat, 11 May 2024 15:35:28 +0300 Subject: [PATCH 10/19] Save command to history before it is executed (#1409) --- .config/zsh/.zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index c46f51d8..8af5d134 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -11,6 +11,7 @@ setopt interactive_comments HISTSIZE=10000000 SAVEHIST=10000000 HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history" +setopt inc_append_history # Load aliases and shortcuts if existent. [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" From 92f9fc458cb6ed9287f59df3eb0b5daee5468c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20AKY=C3=9CZ?= Date: Sat, 11 May 2024 15:39:43 +0300 Subject: [PATCH 11/19] [getcomproot] - fix | minimize | posix compliance (#1388) --- .local/bin/getcomproot | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.local/bin/getcomproot b/.local/bin/getcomproot index d34a2e42..dbee3482 100755 --- a/.local/bin/getcomproot +++ b/.local/bin/getcomproot @@ -1,12 +1,9 @@ -#!/bin/bash +#!/bin/sh # A helper script for LaTeX/groff files used by `compiler` and `opout`. # The user can add the root file of a larger project as a comment as below: # % root = mainfile.tex # And the compiler script will run on that instead of the opened file. -texroot="$(grep -i "^.\+\s*root\s*=\s*\S\+" "$1")" -texroot="${texroot##*=}" -texroot="${texroot//[\"\' ]}" - -[ -f "$texroot" ] && readlink -f "$texroot" || exit 1 +texroot="$(sed -n 's/^\s*%.*root\s*=\s*\(\S\+\).*/\1/p' "${1}")" +[ -f "${texroot}" ] && readlink -f "${texroot}" || exit "1" From f1915e71e559b6171c478a62f9016554d5081787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20AKY=C3=9CZ?= Date: Sat, 11 May 2024 15:41:19 +0300 Subject: [PATCH 12/19] [compiler] - streamline | simplify | minimize (#1389) * [compiler] - streamline | simplify | minimize * Update compiler --- .local/bin/compiler | 83 +++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 45 deletions(-) diff --git a/.local/bin/compiler b/.local/bin/compiler index 8420e25f..57135906 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -2,58 +2,51 @@ # This script will compile or run another finishing operation on a document. I # have this script run via vim. -# + # Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent # presentations. Runs scripts based on extension or shebang. -# + # Note that .tex files which you wish to compile with XeLaTeX should have the # string "xelatex" somewhere in a comment/command in the first 5 lines. -file=$(readlink -f "$1") +file="${1}" +ext="${file##*.}" dir=${file%/*} base="${file%.*}" -ext="${file##*.}" -cd "$dir" || exit 1 +cd "${dir}" || exit "1" -textype() { \ - textarget="$(getcomproot "$file" || echo "$file")" - echo "$textarget" - command="pdflatex" - ( head -n5 "$textarget" | grep -qi 'xelatex' ) && command="xelatex" - $command --output-directory="${textarget%/*}" "${textarget%.*}" - grep -qi addbibresource "$textarget" && - biber --input-directory "${textarget%/*}" "${textarget%.*}" && - $command --output-directory="${textarget%/*}" "${textarget%.*}" && - $command --output-directory="${textarget%/*}" "${textarget%.*}" -} - -case "$ext" in - # Try to keep these cases in alphabetical order. - [0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; - c) cc "$file" -o "$base" && "$base" ;; - cpp) g++ "$file" -o "$base" && "$base" ;; - cs) mcs "$file" && mono "$base".exe ;; - go) go run "$file" ;; - h) sudo make install ;; - java) javac -d classes "$file" && java -cp classes "${1%.*}" ;; - m) octave "$file" ;; - md) if [ -x "$(command -v lowdown)" ]; then - lowdown --parse-no-intraemph "$file" -Tms | groff -mpdfmark -ms -kept -T pdf > "$base".pdf - elif [ -x "$(command -v groffdown)" ]; then - groffdown -i "$file" | groff -T pdf > "$base".pdf - else - pandoc -t ms --highlight-style=kate -s -o "$base".pdf "$file" - fi ; ;; - mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;; - ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;; - org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;; - py) python "$file" ;; - [rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; - rs) cargo build ;; - sass) sassc -a "$file" "$base".css ;; - scad) openscad -o "$base".stl "$file" ;; - sent) setsid -f sent "$file" 2>/dev/null ;; - tex) textype "$file" ;; - *) sed -n '/^#!/s/^#!//p; q' "$file" | xargs -r -I % "$file" ;; +case "${ext}" in + [0-9]) preconv "${file}" | refer -PS -e | groff -mandoc -T pdf > "${base}.pdf" ;; + mom|ms) preconv "${file}" | refer -PS -e | groff -T pdf -m"${ext}" > "${base}.pdf" ;; + c) cc "${file}" -o "${base}" && "./${base}" ;; + cpp) g++ "${file}" -o "${base}" && "./${base}" ;; + cs) mcs "${file}" && mono "${base}.exe" ;; + go) go run "${file}" ;; + h) sudo make install ;; + java) javac -d classes "${file}" && java -cp classes "${base}" ;; + m) octave "${file}" ;; + md) [ -x "$(command -v lowdown)" ] && \ + lowdown --parse-no-intraemph "${file}" -Tms | groff -mpdfmark -ms -kept -T pdf > "${base}.pdf" || \ + [ -x "$(command -v groffdown)" ] && \ + groffdown -i "${file}" | groff -T pdf > "${base}.pdf" || \ + pandoc -t ms --highlight-style="kate" -s -o "${base}.pdf" "${file}" ;; + org) emacs "${file}" --batch -u "${USER}" -f org-latex-export-to-pdf ;; + py) python "${file}" ;; + [rR]md) Rscript -e "rmarkdown::render('${file}', quiet=TRUE)" ;; + rs) cargo build ;; + sass) sassc -a "${file}" "${base}.css" ;; + scad) openscad -o "${base}.stl" "${file}" ;; + sent) setsid -f sent "${file}" 2> "/dev/null" ;; + tex) + textarget="$(getcomproot "${file}" || echo "${file}")" + command="pdflatex" + head -n5 "${textarget}" | grep -qi "xelatex" && command="xelatex" + ${command} --output-directory="${textarget%/*}" "${textarget%.*}" && + grep -qi addbibresource "${textarget}" && + biber --input-directory "${textarget%/*}" "${textarget%.*}" && + ${command} --output-directory="${textarget%/*}" "${textarget%.*}" && + ${command} --output-directory="${textarget%/*}" "${textarget%.*}" + ;; + *) sed -n '/^#!/s/^#!//p; q' "${file}" | xargs -r -I % "${file}" ;; esac From dd6eb3746958acb99e1262467bca85696b67d31e Mon Sep 17 00:00:00 2001 From: Alessio Artoni <34690870+aartoni@users.noreply.github.com> Date: Sat, 11 May 2024 14:42:22 +0200 Subject: [PATCH 13/19] Remove unused vim configs and shortcuts (#1385) Remove: ranger shortcuts, "nocompatible", plain Vim support for NERDTreeBookmarksFile and vimling configuration. --- .config/nvim/init.vim | 16 ++-------------- .local/bin/shortcuts | 5 +---- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8346777b..8f6d0d7e 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -34,7 +34,6 @@ set noshowcmd " Some basics: nnoremap c "_c - set nocompatible filetype plugin on syntax on set encoding=utf-8 @@ -55,22 +54,11 @@ set noshowcmd " Nerd tree map n :NERDTreeToggle autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif - if has('nvim') - let NERDTreeBookmarksFile = stdpath('data') . '/NERDTreeBookmarks' - else - let NERDTreeBookmarksFile = '~/.vim' . '/NERDTreeBookmarks' - endif + let NERDTreeBookmarksFile = stdpath('data') . '/NERDTreeBookmarks' -" vimling: - nm d :call ToggleDeadKeys() - imap d :call ToggleDeadKeys()a - nm i :call ToggleIPA() - imap i :call ToggleIPA()a - nm q :call ToggleProse() - " vim-airline if !exists('g:airline_symbols') - let g:airline_symbols = {} + let g:airline_symbols = {} endif let g:airline_symbols.colnr = ' C:' let g:airline_symbols.linenr = ' L:' diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts index 7d7a1904..0c7cf75d 100755 --- a/.local/bin/shortcuts +++ b/.local/bin/shortcuts @@ -8,13 +8,12 @@ shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc" vim_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/nvim/shortcuts.vim" -ranger_shortcuts="/dev/null" qute_shortcuts="/dev/null" fish_shortcuts="/dev/null" vifm_shortcuts="/dev/null" # Remove, prepare files -rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null +rm -f "$lf_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null printf "# vim: filetype=sh\\n" > "$fish_shortcuts" printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts" printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts" @@ -27,7 +26,6 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); printf(\"abbr %s \42cd %s; and ls -A\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ; printf(\"map g%s :cd %s\nmap t%s :cd %s\nmap M%s :cd %s:mo\nmap Y%s :cd %s:co \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ; printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ; - printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ; printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }" @@ -38,6 +36,5 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ; printf(\"map %s :e %s \n\",\$1,\$2) >> \"$vifm_shortcuts\" ; - printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ; printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }" From 5c8d46a4e7c68e0c4b359ce35efcf7cd8b4dd721 Mon Sep 17 00:00:00 2001 From: TheYellowArchitect Date: Sat, 11 May 2024 12:53:48 +0000 Subject: [PATCH 14/19] Added 5 new mappings, 3 of which pipe to clipboard (#1373) 1. Copies the selected filename instead of the filepath, and pipes it to clipboard. 2. Copies the selected filename and if it matches the yt-dlp downloaded video format [1234567891011], gets the full youtube URL and pipes it to clipboard. 3. Copies the selected filename and if it matches the yt-dlp downloaded video format [1234567891011], gets the full piped.video URL and pipes it to the clipboard. (piped.video is a mirror of youtube, even includes comments) 4. Opens current folder in full picture mode. Think windows large icons mode. Good for browsing quickly through image albums. 5. Ctrl+l to unselect all selections so the behaviour matches the terminal. --- .config/lf/lfrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index e783d728..bb15c62d 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -162,7 +162,14 @@ map V push :!nvim map W $setsid -f $TERMINAL >/dev/null 2>&1 -map Y $printf "%s" "$fx" | xclip -selection clipboard +map U $printf "%s" "$fx" | xclip -selection clipboard +map u $printf "%s" "$fx" | sed 's/.*\///' | xclip -selection clipboard +map . $printf "%s" "$fx" | sed -E 's/^.+\[/https:\/\/www.youtube.com\/watch?v=/' | sed -E 's/\]\..+//' | xclip -selection clipboard +map $printf "%s" "$fx" | sed -E 's/^.+\[/https:\/\/piped.video\/watch?v=/' | sed -E 's/\]\..+//' | xclip -selection clipboard +map T $sxiv -t "$(pwd)" # opens thumbnail mode +map unselect + + # Source Bookmarks source "~/.config/lf/shortcutrc" From 97687287bdfd332398b82a196b5f1feaec73f1d7 Mon Sep 17 00:00:00 2001 From: David Nevado Date: Sat, 11 May 2024 14:54:21 +0200 Subject: [PATCH 15/19] fix: grep pattern to avoid unintended matches (#1383) added `^` and `$` to the pattern used in `grep -v` in order to avoid matching displays whose name contains some other display name. e.g ("DPI", "eDPI") --- .local/bin/displayselect | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/displayselect b/.local/bin/displayselect index 0227a32b..51dd4683 100755 --- a/.local/bin/displayselect +++ b/.local/bin/displayselect @@ -32,7 +32,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens. else primary=$(echo "$screens" | dmenu -i -p "Select primary display:") - secondary=$(echo "$screens" | grep -v "$primary") + secondary=$(echo "$screens" | grep -v ^"$primary"$) direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?") xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0 fi @@ -40,9 +40,9 @@ twoscreen() { # If multi-monitor is selected and there are two screens. morescreen() { # If multi-monitor is selected and there are more than two screens. primary=$(echo "$screens" | dmenu -i -p "Select primary display:") - secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:") + secondary=$(echo "$screens" | grep -v ^"$primary"$ | dmenu -i -p "Select secondary display:") direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?") - tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:") + tertiary=$(echo "$screens" | grep -v ^"$primary"$ | grep -v ^"$secondary"$ | dmenu -i -p "Select third display:") xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto } From db8ee0df793246ed99152c490d29cdd21d45ed12 Mon Sep 17 00:00:00 2001 From: Tri Asep Tumbara <57649797+triaseptmbr@users.noreply.github.com> Date: Sat, 11 May 2024 19:55:29 +0700 Subject: [PATCH 16/19] Fix the problem when taking a screenshot of the lf window (#1398) Without -B option, the result of the screenshot is a blank picture. --- .local/bin/maimpick | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/maimpick b/.local/bin/maimpick index 5de26c17..77175012 100755 --- a/.local/bin/maimpick +++ b/.local/bin/maimpick @@ -10,7 +10,7 @@ xclip_cmd="xclip -sel clip -t image/png" case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in "a selected area") maim -u -s pic-selected-"${output}" ;; - "current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;; + "current window") maim -B -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;; "full screen") maim -q -d 0.2 pic-full-"${output}" ;; "a selected area (copy)") maim -u -s | ${xclip_cmd} ;; "current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;; From 97f2fa3872da7b173daa9650d747a25ee41fc47f Mon Sep 17 00:00:00 2001 From: Stepan Chernov <58429587+pikodd@users.noreply.github.com> Date: Sat, 11 May 2024 15:56:27 +0300 Subject: [PATCH 17/19] Update sb-clock to fix display issue (#1380) Co-authored-by: Stepan Chernov --- .local/bin/statusbar/sb-clock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/sb-clock b/.local/bin/statusbar/sb-clock index ac12aac1..85f1d345 100755 --- a/.local/bin/statusbar/sb-clock +++ b/.local/bin/statusbar/sb-clock @@ -19,7 +19,7 @@ case "$clock" in esac case $BLOCK_BUTTON in - 1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e')\>/&<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; + 1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e'|sed 's/ //g')\>/&<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; 2) setsid -f "$TERMINAL" -e calcurse ;; 3) notify-send "πŸ“… Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` - Middle click opens calcurse if installed" ;; From 1f7376c805cb57daef05713412f8e562141eead8 Mon Sep 17 00:00:00 2001 From: poeplva <132710624+poeplva@users.noreply.github.com> Date: Sat, 11 May 2024 14:22:52 +0000 Subject: [PATCH 18/19] Corrects "application/octet-stream is for arbitrary binary files" (#1337) * Corrects the syntax error in "application/octet-stream is for arbitrary binary files" #1321 had a syntax error, this commit correct it. * Update lfrc support for ts --- .config/lf/lfrc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index bb15c62d..320f9bd5 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -30,7 +30,7 @@ set autoquit true cmd open ${{ case $(file --mime-type "$(readlink -f $f)" -b) in application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;; - image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;; + image/vnd.djvu|application/pdf|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;; text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;; image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;; image/svg+xml) display -- $f ;; @@ -45,8 +45,14 @@ cmd open ${{ video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;; application/pdf|application/vnd.djvu|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;; application/pgp-encrypted) $EDITOR $fx ;; - application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text|application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/octet-stream|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.openxmlformats-officedocument.presentationml.presentation|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 libreoffice $fx >/dev/null 2>&1 ;; - *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;; + application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text|application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.openxmlformats-officedocument.presentationml.presentation|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 libreoffice $fx >/dev/null 2>&1 ;; + application/octet-stream) 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 ;; + *) setsid -f zathura $fx >/dev/null 2>&1 ;; + esac ;; + *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;; esac }} From db6ee8f8197dec0d0e3333f9c912bef38387a3e7 Mon Sep 17 00:00:00 2001 From: Ryan F <65836248+public-void-ryan@users.noreply.github.com> Date: Thu, 23 May 2024 11:42:08 -0500 Subject: [PATCH 19/19] map gh fix (#1414) map gh doesn't do anything because it doesn't recognize multi-letter commands. mapping H to cd to ~ --- .config/lf/lfrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 320f9bd5..fb43a051 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -139,7 +139,7 @@ cmd bulkrename ${{ # Bindings map $lf -remote "send $id select \"$(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 H cd ~ map g top map D delete map E extract