diff --git a/group_vars/all/fonts.yml b/group_vars/all/fonts.yml index 58b26e6..85abd79 100644 --- a/group_vars/all/fonts.yml +++ b/group_vars/all/fonts.yml @@ -2,6 +2,6 @@ font: jetbrains mono light font_size: 10 font_icon: - - FontAwesome5FreeRegular - - FontAwesome5FreeSolid - - FontAwesome5Brands + - FontAwesome6FreeRegular + - FontAwesome6FreeSolid + - FontAwesome6Brands diff --git a/install.yml b/install.yml index 4f3ae97..9e73b51 100644 --- a/install.yml +++ b/install.yml @@ -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' diff --git a/roles/eww/tasks/main.yml b/roles/eww/tasks/main.yml new file mode 100644 index 0000000..8d900a1 --- /dev/null +++ b/roles/eww/tasks/main.yml @@ -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 diff --git a/roles/eww/templates/eww.scss.j2 b/roles/eww/templates/eww.scss.j2 new file mode 100644 index 0000000..4893603 --- /dev/null +++ b/roles/eww/templates/eww.scss.j2 @@ -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; +} diff --git a/roles/eww/templates/eww.yuck.j2 b/roles/eww/templates/eww.yuck.j2 new file mode 100644 index 0000000..74a86c1 --- /dev/null +++ b/roles/eww/templates/eww.yuck.j2 @@ -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)) diff --git a/roles/rustup/files/rustup.fish b/roles/rustup/files/rustup.fish new file mode 100644 index 0000000..d7856ea --- /dev/null +++ b/roles/rustup/files/rustup.fish @@ -0,0 +1 @@ +set -x PATH "$PATH:$HOME/.cargo/bin" diff --git a/roles/rustup/tasks/main.yml b/roles/rustup/tasks/main.yml new file mode 100644 index 0000000..5d77da6 --- /dev/null +++ b/roles/rustup/tasks/main.yml @@ -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/"