dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit c75fb96fb86a2f5d471a955c10143c3bcaffd7d3
parent aa51f7f815eee23b33a01f87be43218513daf9f5
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Sun,  2 Feb 2020 16:54:25 +0000

Dwm

Diffstat:
M.Xresources | 2+-
M.config/picom/config | 2++
M.scripts/bin/display/rfeh | 3++-
M.scripts/i3blocks/bat | 2+-
M.scripts/i3blocks/cal | 2+-
M.scripts/i3blocks/convtodwm | 28+++++++++++++++++-----------
M.scripts/i3blocks/cpu | 2+-
M.scripts/i3blocks/disk | 2+-
M.scripts/i3blocks/disk2 | 2+-
M.scripts/i3blocks/host | 2+-
M.scripts/i3blocks/mem | 2+-
M.scripts/i3blocks/mpv | 8+++-----
M.scripts/i3blocks/net | 2+-
M.scripts/i3blocks/news | 2+-
M.scripts/i3blocks/time | 2+-
M.scripts/i3blocks/time2 | 2+-
M.scripts/i3blocks/vol | 2+-
M.scripts/i3blocks/weather | 2+-
M.scripts/i3blocks/weather2 | 2+-
M.xinitrc | 11++++++++++-
20 files changed, 49 insertions(+), 33 deletions(-)

