mirror of
https://github.com/elkowar/dots-of-war.git
synced 2025-04-13 12:02:15 +00:00
Compare commits
No commits in common. "66cf2516c6e4e6c3b85093ed04a7a49497585a30" and "3997674b73a7a4f06b33e5ce85afd57faa54283e" have entirely different histories.
66cf2516c6
...
3997674b73
14 changed files with 688 additions and 19 deletions
0
eggs/eww/.config/eww/asdf/eww.scss
Normal file
0
eggs/eww/.config/eww/asdf/eww.scss
Normal file
27
eggs/eww/.config/eww/asdf/eww.xml
Normal file
27
eggs/eww/.config/eww/asdf/eww.xml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<eww>
|
||||||
|
<definitions>
|
||||||
|
<def name="something">
|
||||||
|
<box class="{{some_var}}" halign="start">
|
||||||
|
<button onclick="notify-send 'test' 'message'">
|
||||||
|
{{some_script}}
|
||||||
|
</button>
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
</definitions>
|
||||||
|
<variables>
|
||||||
|
<var name="some_var">
|
||||||
|
foo
|
||||||
|
</var>
|
||||||
|
<script-var name="some_script" interval="1s">
|
||||||
|
date | sed 's/:/X/g' | rev
|
||||||
|
</script-var>
|
||||||
|
</variables>
|
||||||
|
<windows>
|
||||||
|
<window name="foo">
|
||||||
|
<geometry anchor="center" width="100px" height="10%"/>
|
||||||
|
<widget>
|
||||||
|
<something arg="value"/>
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
</windows>
|
||||||
|
</eww>
|
129
eggs/eww/.config/eww/eww.scss
Normal file
129
eggs/eww/.config/eww/eww.scss
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
entry {
|
||||||
|
padding: 10px;
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main_window {
|
||||||
|
all: unset;
|
||||||
|
background: #1d2021;
|
||||||
|
}
|
||||||
|
|
||||||
|
.volume_popup {
|
||||||
|
&,
|
||||||
|
& * {
|
||||||
|
all: unset;
|
||||||
|
}
|
||||||
|
background: #1d2021;
|
||||||
|
border-radius: 50px;
|
||||||
|
|
||||||
|
scale trough {
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 50px;
|
||||||
|
background-color: #ebdbb2;
|
||||||
|
|
||||||
|
slider {
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
highlight {
|
||||||
|
padding: 10px;
|
||||||
|
min-height: 30px;
|
||||||
|
border-bottom-left-radius: 50px;
|
||||||
|
border-bottom-right-radius: 50px;
|
||||||
|
background-color: #8ec07c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.music {
|
||||||
|
&,
|
||||||
|
& * {
|
||||||
|
all: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data {
|
||||||
|
margin: 15px;
|
||||||
|
margin-left: 45px;
|
||||||
|
|
||||||
|
.songname {
|
||||||
|
color: #8ec07c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.key {
|
||||||
|
color: #928374;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttons {
|
||||||
|
min-height: 50px;
|
||||||
|
background: #1d2021;
|
||||||
|
box-shadow: 0 0 10px -5px rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scale trough {
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 50px;
|
||||||
|
background-color: #ebdbb2;
|
||||||
|
|
||||||
|
highlight {
|
||||||
|
padding: 10px;
|
||||||
|
min-width: 30px;
|
||||||
|
border-bottom-left-radius: 50px;
|
||||||
|
border-bottom-right-radius: 50px;
|
||||||
|
background-color: #8ec07c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.this {
|
||||||
|
border: 10px solid blue;
|
||||||
|
}
|
||||||
|
.shit {
|
||||||
|
border: 10px solid green;
|
||||||
|
}
|
||||||
|
.fuck {
|
||||||
|
border-radius: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.whatever {
|
||||||
|
border: 2px solid green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lol {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
//background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
progressbar {
|
||||||
|
min-width: 1px;
|
||||||
|
|
||||||
|
trough {
|
||||||
|
min-width: 1px;
|
||||||
|
//background-color: #ebdbb255;
|
||||||
|
}
|
||||||
|
|
||||||
|
&, & * {
|
||||||
|
all: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress {
|
||||||
|
min-width: 1px;
|
||||||
|
//background-color: #8CD68F;
|
||||||
|
//box-shadow: 0 0 10px 3px #8CD68F22;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
progressbar progress {
|
||||||
|
background: repeating-linear-gradient(0deg, #458588, #8ec07c); /*, #b8bb26, #fabd2f);*/
|
||||||
|
background-size: 100% 200%;
|
||||||
|
|
||||||
|
animation: AnimationName 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes AnimationName {
|
||||||
|
0%{background-position:0% 0%}
|
||||||
|
100%{background-position:0% 200%}
|
||||||
|
}
|
226
eggs/eww/.config/eww/eww.xml
Normal file
226
eggs/eww/.config/eww/eww.xml
Normal file
|
@ -0,0 +1,226 @@
|
||||||
|
<eww>
|
||||||
|
|
||||||
|
<includes>
|
||||||
|
|
||||||
|
<file path="./foo.xml"/>
|
||||||
|
</includes>
|
||||||
|
<definitions>
|
||||||
|
|
||||||
|
<def name="pxbar">
|
||||||
|
<progress value="{{volume}}" orientation="v" halign="start" flipped="true"/>
|
||||||
|
</def>
|
||||||
|
|
||||||
|
<def name="revtest">
|
||||||
|
<box>
|
||||||
|
<revealer reveal="{{reveal}}" transition="slideleft" duration="300ms">
|
||||||
|
hello, world
|
||||||
|
</revealer>
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
|
||||||
|
<def name="test">
|
||||||
|
<box class="{{some_var}}" space-evenly="false" spacing="10">
|
||||||
|
<scale value="{{scaleval}}" orientation="v" min="0" max="100" flipped="true" />
|
||||||
|
<box space-evenly="false" orientation="v">
|
||||||
|
asdasdfflmao
|
||||||
|
|
||||||
|
|
||||||
|
<box> | {{ round((EWW_NET["enp34s0"].NET_UP) * 8 / (1024 * 1024), 2)}}
|
||||||
|
{{ round((EWW_NET["enp34s0"].NET_DOWN) * 8 / (1024 * 1024), 2)}}
|
||||||
|
| {{EWW_RAM}}
|
||||||
|
| {{ round((EWW_DISK["/"].free) / (1024 * 1024 * 1024), 2)}}
|
||||||
|
</box>
|
||||||
|
|
||||||
|
|
||||||
|
<!--{{(EWW_NET[kek].NET_UP) * 10}}-->
|
||||||
|
|
||||||
|
asdf {{ round(0.1234, 2) }}
|
||||||
|
</box>
|
||||||
|
|
||||||
|
|
||||||
|
<button onclick="pgrep 'eww' && echo '' || echo ''" cursor="wait">Test bug</button>
|
||||||
|
<revealer reveal="{{reveal}}" transition="slideright" duration="300ms">
|
||||||
|
<button
|
||||||
|
onclick="notify-send 'ree' 'this is {{shit}}'"
|
||||||
|
onmiddleclick="notify-send 'ree' 'MITTE'"
|
||||||
|
onrightclick="notify-send 'ree' 'RECHTS'"
|
||||||
|
>
|
||||||
|
click me
|
||||||
|
</button>
|
||||||
|
</revealer>
|
||||||
|
<calendar show-heading="false" show-day-names="false" day="2" onclick="notify-send 'asdf' '{}'" />
|
||||||
|
notify-send 'ree' 'this is {{shit}}'
|
||||||
|
<multiple text="{{shit}}" />
|
||||||
|
|
||||||
|
<!--<literal content="{{code}}"/>-->
|
||||||
|
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
|
||||||
|
<def name="multiple">
|
||||||
|
<box orientation="v" space-evenly="false">
|
||||||
|
<box>{{text}}test</box>
|
||||||
|
|
||||||
|
<box class="whatever lol">{{text}}</box>
|
||||||
|
<box style="color: blue;">{{text}}</box>
|
||||||
|
<box>{{text}}</box>
|
||||||
|
<box>{{text}}</box>
|
||||||
|
|
||||||
|
<label onscroll="notify-send '{{shit}}' {}" text="reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" limit-width="5" wrap="true" />
|
||||||
|
<!--<input onchange="eww update code='{}'" />-->
|
||||||
|
{{date}}
|
||||||
|
{{date-tail}}
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
|
||||||
|
<def name="volume_popup">
|
||||||
|
<box orientation="v" space-evenly="true">
|
||||||
|
<scale flipped="true" orientation="v" value="{{volume}}" min="0" max="100" onchange="amixer sset 'Master' {}%" />
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
|
||||||
|
<def name="music">
|
||||||
|
<box class="hi ho" orientation="h" valign="start" space-evenly="false" hexpand="true">
|
||||||
|
<image visible="{{song-image-visible}}" path="{{song-image}}" width="150" height="150" />
|
||||||
|
<box orientation="v" halign="fill" space-evenly="false" vexpand="true" hexpand="true">
|
||||||
|
<box class="data" vexpand="true">
|
||||||
|
<box orientation="v" halign="start">
|
||||||
|
<label class="songname" halign="start" limit-width="30" text="{{song-name}}" />
|
||||||
|
<box space-evenly="false" halign="start">
|
||||||
|
<label class="key" text="Album: " />
|
||||||
|
<label halign="start" limit-width="30" text="{{song-album}}" />
|
||||||
|
</box>
|
||||||
|
<box space-evenly="false" halign="start">
|
||||||
|
<label class="key" text="By: " />
|
||||||
|
<label halign="start" limit-width="30" text="{{song-artist}}" />
|
||||||
|
</box>
|
||||||
|
</box>
|
||||||
|
</box>
|
||||||
|
<box class="buttons" hexpand="true">
|
||||||
|
<button onclick="playerctl previous"></button>
|
||||||
|
<button onclick="playerctl play-pause">{{song-playpause}}</button>
|
||||||
|
<button onclick="playerctl next"></button>
|
||||||
|
</box>
|
||||||
|
</box>
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
|
||||||
|
</definitions>
|
||||||
|
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<script-var name="volume">
|
||||||
|
amixer sget 'Master' | grep 'Front Left:' | sed 's/.*\[\(.*\)%\].*/\1/g';
|
||||||
|
LANG=C pactl subscribe | grep --line-buffered sink | while read -r _; do
|
||||||
|
amixer sget 'Master' | grep 'Front Left:' | sed 's/.*\[\(.*\)%\].*/\1/g'
|
||||||
|
done
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
<var name="reveal">
|
||||||
|
false
|
||||||
|
</var>
|
||||||
|
<var name="shit">
|
||||||
|
enp34s0
|
||||||
|
</var>
|
||||||
|
<var name="some_var"></var>
|
||||||
|
<var name="code"></var>
|
||||||
|
|
||||||
|
<script-var name="scaleval" interval="50ms">
|
||||||
|
echo 25
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
|
||||||
|
<var name="song-image"></var>
|
||||||
|
<var name="song-image-visible">true</var>
|
||||||
|
<var name="song-name"></var>
|
||||||
|
<var name="song-album"></var>
|
||||||
|
<var name="song-artist"></var>
|
||||||
|
<var name="song-show-progress">false</var>
|
||||||
|
<var name="song-playpause"></var>
|
||||||
|
<!--<script-var name="date" interval="1s">-->
|
||||||
|
<!--date-->
|
||||||
|
<!--</script-var>-->
|
||||||
|
<script-var name="date-tail">
|
||||||
|
<!--while true; do-->
|
||||||
|
<!--sleep 1;-->
|
||||||
|
<!--notify-send 'hi' 'ho'-->
|
||||||
|
date
|
||||||
|
<!--done-->
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
<script-var name="date" interval="1s">
|
||||||
|
date
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
|
||||||
|
<script-var interval="100ms" name="lmao">
|
||||||
|
cat ~/fuck
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
|
||||||
|
<var name="bruh">
|
||||||
|
{"hi": "ho", "hey": "fuck", "lol": "test" }
|
||||||
|
</var>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script-var name="kek" interval="1s">
|
||||||
|
/home/leon/reee.sh
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--<script-var name="xyz">-->
|
||||||
|
<!--tail -F /home/leon/test | while read -r _; do notify-send "Hi"; done-->
|
||||||
|
<!--</script-var>-->
|
||||||
|
|
||||||
|
<!--<script-var name="foo">-->
|
||||||
|
<!--tail -F /home/leon/test-->
|
||||||
|
<!--</script-var>-->
|
||||||
|
</variables>
|
||||||
|
|
||||||
|
|
||||||
|
<windows>
|
||||||
|
<window screen="0" name="px" stacking="fg" focusable="false">
|
||||||
|
<geometry anchor="center" width="10px" height="100%" x="1px" y="0px"/>
|
||||||
|
<widget>
|
||||||
|
<pxbar/>
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
<window screen="0" name="mw" stacking="fg" focusable="false" windowtype="dock" wm-ignore="false" sticky="false">
|
||||||
|
<!--<window screen="2" name="mw" stacking="fg" focusable="false">-->
|
||||||
|
<!--<geometry anchor="center" width="20%" height="20%" x="50px" y="50px"/>-->
|
||||||
|
<geometry anchor="top center" width="20%" height="20%" x="0px" y="0px"/>
|
||||||
|
<reserve side="left" distance="30%"/>
|
||||||
|
<widget>
|
||||||
|
<test ree="test" />
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
<window screen="0" name="rev">
|
||||||
|
<geometry anchor="bottom center" width="0" height="0"/>
|
||||||
|
<widget>
|
||||||
|
|
||||||
|
<revtest/>
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
<window screen="0" name="mw2" stacking="fg">
|
||||||
|
<geometry anchor="bottom right"/>
|
||||||
|
<widget>
|
||||||
|
<foo/>
|
||||||
|
<!--<test ree="test" />-->
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
<window screen="0" name="volume_popup">
|
||||||
|
<geometry />
|
||||||
|
<widget>
|
||||||
|
<volume_popup />
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
<window screen="0" name="music">
|
||||||
|
<widget>
|
||||||
|
<music />
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
</windows>
|
||||||
|
</eww>
|
|
@ -1,15 +0,0 @@
|
||||||
(defwindow test
|
|
||||||
:monitor 0
|
|
||||||
:geometry (geometry :x "0%"
|
|
||||||
:y "20px"
|
|
||||||
:width "10%"
|
|
||||||
:height "30px"
|
|
||||||
:anchor "top center")
|
|
||||||
:stacking "fg"
|
|
||||||
:reserve (struts :distance "40px" :side "top")
|
|
||||||
:windowtype "dock"
|
|
||||||
:wm-ignore false
|
|
||||||
(test-widget))
|
|
||||||
|
|
||||||
(defwidget test-widget []
|
|
||||||
"Bar")
|
|
87
eggs/eww/.config/eww/example/eww.scss
Normal file
87
eggs/eww/.config/eww/example/eww.scss
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
|
||||||
|
* {
|
||||||
|
all: unset; //Unsets everything so you can style everything from scratch
|
||||||
|
}
|
||||||
|
|
||||||
|
//Global Styles
|
||||||
|
window {
|
||||||
|
background-color: #282828;
|
||||||
|
color: #ffd5cd;
|
||||||
|
font-family: cozette;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
all: unset;
|
||||||
|
background-color: #282828;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar {
|
||||||
|
padding-left: 30px;
|
||||||
|
padding-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Styles on classes (see eww.xml for more information)
|
||||||
|
|
||||||
|
.sidestuff slider {
|
||||||
|
all: unset;
|
||||||
|
color: #ffd5cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider-vol scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-color: #D35D6E;
|
||||||
|
color: #000000;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.slider-vol scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: #4e4e4e;
|
||||||
|
border-radius: 50px;
|
||||||
|
min-height: 3px;
|
||||||
|
min-width: 50px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
.slider-ram scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-color: #D35D6E;
|
||||||
|
color: #000000;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.slider-ram scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: #4e4e4e;
|
||||||
|
border-radius: 50px;
|
||||||
|
min-height: 3px;
|
||||||
|
min-width: 50px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
.label-ram, .label-vol {
|
||||||
|
font-size: large;
|
||||||
|
}
|
||||||
|
.time {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces button:hover {
|
||||||
|
color: #D35D6E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces > * {
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active_wsp {
|
||||||
|
color: #8ec07c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full_wsp {
|
||||||
|
color: #ebdbb2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inactive_wsp {
|
||||||
|
color: #a89984;
|
||||||
|
}
|
125
eggs/eww/.config/eww/example/eww.xml
Normal file
125
eggs/eww/.config/eww/example/eww.xml
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
<!-- The main eww configuration file. This is where your widgets and how they appear on the screen and what they
|
||||||
|
contain are defined. -->
|
||||||
|
|
||||||
|
<eww>
|
||||||
|
<definitions>
|
||||||
|
<!-- This is the place where you structure your widgets, align them and stuff. -->
|
||||||
|
|
||||||
|
<def name="bar"> <!-- Starts the definition of a widget named main -->
|
||||||
|
<box orientation="h" hexpand="true" valign="center">
|
||||||
|
<workspaces wsp_literal="{{wsp_literal}}"/>
|
||||||
|
<music/>
|
||||||
|
<sidestuff/>
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
<def name="sidestuff">
|
||||||
|
<box class="sidestuff" orientation="h" space-evenly="false" halign="end">
|
||||||
|
<slider-vol/>
|
||||||
|
<slider-ram/>
|
||||||
|
<time/>
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
|
||||||
|
<def name="workspaces">
|
||||||
|
<literal content="{{wsp_literal}}"/>
|
||||||
|
</def>
|
||||||
|
<def name="music">
|
||||||
|
<box orientation="h" class="music" halign="center" space-evenly="false">
|
||||||
|
<!-- An image. We won't be using it, but it might be handy if you ever need it. -->
|
||||||
|
<!-- <image path="/home/user/.config/eww/icons/music.svg"/> -->
|
||||||
|
|
||||||
|
{{music}} <!--This is how you use variables.-->
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
<def name="slider-vol">
|
||||||
|
<!--A basic volume slider-->
|
||||||
|
<box orientation="h" class="slider-vol" space-evenly="false">
|
||||||
|
<box class="label-vol"></box>
|
||||||
|
<scale min="0" max="101" value="{{volume}}" onchange="amixer -D pulse sset Master {}%"/>
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
<def name="slider-ram">
|
||||||
|
<!--A basic RAM slider-->
|
||||||
|
<box orientation="h" class="slider-ram" space-evenly="false">
|
||||||
|
<box class="label-ram"></box>
|
||||||
|
<scale min="0" active="false" max="101" value="{{ram-used}}"/>
|
||||||
|
</box>
|
||||||
|
</def>
|
||||||
|
<def name="time">
|
||||||
|
<!--Time-->
|
||||||
|
<box class="time">{{hour}}:{{min}} {{month}} {{number_day}}, {{year_full}}</box>
|
||||||
|
</def>
|
||||||
|
</definitions>
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
|
||||||
|
<!-- Music vars -->
|
||||||
|
<!-- These are your variables. Like they say, they run a script, and then output that to the variable. In
|
||||||
|
the following var, we get music info from playerctl. -->
|
||||||
|
|
||||||
|
<script-var name="music" interval="5s">playerctl metadata --format '{{ artist }} - {{ title }}'</script-var>
|
||||||
|
|
||||||
|
|
||||||
|
<!--Volume var-->
|
||||||
|
<!-- If your vars get too complex to write down here, you can use an external script and paste it's path here as well, as shown below.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<script-var name="volume" interval="16ms">
|
||||||
|
amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
<script-var name="workspace_literal_0">
|
||||||
|
~/.config/eww/scripts/workspaces.sh 0
|
||||||
|
</script-var>
|
||||||
|
<script-var name="workspace_literal_1">
|
||||||
|
~/.config/eww/scripts/workspaces.sh 1
|
||||||
|
</script-var>
|
||||||
|
<script-var name="workspace_literal_2">
|
||||||
|
~/.config/eww/scripts/workspaces.sh 2
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
<!--Date vars-->
|
||||||
|
<script-var name="number_day" interval="5h">date "+%d"</script-var>
|
||||||
|
<script-var name="month" interval="10h">date "+%b"</script-var>
|
||||||
|
<script-var name="min" interval="10s">date "+%M"</script-var>
|
||||||
|
<script-var name="hour" interval="1m">date "+%H"</script-var>
|
||||||
|
<script-var name="year_full" interval="15h">date "+%Y"</script-var>
|
||||||
|
|
||||||
|
<!--RAM var-->
|
||||||
|
<script-var name="ram-used" interval="1s">
|
||||||
|
printf '%.0f\n' $(LANG=en_US free -m | grep Mem | awk '{print ($3/$2)*100}')
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
<!--Battery charge var-->
|
||||||
|
<script-var name="battery-remaining" interval="2m">
|
||||||
|
<!--cat /sys/class/power_supply/BAT0/capacity-->
|
||||||
|
echo 50
|
||||||
|
</script-var>
|
||||||
|
|
||||||
|
</variables>
|
||||||
|
|
||||||
|
<windows>
|
||||||
|
<!-- These are the windows -->
|
||||||
|
<window screen="0" name="bar">
|
||||||
|
<geometry x="0%" y="0%" width="100%" height="40px"/> <!--Specifies geometry-->
|
||||||
|
<reserve side="top" distance="20px"/>
|
||||||
|
<widget>
|
||||||
|
<bar wsp_literal="{{workspace_literal_1}}"/> <!--This is the def we created earlier-->
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
<window screen="1" name="bar1">
|
||||||
|
<geometry x="0%" y="0%" width="100%" height="40px"/> <!--Specifies geometry-->
|
||||||
|
<reserve side="top" distance="20px"/>
|
||||||
|
<widget>
|
||||||
|
<bar wsp_literal="{{workspace_literal_0}}"/> <!--This is the def we created earlier-->
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
<window screen="2" name="bar2">
|
||||||
|
<geometry x="0%" y="0%" width="100%" height="40px"/> <!--Specifies geometry-->
|
||||||
|
<reserve side="top" distance="20px"/>
|
||||||
|
<widget>
|
||||||
|
<bar wsp_literal="{{workspace_literal_2}}"/> <!--This is the def we created earlier-->
|
||||||
|
</widget>
|
||||||
|
</window>
|
||||||
|
</windows>
|
||||||
|
</eww>
|
13
eggs/eww/.config/eww/foo.xml
Normal file
13
eggs/eww/.config/eww/foo.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<eww>
|
||||||
|
<definitions>
|
||||||
|
<def name="foo">
|
||||||
|
<box>Hey this is a foo</box>
|
||||||
|
</def>
|
||||||
|
</definitions>
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<var name="shit">
|
||||||
|
shit
|
||||||
|
</var>
|
||||||
|
</variables>
|
||||||
|
</eww>
|
38
eggs/eww/.config/eww/music.sh
Executable file
38
eggs/eww/.config/eww/music.sh
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fixArtUrl() {
|
||||||
|
sed -e 's/open.spotify.com/i.scdn.co/g'
|
||||||
|
}
|
||||||
|
|
||||||
|
getData() {
|
||||||
|
eww update song-name "$(playerctl metadata --format "{{ xesam:title }}")"
|
||||||
|
wget -O /tmp/music-file "$(playerctl metadata --format "{{ mpris:artUrl }}"| fixArtUrl)"
|
||||||
|
eww update song-image /tmp/music-file
|
||||||
|
if [ -f /tmp/music-file ]; then
|
||||||
|
eww update song-image-visible true
|
||||||
|
else
|
||||||
|
eww update song-image-visible false
|
||||||
|
fi
|
||||||
|
|
||||||
|
eww update song-album "$(playerctl metadata --format "{{ xesam:album }}")"
|
||||||
|
eww update song-artist "$(playerctl metadata --format "{{ xesam:artist }}")"
|
||||||
|
if [ "spotify" = "$(playerctl metadata | head -n1 | awk '{ print $1 }')" ]; then
|
||||||
|
eww update song-show-progress "false"
|
||||||
|
else
|
||||||
|
eww update song-show-progress "true"
|
||||||
|
fi;
|
||||||
|
|
||||||
|
song_status="$(playerctl status --format "{{ lc(status) }}")"
|
||||||
|
if [ "$song_status" = "playing" ]; then
|
||||||
|
eww update song-playpause
|
||||||
|
else
|
||||||
|
eww update song-playpause
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getData
|
||||||
|
cat <(playerctl metadata --format '{{ title }}' -F & playerctl status -F) 2>&1 /dev/null
|
12
eggs/eww/.config/eww/popup.sh
Executable file
12
eggs/eww/.config/eww/popup.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
secs="$1"
|
||||||
|
window_name="$2"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#kill -9 "$(cat /tmp/eww-popup.pid)" || \
|
||||||
|
#eww -d open "$window_name"
|
||||||
|
|
||||||
|
#{ sleep "$secs"; eww close "$window_name"; } &
|
||||||
|
#echo $! > /tmp/eww-popup.pid
|
28
eggs/eww/.config/eww/scripts/workspaces.sh
Executable file
28
eggs/eww/.config/eww/scripts/workspaces.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
monitor="$1"
|
||||||
|
|
||||||
|
gib_workspace_names() {
|
||||||
|
wmctrl -d \
|
||||||
|
| awk '{ print $1 " " $2 " " $9 }' \
|
||||||
|
| grep -v NSP \
|
||||||
|
| grep "${monitor}_"
|
||||||
|
}
|
||||||
|
|
||||||
|
gib_workspace_xml() {
|
||||||
|
gib_workspace_names | while read -r id active name; do
|
||||||
|
name="${name#*_}"
|
||||||
|
if [ "$active" == '*' ]; then
|
||||||
|
button_class="active_wsp"
|
||||||
|
elif wmctrl -l | grep --regexp '.*\s\+'"$id"'\s\+.*' >/dev/null; then
|
||||||
|
button_class="full_wsp"
|
||||||
|
else
|
||||||
|
button_class="inactive_wsp"
|
||||||
|
fi
|
||||||
|
echo -n '<button class="'"$button_class"'" onclick="wmctrl -s '"$id"'">'"$name"'</button>'
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
xprop -spy -root _NET_CURRENT_DESKTOP | while read -r; do
|
||||||
|
echo '<box orientation="h" class="workspaces" space-evenly="true" halign="start" valign="center" vexpand="true">'"$(gib_workspace_xml)"'</box>'
|
||||||
|
done
|
|
@ -421,6 +421,7 @@ binds {
|
||||||
Mod+Minus { set-column-width "-10%"; }
|
Mod+Minus { set-column-width "-10%"; }
|
||||||
Mod+Shift+Equal { set-column-width "+10%"; }
|
Mod+Shift+Equal { set-column-width "+10%"; }
|
||||||
Mod+Equal { set-column-width "+10%"; }
|
Mod+Equal { set-column-width "+10%"; }
|
||||||
|
|
||||||
Mod+Ctrl+Minus { set-window-height "-10%"; }
|
Mod+Ctrl+Minus { set-window-height "-10%"; }
|
||||||
Mod+Ctrl+Equal { set-window-height "+10%"; }
|
Mod+Ctrl+Equal { set-window-height "+10%"; }
|
||||||
Mod+Ctrl+Shift+Equal { set-window-height "+10%"; }
|
Mod+Ctrl+Shift+Equal { set-window-height "+10%"; }
|
||||||
|
@ -439,7 +440,5 @@ binds {
|
||||||
|
|
||||||
Ctrl+Escape { spawn "killall" "-s" "SIGINT" "wf-recorder"; }
|
Ctrl+Escape { spawn "killall" "-s" "SIGINT" "wf-recorder"; }
|
||||||
|
|
||||||
Mod+Shift+Y { spawn "niri" "msg" "action" "set-dynamic-cast-window"; }
|
|
||||||
|
|
||||||
Mod+Shift+E { quit; }
|
Mod+Shift+E { quit; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,5 +15,5 @@
|
||||||
"news": {
|
"news": {
|
||||||
"NEWS.md": "10960"
|
"NEWS.md": "10960"
|
||||||
},
|
},
|
||||||
"version": 8
|
"version": 7
|
||||||
}
|
}
|
|
@ -31,7 +31,7 @@ export let eggs = #{
|
||||||
"nvim-old": #{ enabled: false },
|
"nvim-old": #{ enabled: false },
|
||||||
"wallpapers": #{ targets: "~/.config/wallpapers" },
|
"wallpapers": #{ targets: "~/.config/wallpapers" },
|
||||||
"alacritty": #{ enabled: !device.windows, targets: "~/.config/alacritty" },
|
"alacritty": #{ enabled: !device.windows, targets: "~/.config/alacritty" },
|
||||||
"eww": merge_into_home(device.linux && device.desktop || device.thinkix, []),
|
"eww": merge_into_home(device.linux && device.desktop, []),
|
||||||
"eww-bar": merge_into_home(device.linux && device.desktop, []),
|
"eww-bar": merge_into_home(device.linux && device.desktop, []),
|
||||||
"foot": #{ enabled: device.linux, targets: "~/.config/foot", templates: ["foot.ini"] },
|
"foot": #{ enabled: device.linux, targets: "~/.config/foot", templates: ["foot.ini"] },
|
||||||
"git": merge_into_home(true, [".gitconfig"]),
|
"git": merge_into_home(true, [".gitconfig"]),
|
||||||
|
|
Loading…
Add table
Reference in a new issue