diff --git a/README.md b/README.md index 193c7d7..247b86a 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,25 @@ ### dependencies -- hyprland +- alacritty +- blight - ~~conky~~ -- waybar -- hyprpaper - eww - gotop - htop -- alacritty -- ~~swaylock~~ +- hyprland +- hyprpaper - hypridle - hyprlock -- [swaylock-script](https://gitea.ahur.ac/statzitz/swaylock-script) -- wlclock -- [clock_start](https://gitea.ahur.ac/statzitz/clock-start) -- neofetch -- [nfetch_startup](https://gitea.ahur.ac/statzitz/nfetch-startup) - hy3 +- ~~swaylock~~ +- neofetch +- pamixer +- ~~[swaylock-script](https://gitea.ahur.ac/statzitz/swaylock-script)~~ +- wlclock +- ~~[clock_start](https://gitea.ahur.ac/statzitz/clock-start)~~ +- [nfetch_startup](https://gitea.ahur.ac/statzitz/nfetch-startup) +- ~~waybar~~ + others suprises ### images_hyprland diff --git a/dotconfig/eww/bar_widget/bar.scss b/dotconfig/eww/bar_widget/bar.scss index cc16b15..892c14a 100644 --- a/dotconfig/eww/bar_widget/bar.scss +++ b/dotconfig/eww/bar_widget/bar.scss @@ -54,17 +54,97 @@ } +.sound_box { + padding-top: 2px; + padding-left: 12px; + padding-right: 4px; + transition: none; + color: #99ddff; + + border-radius: 13px 0px 0px 13px; + background: #362a28; + +} + +.mic_box { + padding-top: 2px; + padding-left: 4px; + padding-right: 4px; + transition: none; + color: #99ddff; + + border-radius: 0px 0px 0px 0px; + background: #362a28; + +} + +.light_box { + padding-top: 2px; + padding-left: 4px; + padding-right: 4px; + transition: none; + color: #ff8844; + + border-radius: 0px 0px 0px 0px; + background: #362a28; + +} + +.battery_box { + padding-top: 2px; + padding-left: 4px; + padding-right: 12px; + margin-right: 8px; + transition: none; + color: #ffdd44; + + border-radius: 0px 13px 13px 0px; + background: #362a28; + +} + .tray { padding-top: 2px; padding-left: 12px; padding-right: 12px; margin-right: 16px; transition: none; - color: #bd93f9; + color: #ffa500; border-radius: 13px 13px 13px 13px; background: #362a28; + menu { + + background: #201010; + border-radius: 10px; + + } + + menuitem { + border-radius: 13px; + font-size: 14px; + padding: 2px 5px; + + + &disabled label { + color: #928374; + } + + &:hover { + background-color: #282828; + } + + separator { + padding-top: 1px; + + &:last-child { + padding: unset; + } + } + + } + } // Styles on classes (see eww.yuck for more information) diff --git a/dotconfig/eww/bar_widget/bar.yuck b/dotconfig/eww/bar_widget/bar.yuck index a18eb6f..18c8d17 100644 --- a/dotconfig/eww/bar_widget/bar.yuck +++ b/dotconfig/eww/bar_widget/bar.yuck @@ -30,15 +30,27 @@ (defwidget left_pane [] (box :class "left_pane" :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 "") + (box + :class "sound_box" + (label :text "${volume_sound}  ")) + (box + :class "mic_box" + (label :text "${volume_mic}%  ")) + (box + :class "light_box" + (label :text "${light_value}% ☀ ")) + (box + :class "battery_box" + (label :text "${batterie}%  ")) + ;(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 "") (systray :class "tray" :orientation "h" :space-evenly true :icon-size "16") )) @@ -76,8 +88,17 @@ (deflisten music :initial "" "playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true") -(defpoll volume :interval "1s" - "echo 50") +(defpoll volume_sound :interval "0.2s" + "pamixer --get-volume-human") + +(defpoll volume_mic :interval "0.2s" + "get_source_volume") + +(defpoll light_value :interval "1s" + "get_light_value") + +(defpoll batterie :interval "1s" + "cat /sys/class/power_supply/BAT1/capacity") (defpoll time :interval "1s" "date '+%I:%M:%S %p'") diff --git a/dotlocal/bin/get_light_value b/dotlocal/bin/get_light_value new file mode 100755 index 0000000..d5b28a3 --- /dev/null +++ b/dotlocal/bin/get_light_value @@ -0,0 +1,2 @@ +#!/bin/sh +echo $(($(blight get)*100/255)) diff --git a/dotlocal/bin/get_source_volume b/dotlocal/bin/get_source_volume new file mode 100755 index 0000000..1d82aa1 --- /dev/null +++ b/dotlocal/bin/get_source_volume @@ -0,0 +1,3 @@ +#!/bin/sh + +pactl get-source-volume @DEFAULT_SOURCE@ | grep -Po '\d+(?=%)' | head -n 1