aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdmenuTerm.sh4
-rwxr-xr-xemoji.sh3
-rwxr-xr-xfloats/mpvFloat.sh2
-rwxr-xr-xi3blocks/i3date.sh16
-rwxr-xr-xi3blocks/i3disk.sh1
-rwxr-xr-xinitialLayout.sh15
-rwxr-xr-xwebview.sh24
-rwxr-xr-xxinit.sh2
8 files changed, 47 insertions, 20 deletions
diff --git a/dmenuTerm.sh b/dmenuTerm.sh
index 1bb633e..b9a6d25 100755
--- a/dmenuTerm.sh
+++ b/dmenuTerm.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# dmenu script for opening console programs and scripts directly
-options="neofetch\ncmus\ncmus (float)\n\nweather\nReset NetworkManager\nwifiUp\nwifiDown\nyears\nmonths\nbg selection\nshowColors\npython\nmusicMode\nClose music mode"
+options="neofetch\ncmus\ncmus (float)\nweather\nReset NetworkManager\nwifiUp\nwifiDown\nyears\nmonths\nbg selection\nshowColors\npython\nmusicMode\nClose music mode"
chosen=$(echo -e "$options" | dmenu -i -p "~$ urxvt -e")
@@ -13,7 +13,7 @@ case "$chosen" in
"months") ~/scripts/floats/floatMonths.sh ;;
"weather") urxvt -title floating -sh 10 -geometry 125x40 -e weather.sh ;;
"bg selection") ~/scripts/floats/floatBgBrowser.sh "$HOME/images/wallpapers/" ;;
- "python") urxvt -title floating -geometry 80x28 -e python ;;
+ "python") urxvt -title floating -geometry 80x28 -e python -q ;;
#programs
"cmus") urxvt -cd ~/music -e cmus ;;
"cmus (float)") urxvt -title floating -sh 20 -geometry "150x12+5-8" -cd ~/music -e cmus ;;
diff --git a/emoji.sh b/emoji.sh
index dd55261..dfa22cb 100755
--- a/emoji.sh
+++ b/emoji.sh
@@ -3,8 +3,7 @@
# Feeds an emoji list into dmenu and allows to select one into clipboard
file="$XDG_CONFIG_HOME/emoji"
-selected="$(dmenu -i -l 20 -p "Choose an emoji:" < "$file" | cut -d' ' -f1)"
+selected="$(sed '/^~/d' "$file" | dmenu -i -l 20 -p "Choose an emoji:" | cut -d' ' -f1)"
[ -z "$selected" ] && dunstify -t 2000 "No emoji selected." && exit 0
echo "$selected" | tr -d '\n' | xsel -ib
dunstify -t 2000 "Copied $(xsel -ob)"
-
diff --git a/floats/mpvFloat.sh b/floats/mpvFloat.sh
index f48db8b..eaed921 100755
--- a/floats/mpvFloat.sh
+++ b/floats/mpvFloat.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-nohup mpv --geometry=-0-0 --autofit=40% --title="mpvfloat" "$@" >/dev/null &
+nohup mpv --geometry=-10-10 --autofit=40% --title="mpvfloat" "$@" >/dev/null &
diff --git a/i3blocks/i3date.sh b/i3blocks/i3date.sh
index a54a135..0461323 100755
--- a/i3blocks/i3date.sh
+++ b/i3blocks/i3date.sh
@@ -9,4 +9,18 @@ esac
#dayofyear=$(date +%j)
#perc=$(echo "scale=1; ($dayofyear*100)/365" | bc)
#echo $(date +"%A, %y/%m/%d ($perc%) - %T")
-echo $(date +"%y/%m/%d %H:%M")
+
+day="$(date +"%y/%m/%d")"
+hour="$(date +"%H:%M")"
+
+min=${hour#*:}
+baseHour=${hour/:*}
+[ $baseHour -gt 11 ] && baseHour=$((baseHour-12))
+
+clocks=(🕛 🕐 🕑 🕒 🕓 🕔 🕕 🕖 🕗 🕘 🕙 🕚 🕧 🕜 🕝 🕞 🕟 🕠 🕡 🕢 🕣 🕤 🕥 🕦)
+clockIndex=$baseHour
+[ $min -gt 29 ] && clockIndex=$((clockIndex+12))
+clock="${clocks[clockIndex]}"
+
+echo $clock $day $hour
+echo $clock $hour
diff --git a/i3blocks/i3disk.sh b/i3blocks/i3disk.sh
index a1aae81..158982f 100755
--- a/i3blocks/i3disk.sh
+++ b/i3blocks/i3disk.sh
@@ -9,3 +9,4 @@ $home" ;;
esac
df -h | grep "/home$" | awk '{print $3"/"$2}'
+df -h | grep "/home$" | awk '{print $3}'
diff --git a/initialLayout.sh b/initialLayout.sh
new file mode 100755
index 0000000..2408911
--- /dev/null
+++ b/initialLayout.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+if pgrep -x i3 && xrandr | grep 'HDMI.* connected'; then
+ i3-msg focus left
+ i3-msg workspace 3:👾
+ i3-msg focus right
+fi
+
+urxvt -e tmux new -s main &
+sleep 1
+
+if pgrep -x i3 && xrandr | grep 'HDMI.* connected'; then
+ i3-msg move workspace number 1:💻
+ i3-msg workspace number 1:💻
+fi
diff --git a/webview.sh b/webview.sh
index 068eb43..a844ce1 100755
--- a/webview.sh
+++ b/webview.sh
@@ -7,6 +7,8 @@ mpvFiles="mkv mp4 gif"
imageFiles="png jpg jpeg jpe"
wgetFiles="mp3 pdf"
+imgViewer="showURLimage.sh"
+
# Reproduce in terminal if no X server
[ -z "$(xset q 2>/dev/null)" ] && mpv -vo caca "$1"
@@ -16,39 +18,35 @@ if echo "$1" | grep "youtube" >/dev/null; then
case "$chosen" in
"mpv") nohup mpv "$1" >/dev/null & ;;
"mpv (loop)") nohup mpv --loop "$1" >/dev/null & ;;
- "mpv (float)") ~/scripts/floats/mpvFloat.sh "$1" ;;
+ "mpv (float)") mpvFloat.sh "$1" ;;
"mpv (terminal)") mpv --loop -vo caca "$1" ;;
- "download (y-dl)") ~/scripts/youtube-dlFloat.sh "$1" & ;;
+ "download (y-dl)") youtube-dlFloat.sh "$1" & ;;
"qutebrowser") qutebrowser "$1" & ;;
"w3m") urxvt -e w3m "$1" & ;;
esac
# General checks
elif echo "$imageFiles" | grep -w "$ext" >/dev/null; then
- chosen=$(echo -e "pqiv\nwget" | dmenu -i)
- case "$chosen" in
- "pqiv") nohup pqiv -i "$1" >/dev/null & ;;
- "wget") nohup wget "$1" & ;;
- esac
+ "$imgViewer" "$1" >/dev/null &
elif echo "$mpvFiles" | grep -w "$ext" >/dev/null; then
- chosen=$(echo -e "mpv\nmpv (loop)\nmpv (terminal)\nqutebrowser" | dmenu -i)
+ chosen=$(echo -e "mpv\nmpv (loop)\nmpv (float)\nmpv (terminal)\nqutebrowser" | dmenu -i)
case "$chosen" in
mpv) nohup mpv "$1" >/dev/null & ;;
"mpv (loop)") nohup mpv --loop "$1" >/dev/null & ;;
- "mpv (float)") ~/scripts/floats/mpvFloat.sh "$1" ;;
+ "mpv (float)") mpvFloat.sh "$1" ;;
"mpv (terminal)") mpv --loop -vo caca "$1" ;;
"qutebrowser") qutebrowser "$1" & ;;
esac
elif echo "$wgetFiles" | grep -w "$ext" >/dev/null; then
nohup wget "$1" >~/log-wget.txt &
else
- chosen=$(echo -e "mpv\nmpv (loop)\nmpv (terminal)\npqiv\ndownload (y-dl)\nqutebrowser\nw3m" | dmenu -i)
+ chosen=$(echo -e "mpv\nmpv (loop)\nmpv (float)\nmpv (terminal)\nsxiv\ndownload (y-dl)\nqutebrowser\nw3m" | dmenu -i)
case "$chosen" in
mpv) nohup mpv "$1" >/dev/null & ;;
"mpv (loop)") nohup mpv --loop "$1" >/dev/null & ;;
- "mpv (float)") ~/scripts/floats/mpvFloat.sh "$1" ;;
+ "mpv (float)") mpvFloat.sh "$1" ;;
"mpv (terminal)") mpv --loop -vo caca "$1" ;;
- pqiv) nohup pqiv -i -P "0,0" -T "pqivfloat" "$1" >/dev/null & ;;
- "download (y-dl)") ~/scripts/floats/youtube-dlFloat.sh "$1" & ;;
+ "sxiv") "$imgViewer" "$1" >/dev/null & ;;
+ "download (y-dl)") youtube-dlFloat.sh "$1" & ;;
qutebrowser) qutebrowser "$1" & ;;
w3m) urxvt -e w3m "$1" & ;;
esac
diff --git a/xinit.sh b/xinit.sh
index 6048726..91e0cb8 100755
--- a/xinit.sh
+++ b/xinit.sh
@@ -9,5 +9,5 @@ setxkbmap -layout es -option caps:swapescape
xset -b
pgrep -x unclutter || unclutter --idle 1 &
#touchpad.sh
-urxvt -e tmux new -s main &
+initialLayout.sh
pgrep -x sxhkd || sxhkd >~/logs/sxhkd.log &