diff --git a/eggs/eww/.config/eww/asdf/eww.scss b/eggs/eww/.config/eww/asdf/eww.scss deleted file mode 100644 index e69de29..0000000 diff --git a/eggs/eww/.config/eww/asdf/eww.xml b/eggs/eww/.config/eww/asdf/eww.xml deleted file mode 100644 index ecc8abd..0000000 --- a/eggs/eww/.config/eww/asdf/eww.xml +++ /dev/null @@ -1,27 +0,0 @@ -<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> diff --git a/eggs/eww/.config/eww/eww.scss b/eggs/eww/.config/eww/eww.scss deleted file mode 100644 index fd05c64..0000000 --- a/eggs/eww/.config/eww/eww.scss +++ /dev/null @@ -1,129 +0,0 @@ -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%} -} diff --git a/eggs/eww/.config/eww/eww.xml b/eggs/eww/.config/eww/eww.xml deleted file mode 100644 index 0224aea..0000000 --- a/eggs/eww/.config/eww/eww.xml +++ /dev/null @@ -1,226 +0,0 @@ -<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> diff --git a/eggs/eww/.config/eww/eww.yuck b/eggs/eww/.config/eww/eww.yuck new file mode 100644 index 0000000..d50cf7c --- /dev/null +++ b/eggs/eww/.config/eww/eww.yuck @@ -0,0 +1,15 @@ +(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") diff --git a/eggs/eww/.config/eww/example/eww.scss b/eggs/eww/.config/eww/example/eww.scss deleted file mode 100644 index d8d856e..0000000 --- a/eggs/eww/.config/eww/example/eww.scss +++ /dev/null @@ -1,87 +0,0 @@ - -* { - 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; -} diff --git a/eggs/eww/.config/eww/example/eww.xml b/eggs/eww/.config/eww/example/eww.xml deleted file mode 100644 index e36dc39..0000000 --- a/eggs/eww/.config/eww/example/eww.xml +++ /dev/null @@ -1,125 +0,0 @@ -<!-- 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> diff --git a/eggs/eww/.config/eww/foo.xml b/eggs/eww/.config/eww/foo.xml deleted file mode 100644 index 5d0a71f..0000000 --- a/eggs/eww/.config/eww/foo.xml +++ /dev/null @@ -1,13 +0,0 @@ -<eww> - <definitions> - <def name="foo"> - <box>Hey this is a foo</box> - </def> - </definitions> - - <variables> - <var name="shit"> - shit - </var> - </variables> -</eww> diff --git a/eggs/eww/.config/eww/music.sh b/eggs/eww/.config/eww/music.sh deleted file mode 100755 index c7a609e..0000000 --- a/eggs/eww/.config/eww/music.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/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 diff --git a/eggs/eww/.config/eww/popup.sh b/eggs/eww/.config/eww/popup.sh deleted file mode 100755 index cb2e400..0000000 --- a/eggs/eww/.config/eww/popup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 diff --git a/eggs/eww/.config/eww/scripts/workspaces.sh b/eggs/eww/.config/eww/scripts/workspaces.sh deleted file mode 100755 index bb97865..0000000 --- a/eggs/eww/.config/eww/scripts/workspaces.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/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 diff --git a/yolk.rhai b/yolk.rhai index 7b30a46..5eae9d1 100644 --- a/yolk.rhai +++ b/yolk.rhai @@ -31,7 +31,7 @@ export let eggs = #{ "nvim-old": #{ enabled: false }, "wallpapers": #{ targets: "~/.config/wallpapers" }, "alacritty": #{ enabled: !device.windows, targets: "~/.config/alacritty" }, - "eww": merge_into_home(device.linux && device.desktop, []), + "eww": merge_into_home(device.linux && device.desktop || device.thinkix, []), "eww-bar": merge_into_home(device.linux && device.desktop, []), "foot": #{ enabled: device.linux, targets: "~/.config/foot", templates: ["foot.ini"] }, "git": merge_into_home(true, [".gitconfig"]),