diff options
author | Adam T. Carpenter <atc@53hor.net> | 2021-02-28 07:51:29 -0500 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2021-02-28 07:51:29 -0500 |
commit | 2ca667744959fb6077f9cb9396ccdef4352d57dc (patch) | |
tree | 4cf9ebd0eb6a31870ff1f78c4702ff6685eec357 | |
parent | 9cff66c405948bd70532c2d87d504a8effb9ed1d (diff) | |
download | dotfiles-2ca667744959fb6077f9cb9396ccdef4352d57dc.tar.xz dotfiles-2ca667744959fb6077f9cb9396ccdef4352d57dc.zip |
moved all scripts into i3blocks config itself
-rw-r--r-- | .config/i3blocks/config | 41 | ||||
-rw-r--r-- | .config/vim-vixen.json | 73 | ||||
-rw-r--r-- | .vimrc | 1 |
3 files changed, 95 insertions, 20 deletions
diff --git a/.config/i3blocks/config b/.config/i3blocks/config index 7846d6f..c2d44e1 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -13,61 +13,64 @@ separator_block_width=15 [packages] interval=3600 -command=i3blocks-packages.sh +command=count=$(pkg upgrade -n | sed -n 's/^Number of packages to be upgraded:\(.*\)/\1/p') ; [ -n "$count" ] && [ "$count" -gt 0 ] && printf "%s" $count && return 33 || return 0 [mail] interval=1800 signal=12 -command=i3blocks-mail.sh +command=unread=$(ls ~/.mail/gmail/Inbox/new/ | wc -l | cut -w -f2) ; [ $unread -gt 0 ] && printf "%s\n" $unread || echo [news] -interval=3600 +interval=1800 signal=13 -command=i3blocks-news.sh +command=unread=$(newsboat -x print-unread|cut -w -f1) ; [ "$unread" != 0 ] && [ "$unread" != Authentication ] && printf "A:%s\n" $unread -#[weather] -#interval=3600 -#command=i3blocks-weather.sh +#[uptime] +#interval=300 +#command=printf "%s\n" "$(uptime | grep -o 'up[^,]*' )" -[up] +[updates] +interval=86399 +command=doas freebsd-update updatesready > /dev/null ; [ $? -ne 2 ] && printf "Updates ready" || return 0 + +[weather] interval=3600 -interval=10 -command=i3blocks-up.sh +command=fetch -qo - "https://wttr.in/23435?format=2" [net] interval=10 -command=i3blocks-net.sh +command=inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3 | tr '\n' ' ') ; [ "$(ifconfig em0|grep status|cut -d\: -f2)" = " active" ] && printf "%s\n" "$inet" || [ "$(ifconfig wlan0|grep status|cut -d\: -f2)" = " associated" ] && ssid=$(ifconfig wlan0|sed -n 's/^.*ssid \(.*\) channel.*$/\1/p') && [ -n "$ssid" ] && printf "%s %s\n" "$ssid" "$inet" || printf "Offline\n" [screencast] interval=once signal=11 -command=i3blocks-screencast.sh +command=[ -f /tmp/cast.mkv ] && printf "\n" || return 0 [audio] interval=once signal=10 -command=i3blocks-audio.sh +command=vol=$(mixer vol|cut -d':' -f2) ; printf "%.3d\n" $vol ; [ $vol -eq 0 ] && return 33 || return 0 [disk] interval=10 -command=i3blocks-disk.sh +command=printf "%s\n" $(df -hk /usr/home | cut -w -f5 | sed 1d) [memory] interval=10 -command=i3blocks-memory.sh +command=printf "%s\n" $(top -n | grep Mem | cut -w -f2) [load] interval=10 -command=i3blocks-cpuload.sh +command=cpu_count=$(sysctl -n hw.ncpu) ; avg_load=$(sysctl vm.loadavg|cut -w -f3) ; percent=$(echo "result = $avg_load / $cpu_count * 100; scale=0; result / 1"|bc -l) ; printf "%.3d%%\n" $percent ; [ $percent -ge 70 ] && return 33 || return 0 [temp] interval=10 -command=i3blocks-cputemp.sh +command=celcius=$(sysctl -n dev.cpu.0.temperature|cut -d'.' -f1) ; printf "%.3d ℉\n" $(echo "$celcius * 9 / 5 + 32" | bc) ; [ $celcius -ge 80 ] && return 33 || return 0 [battery] interval=59 -command=i3blocks-battery.sh +command=status=$(apm -b) ; level=$(apm -l) ; [ $status -eq 3 ] && printf "%.3d%%" $level || printf "%.3d%%" $level && [ $status -eq 2 ] && return 33 || return 0 [date] interval=59 -command=i3blocks-date.sh +command=printf "%s\n" "$(date '+%a %b %e %l:%M %p')" diff --git a/.config/vim-vixen.json b/.config/vim-vixen.json new file mode 100644 index 0000000..a8854b8 --- /dev/null +++ b/.config/vim-vixen.json @@ -0,0 +1,73 @@ +{ + "keymaps": { + "0": { "type": "scroll.home" }, + ":": { "type": "command.show" }, + "o": { "type": "command.show.open", "alter": false }, + "O": { "type": "command.show.tabopen", "alter": false }, + "w": { "type": "command.show.winopen", "alter": false }, + "b": { "type": "command.show.buffer" }, + "m": { "type": "command.show.addbookmark", "alter": false }, + "M": { "type": "command.show.addbookmark", "alter": true }, + "k": { "type": "scroll.vertically", "count": -5 }, + "j": { "type": "scroll.vertically", "count": 5 }, + "h": { "type": "scroll.horizonally", "count": -5 }, + "l": { "type": "scroll.horizonally", "count": 5 }, + "<C-U>": { "type": "scroll.pages", "count": -0.5 }, + "<C-D>": { "type": "scroll.pages", "count": 0.5 }, + "<C-B>": { "type": "scroll.pages", "count": -1 }, + "<C-F>": { "type": "scroll.pages", "count": 1 }, + "gg": { "type": "scroll.top" }, + "G": { "type": "scroll.bottom" }, + "$": { "type": "scroll.end" }, + "dd": { "type": "tabs.close" }, + "DD": { "type": "tabs.close", "select": "left" }, + "x$": { "type": "tabs.close.right" }, + "!d": { "type": "tabs.close.force" }, + "u": { "type": "tabs.reopen" }, + "K": { "type": "tabs.prev" }, + "J": { "type": "tabs.next" }, + "g0": { "type": "tabs.first" }, + "g$": { "type": "tabs.last" }, + "<C-6>": { "type": "tabs.prevsel" }, + "r": { "type": "tabs.reload", "cache": false }, + "R": { "type": "tabs.reload", "cache": true }, + "zp": { "type": "tabs.pin.toggle" }, + "zd": { "type": "tabs.duplicate" }, + "+": { "type": "zoom.in" }, + "-": { "type": "zoom.out" }, + "=": { "type": "zoom.neutral" }, + "f": { "type": "follow.start", "newTab": false }, + "F": { "type": "follow.start", "newTab": true, "background": false }, + "H": { "type": "navigate.history.prev" }, + "L": { "type": "navigate.history.next" }, + "[[": { "type": "navigate.link.prev" }, + "]]": { "type": "navigate.link.next" }, + "gu": { "type": "navigate.parent" }, + "gU": { "type": "navigate.root" }, + "gi": { "type": "focus.input" }, + "gf": { "type": "page.source" }, + "gh": { "type": "page.home" }, + "gH": { "type": "page.home", "newTab": true }, + "y": { "type": "urls.yank" }, + "p": { "type": "urls.paste", "newTab": false }, + "P": { "type": "urls.paste", "newTab": true }, + "/": { "type": "find.start" }, + "n": { "type": "find.next" }, + "N": { "type": "find.prev" }, + ".": { "type": "repeat.last" }, + "<S-Esc>": { "type": "addon.toggle.enabled" } + }, + "search": { + "default": "duckduckgo", + "engines": { + "duckduckgo": "https://duckduckgo.com/?q={}" + } + }, + "properties": { + "hintchars": "abcdefghijklmnopqrstuvwxyz", + "smoothscroll": false, + "complete": "sbh", + "colorscheme": "system" + }, + "blacklist": [] +} @@ -67,4 +67,3 @@ highlight CocFloating ctermbg=black " Auto-reloading scripts autocmd BufWritePost i3.base !themer.sh -r -autocmd BufWritePost */i3blocks/config !i3-msg reload |