1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-21 22:42:00 +01:00

added first files to test eww

This commit is contained in:
eoli3n 2023-11-06 13:39:40 +01:00
parent 62d13faa6b
commit 8c352b286c
7 changed files with 179 additions and 3 deletions

@ -2,6 +2,6 @@
font: jetbrains mono light
font_size: 10
font_icon:
- FontAwesome5FreeRegular
- FontAwesome5FreeSolid
- FontAwesome5Brands
- FontAwesome6FreeRegular
- FontAwesome6FreeSolid
- FontAwesome6Brands

@ -68,3 +68,9 @@
- role: mime
tags: mime
when: ansible_user_id != 'root'
- role: rustup
tags: rustup
when: ansible_user_id != 'root'
- role: eww
tags: eww
when: ansible_user_id != 'root'

31
roles/eww/tasks/main.yml Normal file

@ -0,0 +1,31 @@
---
- name: clone eww project
git:
repo: https://github.com/elkowar/eww
dest: "$HOME/dev/eww"
- name: build eww
shell: cargo build --release --no-default-features --features=wayland
args:
creates: "$HOME/dev/eww/target/release/eww"
chdir: "$HOME/dev/eww/"
- name: chmod eww
file:
path: "$HOME/dev/eww/target/release/eww"
mode: 0755
- name: create eww config dir
file:
path: "$HOME/.config/eww"
state: directory
- name: configure eww
template:
src: '{{ item.src }}'
dest: "$HOME/.config/eww/{{ item.dest }}"
loop:
- src: eww.scss.j2
dest: eww.scss
- src: eww.yuck.j2
dest: eww.yuck

@ -0,0 +1,54 @@
* {
all: unset; //Unsets everything so you can style everything from scratch
}
//Global Styles
.bartop {
background-color: #3a3a3a;
color: #b0b4bc;
padding: 10px;
}
// Styles on classes (see eww.yuck for more information)
.sidestuff slider {
all: unset;
color: #ffd5cd;
}
.metric scale trough highlight {
all: unset;
background-color: #D35D6E;
color: #000000;
border-radius: 10px;
}
.metric scale trough {
all: unset;
background-color: #4e4e4e;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.metric scale trough highlight {
all: unset;
background-color: #D35D6E;
color: #000000;
border-radius: 10px;
}
.metric scale trough {
all: unset;
background-color: #4e4e4e;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.label-ram {
font-size: large;
}
.workspaces button:hover {
color: #D35D6E;
}

@ -0,0 +1,74 @@
(defwidget bar []
(centerbox :orientation "h"
(workspaces)
(music)
(sidestuff)))
(defwidget sidestuff []
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
(metric :label "🔊"
:value volume
:onchange "amixer -D pulse sset Master {}%")
(metric :label ""
:value {EWW_RAM.used_mem_perc}
:onchange "")
(metric :label "💾"
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "")
time))
(defwidget workspaces []
(box :class "workspaces"
:orientation "h"
:space-evenly true
:halign "start"
:spacing 10
(button :onclick "wmctrl -s 0" 1)
(button :onclick "wmctrl -s 1" 2)
(button :onclick "wmctrl -s 2" 3)
(button :onclick "wmctrl -s 3" 4)
(button :onclick "wmctrl -s 4" 5)
(button :onclick "wmctrl -s 5" 6)
(button :onclick "wmctrl -s 6" 7)
(button :onclick "wmctrl -s 7" 8)
(button :onclick "wmctrl -s 8" 9)))
(defwidget music []
(box :class "music"
:orientation "h"
:space-evenly false
:halign "center"
{music != "" ? " ${music}" : ""}))
(defwidget metric [label value onchange]
(box :orientation "h"
:class "metric"
:space-evenly false
(box :class "label" label)
(scale :min 0
:max 101
:active {onchange != ""}
:value value
:onchange onchange)))
(deflisten music :initial ""
"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
(defpoll volume :interval "1s"
"scripts/getvol")
(defpoll time :interval "1s"
"date '+%d%m%y %H%M%S'")
(defwindow bartop
:monitor 0
:windowtype "dock"
:geometry (geometry :x "0%"
:y "0%"
:width "100%"
:height "10px"
:anchor "top center")
:reserve (struts :side "top" :distance "4%")
(bar))

@ -0,0 +1 @@
set -x PATH "$PATH:$HOME/.cargo/bin"

@ -0,0 +1,10 @@
---
- name: init nightly rustup
shell: rustup-init --default-toolchain nightly --no-modify-path -y
args:
creates: "$HOME/.cargo/bin"
- name: configure cargo path
copy:
src: rustup.fish
dest: "$HOME/.config/fish/conf.d/"