Add eww configuration with disk usage widget
This commit is contained in:
parent
47e60e39dc
commit
0dce0010ef
51
.config/eww/eww.scss
Normal file
51
.config/eww/eww.scss
Normal file
@ -0,0 +1,51 @@
|
||||
$foreground: #D9D7CE;
|
||||
$background: #0F1419;
|
||||
$cursorColor: #ffcc66;
|
||||
|
||||
$black: #47515b;
|
||||
$dblack: #0F1419;
|
||||
|
||||
$red: #ff3333;
|
||||
$dred: #ff6666;
|
||||
|
||||
$green: #bae67e;
|
||||
$dgreen: #cee6ac;
|
||||
|
||||
$yellow: #ffd580;
|
||||
$dyellow: #ffe6b3;
|
||||
|
||||
$blue: #73d0ff;
|
||||
$dblue: #a6e1ff;
|
||||
|
||||
$magenta: #f28779;
|
||||
$dmagenta: #ffd6da;
|
||||
|
||||
$cyan: #95e6cb;
|
||||
$dcyan: #ffffff;
|
||||
|
||||
$white: #ffffff;
|
||||
$dwhite: #ffffff;
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
color: $white;
|
||||
font-family: Iosevka;
|
||||
}
|
||||
|
||||
button {
|
||||
all: unset;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
background-color: $background;
|
||||
}
|
||||
|
||||
.dd_stat-container {
|
||||
border: 1px solid $blue;
|
||||
}
|
||||
|
21
.config/eww/eww.xml
Normal file
21
.config/eww/eww.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<eww>
|
||||
<definitions>
|
||||
<def name="dd_stats">
|
||||
<box class="main-container dd_stat-container" orientation="v" space-evenly="true">
|
||||
<button>{{dd_usage}}</button>
|
||||
</box>
|
||||
</def>
|
||||
</definitions>
|
||||
<variables>
|
||||
<script-var name="dd_usage" interval="5s">~/.config/eww/scripts/dd_usage.sh</script-var>
|
||||
</variables>
|
||||
<windows>
|
||||
<window name="dd_capacity" stacking="fg" focusable="false" screen="1">
|
||||
<geometry anchor="top right" x="-150px" y="24"/>
|
||||
<reserve side="left" distance="50px"/>
|
||||
<widget>
|
||||
<dd_stats/>
|
||||
</widget>
|
||||
</window>
|
||||
</windows>
|
||||
</eww>
|
9
.config/eww/scripts/dd_usage.sh
Executable file
9
.config/eww/scripts/dd_usage.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
mount_points=$(lsblk -l | grep part | grep -ve efi -ve SWAP | awk '{printf $7 "\n"}')
|
||||
|
||||
for mp in $mount_points; do
|
||||
usage=$(df -h $mp | awk '{if(NR>1)print $4 " /" $2 }')
|
||||
printf " %-10s\t %2s %s %s\n" $mp $usage
|
||||
done
|
Loading…
Reference in New Issue
Block a user