summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-04-08 19:06:11 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-04-08 19:06:11 -0400
commit7f334ff4b902e7cfbc8cb824e59510b752e7a754 (patch)
tree2a03dbd10f2beb3143b58e1f3f5ad457f2c9bd7b
parent0948cd95f3dec7694186fb4fbe31a3c46289f7a0 (diff)
downloadeibhear-7f334ff4b902e7cfbc8cb824e59510b752e7a754.tar.gz
eibhear-7f334ff4b902e7cfbc8cb824e59510b752e7a754.tar.zst
eibhear-7f334ff4b902e7cfbc8cb824e59510b752e7a754.zip
oops, sed error
-rw-r--r--.config/aliasrc2
-rw-r--r--.config/i3/config2
-rw-r--r--.config/ncmpcpp/config2
-rw-r--r--.config/sxhkd/sxhkdrc4
-rwxr-xr-x.local/bin/dmenuunicode2
-rwxr-xr-x.local/bin/getkeys4
-rwxr-xr-x.local/bin/i3cmds/toggle-welcome2
-rwxr-xr-x.local/bin/podentr2
-rwxr-xr-x.local/bin/queueandnotify2
-rwxr-xr-x.local/bin/statusbar/help2
-rwxr-xr-x.local/bin/statusbar/mailbox2
-rwxr-xr-x.local/bin/statusbar/weather10
-rw-r--r--.profile10
13 files changed, 23 insertions, 23 deletions
diff --git a/.config/aliasrc b/.config/aliasrc
index 57b6f63..c30f25e 100644
--- a/.config/aliasrc
+++ b/.config/aliasrc
@@ -43,4 +43,4 @@ alias mpv="mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)"
alias \
magit="nvim -c MagitOnly" \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:$HOME/.config}/shortcutrc" \
- weath="less -S ${XDG_DATA_HOME:$HOME/.local/share}/weatherreport" \
+ weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
diff --git a/.config/i3/config b/.config/i3/config
index 36c8aba..ef8077f 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -222,7 +222,7 @@ for_window [title="mpvfloat"] border pixel 0
no_focus [title="mpvfloat"]
# #---Function Buttons---# #
-bindsym $mod+F1 exec --no-startup-id groff -mom ${XDG_DATA_HOME:$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura -
+bindsym $mod+F1 exec --no-startup-id groff -mom ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura -
bindsym $mod+F2 restart
bindsym $mod+F3 exec --no-startup-id displayselect
bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate"
diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config
index c9bcced..1e9f466 100644
--- a/.config/ncmpcpp/config
+++ b/.config/ncmpcpp/config
@@ -5,7 +5,7 @@ ncmpcpp_directory = ${XDG_CONFIG_HOME:$HOME/.config}/ncmpcpp
## MPD clients (eg. ncmpc) also use that location.
##
#
-lyrics_directory = ${XDG_DATA_HOME:$HOME/.local/share}/lyrics
+lyrics_directory = ${XDG_DATA_HOME:-$HOME/.local/share}/lyrics
#
##### connection settings #####
#
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
index a43e582..ffef0b4 100644
--- a/.config/sxhkd/sxhkdrc
+++ b/.config/sxhkd/sxhkdrc
@@ -137,10 +137,10 @@ XF86MyComputer
# Function keys
super + shift + F1
- grep LARBSWELCOME ~/.xprofile && ( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) || ( echo "notify-send -i "${XDG_DATA_HOME:$HOME/.local/share}/larbs/larbs.png" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> ~/.xprofile && notify-send "LARBS welcome message" "Welcome message re-enabled." )
+ grep LARBSWELCOME ~/.xprofile && ( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) || ( echo "notify-send -i "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/larbs.png" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> ~/.xprofile && notify-send "LARBS welcome message" "Welcome message re-enabled." )
# Show readme
super + F1
- groff -mom ${XDG_DATA_HOME:$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura -
+ groff -mom ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura -
# F2 restarts either dwm or i3 and is bound in each.
# Change display
super + F3
diff --git a/.local/bin/dmenuunicode b/.local/bin/dmenuunicode
index 6740be4..15799a3 100755
--- a/.local/bin/dmenuunicode
+++ b/.local/bin/dmenuunicode
@@ -5,7 +5,7 @@
# Must have xclip installed to even show menu.
xclip -h 2>/dev/null || exit 1
-chosen=$(cut -d ';' -f1 ${XDG_DATA_HOME:$HOME/.local/share}/larbs/emoji | dmenu -i -l 20 | sed "s/ .*//")
+chosen=$(cut -d ';' -f1 ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji | dmenu -i -l 20 | sed "s/ .*//")
[ "$chosen" != "" ] || exit
diff --git a/.local/bin/getkeys b/.local/bin/getkeys
index a1113f1..0a0e86e 100755
--- a/.local/bin/getkeys
+++ b/.local/bin/getkeys
@@ -1,5 +1,5 @@
#!/bin/sh
-cat ${XDG_DATA_HOME:$HOME/.local/share}/larbs/getkeys/"$1" 2>/dev/null && exit
+cat ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/getkeys/"$1" 2>/dev/null && exit
echo "Run command with one of the following arguments for info about that program:"
-ls ${XDG_DATA_HOME:$HOME/.local/share}/larbs/getkeys
+ls ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/getkeys
diff --git a/.local/bin/i3cmds/toggle-welcome b/.local/bin/i3cmds/toggle-welcome
index 1f08eb1..517c301 100755
--- a/.local/bin/i3cmds/toggle-welcome
+++ b/.local/bin/i3cmds/toggle-welcome
@@ -2,7 +2,7 @@
# Toggles the LARBS welcome message.
-PIC="${XDG_DATA_HOME:$HOME/.local/share}/larbs/larbs.png"
+PIC="${XDG_DATA_HOME:-$HOME/.local/share}/larbs/larbs.png"
grep LARBSWELCOME "$HOME/.xprofile" &&
( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send -i "$PIC" "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) ||
diff --git a/.local/bin/podentr b/.local/bin/podentr
index e2fec46..9a8313a 100755
--- a/.local/bin/podentr
+++ b/.local/bin/podentr
@@ -4,4 +4,4 @@
[ "$(pgrep -x $(basename $0) | wc -l)" -gt 2 ] && exit
-echo ${XDG_DATA_HOME:$HOME/.local/share}/newsboat/queue | entr -p queueandnotify 2>/dev/null
+echo ${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue | entr -p queueandnotify 2>/dev/null
diff --git a/.local/bin/queueandnotify b/.local/bin/queueandnotify
index 002c2a3..a54b13e 100755
--- a/.local/bin/queueandnotify
+++ b/.local/bin/queueandnotify
@@ -3,7 +3,7 @@
# Podboat sucks. This script replaces it.
# It reads the newsboat queue, queuing downloads with taskspooler.
# It also removes the junk from extentions.
-queuefile="${XDG_DATA_HOME:$HOME/.local/share}/newsboat/queue"
+queuefile="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue"
while read -r line; do
[ -z "$line" ] && continue
diff --git a/.local/bin/statusbar/help b/.local/bin/statusbar/help
index d05a90c..c1f1caa 100755
--- a/.local/bin/statusbar/help
+++ b/.local/bin/statusbar/help
@@ -1,7 +1,7 @@
#!/bin/sh
case $BLOCK_BUTTON in
- 1) groff -mom ${XDG_DATA_HOME:$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura - ;;
+ 1) groff -mom ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura - ;;
2) i3 restart ;;
3) pgrep -x dunst >/dev/null && notify-send "❓ Help module" "\- Left click to open LARBS guide.
- Middle click to refresh i3.";;
diff --git a/.local/bin/statusbar/mailbox b/.local/bin/statusbar/mailbox
index 28deb45..49630ad 100755
--- a/.local/bin/statusbar/mailbox
+++ b/.local/bin/statusbar/mailbox
@@ -13,7 +13,7 @@ case $BLOCK_BUTTON in
- Middle click syncs mail" ;;
esac
-unread="$(find ${XDG_DATA_HOME:$HOME/.local/share}/mail/*/INBOX/new/* -type f | wc -l 2>/dev/null)"
+unread="$(find ${XDG_DATA_HOME:-$HOME/.local/share}/mail/*/INBOX/new/* -type f | wc -l 2>/dev/null)"
icon="$(cat "/tmp/imapsyncicon_$USER")"
diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather
index 8c85857..59198a0 100755
--- a/.local/bin/statusbar/weather
+++ b/.local/bin/statusbar/weather
@@ -7,18 +7,18 @@
# You could set up a shell alias to view the full file in a pager in the
# terminal if desired. This function will only be run once a day when needed.
getforecast() { ping -q -c 1 1.1.1.1 >/dev/null &&
-curl -sf "wttr.in/$LOCATION" > "${XDG_DATA_HOME:$HOME/.local/share}/weatherreport" || exit 1 ;}
+curl -sf "wttr.in/$LOCATION" > "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" || exit 1 ;}
# Some very particular and terse stream manipulation. We get the maximum
# precipication chance and the daily high and low from the downloaded file and
# display them with coresponding emojis.
-showweather() { printf "%s" "$(sed '16q;d' "${XDG_DATA_HOME:$HOME/.local/share}/weatherreport" |
+showweather() { printf "%s" "$(sed '16q;d' "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" |
grep -wo "[0-9]*%" | sort -rn | sed "s/^/☔ /g;1q" | tr -d '\n')"
-sed '13q;d' "${XDG_DATA_HOME:$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' "${XDG_DATA_HOME:-$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 "°"}' ;}
# 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) $TERMINAL -e less -Srf "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" ;;
2) getforecast && showweather ;;
3) pgrep -x dunst >/dev/null && notify-send "🌈 Weather module" "\- Left click for full forecast.
- Middle click to update forecast.
@@ -29,7 +29,7 @@ esac
# The test if our forcecast is updated to the day. If it isn't download a new
# weather report from wttr.in with the above function.
-[ "$(stat -c %y "${XDG_DATA_HOME:$HOME/.local/share}/weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
+[ "$(stat -c %y "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
getforecast
showweather
diff --git a/.profile b/.profile
index d067c73..39ff1d4 100644
--- a/.profile
+++ b/.profile
@@ -3,8 +3,8 @@
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
-# Get default LARBS WM from ${XDG_DATA_HOME:$HOME/.local/share}/larbs/wm
-export LARBSWM="$(cat ${XDG_DATA_HOME:$HOME/.local/share}/larbs/wm 2>/dev/null)" &&
+# Get default LARBS WM from ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/wm
+export LARBSWM="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/wm 2>/dev/null)" &&
[ "$LARBSWM" = "dwm" ] || export LARBSWM="i3"
# Default programs:
@@ -25,10 +25,10 @@ export LESSHISTFILE="-"
export WGETRC="${XDG_CONFIG_HOME:$HOME/.config}/wget/wgetrc"
export INPUTRC="${XDG_CONFIG_HOME:$HOME/.config}/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:$HOME/.config}/zsh"
-export PASSWORD_STORE_DIR="${XDG_DATA_HOME:$HOME/.local/share}/password-store"
+export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:$HOME/.config}/android"
-export CARGO_HOME="${XDG_DATA_HOME:$HOME/.local/share}/cargo"
+export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
# Other program settings:
export DICS="/usr/share/stardict/dic/"
@@ -49,4 +49,4 @@ export LESS_TERMCAP_ue="$(printf '%b' '')"
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx
# 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:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null