mirror of https://github.com/tiyn/dotfiles
parent
df2abe0340
commit
99a701d793
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
kill -9 "$(cat ~/.recordingpid)"
|
||||
|
||||
# Update i3bar.
|
||||
echo "" > ~/.recordingicon
|
||||
pkill -RTMIN+9 i3blocks
|
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Display contents of selection via dunst if running.
|
||||
# Separate script for i3.
|
||||
|
||||
clip=$(xclip -o -selection clipboard)
|
||||
prim=$(xclip -o -selection primary)
|
||||
|
||||
[ -n "$clip" ] && notify-send "Clipboard:" "$clip"
|
||||
[ -n "$prim" ] && notify-send "Primary:" "$prim"
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
# This is the script that i3 runs to either start tmux in
|
||||
# the dropdown terminal or log into a previous session.
|
||||
tmux a || tmux
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Gets your public ip address checks which country you are in and
|
||||
# displays that information in the statusbar
|
||||
#
|
||||
# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/
|
||||
ifinstalled "geoiplookup" || exit
|
||||
addr="$(curl ifconfig.me 2>/dev/null)" || exit
|
||||
grep "flag: " ~/.config/emoji | grep "$(geoiplookup $addr | sed 's/.*, //')" | sed "s/flag: //;s/;.*//"
|
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
filter() {
|
||||
sed "/^volume:/d" | tac | sed -e "s/\\&/&/g;s/\\[paused\\].*/<span color=\"gray\" font_style=\"italic\">/g;s/\\[playing\\].*/<span>/g" | tr -d '\n' | sed -e "s/$/<\\/span>/g"
|
||||
}
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) mpc status | filter && setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause
|
||||
2) mpc toggle | filter ;; # right click, pause/unpause
|
||||
3) mpc status | filter && pgrep -x dunst >/dev/null && notify-send "🎵 Music module" "\- Shows mpd song playing.
|
||||
- Italic when paused.
|
||||
- Left click opens ncmpcpp.
|
||||
- Middle click pauses.
|
||||
- Scroll changes track.";; # right click, pause/unpause
|
||||
4) mpc prev | filter ;; # scroll up, previous
|
||||
5) mpc next | filter ;; # scroll down, next
|
||||
*) mpc status | filter ;;
|
||||
esac; exit
|
@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# i3blocks newsboat module.
|
||||
# Displays number of unread news items and an loading icon if updating.
|
||||
# When clicked, brings up `newsboat`.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid "$TERMINAL" -e newsboat ;;
|
||||
2) setsid newsup >/dev/null & exit ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "📰 News module" "\- Shows unread news items
|
||||
- Shows 🔃 if updating with \`newsup\`
|
||||
- Left click opens newsboat
|
||||
- Middle click syncs RSS feeds
|
||||
<b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;;
|
||||
esac
|
||||
|
||||
cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print $1}' | sed s/^0$//g)$(cat ~/.config/newsboat/.update 2>/dev/null)"
|
@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
transmission-remote -l | grep % |
|
||||
sed " # This first sed command is to ensure a desirable order with sort
|
||||
s/.*Stopped.*/A/g;
|
||||
s/.*Seeding.*/Z/g;
|
||||
s/.*100%.*/N/g;
|
||||
s/.*Idle.*/B/g;
|
||||
s/.*Uploading.*/L/g;
|
||||
s/.*%.*/M/g" |
|
||||
sort -h | uniq -c | sed " # Now we replace the standin letters with icons.
|
||||
s/A/🛑/g;
|
||||
s/B/⌛️/g;
|
||||
s/L/🔼/g;
|
||||
s/M/🔽/g;
|
||||
s/N/✅/g;
|
||||
s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed -e "s/ $//g"
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) $TERMINAL -e transmission-remote-cli ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "Torrent module" "🛑: paused
|
||||
⏳: idle (seeds needed)
|
||||
🔼: uploading (unfinished)
|
||||
🔽: downloading
|
||||
✅: done
|
||||
🌱: done and seeding" ;;
|
||||
esac
|
||||
|
Loading…
Reference in new issue