refactore directory structure
This commit is contained in:
parent
3830eef1f4
commit
e87bfb7c39
485 changed files with 66 additions and 1696 deletions
44
.config/eww/battery.yuck
Normal file
44
.config/eww/battery.yuck
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
(defvar batt_close_hover false)
|
||||
|
||||
(defwindow battery
|
||||
:geometry (geometry :x "0px"
|
||||
:y "40px"
|
||||
:width "200px"
|
||||
:height "60px"
|
||||
:anchor "bottom center")
|
||||
:stacking "fg"
|
||||
:monitor "0"
|
||||
(battery))
|
||||
|
||||
(defwidget battery []
|
||||
(box
|
||||
:class "battery-container"
|
||||
:orientation "h"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:space-evenly "false"
|
||||
:spacing 5
|
||||
(button
|
||||
:class "battery-icon"
|
||||
:onclick "" "")
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:spacing 5
|
||||
(label
|
||||
:class "battery-label"
|
||||
:halign "start"
|
||||
:text "Battery is at ${round(EWW_BATTERY['BAT1'].capacity, 0)}%, plug it in you dope.")
|
||||
(scale
|
||||
:class "battery-value"
|
||||
:value {EWW_BATTERY["BAT1"].capacity}
|
||||
:orientation "h"
|
||||
:max 100
|
||||
:min 0))
|
||||
(button
|
||||
:class "close-icon"
|
||||
:onclick "eww close battery"
|
||||
"")))
|
32
.config/eww/bright.yuck
Normal file
32
.config/eww/bright.yuck
Normal file
|
@ -0,0 +1,32 @@
|
|||
(defwindow brightness
|
||||
:geometry (geometry :x "0px"
|
||||
:y "40px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:monitor "0"
|
||||
(brightshow))
|
||||
|
||||
(defwidget brightshow []
|
||||
(box
|
||||
:class "volume-container"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:spacing 5
|
||||
(button
|
||||
:class "volume-icon"
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
:onclick "" "墳")
|
||||
(scale
|
||||
:class "volume-value"
|
||||
:value {volume_percent}
|
||||
:valign "center"
|
||||
:halign "start"
|
||||
:orientation "h"
|
||||
:max 150
|
||||
:min 0)
|
||||
(label
|
||||
:class "volume-label"
|
||||
:halign "start"
|
||||
:valign "center"
|
||||
:text "${volume_percent}%")))
|
808
.config/eww/eww.scss
Normal file
808
.config/eww/eww.scss
Normal file
|
@ -0,0 +1,808 @@
|
|||
/**
|
||||
Created by saimoom **/
|
||||
*{
|
||||
all: unset;
|
||||
font-family: feather;
|
||||
font-family: VictorMono Nerd Font;
|
||||
}
|
||||
|
||||
$background: rgba(00, 00, 00, 0.7);
|
||||
$widget-background: rgba(30, 30, 30, 0.4);
|
||||
$shadow: #0B0B0B;
|
||||
$grey: #606060;
|
||||
|
||||
$black: #282A36;
|
||||
$red: #F37F97;
|
||||
$green: #5ADECD;
|
||||
$orange: #F2A272;
|
||||
$blue: #8897F4;
|
||||
$purple: #C574DD;
|
||||
$teal: #79E6F3;
|
||||
$white: #FDFDFD;
|
||||
|
||||
$base00: #282a36;
|
||||
$base01: #34353e;
|
||||
$base02: #43454f;
|
||||
$base03: #78787e;
|
||||
$base04: #a5a5a9;
|
||||
$base05: #e2e4e5;
|
||||
$base06: #eff0eb;
|
||||
$base07: #f1f1f0;
|
||||
$base08: #ff5c57;
|
||||
$base09: #ff9f43;
|
||||
$base0A: #f3f99d;
|
||||
$base0B: #5af78e;
|
||||
$base0C: #9aedfe;
|
||||
$base0D: #57c7ff;
|
||||
$base0E: #ff6ac1;
|
||||
$base0F: #b2643c;
|
||||
$basetransparent: rgba(40, 42, 54, 0.0);
|
||||
$backtransparent: rgba(40, 42, 54, 0.7);
|
||||
$darktransparent: rgba(40, 42, 54, 0.97);
|
||||
|
||||
/** General **/
|
||||
.bar_class {
|
||||
background-color: $backtransparent;
|
||||
border-radius: 20px 20px 20px 20px;
|
||||
box-shadow: 5px 5px 4px 4px #202020;
|
||||
margin: 6px 18px 13px 18px;
|
||||
}
|
||||
.module {
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 10px 10px 0px 10px;
|
||||
}
|
||||
|
||||
.side{
|
||||
background-color: $base00;
|
||||
border-width: 0px;
|
||||
padding: 30px 30px 0px 30px;
|
||||
border-radius: 20px 20px 20px 20px;
|
||||
box-shadow: 2px 2px 5px 5px #101010;
|
||||
margin: 8px 18px 13px 18px;
|
||||
}
|
||||
|
||||
.center_modules {
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
/** tooltip!! **/
|
||||
tooltip.background {
|
||||
background-color: $backtransparent;
|
||||
font-size: 18;
|
||||
border-radius: 10px;
|
||||
color: $white;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
|
||||
/** Widgets **/
|
||||
|
||||
.clock_time_class, .clock_minute_class {
|
||||
font-size: 14;
|
||||
}
|
||||
.clock_date_class {
|
||||
font-size: 14;
|
||||
margin: 0px 20px 0px -1px;
|
||||
color: $base08;
|
||||
}
|
||||
.clock_time_class {
|
||||
color: $base0B;
|
||||
font-weight: bold;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.notif_button {
|
||||
font-size: 14;
|
||||
margin: 2px 20px 0px 0px;
|
||||
color: $base05;
|
||||
}
|
||||
|
||||
.right_modules {
|
||||
padding-bottom: 2px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.separ {
|
||||
font-size: 5;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
.membar {
|
||||
color: $base0A;
|
||||
background-color: $base01;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.batbar {
|
||||
color: $base0E;
|
||||
background-color: $widget-background;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.cpubar {
|
||||
color: $base0D;
|
||||
background-color: $widget-background;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.brightbar trough highlight {
|
||||
background-color: $base09;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.brightbar {
|
||||
color: $base09;
|
||||
background-color: $widget-background;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.bright_label {
|
||||
color: $base09;
|
||||
}
|
||||
|
||||
.bright_icon {
|
||||
font-size: 18;
|
||||
color: $base09;
|
||||
margin: 0px 15px 0px 3px;
|
||||
}
|
||||
|
||||
.volbar trough highlight {
|
||||
background-color: $base08;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.vol_module, .bright_module {
|
||||
background-color: rgba(00, 00, 00, 0.0);
|
||||
margin: 0px 3px 0px 5px;
|
||||
}
|
||||
|
||||
.volbar {
|
||||
color: $base08;
|
||||
background-color: $widget-background;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.vol_label {
|
||||
color: $base08;
|
||||
}
|
||||
|
||||
.volume_icon {
|
||||
font-size: 14;
|
||||
color: $base08;
|
||||
margin: 0px 15px 0px 3px;
|
||||
}
|
||||
|
||||
.module_essid {
|
||||
font-size: 14px;
|
||||
// color: $base0C;
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
.module-wifi {
|
||||
font-size: 14px;
|
||||
// color: $base0C;
|
||||
margin: 0px 25px 0px 0px;
|
||||
}
|
||||
|
||||
.iconlauncher {
|
||||
color: $white;
|
||||
font-size: 10px;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
.iconsearch {
|
||||
color: $white;
|
||||
font-size: 18px;
|
||||
}
|
||||
.iconmem {
|
||||
color: $base0A;
|
||||
padding: 2px 10px 0px 8px;
|
||||
}
|
||||
.iconbat {
|
||||
color: $base0E;
|
||||
margin: 2px 10px 0px 8px;
|
||||
}
|
||||
.iconcpu {
|
||||
color: $base0D;
|
||||
margin: 2px 10px 0px 8px;
|
||||
}
|
||||
.iconvol {
|
||||
color: $base08;
|
||||
margin: 2px 10px 0px 8px;
|
||||
}
|
||||
.iconbright {
|
||||
color: $base09;
|
||||
margin: 3px 13px 0px 8px;
|
||||
}
|
||||
.iconbat, .iconmem, .iconcpu .iconvol .iconbright {
|
||||
font-size: 12;
|
||||
}
|
||||
.mem_label {
|
||||
color: $base0A;
|
||||
}
|
||||
.cpu_label {
|
||||
color: $base0D;
|
||||
}
|
||||
.bat_label {
|
||||
color: $base0E;
|
||||
}
|
||||
.bright_icon {
|
||||
font-size: 18;
|
||||
color: $base09;
|
||||
margin: 0px 15px 0px 3px;
|
||||
}
|
||||
|
||||
.disk_label {
|
||||
color: $base09;
|
||||
}
|
||||
|
||||
.icondisk {
|
||||
font-size: 18;
|
||||
color: $base09;
|
||||
margin: 3px 5px 0px 3px;
|
||||
}
|
||||
|
||||
.separ {
|
||||
color: $base03;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
margin: 0px 8px 0px 8px;
|
||||
}
|
||||
|
||||
.launcher_module {
|
||||
background-color: rgba(00, 00, 00, 0.0);
|
||||
}
|
||||
|
||||
.mem_module {
|
||||
background-color: rgba(00, 00, 00, 0.0);
|
||||
border-radius: 16px;
|
||||
margin: 0px 5px 0px 0px;
|
||||
}
|
||||
|
||||
.bat_module {
|
||||
background-color: rgba(00, 00, 00, 0.0);
|
||||
border-radius: 16px;
|
||||
margin: 0px 0px 0px 5px;
|
||||
}
|
||||
|
||||
.cpu_module {
|
||||
background-color: rgba(00, 00, 00, 0.0);
|
||||
border-radius: 16px;
|
||||
margin: 0px 10px 0px 5px;
|
||||
}
|
||||
|
||||
.works {
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
margin: 4px 0px 0px 20px;
|
||||
background-color: rgba(00, 00, 00, 0.0);
|
||||
}
|
||||
|
||||
.0, .01, .02, .03, .04, .05, .06,
|
||||
.011, .022, .033, .044, .055, .066 {
|
||||
margin: 0px 15px 0px 0px;
|
||||
}
|
||||
|
||||
.04 {
|
||||
margin: 0px 2px 0px 0px;
|
||||
}
|
||||
|
||||
/* Unoccupied */
|
||||
.0 {
|
||||
color: $base03;
|
||||
}
|
||||
|
||||
/* Occupied */
|
||||
.01, .02, .03, .04, .05, .06, .07, .08, .09 {
|
||||
color: $base05;
|
||||
}
|
||||
|
||||
/* Focused */
|
||||
.011, .022, .033, .044, .055, .066, .077, .088, .099{
|
||||
color: $base0D;
|
||||
}
|
||||
|
||||
|
||||
// Calendar
|
||||
.cal {
|
||||
background-color: $backtransparent;
|
||||
font-family: mononoki Nerd Font;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
border-radius: 25px;
|
||||
|
||||
.cal-in {
|
||||
padding: 10px 10px 10px 10px;
|
||||
color: $white;
|
||||
|
||||
.cal {
|
||||
&.highlight {
|
||||
padding: 20px;
|
||||
}
|
||||
padding: 10px 10px 10px 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
calender {
|
||||
color: $blue;
|
||||
}
|
||||
calendar:selected {
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
calendar.header {
|
||||
color: $blue;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar.button {
|
||||
color: $green;
|
||||
}
|
||||
|
||||
calendar.highlight {
|
||||
color: $blue;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar:indeterminate {
|
||||
color: $black;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.sys_sep {
|
||||
color: $widget-background;
|
||||
font-size: 14;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
.sys_text_bat_sub, .sys_text_mem_sub {
|
||||
font-size: 16;
|
||||
color: $white;
|
||||
margin: 5px 0px 0px 25px;
|
||||
}
|
||||
.sys_text_bat, .sys_text_mem {
|
||||
font-size: 21;
|
||||
font-weight: bold;
|
||||
margin: 14px 0px 0px 25px;
|
||||
}
|
||||
.sys_icon_bat, .sys_icon_mem {
|
||||
font-size: 30;
|
||||
margin: 30px;
|
||||
}
|
||||
.sys_win {
|
||||
background-color: $background;
|
||||
border-radius: 25px;
|
||||
}
|
||||
.sys_bat {
|
||||
color: $green;
|
||||
background-color: $widget-background;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sys_mem {
|
||||
color: $orange;
|
||||
background-color: $widget-background;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sys_icon_bat, .sys_text_bat {
|
||||
color: $green;
|
||||
}
|
||||
.sys_icon_mem, .sys_text_mem {
|
||||
color: $orange;
|
||||
}
|
||||
.sys_bat_box {
|
||||
border-radius: 16px;
|
||||
margin: 15px 10px 10px 20px;
|
||||
}
|
||||
.sys_mem_box {
|
||||
border-radius: 16px;
|
||||
margin: 10px 10px 15px 20px;
|
||||
}
|
||||
|
||||
|
||||
.app-name {
|
||||
color: $base0D;
|
||||
font-size : 14px;
|
||||
font-weight : bold;
|
||||
// margin : 11px 5px 0px 0px;
|
||||
}
|
||||
|
||||
.app-icon {
|
||||
margin : 5px 10px 0px 0px;
|
||||
|
||||
}
|
||||
|
||||
.app-button {
|
||||
color: $base0D;
|
||||
font-size : 20px;
|
||||
font-weight : bold;
|
||||
margin : 0px 15px 0px 15px;
|
||||
}
|
||||
|
||||
.launcher-icon {
|
||||
margin : 9px 0px 10px 15px;
|
||||
}
|
||||
|
||||
.audio-box {
|
||||
background-color: $background;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.speaker_icon {
|
||||
background-size: cover;
|
||||
background-image: url('images/speaker.png');
|
||||
background-position: center;
|
||||
min-height: 70px;
|
||||
min-width: 75px;
|
||||
margin: 10px 20px 5px 20px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.speaker_text {
|
||||
color: $base0D;
|
||||
font-size : 26px;
|
||||
font-weight : bold;
|
||||
margin: 20px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.speaker_bar scale trough highlight {
|
||||
all: unset;
|
||||
background-image: linear-gradient(to right, #afcee0 30%, #92B6F4 50%, #77a5bf 100% *50);
|
||||
border-radius: 24px;
|
||||
}
|
||||
.speaker_bar scale trough {
|
||||
all: unset;
|
||||
background-color: $widget-background;
|
||||
box-shadow: 0 6px 5px 2px $shadow;
|
||||
border-radius: 24px;
|
||||
min-height: 13px;
|
||||
min-width: 120px;
|
||||
margin : 0px 0px 5px 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.mic_icon {
|
||||
background-size: cover;
|
||||
background-image: url('images/mic.png');
|
||||
background-position: center;
|
||||
min-height: 70px;
|
||||
min-width: 75px;
|
||||
margin: 5px 20px 20px 20px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.mic_text {
|
||||
color: $blue;
|
||||
font-size : 26px;
|
||||
font-weight : bold;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.mic_bar scale trough highlight {
|
||||
all: unset;
|
||||
background-image: linear-gradient(to right, #afcee0 30%, #92B6F4 50%, #77a5bf 100% *50);
|
||||
border-radius: 24px;
|
||||
}
|
||||
.mic_bar scale trough {
|
||||
all: unset;
|
||||
box-shadow: 0 6px 5px 2px $shadow;
|
||||
background-color: $widget-background;
|
||||
border-radius: 24px;
|
||||
min-height: 13px;
|
||||
min-width: 120px;
|
||||
margin : 0px 0px 20px 0px;
|
||||
}
|
||||
|
||||
.audio_sep {
|
||||
color: $black;
|
||||
font-size: 18;
|
||||
margin : 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
// Music
|
||||
.music-player {
|
||||
all: unset;
|
||||
background-color: $widget-background;
|
||||
padding: 0px 25px 0px 17px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0px 0px 6px 6px $shadow;}
|
||||
|
||||
.album_art {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
border-radius: 12px;
|
||||
margin: 2rem 1rem 1.5rem 1rem;
|
||||
padding: 4rem;}
|
||||
|
||||
.song {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-weight: bold;
|
||||
color: $white;
|
||||
font-size : 1.2em;
|
||||
}
|
||||
.artist {
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
font-style: italic;
|
||||
font-size: 1.1em;
|
||||
color: $blue;
|
||||
margin-top: -5px;
|
||||
}
|
||||
.btn_prev, .btn_play, .btn_next {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
color: $purple;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.metric-player scale trough highlight {
|
||||
all: unset;
|
||||
border-radius: 10px;
|
||||
background-color: $blue;
|
||||
}
|
||||
|
||||
// weather
|
||||
.weather {
|
||||
all: unset;
|
||||
background-color: $widget-background;
|
||||
border-radius: 12px;
|
||||
padding: 23px 37px 20px 37px;
|
||||
box-shadow: 0px 0px 6px 6px rgb(0, 0, 0, .4);}
|
||||
|
||||
.iconweather {
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
font-size : 44px;
|
||||
font-weight : normal;
|
||||
margin : 0px -5px 0px 20px;
|
||||
}
|
||||
|
||||
.label_temp {
|
||||
color : $base0D;
|
||||
font-size : 35px;
|
||||
font-weight : bold;
|
||||
margin : 0px 0px 0px 0px;
|
||||
font-family: Furamono Nerd Font;
|
||||
|
||||
}
|
||||
|
||||
.label_stat {
|
||||
color : $base0D;
|
||||
font-size : 38px;
|
||||
font-weight : bold;
|
||||
}
|
||||
|
||||
.label_quote {
|
||||
color : $base0D;
|
||||
font-size : 18px;
|
||||
padding-bottom: 10px;
|
||||
font-weight : normal;
|
||||
}
|
||||
|
||||
.date {
|
||||
all: unset;
|
||||
background-color: $widget-background;
|
||||
padding: 33px 27px 27px 27px;
|
||||
border-radius: 12px;
|
||||
color: $base0D;
|
||||
font-size : 12px;
|
||||
font-style : italic;
|
||||
font-family: Cartograph CF;
|
||||
box-shadow: 0px 0px 6px 6px rgb(0, 0, 0, .4);}
|
||||
|
||||
.stats-box {
|
||||
all: unset;
|
||||
background-color: $widget-background;
|
||||
padding: 20px 25px 20px 25px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0px 0px 6px 6px rgb(0, 0, 0, .4);}
|
||||
|
||||
.stats-icon {
|
||||
font-size: 23px;
|
||||
color: $base0D;
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
}
|
||||
|
||||
|
||||
scale trough {
|
||||
all: unset;
|
||||
background-color: $widget-background;
|
||||
box-shadow: 0 2px 3px 2px $shadow;
|
||||
border-radius: 16px;
|
||||
min-height: 10px;
|
||||
min-width: 70px;
|
||||
margin: 0px 5px 0px 10px;
|
||||
}
|
||||
|
||||
.scale highlight {
|
||||
background-image: linear-gradient(to right, #afcee0 30%, #92B6F4 50%, #77a5bf 100% *50);
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.foo {
|
||||
font-size: 40px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
opacity: 1;
|
||||
background-color: $widget-background;
|
||||
border-radius: 12px;
|
||||
padding: 15px 0px 15px 0px;
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 0px 0px 6px 6px rgb(0, 0, 0, .4);}
|
||||
|
||||
.poweroff, .reboot, .firmware, .exit, .restart {
|
||||
margin: 0px 16px 0px 16px;
|
||||
padding: 2px 15px 2px 9px;
|
||||
font-family: mononoki Nerd Font;
|
||||
border-radius: 25px;
|
||||
font-size: 24px;
|
||||
color: $black;
|
||||
}
|
||||
|
||||
.poweroff {
|
||||
background-color: $red;
|
||||
}
|
||||
.reboot {
|
||||
background-color: $green;
|
||||
}
|
||||
.firmware {
|
||||
background-color: $orange;
|
||||
}
|
||||
.exit {
|
||||
background-color: $purple;
|
||||
}
|
||||
.restart {
|
||||
background-color: $blue;
|
||||
}
|
||||
|
||||
.fetch {
|
||||
margin-top: 35px;
|
||||
font-size: 15px;
|
||||
border-radius: 12px;
|
||||
background-color: $widget-background;
|
||||
padding: 30px 55px 30px 55px;
|
||||
box-shadow: 0px 0px 6px 6px rgb(0, 0, 0, .4);}
|
||||
|
||||
.wm {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-weight: bold;
|
||||
color: $red;
|
||||
}
|
||||
|
||||
.host {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-weight: bold;
|
||||
color: $purple;
|
||||
}
|
||||
|
||||
.uptime {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-weight: bold;
|
||||
color: $orange;
|
||||
}
|
||||
|
||||
.packages {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-weight: bold;
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
.kernal {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-weight: bold;
|
||||
color: $green;
|
||||
}
|
||||
|
||||
.notification {
|
||||
all: unset;
|
||||
background-color: $base00;
|
||||
padding: 10px 15px 10px 7px;
|
||||
margin: 0px 15px 0px 15px;
|
||||
border-radius: 12px;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
border-color: $base09;}
|
||||
|
||||
.notification-header {
|
||||
all: unset;
|
||||
background-color: $base00;
|
||||
padding: 10px 15px 10px 7px;
|
||||
margin: 20px 15px 10px 15px;
|
||||
border-radius: 12px;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
border-color: $base0A;}
|
||||
|
||||
.notification-icon {
|
||||
color: $white;
|
||||
font-size: 16px;
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
|
||||
.notification-appname {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: $orange;
|
||||
}
|
||||
|
||||
.notification-summary {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: $white;
|
||||
}
|
||||
|
||||
.notification-body {
|
||||
font-size: 14px;
|
||||
color: $white;
|
||||
}
|
||||
|
||||
.notification-label {
|
||||
font-size: 30px;
|
||||
color: $blue;
|
||||
margin: 0px 50px 0px 0px;
|
||||
}
|
||||
.notification-action {
|
||||
font-size: 36px;
|
||||
color: $white;
|
||||
margin: 0px 0px 0px 20px;
|
||||
}
|
||||
.battery-container {
|
||||
background-color: $darktransparent;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.battery-icon {
|
||||
margin: 10px;
|
||||
margin-left: 20px;
|
||||
font-size: 28px;
|
||||
}
|
||||
.battery-value trough highlight {
|
||||
background-color: $base08;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.battery-value {
|
||||
margin-bottom: 30px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.battery-label {
|
||||
margin: 20px 50px 10px 40px;
|
||||
}
|
||||
|
||||
.close-icon {
|
||||
margin-left: -10px;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 50px;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.close-icon:hover {
|
||||
color: $base08;
|
||||
}
|
||||
|
||||
.volume-container {
|
||||
background-color: $darktransparent;
|
||||
border-radius: 16px;
|
||||
box-shadow: 2px 2px 3px 3px #101010;
|
||||
margin: 8px 18px 13px 18px;
|
||||
}
|
||||
|
||||
.volume-value trough highlight {
|
||||
background-color: $base0B;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.volume-value {
|
||||
margin-bottom: 0px;
|
||||
margin-right: 0px;
|
||||
min-width: 250px;
|
||||
}
|
||||
|
||||
.volume-label {
|
||||
margin: 10px 20px 10px 5px;
|
||||
}
|
||||
.volume-icon {
|
||||
font-size: 18;
|
||||
color: $base0B;
|
||||
margin: 0px 5px 0px 20px;
|
||||
}
|
||||
|
643
.config/eww/eww.yuck
Normal file
643
.config/eww/eww.yuck
Normal file
|
@ -0,0 +1,643 @@
|
|||
;; Variables
|
||||
|
||||
(include "sidebar.yuck")
|
||||
(include "notifications.yuck")
|
||||
(include "battery.yuck")
|
||||
(include "volume.yuck")
|
||||
|
||||
(defpoll clock_time :interval "5s" "date '+\%l:\%M \%p'")
|
||||
(defpoll clock_full :interval "5s" "date '+\%a \%b \%d, \%-I:\%M \%p'")
|
||||
(defpoll clock_date :interval "1h" "date '+%b %d, %Y'")
|
||||
(defpoll calendar_day :interval "2h" "date '+%d'")
|
||||
(defpoll calendar_year :interval "2h" "date '+%Y'")
|
||||
(defpoll mic_percent :interval "3s" "pamixer --get-volume --default-source")
|
||||
(defpoll brightness_percent :interval "5s" "scripts/bright")
|
||||
(defpoll COL_WLAN :interval "1m" "scripts/wifi --COL")
|
||||
(defpoll ESSID_WLAN :interval "1m" "scripts/wifi --ESSID")
|
||||
(defpoll WLAN_ICON :interval "1m" "scripts/wifi --ICON")
|
||||
(defpoll HOST :interval "1h" "hostname")
|
||||
(defpoll DISK :interval "1m" "disk")
|
||||
(deflisten volume_percent :interval "0.5s" "tail -F /tmp/vol")
|
||||
(deflisten workspace "scripts/workspace")
|
||||
(deflisten appname "scripts/appname")
|
||||
|
||||
(defvar vol_reveal false)
|
||||
(defvar br_reveal false)
|
||||
(defvar music_reveal false)
|
||||
(defvar control_reveal false)
|
||||
(defvar wifi_rev false)
|
||||
(defvar time_rev false)
|
||||
|
||||
|
||||
;; widgets
|
||||
|
||||
(defwidget workspaces []
|
||||
(literal
|
||||
:content workspace))
|
||||
|
||||
;; (defwidget workspaces []
|
||||
;; (box
|
||||
;; :class "works"
|
||||
;; :orientation "h"
|
||||
;; :spacing 5
|
||||
;; :space-evenly "false"
|
||||
;; :valign "center"
|
||||
;; (button
|
||||
;; :onclick "hyprctl dispatch workspace 1"
|
||||
;; :onrightclick "hyprctl dispatch workspace 1 && $HOME/.config/hypr/themes/neon/scripts/default_app"
|
||||
;; :class "0$o1$f1" "")
|
||||
;; (button
|
||||
;; :onclick "hyprctl dispatch workspace 2"
|
||||
;; :onrightclick "hyprctl dispatch workspace 2 && $HOME/.config/hypr/themes/neon/scripts/default_app"
|
||||
;; :class "0$o2$f2" "")
|
||||
;; (button
|
||||
;; :onclick "hyprctl dispatch workspace 3"
|
||||
;; :onrightclick "hyprctl dispatch workspace 3 && $HOME/.config/hypr/themes/neon/scripts/default_app"
|
||||
;; :class "0$o3$f3" "")
|
||||
;; (button
|
||||
;; :onclick "hyprctl dispatch workspace 4"
|
||||
;; :onrightclick "hyprctl dispatch workspace 4 && $HOME/.config/hypr/themes/neon/scripts/default_app"
|
||||
;; :class "0$o4$f4" "")
|
||||
;; (button
|
||||
;; :onclick "hyprctl dispatch workspace 5"
|
||||
;; :onrightclick "hyprctl dispatch workspace 5 && $HOME/.config/hypr/themes/neon/scripts/default_app"
|
||||
;; :class "0$o5$f5" "")))
|
||||
|
||||
(defwidget appnames []
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update control_reveal=true"
|
||||
:onhoverlost "${EWW_CMD} update control_reveal=false"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(literal
|
||||
:content appname)
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal control_reveal
|
||||
:duration "250ms"
|
||||
(box
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
(button
|
||||
:class "app-button"
|
||||
:onclick "hyprctl dispatch togglefloating 1" "")
|
||||
(button
|
||||
:class "app-button"
|
||||
:onclick "hyprctl dispatch fullscreen 1" "")
|
||||
(button
|
||||
:class "app-button"
|
||||
:onclick "hyprctl dispatch killactive 1" ""))))))
|
||||
|
||||
;; (defwidget bright []
|
||||
;; (eventbox
|
||||
;; :onhover "${EWW_CMD} update br_reveal=true"
|
||||
;; :onhoverlost "${EWW_CMD} update br_reveal=false"
|
||||
;; :visible {HOST == "kaladin" ? "false" : "true"}
|
||||
;; (box
|
||||
;; :class "module"
|
||||
;; :space-evenly "false"
|
||||
;; :orientation "h"
|
||||
;; :spacing "3"
|
||||
;; (scale
|
||||
;; :class "brightbar"
|
||||
;; :value brightness_percent
|
||||
;; :orientation "h"
|
||||
;; :tooltip "${brightness_percent}%"
|
||||
;; :max 100
|
||||
;; :min 0
|
||||
;; :onchange "brightnessctl s {}%" )
|
||||
;; (label
|
||||
;; :text ""
|
||||
;; :class "bright_icon"
|
||||
;; :tooltip "brightness"))))
|
||||
|
||||
;; (defwidget volume []
|
||||
;; (eventbox
|
||||
;; :onhover "${EWW_CMD} update vol_reveal=true"
|
||||
;; :onhoverlost "${EWW_CMD} update vol_reveal=false"
|
||||
;; (box
|
||||
;; :class "module-2"
|
||||
;; :space-evenly "false"
|
||||
;; :orientation "h"
|
||||
;; :spacing "3"
|
||||
;; (scale
|
||||
;; :class "volbar"
|
||||
;; :value volume_percent
|
||||
;; :draw-value: true
|
||||
;; :orientation "h"
|
||||
;; :tooltip "${volume_percent}%"
|
||||
;; :max 150
|
||||
;; :min 0
|
||||
;; :onchange "pamixer --set-volume {}" )
|
||||
;; (button
|
||||
;; :onclick "scripts/pop audio"
|
||||
;; :class "volume_icon"
|
||||
;; "墳"))))
|
||||
|
||||
(defwidget wifi []
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update wifi_rev=true"
|
||||
:onhoverlost "${EWW_CMD} update wifi_rev=false"
|
||||
(box
|
||||
:class "wifi"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:space-evenly "false"
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal wifi_rev
|
||||
:duration "250ms"
|
||||
(label
|
||||
:class "module_essid"
|
||||
:text ESSID_WLAN))
|
||||
(button
|
||||
:class "module-wifi"
|
||||
:onclick "networkmanager_dmenu"
|
||||
WLAN_ICON))))
|
||||
|
||||
(defwidget bat []
|
||||
(box
|
||||
:class "bat_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:spacing 0
|
||||
:visible {HOST == "kaladin" ? "false" : "true"}
|
||||
(button
|
||||
:onclick "scripts/pop system"
|
||||
:class "iconbat"
|
||||
:tooltip "${EWW_BATTERY["BAT1"].capacity}% battery left"
|
||||
"")
|
||||
(label
|
||||
:text "${round(EWW_BATTERY['BAT1'].capacity, 0)}%"
|
||||
:class "bat_label")))
|
||||
|
||||
(defwidget disk []
|
||||
(box
|
||||
:class "disk_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:spacing 0
|
||||
(button
|
||||
:onclick "scripts/pop system"
|
||||
:class "icondisk"
|
||||
:tooltip "${DISK}"
|
||||
"")
|
||||
(label
|
||||
:text "${DISK}"
|
||||
:class "disk_label")))
|
||||
|
||||
(defwidget bright []
|
||||
(box
|
||||
:class "bright_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:visible {HOST == "kaladin" ? "false" : "true"}
|
||||
(button
|
||||
:class "iconbright"
|
||||
;; :onclick "scripts/pop audio"
|
||||
:tooltip "${brightness_percent}%"
|
||||
"")
|
||||
(label
|
||||
:text brightness_percent
|
||||
:class "bright_label"))
|
||||
)
|
||||
|
||||
(defwidget volume []
|
||||
(box
|
||||
:class "vol_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(button
|
||||
:class "iconvol"
|
||||
:onclick "scripts/pop audio"
|
||||
:tooltip "${volume_percent}%"
|
||||
"")
|
||||
(label
|
||||
:text volume_percent
|
||||
:class "vol_label")))
|
||||
|
||||
(defwidget cpu []
|
||||
(box
|
||||
:class "cpu_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(button
|
||||
:onclick "scripts/pop system"
|
||||
:class "iconcpu"
|
||||
:tooltip "using ${EWW_CPU.avg}% of cpu"
|
||||
"")
|
||||
(label
|
||||
:text "${round(EWW_CPU.avg, 0)}%"
|
||||
:class "cpu_label")))
|
||||
|
||||
(defwidget mem []
|
||||
(box
|
||||
:class "mem_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(button
|
||||
:onclick "scripts/pop system"
|
||||
:class "iconmem"
|
||||
:tooltip "using ${EWW_RAM.used_mem_perc}% ram"
|
||||
"")
|
||||
(label
|
||||
:text "${round(EWW_RAM.used_mem_perc, 0)}%"
|
||||
:class "mem_label")))
|
||||
|
||||
(defwidget kdeconnect []
|
||||
(box
|
||||
:class "kdeconnect_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"))
|
||||
|
||||
(defwidget clock_module []
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update time_rev=true"
|
||||
:onhoverlost "${EWW_CMD} update time_rev=false"
|
||||
(box
|
||||
:class "module"
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
:spacing "0"
|
||||
(label
|
||||
:text clock_full
|
||||
:class "clock_time_class" ))))
|
||||
|
||||
(defwidget notif_button []
|
||||
(box
|
||||
:class "notif_button"
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "if ${EWW_CMD} state | grep 'rightside: false' ; then ${EWW_CMD} update rightside=true ; else ${EWW_CMD} update rightside=false ; fi"
|
||||
(label
|
||||
:text ""))))
|
||||
|
||||
(defwidget nextcloud_button []
|
||||
(box
|
||||
:class "notif_button"
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "nextcloud"
|
||||
(label
|
||||
:text ""))))
|
||||
|
||||
(defwidget sep []
|
||||
(box
|
||||
:class "separator"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(label
|
||||
:class "separ"
|
||||
:text "|")))
|
||||
|
||||
(defwidget gap []
|
||||
(box
|
||||
:orientation "h"
|
||||
:hexpand "false"
|
||||
:visible "true"
|
||||
:width "150"))
|
||||
|
||||
|
||||
|
||||
;;define widget groups
|
||||
(defwidget left []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:valign "center"
|
||||
:class "left_modules"
|
||||
:spacing 8
|
||||
(workspaces)
|
||||
(appnames)))
|
||||
(defwidget center []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:class "center_modules"
|
||||
(clock_module)))
|
||||
(defwidget right []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
:class "right_modules"
|
||||
(sep)
|
||||
(disk)
|
||||
(cpu)
|
||||
(mem)
|
||||
(volume)
|
||||
(bright)
|
||||
(bat)
|
||||
(sep)
|
||||
(wifi)
|
||||
(notif_button)
|
||||
(nextcloud_button)))
|
||||
|
||||
(defwidget bar_layout []
|
||||
(centerbox
|
||||
:class "bar_class"
|
||||
:orientation "h"
|
||||
(left)
|
||||
(center)
|
||||
(right)
|
||||
))
|
||||
(defwindow bar0
|
||||
:monitor 0
|
||||
:exclusive true
|
||||
:geometry (geometry
|
||||
:x "15px"
|
||||
:y "3px"
|
||||
:width "95%"
|
||||
:height "50px"
|
||||
:anchor "bottom center")
|
||||
:stacking "fg"
|
||||
:windowtype "dock"
|
||||
(bar_layout))
|
||||
(defwindow bar1
|
||||
:monitor 0
|
||||
:exclusive true
|
||||
:geometry (geometry
|
||||
:x "15px"
|
||||
:y "10px"
|
||||
:width "80%"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:windowtype "dock"
|
||||
(bar_layout))
|
||||
(defwindow bar2
|
||||
:monitor 2
|
||||
:exclusive false
|
||||
:geometry (geometry
|
||||
:x "15px"
|
||||
:y "0px"
|
||||
:width "100%"
|
||||
:height "50px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:windowtype "dock"
|
||||
(bar_layout))
|
||||
|
||||
|
||||
|
||||
(defwidget audio []
|
||||
(box
|
||||
:class "audio-box"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(box
|
||||
:halign "v"
|
||||
:space-evenly "false"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(box
|
||||
:class "speaker_icon"
|
||||
:orientation "v")
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "center"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(label
|
||||
:class "speaker_text"
|
||||
:text "speaker"
|
||||
:valign "center"
|
||||
:halign "left" )
|
||||
(box
|
||||
:class "speaker_bar"
|
||||
:halign "center"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(scale
|
||||
:value volume_percent
|
||||
:orientation "h"
|
||||
:onchange "amixer -D pulse sset Master {}%"
|
||||
:tooltip "volume on ${volume_percent}%"
|
||||
:max 100
|
||||
:min 0))))
|
||||
(label
|
||||
:text "_____________________________________"
|
||||
:class "audio_sep"
|
||||
:halign "center")
|
||||
(box
|
||||
:halign "v"
|
||||
:space-evenly "false"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(box
|
||||
:class "mic_icon"
|
||||
:orientation "v")
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "center"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(label
|
||||
:class "mic_text"
|
||||
:text "mic"
|
||||
:valign "center"
|
||||
:halign "left" )
|
||||
(box
|
||||
:class "mic_bar"
|
||||
:halign "center"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(scale
|
||||
:value mic_percent
|
||||
:orientation "h"
|
||||
:tooltip "mic on ${mic_percent}%"
|
||||
:onchange "amixer -D pulse sset Capture {}%"
|
||||
:max 100
|
||||
:min 0))))))
|
||||
(defwindow audio_ctl
|
||||
:stacking "fg"
|
||||
:focusable "false"
|
||||
:screen 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "20"
|
||||
:y "7%"
|
||||
:anchor "top right"
|
||||
:width "280px"
|
||||
:height "60px")
|
||||
(audio))
|
||||
|
||||
|
||||
;;Define System widget
|
||||
(defwidget system []
|
||||
(box
|
||||
:class "sys_win"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
:spacing 0
|
||||
(box
|
||||
:class "sys_bat_box"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
(circular-progress
|
||||
:value {EWW_BATTERY["BAT1"].capacity}
|
||||
:class "sys_bat"
|
||||
:thickness 9
|
||||
(label :text ""
|
||||
:class "sys_icon_bat"
|
||||
:limit-width 2
|
||||
:wrap false))
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 0
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(label
|
||||
:text "battery"
|
||||
:halign "start"
|
||||
:class "sys_text_bat"
|
||||
:limit-width 9
|
||||
:wrap false)
|
||||
(label
|
||||
:text "${EWW_BATTERY["BAT1"].capacity}%"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
(label :text "${EWW_BATTERY["BAT1"].status}"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:wrap false)))
|
||||
(label
|
||||
:text "____________________________________"
|
||||
:class "sys_sep"
|
||||
:halign "center")
|
||||
(box
|
||||
:class "sys_mem_box"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:halign "start"
|
||||
(circular-progress
|
||||
:value {EWW_CPU.avg}
|
||||
:class "sys_mem"
|
||||
:thickness 9
|
||||
(label
|
||||
:text ""
|
||||
:class "sys_icon_mem"
|
||||
:limit-width 2
|
||||
:wrap false
|
||||
:angle 0.0))
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 0
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(label
|
||||
:text "processor"
|
||||
:halign "start"
|
||||
:class "sys_text_mem"
|
||||
:limit-width 9
|
||||
:wrap false)
|
||||
(label
|
||||
:text "${EWW_CPU.avg} | ${round((EWW_RAM.total_mem / 1024), 0)}mb "
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
(label :text "3.4 GHZ"
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
))
|
||||
(label
|
||||
:text "____________________________________"
|
||||
:class "sys_sep"
|
||||
:halign "center")
|
||||
(box
|
||||
:class "sys_mem_box"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:halign "start"
|
||||
(circular-progress
|
||||
:value {EWW_RAM.used_mem_perc}
|
||||
:class "sys_mem"
|
||||
:thickness 9
|
||||
(label
|
||||
:text ""
|
||||
:class "sys_icon_mem"
|
||||
:limit-width 2
|
||||
:wrap false
|
||||
:angle 0.0))
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 0
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(label
|
||||
:text "memory"
|
||||
:halign "start"
|
||||
:class "sys_text_mem"
|
||||
:limit-width 9
|
||||
:wrap false)
|
||||
(label
|
||||
:text "${round((EWW_RAM.available_mem / 1024), 0)} | ${round((EWW_RAM.total_mem / 1024), 0)}mb "
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
(label :text "${round((EWW_RAM.used_mem / 1024), 0)}mb free"
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
))))
|
||||
(defwindow system
|
||||
:stacking "fg"
|
||||
:focusable "false"
|
||||
:screen 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "20"
|
||||
:y "0"
|
||||
:anchor "bottom right"
|
||||
:width "290px"
|
||||
:height "120px")
|
||||
(system))
|
||||
|
||||
|
||||
|
||||
;;Calendar Widget
|
||||
(defwidget cal []
|
||||
(box
|
||||
:class "cal"
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "cal-in"
|
||||
(calendar
|
||||
:day calendar_day
|
||||
:year calendar_year))))
|
||||
(defwindow calendar
|
||||
:stacking "fg"
|
||||
:focusable "false"
|
||||
:screen 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "20"
|
||||
:y "0"
|
||||
:anchor "bottom right"
|
||||
:width "270px"
|
||||
:height "60px")
|
||||
(cal))
|
BIN
.config/eww/favicon.ico
Normal file
BIN
.config/eww/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 231 KiB |
BIN
.config/eww/images/mic.png
Normal file
BIN
.config/eww/images/mic.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
.config/eww/images/music.png
Normal file
BIN
.config/eww/images/music.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
.config/eww/images/profile.png
Normal file
BIN
.config/eww/images/profile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
BIN
.config/eww/images/speaker.png
Normal file
BIN
.config/eww/images/speaker.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
63
.config/eww/notifications.yuck
Normal file
63
.config/eww/notifications.yuck
Normal file
|
@ -0,0 +1,63 @@
|
|||
|
||||
(defwindow notifications
|
||||
:geometry (geometry :x "0px"
|
||||
:y "0px"
|
||||
:width "1px"
|
||||
:height "63%"
|
||||
:anchor "bottom right")
|
||||
:stacking "fg"
|
||||
:monitor "0"
|
||||
(notif-panel))
|
||||
|
||||
(defwidget notif-panel []
|
||||
(eventbox
|
||||
:halign "start"
|
||||
:onhoverlost "${EWW_CMD} update rightside=false"
|
||||
(revealer
|
||||
:transition "slideleft"
|
||||
:reveal rightside
|
||||
:duration "250ms"
|
||||
(rightside))))
|
||||
(defvar rightside false)
|
||||
|
||||
(defwidget rightside []
|
||||
(box
|
||||
:class "side"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing "10"
|
||||
:halign "center"
|
||||
(box
|
||||
:class "notification-header"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
(label
|
||||
:class "notification-label"
|
||||
:halign "start"
|
||||
:text "Notifications")
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:halign "end"
|
||||
(button
|
||||
:class "notification-action"
|
||||
:tooltip "Refresh"
|
||||
:onclick "dunstctl history > /tmp/dunst-history.json" "")
|
||||
(button
|
||||
:class "notification-action"
|
||||
:tooltip "Pause/Resume Notifications"
|
||||
:onclick "dunstctl set-paused toggle" "")
|
||||
(button
|
||||
:class "notification-action"
|
||||
:tooltip "Dismiss All"
|
||||
:onclick "pkill dunst && hyprctl dispatch exec dunst && dunstctl history > /tmp/dunst-history.json" "")))
|
||||
(scroll
|
||||
:vscroll "true"
|
||||
:hscroll "false"
|
||||
:height 740
|
||||
:width 200
|
||||
(literal
|
||||
:content notifications)
|
||||
)))
|
||||
|
||||
(deflisten notifications "scripts/notifications")
|
40
.config/eww/scripts/appname
Executable file
40
.config/eww/scripts/appname
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#define icons for workspaces 1-9
|
||||
#icontheme=$(geticons -U)
|
||||
icontheme=$(grep "gtk-icon-theme-name" "$HOME"/.config/gtk-3.0/settings.ini | cut --delimiter="=" -f 2)
|
||||
|
||||
workspaces() {
|
||||
# if [[ ${1:0:12} == "activewindowv2" ]]; then
|
||||
# fi
|
||||
|
||||
if [[ ${1:0:12} == "activewindow" ]]; then #set focused workspace
|
||||
line=$(hyprctl activewindow | rg Window | cut -f 4- -d ' ' | sed 's/://')
|
||||
class=$(hyprctl activewindow | rg "class:" | awk '{print $2}')
|
||||
export iconpath=$(geticons "$class" -s 32 -c 1 -t "$icontheme" | head -n 1)
|
||||
export title=$line
|
||||
fi
|
||||
}
|
||||
|
||||
module() {
|
||||
#output eww widget
|
||||
echo "(box \
|
||||
:orientation \"h\" \
|
||||
:halign \"start\" \
|
||||
:valign \"center\" \
|
||||
:space-evenly false \
|
||||
(image \
|
||||
:class \"app-icon\" \
|
||||
:path \"$iconpath\" \
|
||||
:image-width \"18\") \
|
||||
(label \
|
||||
:class \"app-name\" \
|
||||
:limit-width \"45\" \
|
||||
:text \"$title\" \
|
||||
:tooltip \"$title\"))"
|
||||
}
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
|
||||
workspaces "$event"
|
||||
module
|
||||
done
|
17
.config/eww/scripts/battery
Executable file
17
.config/eww/scripts/battery
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
battery() {
|
||||
BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
|
||||
cat /sys/class/power_supply/${BAT}/capacity
|
||||
}
|
||||
battery_stat() {
|
||||
BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
|
||||
cat /sys/class/power_supply/${BAT}/status
|
||||
}
|
||||
|
||||
if [[ "$1" == "--bat" ]]; then
|
||||
battery
|
||||
elif [[ "$1" == "--bat-st" ]]; then
|
||||
battery_stat
|
||||
fi
|
||||
|
3
.config/eww/scripts/bright
Executable file
3
.config/eww/scripts/bright
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
brightnessctl | rg Current | awk '{print $4}' | sed 's/(\(.*\)%)/\1/'
|
1
.config/eww/scripts/geticons
Submodule
1
.config/eww/scripts/geticons
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 2f0215d4e1003599a72a9b140ee3abe3c83fa799
|
15
.config/eww/scripts/mem-ad
Executable file
15
.config/eww/scripts/mem-ad
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
total="$(free -m | grep Mem: | awk '{ print $2 }')"
|
||||
used="$(free -m | grep Mem: | awk '{ print $3 }')"
|
||||
|
||||
free=$(expr $total - $used)
|
||||
|
||||
if [ "$1" = "total" ]; then
|
||||
echo $total
|
||||
elif [ "$1" = "used" ]; then
|
||||
echo $used
|
||||
elif [ "$1" = "free" ]; then
|
||||
echo $free
|
||||
fi
|
3
.config/eww/scripts/memory
Executable file
3
.config/eww/scripts/memory
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')
|
98
.config/eww/scripts/music_info
Executable file
98
.config/eww/scripts/music_info
Executable file
|
@ -0,0 +1,98 @@
|
|||
#!/bin/bash
|
||||
# scripts by adi1090x
|
||||
|
||||
## Get data
|
||||
STATUS="$(mpc status)"
|
||||
COVER="/tmp/.music_cover.png"
|
||||
MUSIC_DIR="$HOME/Music"
|
||||
|
||||
## Get status
|
||||
get_status() {
|
||||
if [[ $STATUS == *"[playing]"* ]]; then
|
||||
echo ""
|
||||
else
|
||||
echo "奈"
|
||||
fi
|
||||
}
|
||||
|
||||
## Get song
|
||||
get_song() {
|
||||
song=`mpc -f %title% current`
|
||||
if [[ -z "$song" ]]; then
|
||||
echo "Offline"
|
||||
else
|
||||
echo "$song"
|
||||
fi
|
||||
}
|
||||
|
||||
## Get artist
|
||||
get_artist() {
|
||||
artist=`mpc -f %artist% current`
|
||||
if [[ -z "$artist" ]]; then
|
||||
echo ""
|
||||
else
|
||||
echo "$artist"
|
||||
fi
|
||||
}
|
||||
|
||||
## Get time
|
||||
get_time() {
|
||||
time=`mpc status | grep "%)" | awk '{print $4}' | tr -d '(%)'`
|
||||
if [[ -z "$time" ]]; then
|
||||
echo "0"
|
||||
else
|
||||
echo "$time"
|
||||
fi
|
||||
}
|
||||
get_ctime() {
|
||||
ctime=`mpc status | grep "#" | awk '{print $3}' | sed 's|/.*||g'`
|
||||
if [[ -z "$ctime" ]]; then
|
||||
echo "0:00"
|
||||
else
|
||||
echo "$ctime"
|
||||
fi
|
||||
}
|
||||
get_ttime() {
|
||||
ttime=`mpc -f %time% current`
|
||||
if [[ -z "$ttime" ]]; then
|
||||
echo "0:00"
|
||||
else
|
||||
echo "$ttime"
|
||||
fi
|
||||
}
|
||||
|
||||
## Get cover
|
||||
get_cover() {
|
||||
ffmpeg -i "${MUSIC_DIR}/$(mpc current -f %file%)" "${COVER}" -y &> /dev/null
|
||||
STATUS=$?
|
||||
|
||||
# Check if the file has a embbeded album art
|
||||
if [ "$STATUS" -eq 0 ];then
|
||||
echo "$COVER"
|
||||
else
|
||||
echo "images/music.png"
|
||||
fi
|
||||
}
|
||||
|
||||
## Execute accordingly
|
||||
if [[ "$1" == "--song" ]]; then
|
||||
get_song
|
||||
elif [[ "$1" == "--artist" ]]; then
|
||||
get_artist
|
||||
elif [[ "$1" == "--status" ]]; then
|
||||
get_status
|
||||
elif [[ "$1" == "--time" ]]; then
|
||||
get_time
|
||||
elif [[ "$1" == "--ctime" ]]; then
|
||||
get_ctime
|
||||
elif [[ "$1" == "--ttime" ]]; then
|
||||
get_ttime
|
||||
elif [[ "$1" == "--cover" ]]; then
|
||||
get_cover
|
||||
elif [[ "$1" == "--toggle" ]]; then
|
||||
mpc -q toggle
|
||||
elif [[ "$1" == "--next" ]]; then
|
||||
{ mpc -q next; get_cover; }
|
||||
elif [[ "$1" == "--prev" ]]; then
|
||||
{ mpc -q prev; get_cover; }
|
||||
fi
|
55
.config/eww/scripts/notifications
Executable file
55
.config/eww/scripts/notifications
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
tmp=/tmp/dunst-history.json
|
||||
|
||||
notif() {
|
||||
export ids=($(dunstctl history | jq '.data[] | .[].id.data'))
|
||||
|
||||
printf "\n (box \
|
||||
:orientation \"v\" \
|
||||
:space-evenly \"false\" \
|
||||
:spacing \"20\" \
|
||||
:halign \"start\" "
|
||||
|
||||
for id in "${ids[@]}"; do
|
||||
mapfile -t notif < <(jq -r ".data[] | .[] | select(.id.data == $id) | .appname.data, .icon_path.data, .summary.data, .body.data" "$tmp" | sed -r '/^\s*$/d' | sed -e 's/\%/ percent/g')
|
||||
printf "(eventbox :onclick \"dunstctl history-pop $id && dunstctl action 0 && dunstctl close\" \
|
||||
(box \
|
||||
:class \"notification\" \
|
||||
:orientation \"h\" \
|
||||
:width 350 \
|
||||
:space-evenly \"false\" \
|
||||
(image \
|
||||
:class \"notification-icon\" \
|
||||
:path \"${notif[1]}\" \
|
||||
:image-height 50 \
|
||||
:image-width 100) \
|
||||
(box \
|
||||
:orientation \"v\" \
|
||||
:space-evenly \"false\" \
|
||||
:valign \"left\" \
|
||||
:width 350 \
|
||||
:spacing 10 \
|
||||
(label \
|
||||
:xalign 0 \
|
||||
:wrap "true" \
|
||||
:class \"notification-appname\" \
|
||||
:text \"${notif[0]}\") \
|
||||
(label \
|
||||
:xalign 0 \
|
||||
:wrap "true" \
|
||||
:class \"notification-summary\" \
|
||||
:text \"${notif[2]}\") \
|
||||
(label \
|
||||
:xalign 0 \
|
||||
:wrap "true" \
|
||||
:class \"notification-body\" \
|
||||
:text \"${notif[3]}\"))))"
|
||||
done
|
||||
printf ") \n"
|
||||
}
|
||||
|
||||
notif
|
||||
tail --follow $tmp 2> /dev/null | grep --line-buffered "aa{sv}" | while read -r; do
|
||||
notif
|
||||
done
|
92
.config/eww/scripts/pop
Executable file
92
.config/eww/scripts/pop
Executable file
|
@ -0,0 +1,92 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
calendar() {
|
||||
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww/eww"
|
||||
|
||||
run() {
|
||||
eww open calendar
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||
eww close system music_win audio_ctl
|
||||
touch "$LOCK_FILE"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
eww close calendar
|
||||
rm "$LOCK_FILE" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
system() {
|
||||
LOCK_FILE_MEM="$HOME/.cache/eww-system.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww/eww"
|
||||
|
||||
run() {
|
||||
eww open system
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_MEM" ]]; then
|
||||
eww close calendar music_win audio_ctl
|
||||
touch "$LOCK_FILE_MEM"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
eww close system
|
||||
rm "$LOCK_FILE_MEM" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
music() {
|
||||
LOCK_FILE_SONG="$HOME/.cache/eww-song.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww/eww"
|
||||
|
||||
run() {
|
||||
eww open music_win
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_SONG" ]]; then
|
||||
eww close system calendar
|
||||
touch "$LOCK_FILE_SONG"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
eww close music_win
|
||||
rm "$LOCK_FILE_SONG" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
audio() {
|
||||
LOCK_FILE_AUDIO="$HOME/.cache/eww-audio.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww/eww"
|
||||
|
||||
run() {
|
||||
eww open audio_ctl
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
|
||||
eww close system calendar music
|
||||
touch "$LOCK_FILE_AUDIO"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
eww close audio_ctl
|
||||
rm "$LOCK_FILE_AUDIO" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if [ "$1" = "calendar" ]; then
|
||||
calendar
|
||||
elif [ "$1" = "system" ]; then
|
||||
system
|
||||
elif [ "$1" = "music" ]; then
|
||||
music
|
||||
elif [ "$1" = "audio" ]; then
|
||||
audio
|
||||
fi
|
29
.config/eww/scripts/wifi
Executable file
29
.config/eww/scripts/wifi
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
status=$(nmcli g | grep -oE "disconnected")
|
||||
essid=$(nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d: -f2)
|
||||
device=$(nmcli d | rg -w "connected" | awk '{print $1}')
|
||||
|
||||
if [ $status ] ; then
|
||||
icon="睊"
|
||||
text=""
|
||||
col="#575268"
|
||||
|
||||
else
|
||||
if [ $device == "enp0s31f6" ]; then
|
||||
icon=""
|
||||
text="ethernet"
|
||||
col="#a1bdce"
|
||||
else
|
||||
icon=""
|
||||
text="${essid}"
|
||||
col="#a1bdce"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
case $1 in
|
||||
--COL) echo $col;;
|
||||
--ESSID) echo $text;;
|
||||
--ICON) echo $icon;;
|
||||
esac
|
67
.config/eww/scripts/workspace
Executable file
67
.config/eww/scripts/workspace
Executable file
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#define icons for workspaces 1-9
|
||||
ic=(0 )
|
||||
|
||||
#initial check for occupied workspaces
|
||||
for num in $(hyprctl workspaces | grep ID | awk '{print $3}'); do
|
||||
export o"$num"="$num"
|
||||
done
|
||||
|
||||
#initial check for focused workspace
|
||||
for num in $(hyprctl monitors | grep -B 4 "focused: yes" | awk 'NR==1{print $3}'); do
|
||||
export f"$num"="$num"
|
||||
export fnum=f"$num"
|
||||
export mon=$(hyprctl monitors | grep -B 2 "\($num\)" | awk 'NR==1{print $2}')
|
||||
done
|
||||
|
||||
workspaces() {
|
||||
if [[ ${1:0:9} == "workspace" ]] && [[ ${1:11} != "special" ]]; then #set focused workspace
|
||||
unset -v "$fnum"
|
||||
num=${1:11}
|
||||
export f"$num"="$num"
|
||||
export fnum=f"$num"
|
||||
|
||||
elif [[ ${1:0:10} == "focusedmon" ]]; then #set focused workspace following monitor focus change
|
||||
unset -v "$fnum"
|
||||
string=${1:12}
|
||||
num=${string##*,}
|
||||
export mon=${string/,*/}
|
||||
export f"$num"="$num"
|
||||
export fnum=f"$num"
|
||||
|
||||
elif [[ ${1:0:13} == "moveworkspace" ]] && [[ ${1##*,} == "$mon" ]]; then #Set focused workspace following swapactiveworkspace
|
||||
unset -v "$fnum"
|
||||
string=${1:15}
|
||||
num=${string/,*/}
|
||||
export f"$num"="$num"
|
||||
export fnum=f"$num"
|
||||
|
||||
elif [[ ${1:0:15} == "createworkspace" ]]; then #set Occupied workspace
|
||||
num=${1:17}
|
||||
export o"$num"="$num"
|
||||
export onum=o"$num"
|
||||
|
||||
elif [[ ${1:0:16} == "destroyworkspace" ]]; then #unset unoccupied workspace
|
||||
num=${1:18}
|
||||
unset -v o"$num"
|
||||
fi
|
||||
}
|
||||
module() {
|
||||
#output eww widget
|
||||
echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" :valign \"center\" \
|
||||
(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" :valign \"center\" \
|
||||
(button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o1$f1\" \"${ic[1]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o2$f2\" \"${ic[2]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o3$f3\" \"${ic[3]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o4$f4\" \"${ic[4]}\") \
|
||||
)\
|
||||
)"
|
||||
}
|
||||
|
||||
module
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
|
||||
workspaces "$event"
|
||||
module
|
||||
done
|
253
.config/eww/sidebar.yuck
Normal file
253
.config/eww/sidebar.yuck
Normal file
|
@ -0,0 +1,253 @@
|
|||
(defwindow sidebar
|
||||
:geometry (geometry :x "0px"
|
||||
:y "10px"
|
||||
:width "1px"
|
||||
:height "724"
|
||||
:anchor "bottom left")
|
||||
:stacking "fg"
|
||||
:monitor "0"
|
||||
(sidebar))
|
||||
|
||||
(defwidget sidebar []
|
||||
(eventbox
|
||||
:class "side_class"
|
||||
:halign "start"
|
||||
:onhover "${EWW_CMD} update side=true"
|
||||
:onhoverlost "${EWW_CMD} update side=false"
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal side
|
||||
:duration "250ms"
|
||||
(side))))
|
||||
|
||||
(defvar side false)
|
||||
|
||||
;; background
|
||||
(defwidget side []
|
||||
(box
|
||||
:class "side"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing "30"
|
||||
:halign "start"
|
||||
(fetch)
|
||||
(top)
|
||||
(system-side)
|
||||
(tray))
|
||||
)
|
||||
|
||||
(defwidget top []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:spacing "30"
|
||||
:halign "center"
|
||||
(date))
|
||||
)
|
||||
|
||||
;; weather
|
||||
(defwidget weather []
|
||||
(box
|
||||
:class "weather"
|
||||
:orientation "v"
|
||||
:spacing -2
|
||||
:space-evenly "false"
|
||||
:vexpand "true"
|
||||
:hexpand "false"
|
||||
:valign "start"
|
||||
:halign "center"
|
||||
(label
|
||||
:class "iconweather"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:style "color: ${HEX};" :text ICON)
|
||||
(button
|
||||
:onclick "scripts/weather --getdata && eww reload &"
|
||||
:class "label_temp"
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
"${TEMP}")))
|
||||
|
||||
(defwidget date []
|
||||
(box :class "date" :orientation "v" :valign "start" :space-evenly "false" :halign "center"
|
||||
(label
|
||||
:text DAY)
|
||||
(label
|
||||
:text POO)
|
||||
(label :class "foo"
|
||||
:text FOO)))
|
||||
|
||||
(defpoll FOO :interval "6h" "date '+%d'")
|
||||
(defpoll DAY :interval "6h" "date '+%A'")
|
||||
(defpoll POO :interval "6h" "date '+%B'")
|
||||
|
||||
|
||||
;; Weather vars
|
||||
(defpoll ICON :interval "15m" `scripts/weather --icon`)
|
||||
(defpoll TEMP :interval "15m" `scripts/weather --temp`)
|
||||
(defpoll HEX :interval "15m" `scripts/weather --hex`)
|
||||
|
||||
;; <-- System -->
|
||||
(defwidget system-side []
|
||||
(box
|
||||
:class "stats-box"
|
||||
:space-evenly "false"
|
||||
:width "300px"
|
||||
:orientation "v"
|
||||
:valign "start"
|
||||
:halign "center"
|
||||
:spacing 12
|
||||
(box
|
||||
:class "stats"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
:space-evenly "false"
|
||||
(label
|
||||
:tooltip "${round(EWW_CPU.avg, 0)}%"
|
||||
:class "stats-icon" :text "")
|
||||
(scale
|
||||
:min 0
|
||||
:max 101
|
||||
:active false
|
||||
:value {EWW_CPU.avg}
|
||||
:class "scale"
|
||||
:width 280))
|
||||
(box
|
||||
:class "stats"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
:space-evenly "false"
|
||||
(label
|
||||
:tooltip "${round(EWW_RAM.used_mem_perc, 0)}%"
|
||||
:class "stats-icon"
|
||||
:text "")
|
||||
(scale
|
||||
:min 0
|
||||
:max 101
|
||||
:active false
|
||||
:value {EWW_RAM.used_mem_perc}
|
||||
:class "scale"
|
||||
:width 280))
|
||||
(box
|
||||
:class "stats"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
:space-evenly "false"
|
||||
(label
|
||||
:tooltip "${round(EWW_DISK["/"].used_perc, 0)}%"
|
||||
:class "stats-icon"
|
||||
:text "")
|
||||
(scale
|
||||
:min 0
|
||||
:max 101
|
||||
:active false
|
||||
:value {(EWW_DISK["/"].used / EWW_DISK["/"].total) * 100}
|
||||
:class "scale"
|
||||
:width 280))
|
||||
;; (box
|
||||
;; :class "stats"
|
||||
;; :hexpand "false"
|
||||
;; :vexpand "false"
|
||||
;; :space-evenly "false"
|
||||
;; (label
|
||||
;; :tooltip "${gpu}%"
|
||||
;; :class "stats-icon"
|
||||
;; :text "調")
|
||||
;; (scale
|
||||
;; :min 0
|
||||
;; :max 101
|
||||
;; :active false
|
||||
;; :value gpu
|
||||
;; :class "scale"
|
||||
;; :width 280))
|
||||
(box
|
||||
:class "stats"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
:space-evenly "false"
|
||||
(button
|
||||
:tooltip "${volume_percent}%"
|
||||
:onclick "amixer set Master toggle"
|
||||
:onrightclick "alsamixer &"
|
||||
:class "stats-icon" "墳")
|
||||
(scale
|
||||
:min 0
|
||||
:max 101
|
||||
:active true
|
||||
:value volume_percent
|
||||
:class "scale"
|
||||
:width 280
|
||||
:onchange "pamixer --set-volume {}")
|
||||
)))
|
||||
|
||||
(deflisten gpu "scripts/gpu")
|
||||
|
||||
(defwidget tray []
|
||||
(box
|
||||
:class "buttons"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:halign "center"
|
||||
:valign "start"
|
||||
:spacing "2"
|
||||
(button
|
||||
:class "poweroff"
|
||||
:halign "center"
|
||||
:tooltip "Shut Down"
|
||||
:onclick "alacritty poweroff &" "⏻")
|
||||
(button
|
||||
:class "reboot"
|
||||
:halign "center"
|
||||
:tooltip "Reboot"
|
||||
:onclick "alacritty reboot &" "")
|
||||
(button
|
||||
:class "firmware"
|
||||
:halign "center"
|
||||
:tooltip "Reboot to EFI"
|
||||
:onclick "alacritty systemctl reboot --firmware &" "拉")
|
||||
(button
|
||||
:class "exit"
|
||||
:halign "center"
|
||||
:tooltip "Quit Hyprland"
|
||||
:onclick "hyprctl dispatch exit exit" "")
|
||||
(button
|
||||
:class "restart"
|
||||
:halign "center"
|
||||
:tooltip "edit Config"
|
||||
:onclick "emacsclient ~/.config/hypr/hyprland.conf &" "")))
|
||||
|
||||
(defpoll uptime :interval "1m" "uptime | awk '{print $3}' | sed 's/,//;s/\(.*\):\(.*\)/\1 h \2 m/")
|
||||
(defpoll packages :interval "5m" `pacman -Q | wc -l`)
|
||||
(defpoll kernal :interval "5m" `uname -r`)
|
||||
(defpoll name :interval "5m" `whoami`)
|
||||
(defpoll host :interval "5m" `uname -n`)
|
||||
(defpoll wm :interval "5m" `echo $XDG_CURRENT_DESKTOP`)
|
||||
|
||||
(defwidget fetch []
|
||||
(box
|
||||
:class "fetch"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:halign "center"
|
||||
:valign "start"
|
||||
:spacing "10"
|
||||
(label
|
||||
:class "host"
|
||||
:halign "start"
|
||||
:text " : ${name}@${host}")
|
||||
(label
|
||||
:class "wm"
|
||||
:halign "start"
|
||||
:text " : ${wm}")
|
||||
(label
|
||||
:class "uptime"
|
||||
:halign "start"
|
||||
:text " : ${uptime}")
|
||||
;; (label
|
||||
;; :class "packages"
|
||||
;; :halign "start"
|
||||
;; :text " : ${packages}")
|
||||
(label
|
||||
:class "kernal"
|
||||
:halign "start"
|
||||
:text " : ${kernal}")))
|
35
.config/eww/volume.yuck
Normal file
35
.config/eww/volume.yuck
Normal file
|
@ -0,0 +1,35 @@
|
|||
(defwindow volume
|
||||
:geometry (geometry :x "0px"
|
||||
:y "40px"
|
||||
:anchor "top center")
|
||||
:stacking "overlay"
|
||||
:monitor "0"
|
||||
:focusable "false"
|
||||
:windowtype "dock"
|
||||
:wm-ignore "true"
|
||||
(volshow))
|
||||
|
||||
(defwidget volshow []
|
||||
(box
|
||||
:class "volume-container"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:spacing 5
|
||||
(button
|
||||
:class "volume-icon"
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
:onclick "" "")
|
||||
(scale
|
||||
:class "volume-value"
|
||||
:value {volume_percent}
|
||||
:valign "center"
|
||||
:halign "start"
|
||||
:orientation "h"
|
||||
:max 150
|
||||
:min 0)
|
||||
(label
|
||||
:class "volume-label"
|
||||
:halign "start"
|
||||
:valign "center"
|
||||
:text "${volume_percent}%")))
|
Loading…
Add table
Add a link
Reference in a new issue