From e008bbee2a47197ee79ca545706917e16843d56e Mon Sep 17 00:00:00 2001 From: Dennis Lee Date: Sat, 11 Apr 2020 18:35:05 -0700 Subject: [PATCH 1/7] xprofile: tell Qt to use the GTK2 theme --- .config/xprofile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/xprofile b/.config/xprofile index 92861d1..662cc32 100755 --- a/.config/xprofile +++ b/.config/xprofile @@ -19,3 +19,6 @@ xcompmgr & # xcompmgr for transparency dunst & # dunst for notifications xset r rate 300 50 & # Speed xrate up unclutter & # Remove mouse when idle + +# program settings: +export QT_QPA_PLATFORMTHEME="gtk2" From 37637b20305256d82e29e6850b90fd5c7dfc85bc Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 12 Apr 2020 09:17:20 -0400 Subject: [PATCH 2/7] mpd cleanup --- .config/mpd/mpd.conf | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf index ee7ed17..c635183 100644 --- a/.config/mpd/mpd.conf +++ b/.config/mpd/mpd.conf @@ -1,26 +1,19 @@ -db_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/database" -log_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/log" -music_directory "~/Music" -playlist_directory "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/playlists" -pid_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/pid" -state_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/state" -sticker_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/sticker.sql" +music_directory "~/Music" +playlist_directory "~/.config/mpd/playlists" auto_update "yes" - bind_to_address "127.0.0.1" restore_paused "yes" max_output_buffer_size "16384" audio_output { type "alsa" - name "alsa for audio soundcard" - mixer_type "software" + name "ALSA" } audio_output { -type "fifo" -name "toggle_visualizer" -path "/tmp/mpd.fifo" -format "44100:16:2" + type "fifo" + name "Visualizer feed" + path "/tmp/mpd.fifo" + format "44100:16:2" } From b77dc80c37cb3f43564e927dbe12a68756503f5b Mon Sep 17 00:00:00 2001 From: Dennis Lee Date: Sun, 12 Apr 2020 08:26:47 -0700 Subject: [PATCH 3/7] move qt use gtk theme from xprofile to profile --- .profile | 1 + 1 file changed, 1 insertion(+) diff --git a/.profile b/.profile index 7edd637..7f3a920 100644 --- a/.profile +++ b/.profile @@ -41,6 +41,7 @@ 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" # This is the list for lf icons: export LF_ICONS="di=📁:\ From 6491129dbb654e248df75f289ccf37a82cfab1f2 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 12 Apr 2020 23:49:42 -0400 Subject: [PATCH 4/7] bat script changes for better statusbar --- .local/bin/statusbar/battery | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index 65152f7..981fc3a 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -22,6 +22,6 @@ do # If it is discharging and 25% or less, we will add a ❗ as a warning. [ "$capacity" -le 25 ] && [ "$status" = "🔋" ] && warn="❗" - printf "%s%s%s%%\n" "$status" "$warn" "$capacity" + printf "%s%s%s%% " "$status" "$warn" "$capacity" unset warn -done +done | sed s/\ $/\\n/ From 64b8f085636776e4ab1dad091711a3e8a22a8076 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 13 Apr 2020 01:38:59 -0400 Subject: [PATCH 5/7] statusbar tweaks/updates for dwmblocks --- .local/bin/statusbar/cpu | 5 +++-- .local/bin/statusbar/help | 14 +++++++++++--- .local/bin/statusbar/memory | 4 +++- .local/bin/statusbar/pacpackages | 8 ++++---- .local/bin/statusbar/weather | 2 +- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.local/bin/statusbar/cpu b/.local/bin/statusbar/cpu index 5b5528e..bd0c77a 100755 --- a/.local/bin/statusbar/cpu +++ b/.local/bin/statusbar/cpu @@ -1,10 +1,11 @@ #!/bin/sh case $BLOCK_BUTTON in - 1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" ;; + 1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\\n(100% per core)" ;; + 2) setsid "$TERMINAL" -e htop & ;; 3) notify-send "🖥 CPU module " "\- Shows CPU temperature. - Click to show intensive processes. -- % is of single core." ;; +- Middle click to open htop." ;; esac sensors | awk '/Core 0/ {print "🌡", $3}' diff --git a/.local/bin/statusbar/help b/.local/bin/statusbar/help index 70ca383..4d8e3c2 100755 --- a/.local/bin/statusbar/help +++ b/.local/bin/statusbar/help @@ -1,8 +1,16 @@ #!/bin/sh +# The clickable help menu. Middle click to restart wm. + +# If dwm is running, use dwm's readme and restart. +ps ax | grep -q "\sdwm$" && + READMEFILE=/usr/local/share/dwm/larbs.mom + restartwm() { pkill -HUP dwm ;} || + restartwm() { i3 restart ;} + case $BLOCK_BUTTON in - 1) groff -mom ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura - ;; - 2) i3 restart ;; + 1) groff -mom "${READMEFILE:-${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom}" -Tpdf | zathura - ;; + 2) restartwm ;; 3) notify-send "❓ Help module" "\- Left click to open LARBS guide. -- Middle click to refresh i3.";; +- Middle click to refresh window manager.";; esac; echo "❓" diff --git a/.local/bin/statusbar/memory b/.local/bin/statusbar/memory index 25a2958..dce5268 100755 --- a/.local/bin/statusbar/memory +++ b/.local/bin/statusbar/memory @@ -2,8 +2,10 @@ case $BLOCK_BUTTON in 1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;; + 2) setsid "$TERMINAL" -e htop & ;; 3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total. -- Click to show memory hogs." ;; +- Click to show memory hogs. +- Middle click to open htop." ;; esac free -h | sed -n '2{p;q}' | awk '{print "🧠", $3 "/" $2}' diff --git a/.local/bin/statusbar/pacpackages b/.local/bin/statusbar/pacpackages index 6f439cc..49ba319 100755 --- a/.local/bin/statusbar/pacpackages +++ b/.local/bin/statusbar/pacpackages @@ -15,14 +15,14 @@ # [Action] # Description = Updating statusbar... # When = PostTransaction -# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks +# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3. case $BLOCK_BUTTON in - 1) $TERMINAL -e popupgrade ;; + 1) setsid "$TERMINAL" -e popupgrade & ;; 2) notify-send "$(/usr/bin/pacman -Qu)" ;; - 3) notify-send "Upgrade module" "📦: number of upgradable packages + 3) notify-send "🎁 Upgrade module" "📦: number of upgradable packages - Left click to upgrade packages - Middle click to show upgradable packages" ;; esac -pacman -Qu | grep -v "\[ignored\]" | wc -l | sed "s/^/📦/;s/^📦0$//g" +pacman -Qu | grep -cv "\[ignored\]" | sed "s/^/📦/;s/^📦0$//g" diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather index 853d262..875259c 100755 --- a/.local/bin/statusbar/weather +++ b/.local/bin/statusbar/weather @@ -18,7 +18,7 @@ sed '13q;d' "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" | grep -o "m\\( # The BLOCK_BUTTON bloat for clicking in i3. case $BLOCK_BUTTON in - 1) $TERMINAL -e less -Srf "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" ;; + 1) setsid "$TERMINAL" -e less -Srf "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" & ;; 2) getforecast && showweather ;; 3) notify-send "🌈 Weather module" "\- Left click for full forecast. - Middle click to update forecast. From 203930c326ba04ff41df30328eefeb6dcc878abd Mon Sep 17 00:00:00 2001 From: vired <62380689+vired@users.noreply.github.com> Date: Mon, 13 Apr 2020 17:09:32 +0600 Subject: [PATCH 6/7] autocmd to delete newlines at end of file on save. (#563) --- .config/nvim/init.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 5b1605d..c0078e1 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -103,8 +103,9 @@ set clipboard+=unnamedplus autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x! autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q! -" Automatically deletes all trailing whitespace on save. +" Automatically deletes all trailing whitespace and newlines at end of file on save. autocmd BufWritePre * %s/\s\+$//e + autocmd BufWritepre * %s/\n\+\%$//e " When shortcut files are updated, renew bash and ranger configs with new material: autocmd BufWritePost files,directories !shortcuts From 24d9df2709f2c6262906a2e58a821d332a94b6a2 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 13 Apr 2020 07:20:05 -0400 Subject: [PATCH 7/7] clean --- .config/xprofile | 3 --- .profile | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.config/xprofile b/.config/xprofile index 662cc32..92861d1 100755 --- a/.config/xprofile +++ b/.config/xprofile @@ -19,6 +19,3 @@ xcompmgr & # xcompmgr for transparency dunst & # dunst for notifications xset r rate 300 50 & # Speed xrate up unclutter & # Remove mouse when idle - -# program settings: -export QT_QPA_PLATFORMTHEME="gtk2" diff --git a/.profile b/.profile index 7f3a920..f7a12c5 100644 --- a/.profile +++ b/.profile @@ -41,7 +41,8 @@ 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" +export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme. +export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads. # This is the list for lf icons: export LF_ICONS="di=📁:\