summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/Xresources156
-rwxr-xr-x.local/bin/ext3
-rwxr-xr-x.local/bin/samedir6
-rwxr-xr-x.local/bin/statusbar/battery10
-rwxr-xr-x.local/bin/statusbar/pacpackages16
-rwxr-xr-x.local/bin/statusbar/weather6
-rw-r--r--.profile4
-rw-r--r--.xprofile2
8 files changed, 186 insertions, 17 deletions
diff --git a/.config/Xresources b/.config/Xresources
new file mode 100644
index 0000000..611f39a
--- /dev/null
+++ b/.config/Xresources
@@ -0,0 +1,156 @@
+!! Transparency (0-1):
+*.alpha: 0.8
+
+!! Set a default font and font size as below:
+*.font: monospace:size=10
+
+/* name dark light */
+/* black 0 8 */
+/* red 1 9 */
+/* green 2 10 */
+/* yellow 3 11 */
+/* blue 4 12 */
+/* purple 5 13 */
+/* cyan 6 14 */
+/* white 7 15 */
+
+/* !! gruvbox: */
+/* *.color0: #1d2021 */
+/* *.color1: #cc241d */
+/* *.color2: #98971a */
+/* *.color3: #d79921 */
+/* *.color4: #458588 */
+/* *.color5: #b16286 */
+/* *.color6: #689d6a */
+/* *.color7: #a89984 */
+/* *.color8: #928374 */
+/* *.color9: #fb4934 */
+/* *.color10: #b8bb26 */
+/* *.color11: #fabd2f */
+/* *.color12: #83a598 */
+/* *.color13: #d3869b */
+/* *.color14: #8ec07c */
+/* *.color15: #ebdbb2 */
+/* *.color256: #1d2021 */
+/* *.color257: #ebdbb2 */
+
+/* !! gruvbox light: */
+/* *.color0: #fbf1c7 */
+/* *.color1: #cc241d */
+/* *.color2: #98971a */
+/* *.color3: #d79921 */
+/* *.color4: #458588 */
+/* *.color5: #b16286 */
+/* *.color6: #689d6a */
+/* *.color7: #7c6f64 */
+/* *.color8: #928374 */
+/* *.color9: #9d0006 */
+/* *.color10: #79740e */
+/* *.color11: #b57614 */
+/* *.color12: #076678 */
+/* *.color13: #8f3f71 */
+/* *.color14: #427b58 */
+/* *.color15: #3c3836 */
+/* *.background: #fbf1c7 */
+/* *.foreground: #282828 */
+/* st.alpha: 0.9 */
+
+/* !! brogrammer: */
+/* *.foreground: #d6dbe5 */
+/* *.background: #131313 */
+/* *.color0: #1f1f1f */
+/* *.color8: #d6dbe5 */
+/* *.color1: #f81118 */
+/* *.color9: #de352e */
+/* *.color2: #2dc55e */
+/* *.color10: #1dd361 */
+/* *.color3: #ecba0f */
+/* *.color11: #f3bd09 */
+/* *.color4: #2a84d2 */
+/* *.color12: #1081d6 */
+/* *.color5: #4e5ab7 */
+/* *.color13: #5350b9 */
+/* *.color6: #1081d6 */
+/* *.color14: #0f7ddb */
+/* *.color7: #d6dbe5 */
+/* *.color15: #ffffff */
+/* *.colorBD: #d6dbe5 */
+
+/* ! base16 */
+/* *.color0: #181818 */
+/* *.color1: #ab4642 */
+/* *.color2: #a1b56c */
+/* *.color3: #f7ca88 */
+/* *.color4: #7cafc2 */
+/* *.color5: #ba8baf */
+/* *.color6: #86c1b9 */
+/* *.color7: #d8d8d8 */
+/* *.color8: #585858 */
+/* *.color9: #ab4642 */
+/* *.color10: #a1b56c */
+/* *.color11: #f7ca88 */
+/* *.color12: #7cafc2 */
+/* *.color13: #ba8baf */
+/* *.color14: #86c1b9 */
+/* *.color15: #f8f8f8 */
+
+/* !! solarized */
+/* *.color0: #073642 */
+/* *.color1: #dc322f */
+/* *.color2: #859900 */
+/* *.color3: #b58900 */
+/* *.color4: #268bd2 */
+/* *.color5: #d33682 */
+/* *.color6: #2aa198 */
+/* *.color7: #eee8d5 */
+/* *.color9: #cb4b16 */
+/* *.color8: #fdf6e3 */
+/* *.color10: #586e75 */
+/* *.color11: #657b83 */
+/* *.color12: #839496 */
+/* *.color13: #6c71c4 */
+/* *.color14: #93a1a1 */
+/* *.color15: #fdf6e3 */
+
+/* !! xterm */
+/* *.color0: #000000 */
+/* *.color1: #cd0000 */
+/* *.color2: #00cd00 */
+/* *.color3: #cdcd00 */
+/* *.color4: #0000cd */
+/* *.color5: #cd00cd */
+/* *.color6: #00cdcd */
+/* *.color7: #e5e5e5 */
+/* *.color8: #4d4d4d */
+/* *.color9: #ff0000 */
+/* *.color10: #00ff00 */
+/* *.color11: #ffff00 */
+/* *.color12: #0000ff */
+/* *.color13: #ff00ff */
+/* *.color14: #00ffff */
+/* *.color15: #aabac8 */
+/* *.background: #000000 */
+
+/* ! Dracula Xresources palette */
+/* *.foreground: #F8F8F2 */
+/* *.background: #282A36 */
+/* *.color0: #000000 */
+/* *.color8: #4D4D4D */
+/* *.color1: #FF5555 */
+/* *.color9: #FF6E67 */
+/* *.color2: #50FA7B */
+/* *.color10: #5AF78E */
+/* *.color3: #F1FA8C */
+/* *.color11: #F4F99D */
+/* *.color4: #BD93F9 */
+/* *.color12: #CAA9FA */
+/* *.color5: #FF79C6 */
+/* *.color13: #FF92D0 */
+/* *.color6: #8BE9FD */
+/* *.color14: #9AEDFE */
+/* *.color7: #BFBFBF */
+/* *.color15: #E6E6E6 */
+
+/* *.background: .color0 */
+/* *.color256: 0#1d2021 */
+/* *.color257: 15#ebdbb2 */
diff --git a/.local/bin/ext b/.local/bin/ext
index c2e0f5c..c5f89c5 100755
--- a/.local/bin/ext
+++ b/.local/bin/ext
@@ -24,7 +24,8 @@ fi
if [ -f "$archive" ] ; then
case "$archive" in
- *.tar.bz2|*.tar.xz|*.tbz2) tar xvjf "$archive" ;;
+ *.tar.bz2|*.tbz2) tar xvjf "$archive" ;;
+ *.tar.xz) tar -xf "$archive" ;;
*.tar.gz|*.tgz) tar xvzf "$archive" ;;
*.lzma) unlzma "$archive" ;;
*.bz2) bunzip2 "$archive" ;;
diff --git a/.local/bin/samedir b/.local/bin/samedir
index 740dcfc..73facfd 100755
--- a/.local/bin/samedir
+++ b/.local/bin/samedir
@@ -1,6 +1,8 @@
#!/bin/sh
+# 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=$(echo "$(pstree -lpA "$PID" | tail -n 1)" | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')
-cd "$(readlink /proc/"$PID"/cwd)"
+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"
diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery
index d9506f0..e8b0554 100755
--- a/.local/bin/statusbar/battery
+++ b/.local/bin/statusbar/battery
@@ -11,8 +11,10 @@ case $BLOCK_BUTTON in
- Text color reflects charge left" ;;
esac
-capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
-status=$(cat /sys/class/power_supply/"$1"/status)
+for battery in /sys/class/power_supply/BAT?
+do
+capacity=$(cat "$battery"/capacity) || exit
+status=$(cat "$battery"/status)
if [ "$capacity" -ge 75 ]; then
color="#00ff00"
@@ -29,4 +31,6 @@ fi
[ "$status" = "Charging" ] && color="#ffffff"
-printf "<span color='%s'>%s%s%s</span>\n" "$color" "$(echo "$status" | sed -e "s/,//;s/Discharging/🔋/;s/Not charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')"
+printf "%s%s%s\n" "$(echo "$status" | sed "s/,//;s/Discharging/🔋/;s/Not charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')"
+done
+
diff --git a/.local/bin/statusbar/pacpackages b/.local/bin/statusbar/pacpackages
index 418bc2d..4273c86 100755
--- a/.local/bin/statusbar/pacpackages
+++ b/.local/bin/statusbar/pacpackages
@@ -1,10 +1,21 @@
#!/bin/sh
-# i3blocks module for pacman upgrades.
# Displays number of upgradeable packages.
# For this to work, have a `pacman -Sy` command run in the background as a
# cronjob every so often as root. This script will then read those packages.
# When clicked, it will run an upgrade via pacman.
+#
+# Add the following text as a file in /usr/share/libalpm/hooks/statusbar.hook:
+#
+# [Trigger]
+# Operation = Upgrade
+# Type = Package
+# Target = *
+#
+# [Action]
+# Description = Updating statusbar...
+# When = PostTransaction
+# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks
case $BLOCK_BUTTON in
1) $TERMINAL -e popupgrade ;;
@@ -14,5 +25,4 @@ case $BLOCK_BUTTON in
- Middle click to show upgradable packages" ;;
esac
-
-pacman -Qu | grep -v "\[ignored\]" | wc -l | sed -e "s/^0$//g"
+pacman -Qu | grep -v "\[ignored\]" | wc -l | sed "s/^/📦/;s/^📦0$//g"
diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather
index 4a11673..dc33cb9 100755
--- a/.local/bin/statusbar/weather
+++ b/.local/bin/statusbar/weather
@@ -1,12 +1,10 @@
#!/bin/sh
-location="$1"; [ -z "$location" ] || { location="$location+" && rm -f "$HOME/.local/share/weatherreport" ;}
-
getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1
-curl -s "wttr.in/$location" > "$HOME/.local/share/weatherreport" || exit 1 ;}
+curl -sf "wttr.in/$LOCATION" > "$HOME/.local/share/weatherreport" || exit 1 ;}
showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')"
-sed '13q;d' "$HOME/.local/share/weatherreport" | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}' ;}
+sed '13q;d' "$HOME/.local/share/weatherreport" | grep -o "m\\(-+\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}' ;}
case $BLOCK_BUTTON in
1) $TERMINAL -e less -S "$HOME/.local/share/weatherreport" ;;
diff --git a/.profile b/.profile
index bb226b0..53cb8de 100644
--- a/.profile
+++ b/.profile
@@ -12,7 +12,7 @@ export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="brave"
export READER="zathura"
-export FILE="ranger"
+export FILE="lf"
export STATUSBAR="${LARBSWM}blocks"
# ~/ Clean-up:
@@ -38,8 +38,6 @@ export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
-mpd >/dev/null 2>&1 &
-
[ ! -f ~/.config/shortcutrc ] && shortcuts >/dev/null 2>&1
# Start graphical server on tty1 if not already running.
diff --git a/.xprofile b/.xprofile
index 321a5de..9812f45 100644
--- a/.xprofile
+++ b/.xprofile
@@ -7,6 +7,7 @@
# Add this when you include flatpak in your system
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
+mpd & # music player daemon-you might prefer it as a service though
remaps & # run the remaps script, switching caps/esc and more; check it for more info
setbg & # set the background with the `setbg` script
xcompmgr & # xcompmgr for transparency
@@ -15,4 +16,3 @@ dunst & # dunst for notifications
xset r rate 300 50 & # Speed xrate up
unclutter & # Remove mouse when idle
mpd-module-update & # Check for when to update the mpd module
-notify-send -i ~/.local/share/larbs/larbs.png "Welcome to LARBS" "Press super+F1 for the help menu." # LARBSWELCOME