i3 eternally btfo
This commit is contained in:
parent
67f70d70bb
commit
8117f84198
24 changed files with 0 additions and 611 deletions
|
@ -1,188 +0,0 @@
|
|||
# vim: filetype=i3
|
||||
# File originally by Luke Smith <https://lukesmith.xyz>
|
||||
|
||||
# This config file will use environmental variables such as $BROWSER and $TERMINAL.
|
||||
# You can set these variables in ~/.profile or ~/.bash_profile if you have it as below:
|
||||
#
|
||||
# export FILE="ranger"
|
||||
# export TERMINAL="st"
|
||||
|
||||
# #---Basic Definitions---# #
|
||||
for_window [class="^.*"] border pixel 2
|
||||
gaps inner 15
|
||||
gaps outer 15
|
||||
set $term --no-startup-id $TERMINAL
|
||||
set $mod Mod4
|
||||
|
||||
# #---Dropdown Windows---# #
|
||||
# General dropdown window traits. The order can matter.
|
||||
for_window [instance="dropdown_*"] floating enable
|
||||
for_window [instance="dropdown_*"] move scratchpad
|
||||
for_window [instance="dropdown_*"] sticky enable
|
||||
for_window [instance="dropdown_*"] scratchpad show
|
||||
for_window [instance="dropdown_tmuxdd"] resize set 625 450
|
||||
for_window [instance="dropdown_dropdowncalc"] resize set 800 300
|
||||
for_window [instance="dropdown_tmuxdd"] border pixel 3
|
||||
for_window [instance="dropdown_dropdowncalc"] border pixel 2
|
||||
for_window [instance="dropdown_*"] move position center
|
||||
|
||||
bar {
|
||||
font pango:mono 10
|
||||
status_command i3blocks
|
||||
position top
|
||||
mode dock
|
||||
modifier None
|
||||
}
|
||||
|
||||
# #---Basic Bindings---# #
|
||||
bindsym $mod+Shift+Return exec --no-startup-id samedir
|
||||
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
bindsym $mod+Escape workspace prev
|
||||
bindsym $mod+Shift+Escape exec --no-startup-id prompt "Exit i3?" "i3-msg exit"
|
||||
|
||||
#STOP/HIDE EVERYTHING:
|
||||
bindsym $mod+Shift+Delete exec --no-startup-id lmc truemute ; exec --no-startup-id lmc pause ; exec --no-startup-id pauseallmpv; workspace 0; exec $term -e htop ; exec $term -e $FILE
|
||||
|
||||
# #---Letter Key Bindings---# #
|
||||
bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill
|
||||
bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec --no-startup-id kill -9 `xdotool getwindowfocus getwindowpid`
|
||||
|
||||
bindsym $mod+Shift+r exec --no-startup-id winresize
|
||||
|
||||
bindsym $mod+t split toggle
|
||||
bindsym $mod+Shift+t gaps inner current set 15; gaps outer current set 15
|
||||
|
||||
bindsym $mod+Shift+y exec --no-startup-id i3resize left
|
||||
|
||||
bindsym $mod+u exec --no-startup-id ddspawn tmuxdd
|
||||
bindsym $mod+Shift+u exec --no-startup-id i3resize down
|
||||
|
||||
bindsym $mod+Shift+i exec --no-startup-id i3resize up
|
||||
|
||||
bindsym $mod+o sticky toggle
|
||||
bindsym $mod+Shift+o exec --no-startup-id i3resize right
|
||||
|
||||
bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
|
||||
|
||||
bindsym $mod+s gaps inner current plus 5
|
||||
bindsym $mod+Shift+s gaps inner current minus 5
|
||||
|
||||
bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0
|
||||
|
||||
set $freeze Distraction-free mode (super+shift+f to reactivate bindings)
|
||||
mode "$freeze" { bindsym $mod+Shift+f mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+f fullscreen toggle
|
||||
bindsym $mod+Shift+f mode "$freeze" ;; exec --no-startup-id notify-send "Distraction-free mode activated." "Press Super+Shift+f to return."
|
||||
|
||||
bindsym $mod+g workspace prev
|
||||
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+Shift+h move left 30
|
||||
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+Shift+j move down 30
|
||||
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+Shift+k move up 30
|
||||
|
||||
bindsym $mod+l focus right
|
||||
bindsym $mod+Shift+l move right 30
|
||||
|
||||
bindsym $mod+z gaps outer current plus 5
|
||||
bindsym $mod+Shift+z gaps outer current minus 5
|
||||
|
||||
bindsym $mod+c exec --no-startup-id cabl
|
||||
|
||||
bindsym $mod+v exec --no-startup-id $term -e $EDITOR -c "VimwikiIndex"
|
||||
|
||||
bindsym $mod+b bar mode toggle
|
||||
bindsym $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id hover left
|
||||
|
||||
bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id hover right
|
||||
|
||||
# #---Workspace Bindings---# #
|
||||
bindsym $mod+Home workspace $ws1
|
||||
bindsym $mod+Shift+Home move container to workspace $ws1
|
||||
bindsym $mod+End workspace $ws10
|
||||
bindsym $mod+Shift+End move container to workspace $ws10
|
||||
bindsym $mod+Prior workspace prev
|
||||
bindsym $mod+Shift+Prior move container to workspace prev
|
||||
bindsym $mod+Next workspace next
|
||||
bindsym $mod+Shift+Next move container to workspace next
|
||||
bindsym $mod+Tab workspace back_and_forth
|
||||
bindsym $mod+XF86Back workspace prev
|
||||
bindsym $mod+Shift+XF86Back move container to workspace prev
|
||||
bindsym $mod+XF86Forward workspace next
|
||||
bindsym $mod+Shift+XF86Forward move container to workspace next
|
||||
bindsym $mod+semicolon workspace next
|
||||
bindsym $mod+apostrophe split horizontal ;; exec $term
|
||||
bindsym $mod+slash split vertical ;; exec $term
|
||||
bindsym $mod+Shift+slash kill
|
||||
bindsym $mod+backslash workspace back_and_forth
|
||||
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
set $ws3 "3"
|
||||
set $ws4 "4"
|
||||
set $ws5 "5"
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
for_window [class="Pinentry"] sticky enable
|
||||
for_window [class="sent"] border pixel 0px
|
||||
for_window [title="GIMP Startup"] move workspace $ws5
|
||||
for_window [class="Gimp"] move workspace $ws5
|
||||
for_window [window_role="GtkFileChooserDialog"] resize set 800 600
|
||||
for_window [window_role="GtkFileChooserDialog"] move position center
|
||||
for_window [title="Default - Wine desktop"] floating enable
|
||||
|
||||
# Bindings to make the webcam float and stick.
|
||||
for_window [title="mpvfloat"] floating enable
|
||||
for_window [title="mpvfloat"] sticky enable
|
||||
for_window [title="mpvfloat"] border pixel 0
|
||||
no_focus [title="mpvfloat"]
|
||||
|
||||
# #---Function Buttons---# #
|
||||
bindsym $mod+F2 restart
|
||||
|
||||
# #---Arrow Keys---# #
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
|
@ -1,73 +0,0 @@
|
|||
command=~/.local/bin/statusbar/$BLOCK_NAME
|
||||
separator_block_width=15
|
||||
markup=pango
|
||||
|
||||
[record]
|
||||
command=cat /tmp/recordingicon
|
||||
interval=once
|
||||
signal=9
|
||||
|
||||
[music]
|
||||
label=🎼
|
||||
interval=once
|
||||
signal=11
|
||||
|
||||
[news]
|
||||
label=📰
|
||||
interval=once
|
||||
signal=6
|
||||
|
||||
#[iplocate]
|
||||
#interval=30
|
||||
|
||||
[pacpackages]
|
||||
label=📦
|
||||
interval=once
|
||||
signal=8
|
||||
|
||||
[torrent]
|
||||
interval=20
|
||||
signal=7
|
||||
|
||||
[weather]
|
||||
interval=18000
|
||||
signal=5
|
||||
|
||||
[mailbox]
|
||||
label=📬
|
||||
interval=180
|
||||
signal=12
|
||||
|
||||
#[memory]
|
||||
#interval=30
|
||||
#label=🧠
|
||||
|
||||
#[cpu]
|
||||
#interval=15
|
||||
#label=💻
|
||||
|
||||
[volume]
|
||||
interval=once
|
||||
signal=10
|
||||
|
||||
#[disk]
|
||||
#interval=60
|
||||
#command=disk /
|
||||
|
||||
#[disk]
|
||||
#interval=60
|
||||
#command=disk /home 🏠
|
||||
|
||||
[battery]
|
||||
command=battery BAT0
|
||||
interval=5
|
||||
|
||||
[clock]
|
||||
label=📅
|
||||
interval=30
|
||||
|
||||
[internet]
|
||||
interval=10
|
||||
|
||||
[help]
|
||||
interval=once
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Dependencies are xclip and xorg-xprop.
|
||||
# qrencode required for qrcode generation.
|
||||
# groff/zathura required for man pages.
|
||||
prim="$(xclip -o)"; [ -z "$prim" ] && exit
|
||||
|
||||
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)"
|
||||
[ -f "$prim" ] && xdg-open "$prim" && exit
|
||||
[ -d "$prim" ] && "$TERMINAL" "$prim" && exit
|
||||
|
||||
websearch() { "$BROWSER" "https://duckduckgo.com/?q=$@" ;}
|
||||
wikipedia() { "$BROWSER" "https://en.wikipedia.org/wiki/$@" ;}
|
||||
wiktionary() { "$BROWSER" "https://en.wiktionary.org/wiki/$@" ;}
|
||||
maps() { "$BROWSER" "https://www.openstreetmap.org/search?query=$@" ;}
|
||||
ebay() { "$BROWSER" "https://www.ebay.com/sch/$@" ;}
|
||||
|
||||
echo "$prim" | grep "^.*\.[A-Za-z]\+.*" >/dev/null && gotourl() { "$BROWSER" "$@" ;}
|
||||
echo "$prim" | grep "^.*@.*\.[A-Za-z]\+$" >/dev/null && email() { xdg-email "$@" ;}
|
||||
command -v qrencode >/dev/null && qrcode() { qrencode "$@" -s 10 -o /tmp/qr.png && xdg-open /tmp/qr.png ;}
|
||||
man -k "^$prim$" >/dev/null && manual() { man -Tpdf "$prim" | zathura - ;}
|
||||
|
||||
func="$(declare -F | awk '{print $3}' | dmenu -p "Plumb \"$(echo "$prim" | cut -c -30)\" to?" -i -l 15)"
|
||||
|
||||
[ -z "$func" ] || "$func" "$prim"
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Toggle floating dropdown terminal in i3, or start if non-existing.
|
||||
# $1 is the script run in the terminal.
|
||||
# All other args are terminal settings.
|
||||
# Terminal names are in dropdown_* to allow easily setting i3 settings.
|
||||
|
||||
[ -z "$1" ] && exit
|
||||
|
||||
script=$1
|
||||
shift
|
||||
if xwininfo -tree -root | grep "(\"dropdown_$script\" ";
|
||||
then
|
||||
echo "Window detected."
|
||||
i3 "[instance=\"dropdown_$script\"] scratchpad show; [instance=\"dropdown_$script\"] move position center"
|
||||
else
|
||||
echo "Window not detected... spawning."
|
||||
i3 "exec --no-startup-id $TERMINAL -n dropdown_$script $@ -e $script"
|
||||
fi
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
ifinstalled bc && echo "Welcome to the Calculator." && bc -lq
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/sh
|
||||
# This script was made by `goferito` on Github.
|
||||
# Some cleanup by Luke.
|
||||
|
||||
[ -z "$1" ] && echo "No direction provided" && exit 1
|
||||
distanceStr="2 px or 2 ppt"
|
||||
|
||||
moveChoice() {
|
||||
i3-msg resize "$1" "$2" "$distanceStr" | grep '"success":true' || \
|
||||
i3-msg resize "$3" "$4" "$distanceStr"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
up)
|
||||
moveChoice grow up shrink down
|
||||
;;
|
||||
down)
|
||||
moveChoice shrink up grow down
|
||||
;;
|
||||
left)
|
||||
moveChoice shrink right grow left
|
||||
;;
|
||||
right)
|
||||
moveChoice grow right shrink left
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
echo "📐" | dmenu -p "Give width and height:" | xargs xdotool windowsize "$(xdotool getwindowfocus)"
|
|
@ -1,32 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Give a battery name (e.g. BAT0) as an argument.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
3) pgrep -x dunst >/dev/null && notify-send "🔋 Battery module" "🔋: discharging
|
||||
🛑: not charging
|
||||
♻: stagnant charge
|
||||
🔌: charging
|
||||
⚡: charged
|
||||
❗: battery very low!
|
||||
- Text color reflects charge left" ;;
|
||||
esac
|
||||
|
||||
capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
|
||||
status=$(cat /sys/class/power_supply/"$1"/status)
|
||||
|
||||
if [ "$capacity" -ge 75 ]; then
|
||||
color="#00ff00"
|
||||
elif [ "$capacity" -ge 50 ]; then
|
||||
color="#ffffff"
|
||||
elif [ "$capacity" -ge 25 ]; then
|
||||
color="#ffff00"
|
||||
else
|
||||
color="#ff0000"
|
||||
warn="❗"
|
||||
fi
|
||||
|
||||
[ -z $warn ] && warn=" "
|
||||
|
||||
[ "$status" = "Charging" ] && color="#ffffff"
|
||||
|
||||
printf "<span color='%s'>%s%s%s</span>" "$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/$/%/')"
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
date '+%Y %b %d (%a) %I:%M%p'
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) pgrep -x dunst >/dev/null && notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -D ~/.config/calcurse -d3)" ;;
|
||||
2) "$TERMINAL" -e calcurse -D ~/.config/calcurse ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "📅 Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\`
|
||||
- Middle click opens calcurse if installed" ;;
|
||||
esac
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" ;;
|
||||
3) notify-send "🖥 CPU module " "\- Shows CPU temperature.
|
||||
- Click to show intensive processes.
|
||||
- % is of single core." ;;
|
||||
esac
|
||||
|
||||
sensors | awk '/Core 0/ {print $3}'
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Status bar module for disk space
|
||||
# $1 should be drive mountpoint
|
||||
# $2 is optional icon, otherwise mountpoint will displayed
|
||||
|
||||
[ -z "$1" ] && exit
|
||||
|
||||
icon="$2"
|
||||
[ -z "$2" ] && icon="$1"
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) pgrep -x dunst >/dev/null && notify-send "💽 Disk space" "$(df -h --output=target,used,size)" ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "💽 Disk module" "\- Shows used hard drive space.
|
||||
- Click to show all disk info." ;;
|
||||
esac
|
||||
|
||||
printf "%s: %s" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
case $BLOCK_BUTTON in
|
||||
1) groff -mom ~/.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.";;
|
||||
esac; echo "❓"
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) $TERMINAL -e nmtui ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "🌐 Internet module" "\- Click to connect
|
||||
📡: no wifi connection
|
||||
📶: wifi connection with quality
|
||||
❎: no ethernet
|
||||
🌐: ethernet working
|
||||
" ;;
|
||||
esac
|
||||
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
|
||||
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
|
||||
|
||||
printf "%s %s" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"
|
|
@ -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,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# i3blocks mail module.
|
||||
# Displays number of unread mail and an loading icon if updating.
|
||||
# When clicked, brings up `neomutt`.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) "$TERMINAL" -e neomutt ;;
|
||||
2) setsid mailsync >/dev/null & ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "📬 Mail module" "\- Shows unread mail
|
||||
- Shows 🔃 if syncing mail
|
||||
- Left click opens neomutt
|
||||
- Middle click syncs mail" ;;
|
||||
esac
|
||||
|
||||
echo "$(du -a ~/.local/share/mail/*/INBOX/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon_$USER 2>/dev/null)"
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
||||
3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total.
|
||||
- Click to show memory hogs." ;;
|
||||
esac
|
||||
|
||||
free -h | awk '/^Mem:/ {print $3 "/" $2}'
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Whenever the mpd state changes, update the mpd i3 module.
|
||||
kill -0 "$(cat /tmp/mpdupdate)" 2>/dev/null && exit || echo $$ > /tmp/mpdupdate
|
||||
|
||||
sleep 5 && while : ; do
|
||||
pkill -RTMIN+11 i3blocks
|
||||
mpc idle >/dev/null || exit
|
||||
done
|
|
@ -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,18 +0,0 @@
|
|||
#!/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.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) $TERMINAL -e popupgrade ;;
|
||||
2) notify-send "$(/usr/bin/pacman -Qu)" ;;
|
||||
3) pgrep -x dunst >/dev/null && 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 -e "s/^0$//g"
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "Beginning upgrade.\\n"
|
||||
|
||||
yay -Syu
|
||||
pkill -RTMIN+8 i3blocks
|
||||
|
||||
printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
|
||||
read -r
|
|
@ -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
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid "$TERMINAL" -e pulsemixer & ;;
|
||||
2) pulsemixer --toggle-mute ;;
|
||||
4) pulsemixer --change-volume +5 ;;
|
||||
5) pulsemixer --change-volume -5 ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
|
||||
- Middle click to mute.
|
||||
- Scroll to change."
|
||||
esac
|
||||
|
||||
[ "$(pulsemixer --get-mute)" = "1" ] && printf "🔇\\n" && exit
|
||||
|
||||
vol=$(pulsemixer --get-volume | awk '{print $1}')
|
||||
|
||||
if [ "$vol" -gt "70" ]; then
|
||||
icon="🔊"
|
||||
elif [ "$vol" -lt "30" ]; then
|
||||
icon="🔈"
|
||||
else
|
||||
icon="🔉"
|
||||
fi
|
||||
|
||||
printf "%s %s%%\\n" "$icon" "$vol"
|
|
@ -1,23 +0,0 @@
|
|||
#!/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 ;}
|
||||
|
||||
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 "°"}' ;}
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) $TERMINAL -e less -S "$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.
|
||||
☔: Chance of rain/snow
|
||||
❄: Daily low
|
||||
🌞: Daily high" ;;
|
||||
esac
|
||||
|
||||
if [ "$(stat -c %y "$HOME/.local/share/weatherreport" >/dev/null 2>&1 | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ]
|
||||
then getforecast && showweather
|
||||
else showweather
|
||||
fi
|
Loading…
Reference in a new issue