my-i3b-kernel and other clicks

This commit is contained in:
rileyrg 2021-05-19 00:22:41 +02:00
parent b1f42e40a3
commit 7091fab91d
7 changed files with 137 additions and 45 deletions

View file

@ -70,7 +70,7 @@ If using startx on debian this is taken care of by the system XSession loading e
\`-—
<a id="org15aaa7d"></a>
<a id="org16bb127"></a>
## ~/.profile
@ -123,7 +123,7 @@ fi
```
<a id="orge1f484b"></a>
<a id="orgd902b87"></a>
## ~/.bash\_profile
@ -1304,12 +1304,12 @@ bindsym $mod+d exec j4-dmenu-desktop --display-binary --dmenu='LD_LIBRARY_PATH=/
[dropbox]
label=⇄
interval=15
command=echo "$(my-i3b-db-status)"
command=my-i3b-db-status
color=#ffd700
[kernel]
label=🐧
command=echo "$(uname -sr)"
command=my-i3b-kernel
interval=once
color=#ffffff
@ -1330,14 +1330,14 @@ interval=60
[battery]
markup=pango
command=battery-plus
command=my-i3b-battery-status
interval=60
[power_draw]
label=⚡
command=echo "$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)"
interval=5
color=#00ff00
# [power_draw]
# label=⚡
# command=echo "$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)"
# interval=5
# color=#00ff00
[bluetooth]
command=echo "$(my-i3b-bluetooth)"
@ -1389,10 +1389,9 @@ color=#FFD700
#Maintained in linux-init-files.org
b=`acpi | grep -m 1 -i "remaining\|charging" | sed 's/.*Battery....//I'`
if [ -z "$b" ]; then
echo "charged";
else
echo $b;
b="charged";
fi
echo "🔋$b ⚡$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)h"
```
2. ~/bin/my-i3b-db-status
@ -1411,7 +1410,39 @@ color=#FFD700
fi
```
3. ~/bin/my-i3b-bluetooth
3. ~/bin/my-i3b-db-kernel
```bash
#!/usr/bin/bash
#Maintained in linux-init-files.org
case $BLOCK_BUTTON in
1)
oneterminal "bpytop-kernel" bpytop &>/dev/null &
sway-do-too "bpytop-kernel"
;;
*)
;;
esac
echo "$(uname -sr)"
```
4. ~/bin/my-i3b-db-status
```bash
#!/usr/bin/bash
#Maintained in linux-init-files.org
if pidof dropbox > /dev/null ; then
stat=$(dropbox status | sed -n 1p)
echo "DB:${stat}"; echo "";
else
if command -v dropbox > /dev/null; then
echo "Restart Dropbox.."
#dropbox start &> /dev/null &
fi
fi
```
5. ~/bin/my-i3b-bluetooth
Thank you <https://github.com/deanproxy/dotfiles/blob/master/linux/i3/scripts/bluetooth>
@ -1465,7 +1496,7 @@ color=#FFD700
fi
```
4. ~/bin/my-i3b-brightness
6. ~/bin/my-i3b-brightness
return the brightness %
@ -1480,7 +1511,7 @@ color=#FFD700
fi
```
5. ~/bin/my-i3b-volume
7. ~/bin/my-i3b-volume
return the volume %
@ -1488,12 +1519,16 @@ color=#FFD700
#!/usr/bin/bash
#Maintained in linux-init-files.org
case $BLOCK_BUTTON in
1) pavucontrol &>/dev/null &
1)
pavucontrol &>/dev/null &
;;
*)
;;
esac
exec awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master)
```
6. ~/bin/my-i3b-wifi
8. ~/bin/my-i3b-wifi
return the volume %
@ -1506,7 +1541,7 @@ color=#FFD700
exec i3bm-wifi
```
7. ~/bin/my-i3b-weather
9. ~/bin/my-i3b-weather
return the volume %
@ -2074,7 +2109,7 @@ e dbg.bep=main
export PATH="${HOME}/.pyenv/bin":"${PATH}"
```
2. [Eval](#orge1f484b) pyenv init from bash\_profile in order to set python version
2. [Eval](#orgd902b87) pyenv init from bash\_profile in order to set python version
```bash
eval "$(pyenv init -)"
@ -2086,7 +2121,7 @@ e dbg.bep=main
eval "$(pyenv virtualenv-init -)"
```
Added to PATH in [~/.profile](#org15aaa7d)
Added to PATH in [~/.profile](#org16bb127)
### Debuggers :debuggers:

View file

@ -2,7 +2,6 @@
#Maintained in linux-init-files.org
b=`acpi | grep -m 1 -i "remaining\|charging" | sed 's/.*Battery....//I'`
if [ -z "$b" ]; then
echo "charged";
else
echo $b;
b="charged";
fi
echo "🔋$b ⚡$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)h"

View file

@ -9,3 +9,15 @@ else
#dropbox start &> /dev/null &
fi
fi
#!/usr/bin/bash
#Maintained in linux-init-files.org
if pidof dropbox > /dev/null ; then
stat=$(dropbox status | sed -n 1p)
echo "DB:${stat}"; echo "";
else
if command -v dropbox > /dev/null; then
echo "Restart Dropbox.."
#dropbox start &> /dev/null &
fi
fi

11
directories/bin/my-i3b-kernel Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/bash
#Maintained in linux-init-files.org
case $BLOCK_BUTTON in
1)
oneterminal "bpytop-kernel" bpytop &>/dev/null &
sway-do-too "bpytop-kernel"
;;
*)
;;
esac
echo "$(uname -sr)"

View file

@ -1,6 +1,10 @@
#!/usr/bin/bash
#Maintained in linux-init-files.org
case $BLOCK_BUTTON in
1) pavucontrol &>/dev/null &
1)
pavucontrol &>/dev/null &
;;
*)
;;
esac
exec awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master)

View file

@ -1,12 +1,12 @@
[dropbox]
label=⇄
interval=15
command=echo "$(my-i3b-db-status)"
command=my-i3b-db-status
color=#ffd700
[kernel]
label=🐧
command=echo "$(uname -sr)"
command=my-i3b-kernel
interval=once
color=#ffffff
@ -27,14 +27,14 @@ interval=60
[battery]
markup=pango
command=battery-plus
command=my-i3b-battery-status
interval=60
[power_draw]
label=⚡
command=echo "$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)"
interval=5
color=#00ff00
# [power_draw]
# label=⚡
# command=echo "$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)"
# interval=5
# color=#00ff00
[bluetooth]
command=echo "$(my-i3b-bluetooth)"

View file

@ -1808,12 +1808,12 @@ Load a host specific kanshi file if it exists
[dropbox]
label=⇄
interval=15
command=echo "$(my-i3b-db-status)"
command=my-i3b-db-status
color=#ffd700
[kernel]
label=🐧
command=echo "$(uname -sr)"
command=my-i3b-kernel
interval=once
color=#ffffff
@ -1834,14 +1834,14 @@ Load a host specific kanshi file if it exists
[battery]
markup=pango
command=battery-plus
command=my-i3b-battery-status
interval=60
[power_draw]
label=⚡
command=echo "$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)"
interval=5
color=#00ff00
# [power_draw]
# label=⚡
# command=echo "$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)"
# interval=5
# color=#00ff00
[bluetooth]
command=echo "$(my-i3b-bluetooth)"
@ -1889,10 +1889,37 @@ Load a host specific kanshi file if it exists
#Maintained in linux-init-files.org
b=`acpi | grep -m 1 -i "remaining\|charging" | sed 's/.*Battery....//I'`
if [ -z "$b" ]; then
echo "charged";
else
echo $b;
b="charged";
fi
echo "🔋$b ⚡$(awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now)h"
#+end_src
**** ~/bin/my-i3b-db-status
#+begin_src bash :tangle "~/bin/my-i3b-db-status"
#!/usr/bin/bash
#Maintained in linux-init-files.org
if pidof dropbox > /dev/null ; then
stat=$(dropbox status | sed -n 1p)
echo "DB:${stat}"; echo "";
else
if command -v dropbox > /dev/null; then
echo "Restart Dropbox.."
#dropbox start &> /dev/null &
fi
fi
#+end_src
**** ~/bin/my-i3b-db-kernel
#+begin_src bash :tangle "~/bin/my-i3b-kernel"
#!/usr/bin/bash
#Maintained in linux-init-files.org
case $BLOCK_BUTTON in
1)
oneterminal "bpytop-kernel" bpytop &>/dev/null &
sway-do-too "bpytop-kernel"
;;
,*)
;;
esac
echo "$(uname -sr)"
#+end_src
**** ~/bin/my-i3b-db-status
#+begin_src bash :tangle "~/bin/my-i3b-db-status"
@ -1978,7 +2005,11 @@ return the volume %
#!/usr/bin/bash
#Maintained in linux-init-files.org
case $BLOCK_BUTTON in
1) pavucontrol &>/dev/null &
1)
pavucontrol &>/dev/null &
;;
,*)
;;
esac
exec awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master)
#+end_src