diff --git a/.Xresources b/.Xresources @@ -8,7 +8,7 @@ ! special *.foreground: #1e5eb3 -*.background: #090711 +*.background: #0c0a14 *.cursorColor: #1e5eb3 ! black diff --git a/.config/picom/config b/.config/picom/config @@ -32,6 +32,8 @@ opacity-rule = [ "84:class_g ?= 'vimb' && focused", "87:class_g ?= 'surf' && !focused", "84:class_g ?= 'surf' && focused", + "87:class_g ?= 'tabbed' && !focused", + "84:class_g ?= 'tabbed' && focused", ]; fade-exclude = [ diff --git a/.scripts/bin/display/rfeh b/.scripts/bin/display/rfeh @@ -67,7 +67,8 @@ then else mkdir -p ~/.cache/rfeh fi -echo $files > ~/.cache/rfeh/prev +echo $files +echo $files > $HOME/.cache/rfeh/prev if [ "$lock" == "true" ] then files=$(echo "$files" | tr " " "\n" | sed "s~^~$lockopt ~g" | tr "\n" " ") diff --git a/.scripts/i3blocks/bat b/.scripts/i3blocks/bat @@ -11,7 +11,7 @@ if [ "$p" == "0%" ] then echo "" > /dev/null else - echo "| B $p" + echo "[B $p]" echo echo \#C625C8 fi diff --git a/.scripts/i3blocks/cal b/.scripts/i3blocks/cal @@ -16,6 +16,6 @@ then else todo=$(($todo-1)) fi -echo "| CAL A:$(get_cal -a "*")/T:$todo" +echo "[CAL A:$(get_cal -a "*")/T:$todo]" echo echo \#236B1B diff --git a/.scripts/i3blocks/convtodwm b/.scripts/i3blocks/convtodwm @@ -3,7 +3,7 @@ mkdir -p ~/.cache/blocks ./host > ~/.cache/blocks/host & - +swait=21 while true do ((swait>20)) &&{ @@ -13,7 +13,7 @@ do ./bat > ~/.cache/blocks/bat & ./disk > ~/.cache/blocks/disk & ./disk2 > ~/.cache/blocks/disk2 & - ./time2 > ~/.cache/blocks/time2 & + ./time > ~/.cache/blocks/time & swait=0 }; #./.scripts/i3blocks/cal > .cache/blocks/cal & @@ -21,14 +21,20 @@ do ./mem > ~/.cache/blocks/mem & ./mpv > ~/.cache/blocks/mpv & ./vol > ~/.cache/blocks/vol & - sleep 2 - for ((i=0;i<1;i++)) - do - ./time > .cache/blocks/time & - ( - cd ~/.cache/blocks - xsetroot -name " $(cat bat cpu disk disk2 mem mpv net news vol weather time2 time host | sed '/^#/d;/^$/d' | tr '\n' '\f' | sed 's/\f/ /g')" - ) - done + sleep 3 + cd ~/.cache/blocks + cd ~/.scripts/i3blocks swait=$(($swait+1)) +done & + +while true +do + sleep 1 + ./time2 > ~/.cache/blocks/time2 +done & + +cd ~/.cache/blocks +while true; do +sleep 1 + xsetroot -name "$(for ((i=0;i<255;i++)) do printf " "; done) $(cat bat cpu disk disk2 mem mpv net news vol weather time time2 host | sed '/^#/d;/^$/d' | sed '1~2s/^/\^c#aaaaff\^/;2~2s/^/\^c#ffaaaa\^/' | tr '\n' '\f' | sed 's/\f/ /g' | tr "[]" " ") " done diff --git a/.scripts/i3blocks/cpu b/.scripts/i3blocks/cpu @@ -7,6 +7,6 @@ # Copyright (c) 2019 Hayden Hamilton. cpu=$(ps -e -o %cpu | awk '{s+=$1} END {print s}') -echo "| C $cpu%" +echo "[C $cpu%]" echo echo \#7525C8 diff --git a/.scripts/i3blocks/disk b/.scripts/i3blocks/disk @@ -7,6 +7,6 @@ # Copyright (c) 2019 Hayden Hamilton. sda1=$(df -h | awk '/sda1/ {print $3 "/" $4}') -echo "| SDA1 $sda1" +echo "[SDA1 $sda1]" echo echo \#0F6BF3 diff --git a/.scripts/i3blocks/disk2 b/.scripts/i3blocks/disk2 @@ -7,6 +7,6 @@ # Copyright (c) 2019 Hayden Hamilton. sda2=$(df -h | awk '/sda2/ {print $3 "/" $4}') -echo "| SDA2 $sda2" +echo "[SDA2 $sda2]" echo echo \#3157B5 diff --git a/.scripts/i3blocks/host b/.scripts/i3blocks/host @@ -7,6 +7,6 @@ # Copyright (c) 2019 Hayden Hamilton. hostget="\u@\h" -echo "| ${hostget@P}" +echo "[${hostget@P}]" echo echo \#ff003b diff --git a/.scripts/i3blocks/mem b/.scripts/i3blocks/mem @@ -6,6 +6,6 @@ # haydenvh.com # Copyright (c) 2019 Hayden Hamilton. -echo "| M $(free -h | awk '/^Mem:/ {print $3 "/" $2}')" +echo "[M $(free -h | awk '/^Mem:/ {print $3 "/" $2}')]" echo echo \#007dc1 diff --git a/.scripts/i3blocks/mpv b/.scripts/i3blocks/mpv @@ -6,10 +6,8 @@ # haydenvh.com # Copyright (c) 2019 Hayden Hamilton. -file=$(echo '{command:["get_property", "media-title"]}' | socat - /tmp/mpv-socket | tr "." " " | sed 's/opus//g' | sed 's/mp3//g' | sed 's/mkv//g' | sed 's/flac//g' | sed 's/webm//g' | sed 's/part//g' | tr '"\{:,}[' ' ' | sed 's/data//g' | sed 's/request_id 0//g' | sed 's/error success//g' | sed 's/ //g' | tail -c +2 | sed 's/$//g' | tr "()'" " " | sed 's/ / /g' |sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g') -file2=$(echo "$file" | cut -zc-25) -vidtitle=$(echo '{command:["get_property", "media-title"]}' | socat - /tmp/mpv-socket2 | tr '"{:,}\[' ' ' | sed 's/data//g' | sed 's/request_id 0//g' | sed 's/error success//g' | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | sed 's/^//g') -vidtitle2=$(echo "$vidtitle" | cut -zc-25) +file2=$(echo '{command:["get_property", "media-title"]}' | socat - /tmp/mpv-socket | tr "." " " | sed 's/opus//g' | sed 's/mp3//g' | sed 's/mkv//g' | sed 's/flac//g' | sed 's/webm//g' | sed 's/part//g' | tr '"\{:,}[' ' ' | sed 's/data//g' | sed 's/request_id 0//g' | sed 's/error success//g' | sed 's/ //g' | tail -c +2 | sed 's/$//g' | tr "()'" " " | sed 's/ / /g' |sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g') + vidtitle2=$(echo '{command:["get_property", "media-title"]}' | socat - /tmp/mpv-socket2 | tr '"{:,}\[' ' ' | sed 's/data//g' | sed 's/request_id 0//g' | sed 's/error success//g' | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | sed 's/^//g') state=$(echo '{ "command": ["get_property", "pause"] }' | socat - /tmp/mpv-socket | tr '{":0,}' ' ' | awk '// {print $2}') state2=$(echo '{ "command": ["get_property", "pause"] }' | socat - /tmp/mpv-socket2 | tr '{":0,}' ' ' | awk '// {print $2}') convertsecs() { @@ -48,7 +46,7 @@ else fi if [ "$color" == "true" ] then - echo "| MPV$out" + echo "[MPV$out]" echo echo \#666b1b elif [ "$color" == "false" ] diff --git a/.scripts/i3blocks/net b/.scripts/i3blocks/net @@ -7,6 +7,6 @@ # Copyright (c) 2019 Hayden Hamilton. ip=$(curl -s http://icanhazip.com/) -echo "| $ip" +echo "[$ip]" echo echo \#4Da0C6 diff --git a/.scripts/i3blocks/news b/.scripts/i3blocks/news @@ -9,6 +9,6 @@ newsboat -x reload 2>/dev/null unread=$(newsboat -x print-unread | sed 's/unread articles//g') -echo "| NEWS $unread" +echo "[NEWS $unread]" echo echo \#498364 diff --git a/.scripts/i3blocks/time b/.scripts/i3blocks/time @@ -6,6 +6,6 @@ # haydenvh.com # Copyright (c) 2019 Hayden Hamilton. -echo "| $(date +%d/%m)" +echo "[$(date +%d/%m)]" echo echo \#ff7777 diff --git a/.scripts/i3blocks/time2 b/.scripts/i3blocks/time2 @@ -6,6 +6,6 @@ # haydenvh.com # Copyright (c) 2019 Hayden Hamilton. -echo "| $(date | awk '{print $4}')" +echo "[$(date | awk '{print $4}')]" echo echo \#ff303b diff --git a/.scripts/i3blocks/vol b/.scripts/i3blocks/vol @@ -9,6 +9,6 @@ toggled=$(amixer sget Master | awk '/Mono/ {print $6}' | sed 's/\[//g' | sed 's/\]//g') volume=$(amixer sget Master | awk '/Mono/ {print $4}' | sed 's/\[//g' | sed 's/\]//g') output=$(echo $(echo ${volume}|tr "\n" " ")$(echo ${toggled}|tr "\n" " "|sed 's/ //g')) -echo "| VOL $output" +echo "[VOL $output]" echo echo \#218888 diff --git a/.scripts/i3blocks/weather b/.scripts/i3blocks/weather @@ -7,6 +7,6 @@ # Copyright (c) 2019 Hayden Hamilton. curl -Ss 'https://wttr.in?0TQ' | cut -c 16- > ~/.cache/weather -echo "| $(sed 2q ~/.cache/weather | sed 's/\.\./ /g' | xargs echo)" +echo "[$(sed 2q ~/.cache/weather | sed 's/\.\./ /g' | xargs echo)]" echo echo \#249980 diff --git a/.scripts/i3blocks/weather2 b/.scripts/i3blocks/weather2 @@ -6,6 +6,6 @@ # haydenvh.com # Copyright (c) 2019 Hayden Hamilton. -echo "| RAIN $(sed 5q ~/.cache/weather | sed 's/‘//g' | sed 's/‚’//g' | tail -n 1 | sed 's/ //g')" +echo "[RAIN $(sed 5q ~/.cache/weather | sed 's/‘//g' | sed 's/‚’//g' | tail -n 1 | sed 's/ //g')]" echo echo \#249980 diff --git a/.xinitrc b/.xinitrc @@ -1 +1,10 @@ -exec dwm +#!/bin/bash +[ -f .Xresources ] && xrdb -merge .Xresources + +while true; do + dwm +done + +#while true; do +# sowm +#done