siduck 3 жил өмнө
parent
commit
521b4b9669
45 өөрчлөгдсөн 721 нэмэгдсэн , 150 устгасан
  1. 61 0
      .Xresources
  2. 0 11
      .dwm/autostart
  3. 19 6
      README.md
  4. 11 6
      chadwm/config.def.h
  5. 36 6
      chadwm/dwm.c
  6. 2 2
      chadwm/themes/gruvchad.h
  7. 14 61
      eww/eww.scss
  8. 22 56
      eww/eww.yuck
  9. 0 0
      eww/scripts/audio/headvol
  10. 0 0
      eww/scripts/audio/mastervol
  11. 2 0
      eww/scripts/audio/micvol
  12. 0 0
      eww/scripts/backlight
  13. 3 0
      eww/scripts/fetch/os
  14. 1 0
      eww/scripts/fetch/shell
  15. 3 0
      eww/scripts/fetch/wm
  16. 1 0
      eww/scripts/pkg/pkgs
  17. 9 0
      eww/scripts/pkg/updates
  18. 3 0
      eww/scripts/system/battery
  19. 1 0
      eww/scripts/system/cpu
  20. 1 0
      eww/scripts/system/disk
  21. 1 0
      eww/scripts/system/pkgs
  22. 0 0
      eww/scripts/system/ram
  23. 4 0
      eww/scripts/wifi
  24. 46 0
      eww/scss/focal/audioSlider.scss
  25. 79 0
      eww/scss/focal/focal.scss
  26. 20 0
      eww/scss/footer/brightness.scss
  27. 51 0
      eww/scss/footer/btns.scss
  28. 14 0
      eww/scss/header/equalizer.scss
  29. 30 0
      eww/scss/header/fetch.scss
  30. 12 0
      eww/scss/themes/gruvchad.scss
  31. 7 0
      eww/src/dashboard.yuck
  32. 47 0
      eww/src/focal/audioSliders.yuck
  33. 5 0
      eww/src/focal/init.yuck
  34. 22 0
      eww/src/focal/widgets.yuck
  35. 33 0
      eww/src/footer/btns.yuck
  36. 15 0
      eww/src/footer/init.yuck
  37. 37 0
      eww/src/header/fetch.yuck
  38. 12 0
      eww/src/header/init.yuck
  39. 24 0
      eww/src/widgets.yuck
  40. 58 0
      eww/var.yuck
  41. 13 0
      scripts/autostart
  42. 2 2
      scripts/bar.sh
  43. 0 0
      scripts/bar_themes/gruvchad
  44. 0 0
      scripts/bar_themes/nord
  45. 0 0
      scripts/bar_themes/onedark

+ 61 - 0
.Xresources

@@ -0,0 +1,61 @@
+Xft.antialias:	1
+Xft.hinting:	1
+Xft.autohint:	0
+Xft.hintstyle:	hintslight
+Xft.rgba:	rgb
+Xft.lcdfilter:	lcddefault
+
+! window padding
+st.borderpx: 20
+
+!-- values between 0.1  - 1.0 --! 
+
+st.alpha: 1.0 
+st.font:           JetBrainsMono Nerd Font:style:medium:pixelsize=15
+
+#define base00 #282c34
+#define base01 #353b45
+#define base02 #3e4451
+#define base03 #545862
+#define base04 #565c64
+#define base05 #abb2bf
+#define base06 #b6bdca
+#define base07 #c8ccd4
+#define base08 #e06c75
+#define base09 #d19a66
+#define base0A #e5c07b
+#define base0B #98c379
+#define base0C #56b6c2
+#define base0D #61afef
+#define base0E #c678dd
+#define base0F #be5046
+
+*foreground:   base07
+*background:   #1e222a
+*cursorColor:  base05
+
+*color0:       base00
+*color1:       base08
+*color2:       base0B
+*color3:       base0A
+*color4:       base0D
+*color5:       base0E
+*color6:       base0C
+*color7:       base05
+
+*color8:       base03
+*color9:       base08
+*color10:      base0B
+*color11:      base0A
+*color12:      base0D
+*color13:      base0E
+*color14:      base0C
+*color15:      base07
+
+! just remove this if you dont use my tabbed
+
+tabbed.selfgcolor:   #d6d8eb
+tabbed.selbgcolor:   #1e222a
+
+tabbed.normfgcolor:  #9294a8
+tabbed.normbgcolor:  #282c34

+ 0 - 11
.dwm/autostart

@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# add your autostart stuffs here
-
-picom &
-xrdb merge ~/Public/xresources/forest/.Xresources &
-feh --bg-tile ~/Pictures/wall/gruv.png &
-
-# run bar script and dwm ( do not remove this ) 
-~/.dwm/bar/./bar.sh & 
-dwm

+ 19 - 6
README.md

@@ -23,15 +23,28 @@ https://user-images.githubusercontent.com/59060246/128050994-17f46934-6604-4430-
 
 # Setup 
 
-- Put the .dwm folder in ~/
-- chmod +x all scripts in .dwm folder
-- copy the stuff from fonts folder to your ~/.local/share/fonts ( this is for material design icon font )
-- cd into chadwm and sudo make install
+- mv chadwm dir (this repo) to ~/.config
+- chmod +x all scripts in scripts dir
+- copy the stuff from fonts folder to your ~/.local/share/fonts 
+- compile dwm :
+```
+cd ~/.config/chadwm/chadwm
+sudo make install
+```
 - autostart file is just an example one so it must be adjusted for your liking!
 
 # Run chadwm
 
-- Run the autostart file from .xinitrc or 
+- Run the autostart file from .xinitrc
+
+(.xinitrc file)
+```
+#!/bin/sh
+
+exec ~/.config/chadwm/scripts/./autostart
+```
+OR
+
 - Create a desktop entry 
 
 ```
@@ -42,7 +55,7 @@ touch /usr/share/xsessions/chadwm.desktop
 [Desktop Entry]
 Name=chadwm
 Comment=dwm made beautiful 
-Exec= <path to autostart file> 
+Exec= ~/.config/chadwm/scripts/./autostart 
 Type=Application 
 ```
 

+ 11 - 6
chadwm/config.def.h

@@ -32,7 +32,6 @@ static       int tag_preview        = 0;        /* 1 means enable, 0 is off */
 static const char *fonts[]          = { "JetBrainsMono Nerd Font:style:medium:size=10",
                                         "Material Design Icons-Regular:size=10",
                                       };
-static const char dmenufont[]       = "monospace:size=10";
 static const int colorfultag        = 1;  /* 0 means use SchemeSel for selected non vacant tag */
 
 // theme
@@ -57,7 +56,14 @@ static const char *colors[][3]      = {
 };
 
 /* tagging */
-static char *tags[] = {" ", " ", " ", " ", " "};
+static char *tags[] = {"", "", "", "", ""};
+
+static const char* eww[]      = { "eww", "open" , "eww", NULL };
+
+static const Launcher launchers[] = {
+       /* command       name to display */
+	{ eww,         "" },
+};
 
 static const int tagschemes[] = { SchemeTag1, SchemeTag2, SchemeTag3,
                                   SchemeTag4, SchemeTag5
@@ -119,9 +125,7 @@ static const Layout layouts[] = {
 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
 
 /* commands */
-static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
-static const char *dmenucmd[] = { "dmenu_run", NULL };
-static const char *termcmd[]  = {  "st", NULL }; // change this to your term
+static const char *term[]  = {  "st", NULL }; // change this to your term
 static const char *rofi[] = {"rofi", "-show", "drun", NULL };
 static const char *xi[] = {"xbacklight", "-inc", "7", NULL};
 static const char *xd[] = {"xbacklight", "-dec", "7", NULL};
@@ -129,7 +133,8 @@ static const char *xd[] = {"xbacklight", "-dec", "7", NULL};
 static Key keys[] = {
     /* modifier                     key        function        argument */
     { MODKEY,                       XK_c,      spawn,          {.v = rofi } },
-    { MODKEY,                       XK_Return, spawn,          {.v = termcmd }},  
+    { MODKEY,                       XK_Return, spawn,           {.v = term }},  
+    { MODKEY,                       XK_Return, spawn,          SHCMD("st_pad && st")},  
 
     {MODKEY | ControlMask, XK_u, spawn, SHCMD("maim | xclip -selection clipboard -t image/png")},
     {MODKEY, XK_u, spawn,   SHCMD("maim --select | xclip -selection clipboard -t image/png")},

+ 36 - 6
chadwm/dwm.c

@@ -212,6 +212,11 @@ struct Systray {
   Client *icons;
 };
 
+typedef struct {
+	const char** command;
+	const char* name;
+} Launcher;
+
 /* function declarations */
 static void applyrules(Client *c);
 static int applysizehints(Client *c, int *x, int *y, int *w, int *h,
@@ -605,12 +610,29 @@ void buttonpress(XEvent *e) {
     if (i < LENGTH(tags)) {
       click = ClkTagBar;
       arg.ui = 1 << i;
-    } else if (ev->x < x + blw)
+      goto execute_handler;
+     } else if (ev->x < x + blw) {
       click = ClkLtSymbol;
-    else if (ev->x > selmon->ww - TEXTW(stext) - getsystraywidth())
-      click = ClkStatusText;
+      goto execute_handler;
+      }
+
+		x += blw;
+
+		for(i = 0; i < LENGTH(launchers); i++) {
+			x += TEXTW(launchers[i].name);
+			
+			if (ev->x < x) {
+				Arg a;
+				a.v = launchers[i].command;
+				spawn(&a);
+				return;
+			}
+	}	
+
+	if (ev->x > selmon->ww - TEXTW(stext))
+         click = ClkStatusText;
     else
-      click = ClkWinTitle;
+         click = ClkWinTitle;
     	} 
 	if(ev->window == selmon->tabwin) {
 		i = 0; x = 0;
@@ -643,6 +665,9 @@ void buttonpress(XEvent *e) {
     XAllowEvents(dpy, ReplayPointer, CurrentTime);
     click = ClkClientWin;
   }
+
+execute_handler:
+
   for (i = 0; i < LENGTH(buttons); i++)
     if (click == buttons[i].click && buttons[i].func &&
         buttons[i].button == ev->button &&
@@ -1451,6 +1476,13 @@ void drawbar(Monitor *m) {
   drw_setscheme(drw, scheme[SchemeLayout]);
   x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
 
+  	for (i = 0; i < LENGTH(launchers); i++)
+	{
+		w = TEXTW(launchers[i].name);
+		drw_text(drw, x, 0, w, bh, lrpad / 2, launchers[i].name, urg & 1 << i);
+		x += w;
+	}
+
   if ((w = mw + m->gappov * 2 - sw - stw - x) > bh_n) {
     if (m->sel) {
       drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
@@ -2886,8 +2918,6 @@ void sigterm(int unused) {
 }
 
 void spawn(const Arg *arg) {
-  if (arg->v == dmenucmd)
-    dmenumon[0] = '0' + selmon->num;
   if (fork() == 0) {
     if (dpy)
       close(ConnectionNumber(dpy));

+ 2 - 2
chadwm/themes/gruvchad.h

@@ -1,4 +1,4 @@
-static const char black[]       = "#222526";
+static const char black[]       = "#1e2122";
 static const char gray2[]       = "#282b2c"; // unfocused window border
 static const char gray3[]       = "#5d6061";
 static const char gray4[]       = "#282b2c";
@@ -8,4 +8,4 @@ static const char red[]         = "#ec6b64";
 static const char orange[]      = "#d6b676";
 static const char yellow[]      = "#d1b171";
 static const char pink[]        = "#cc7f94";
-static const char col_borderbar[]  = "#222526"; // inner border
+static const char col_borderbar[]  = "#1e2122"; // inner border

+ 14 - 61
eww/eww.scss

@@ -1,66 +1,19 @@
-* {
-  all: unset; //Unsets everything so you can style everything from scratch
-}
-
-//Global Styles
-.alsa-gui {
-  background-color: #1e222a;
-  color: #abb2bf;
-  padding: 12px;
-  border-radius: 7px;
-  font-size : 25px;
-}
-
-.metric scale trough {
-  all: unset;
-  border-radius: 50px;
-  min-height: 3px;
-  min-width: 90px;
-  margin-left: 10px;
-  margin-right: 10px;
-}
-
-.chad scale trough {
-  all: unset;
-  border-radius: 50px;
-  min-height: 3px;
-  min-width: 90px;
-  margin-left: 10px;
-  margin-right: 10px;
-}
-
-.metric scale trough highlight {
-  all: unset;
-  background-color: #668ee3;
-  border-radius: 10px;
-}
+@import "scss/themes/gruvchad.scss";
 
-.chad scale trough highlight {
-  all: unset;
-  background-color: #e06c75;
-  border-radius: 10px;
-}
+// header
+@import "scss/header/equalizer.scss";
+@import "scss/header/fetch.scss";
 
-.bri  {
-  background-color: #d47d85;
-}
+// focal
+@import "scss/focal/focal.scss";
+@import "scss/focal/audioSlider.scss";
 
-.metric scale trough {
-  all: unset;
-  background-color: #282c34;
-  border-radius: 50px;
-  min-height: 6px;
-  min-width: 90px;
-  margin-left: 10px;
-  margin-right: 10px;
-}
+// footer
+@import "scss/footer/btns.scss";
+@import "scss/footer/brightness.scss";
 
-.chad scale trough {
-  all: unset;
-  background-color: #282c34;
-  border-radius: 50px;
-  min-height: 6px;
-  min-width: 90px;
-  margin-left: 10px;
-  margin-right: 10px;
+.eww {
+  padding: 1rem;
+  padding-top: .6rem;
+  background-color: $black;
 }

+ 22 - 56
eww/eww.yuck

@@ -1,61 +1,27 @@
-(defwidget chad-widgets []
-  (box :orientation "h"
-    (sliders)))
+; defined ones
+(include './var.yuck')
+(include './src/widgets.yuck')
 
-(defwidget sliders []
-  (box :class "master_vol" :orientation "v" :space-evenly false :halign "end"
-    (metric :label ""
-            :value master_vol
-            :onchange "amixer set Master {}%")
-      
-    (metric :label ""
-            :value head_vol
-            :onchange "amixer set Headphone {}%")
-  
-    (chad :label "" 
-             :value brightness
-             :onchange "xbacklight -set {}%")
-  )
-)
+; header
+(include './src/header/fetch.yuck')
+(include './src/header/init.yuck')
 
-(defwidget chad [label value onchange]
-  (box :orientation "h"
-       :class "chad"
-       :space-evenly false
-    (box :class "label" label)
-    (scale :min 0
-           :max 101
-           :active {onchange != ""}
-           :value value
-           :onchange onchange)))
+; focal
+(include './src/focal/widgets.yuck')
+(include './src/focal/audioSliders.yuck')
+(include './src/focal/init.yuck')
 
-(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)))
+; footer
+(include './src/footer/btns.yuck')
+(include './src/footer/init.yuck')
 
-(defpoll master_vol :interval "1s"
-  "scripts/get_mastervol")
+; dashboard 
+(include './src/dashboard.yuck')
 
-(defpoll head_vol :interval "1s"
-  "scripts/get_headvol")
-
-(defpoll brightness :interval "1s"
-  "scripts/get_brightness")
-
-(defwindow alsa-gui
-  :monitor 0
-  :windowtype "dock"
-  :geometry (geometry :x "-01%"
-                      :y "8%"
-                      :width "5%"
-                      :height "0px"
-                      :anchor "top right")
-  ; :reserve (struts :side "right" :distance "0%")
-  (chad-widgets))
+; whole eww window
+(defwindow eww
+           :geometry (geometry :x "-1%"
+                               :y "-2%"
+                               :anchor "right bottom")
+           :wm-ignore true
+(dashboard))

+ 0 - 0
eww/scripts/get_headvol → eww/scripts/audio/headvol


+ 0 - 0
eww/scripts/get_mastervol → eww/scripts/audio/mastervol


+ 2 - 0
eww/scripts/audio/micvol

@@ -0,0 +1,2 @@
+#!/bin/sh
+amixer sget Mic | grep 'Left:' | cut -d\  -f7 | tr -d '[%]'

+ 0 - 0
eww/scripts/get_brightness → eww/scripts/backlight


+ 3 - 0
eww/scripts/fetch/os

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+source /etc/os-release && echo $PRETTY_NAME

+ 1 - 0
eww/scripts/fetch/shell

@@ -0,0 +1 @@
+basename $SHELL

+ 3 - 0
eww/scripts/fetch/wm

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+xprop -id $(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t | grep "WM_NAME" | cut -f2 -d \"

+ 1 - 0
eww/scripts/pkg/pkgs

@@ -0,0 +1 @@
+xbps-query -l | wc -l

+ 9 - 0
eww/scripts/pkg/updates

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+updates=$(xbps-install -S -un | cut -d' ' -f2 | sort | uniq -c | xargs)
+
+if [ -z "$updates" ]; then
+    echo "Fully Updated"
+else
+    echo " $updates""s"
+fi

+ 3 - 0
eww/scripts/system/battery

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+cat /sys/class/power_supply/BAT1/capacity

+ 1 - 0
eww/scripts/system/cpu

@@ -0,0 +1 @@
+grep -o "^[^ ]*" /proc/loadavg

+ 1 - 0
eww/scripts/system/disk

@@ -0,0 +1 @@
+df -hl | awk '/^\/dev\/sd[ab]/ { sum+=$5 } END { print sum }'

+ 1 - 0
eww/scripts/system/pkgs

@@ -0,0 +1 @@
+xbps-query -l | wc -l

+ 0 - 0
eww/scripts/getram → eww/scripts/system/ram


+ 4 - 0
eww/scripts/wifi

@@ -0,0 +1,4 @@
+	case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
+	up) printf "󰤨" ;;
+        down) printf "󰤭" ;;
+	esac

+ 46 - 0
eww/scss/focal/audioSlider.scss

@@ -0,0 +1,46 @@
+.audioSliders {
+  margin-bottom: 1rem;
+}
+
+.masterSlider,.headphoneSlider,.micSlider {
+  margin: 0 .5rem;
+  font-size: 1.5rem;
+  margin-top: -1rem;
+  margin-bottom: -2rem;
+}
+
+.addPadding {
+  padding: 0 .3rem;
+}
+
+.masterSlider scale trough highlight, .headphoneSlider scale trough highlight , .micSlider scale trough highlight {
+  border-radius: 10px;
+}
+
+.masterSlider scale trough, .headphoneSlider scale trough , .micSlider scale trough {
+  background-color: $blackAlt;
+  border-radius: 1rem;
+  min-width: 1.5rem;
+}
+
+.masterSlider scale trough highlight {
+  background-color: $red; 
+}
+
+.headphoneSlider scale trough highlight {
+  background-color: $yellow; 
+}
+
+.micSlider scale trough highlight {
+  background-color: $blue; 
+}
+
+.audioIcon {
+  font-family:  'JetbrainsMono Nerd Font';
+  font-size: 1.5rem;
+  margin-bottom: 2rem;
+  padding: 0.5rem 1.1rem;
+  background-color: $blackAlt;
+  border-radius: 50%;
+  color: $lightGrey;
+}

+ 79 - 0
eww/scss/focal/focal.scss

@@ -0,0 +1,79 @@
+.radialBars {
+  margin-bottom: -4rem;
+  padding: 1.5rem 0.8rem;
+}
+
+// progress bars
+.CPU, .RAM , .DISK, .battery {
+  background-color: $blackAlt;
+  color: $blue;
+  font-size: 2.1rem;
+  font-family: 'JetBrainsMono Nerd Font';
+}
+
+.CPU {
+ font-size: 2.5rem; 
+}
+
+.RAM {
+  color: $green;
+}
+
+.battery {
+  color: $red;
+}
+
+.DISK {
+  font-size: 1rem;
+  color: $white;
+  background-color: $grey;
+}
+
+.time {
+  font-family: 'Iosevka';
+  font-size: 1.2rem;
+  background-color: $blackAlt;
+  margin: 2.5rem 0.5rem;
+  margin-bottom: -0.6rem;
+  border-radius:1rem;
+  padding: 0 1rem;
+  color: $white;
+}
+
+.mute {
+  background-color: $blackAlt;
+  border-radius: 1rem;
+  color: $green;
+  font-family: 'JetBrainsMono Nerd Font';
+  font-size: 2rem;
+  margin:  .8rem ;
+}
+
+.mute:hover {
+  background-color: $grey;
+  color: $white;
+}
+
+.pkgs{
+ margin: 1.5rem;
+ border-radius: 1rem;
+ font-family: 'JetBrainsMono Nerd Font';
+ color: $green;
+ background-color: $blackAlt;
+ padding: 0 1rem;
+}
+
+.pkgsBox {
+  margin: -1rem;
+  margin-top: .3rem;
+  margin-bottom: -3.5rem;
+  margin-left: .15rem;
+}
+
+.CPUBOX {
+  margin-right: .4rem;
+}
+
+.RAMBOX {
+  margin-left: .4rem;
+} 

+ 20 - 0
eww/scss/footer/brightness.scss

@@ -0,0 +1,20 @@
+* {
+  all: unset;
+}
+
+.brightness {
+  padding: 0 1rem;
+  margin-bottom: -2rem;
+}
+
+.brightness scale trough highlight {
+  background-color: $red; 
+  border-radius: 10px;
+}
+
+.brightness scale trough {
+  background-color: $grey;
+  border-radius: 1rem;
+  min-width: 16rem;
+  min-height: .3rem;
+}

+ 51 - 0
eww/scss/footer/btns.scss

@@ -0,0 +1,51 @@
+.btn {
+  font-family: "JetbrainsMono Nerd Font";
+  font-size: 1.6rem;
+  padding: 0 1.3rem;
+  box-shadow: none;
+  background-color: $grey;
+  border-radius: 50%;
+}
+
+.close {
+  color: $red;
+}
+
+.sleep {
+  color: $red;
+}
+.restart {
+  color: $green;
+}
+
+.lock {
+  color: $blue;
+  padding: 0 1.4rem;
+}
+
+.lock:hover , .restart:hover, .close:hover, .wifi:hover{
+  background-color: $green;
+  color: $black;
+}
+
+.wifi {
+  background-color: $red;
+  color: $black;
+  padding: 0 1.1rem;
+}
+
+.lock, .restart, .close, .wifi{
+  transition: ease-out .2s;
+}
+
+.btnMargin {
+  background-color: $grey;
+  border-radius: 50%;
+  margin: 0.5rem;
+}
+
+.footerBtns {
+  background-color: $blackAlt;
+  padding: 0.5rem;
+  border-radius: 1.3rem;
+}

+ 14 - 0
eww/scss/header/equalizer.scss

@@ -0,0 +1,14 @@
+.close , .min , .max{
+  font-family: 'JetBrainsMono Nerd Font';
+  font-size: 1.3rem;
+  padding: 0 0.3rem;
+  color: $red;
+}
+
+.min {
+  color: $yellow;
+}
+
+.max {
+  color: $green;
+}

+ 30 - 0
eww/scss/header/fetch.scss

@@ -0,0 +1,30 @@
+.fetchContent {
+  padding: 2rem;
+  padding-left: 0;
+  font-family: 'JetBrainsMono Nerd Font';
+  color: $white;
+  border-right: 2px solid $grey;
+}
+
+.logo {
+  font-family: 'JetBrainsMono Nerd Font';
+  font-size: 4rem;
+  color: $green;
+  margin:0  1.5rem
+}
+
+.fetch {
+  background-color: $blackAlt;
+  border-radius: 1rem;
+  margin-bottom: 1rem;
+  margin-top: .6rem;
+}
+
+.fetchTitles {
+  color: $green;
+  padding-right: 1rem
+}
+
+.hdd {
+  margin: 1rem;
+}

+ 12 - 0
eww/scss/themes/gruvchad.scss

@@ -0,0 +1,12 @@
+$white: #c7b89d;
+$black: #1e2122;
+$blackAlt: #242728;
+$grey: #2f3233;
+$lightGrey: #696c6d;
+$green: #89b482;
+$red: #ec6b64;
+$blue: #6d8dad;
+$pink: #cc7f94;
+$yellow: #d6b676;
+$orange: #e78a4e;
+$purple: #9f899c;

+ 7 - 0
eww/src/dashboard.yuck

@@ -0,0 +1,7 @@
+(defwidget dashboard []
+  (box :orientation "v"
+  (header)
+  (audioSliders)
+  (focal)
+  (footer)
+ ))

+ 47 - 0
eww/src/focal/audioSliders.yuck

@@ -0,0 +1,47 @@
+(defwidget audioSliders []
+  (box :space-evenly false :class 'audioSliders'
+
+    ; Master
+    (box :orientation 'v' :class 'addPadding' 
+    (label :text '' :class 'audioIcon')
+    (metric
+             :class 'masterSlider'
+             :value master_vol
+             :onchange "amixer set Master {}%"
+             :orientation 'v'
+             :flipped true
+         )
+    )
+
+    ; Headphone
+    (box :orientation 'v' :class 'addPadding'
+    (label :text '' :class 'audioIcon')
+    (metric
+             :class 'headphoneSlider'
+             :value head_vol
+             :onchange "amixer set Headphone {}%"
+             :orientation 'v'
+             :flipped true 
+            ))
+
+    ; Mic 
+    (box :orientation 'v'  :class 'addPadding'
+    (label :text '' :class 'audioIcon')
+    (metric 
+             :class 'micSlider'
+             :value mic_vol
+             :onchange "amixer set Mic {}%"
+             :orientation 'v'
+             :flipped true 
+            ))
+
+   (box :orientation 'v' :class 'pkgsBox'
+    (progressBar
+      :value battery 
+      :text ''
+      :class 'battery'
+      )
+    ; package count
+    (label :text ' ${pkgs} pkgs' :class 'pkgs')
+  )
+ ))

+ 5 - 0
eww/src/focal/init.yuck

@@ -0,0 +1,5 @@
+(defwidget focal []
+  (box :orientation "v"
+    (time)
+    (radialBars)
+ ))

+ 22 - 0
eww/src/focal/widgets.yuck

@@ -0,0 +1,22 @@
+(defwidget time[]
+    (box :class 'time' 
+    '󱑆 ${time} | ${date}')
+ )
+
+(defwidget radialBars[]
+  (box :class "radialBars" 
+    (progressBar
+      :value cpu 
+      :text ''
+      :class 'CPU'
+      :boxClass 'CPUBOX'
+      )
+   (progressBar
+      :value ram
+      :text '﬙'
+      :class 'RAM'
+      :boxClass 'RAMBOX'
+      )
+      (button :class 'mute' :onclick 'amixer set Master 0' '' )
+     )
+)

+ 33 - 0
eww/src/footer/btns.yuck

@@ -0,0 +1,33 @@
+(defwidget btn [name command class]
+  (box :orientation "v"
+       :halign "center"
+       :class "btnMargin"
+    (button :onclick command 
+        :class "btn ${class}" 
+      name))
+)
+
+(defwidget btns []
+  (box :orientation "h"
+       :class 'footerBtns'
+ 
+  (btn :name ""
+  :command "rofi -show drun"
+    :class "restart"
+  )
+
+(btn :name ""
+  :command "slock"
+  :class "lock"
+ )
+
+ (btn :name wifi 
+   :command "iwgtk"
+   :class "wifi"
+  )
+
+ (btn :name "" 
+    :command "doas zzz"
+    :class "sleep"
+  )
+))

+ 15 - 0
eww/src/footer/init.yuck

@@ -0,0 +1,15 @@
+(defwidget backlightSlider []
+    (metric
+             :class 'brightness'
+             :value brightness
+             :onchange "xbacklight -set {}%"
+             :orientation 'h'
+             :flipped false
+             )
+)
+
+(defwidget footer []
+  (box :orientation "v"
+  (backlightSlider)
+  (btns)
+ ))

+ 37 - 0
eww/src/header/fetch.yuck

@@ -0,0 +1,37 @@
+(defwidget txt [label]
+  (box :halign 'start' label ))
+
+(defwidget title[]
+ (box :class 'fetchTitles' :orientation 'v'
+    (txt :label 'os')
+    (txt :label 'wm')
+    (txt :label 'sh')
+))
+
+; dummy details for now!
+(defwidget details[]
+  (box :class 'fetchDetails' :orientation 'v'
+  (txt :label  os)
+  (txt :label  wm)
+  (txt :label  shell)
+))
+
+(defwidget hdd[]
+  (box :orientation 'v' :class 'hdd'
+   (progressBar
+      :value disk 
+      :text 'HDD'
+      :class 'DISK'
+      )
+  )
+  )
+
+(defwidget fetch[]
+ (box :class 'fetch' 
+ (box :class 'logo'  '' ) 
+  (box :orientation 'h' :class 'fetchContent' :space-evenly false
+  (title) 
+  (details)
+ )
+  (hdd)
+))

+ 12 - 0
eww/src/header/init.yuck

@@ -0,0 +1,12 @@
+(defwidget headerBtns[]
+  (box :space-evenly false :valign 'end' :halign 'end' :class 'headerBtns'
+       (button :class 'min' :onclick 'eww close eww' '')
+       (button :class 'close' :onclick 'eww kill'   '')
+      )
+  )
+
+(defwidget header[]
+  (box :orientation 'v' :space-evenly false
+   (headerBtns)
+   (fetch)
+))

+ 24 - 0
eww/src/widgets.yuck

@@ -0,0 +1,24 @@
+; radial progress bar
+(defwidget progressBar [value text class ?boxClass]
+  (box :class boxClass
+  (circular-progress :class class 
+    :value value 
+    :thickness 5
+    text 
+   )
+  )
+)
+
+; slider
+(defwidget metric [class value ?onchange orientation flipped ]
+  (box :class class  :orientation orientation :space-evenly true
+    (scale 
+           :min 0
+           :max 101
+           :active {onchange != ""}
+           :value value
+           :onchange onchange
+           :orientation orientation
+           :flipped flipped
+           )
+))

+ 58 - 0
eww/var.yuck

@@ -0,0 +1,58 @@
+; system i.e for progress bars
+(defpoll cpu :interval "1s"
+    "scripts/system/cpu")
+
+(defpoll ram :interval "1s"
+    "scripts/system/ram")
+
+(defpoll disk :interval "1s"
+    "scripts/system/disk")
+
+(defpoll battery :interval "1s"
+    "scripts/system/battery")
+
+; date time
+(defpoll time :interval "1s"
+    "date +'%H:%M'")
+
+(defpoll date :interval "1s"
+    "date +'%a, %d %m %y'")
+
+; sliders
+
+; audio 
+(defpoll master_vol :interval "1s"
+  "scripts/audio/mastervol")
+
+(defpoll head_vol :interval "1s"
+  "scripts/audio/headvol")
+
+(defpoll mic_vol :interval "1h"
+  "scripts/audio/micvol")
+
+; backlight 
+(defpoll brightness :interval "1s"
+  "scripts/backlight")
+
+; pkg related 
+(defpoll updates :interval "1s"
+    "scripts/pkg/updates")
+
+(defpoll pkgs :interval "1s"
+    "scripts/pkg/pkgs")
+
+; btns
+
+; wifi iwdgtk btn 
+(defpoll wifi :interval "1s"
+    "scripts/wifi")
+
+;fetch 
+(defpoll os :interval '10000s'
+  'scripts/fetch/os')
+
+(defpoll shell :interval '100000s'
+  'scripts/fetch/shell')
+
+(defpoll wm :interval '100000s'
+  'scripts/fetch/wm')

+ 13 - 0
scripts/autostart

@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# this is just an example!
+# add your autostart stuffs here
+xbacklight -set 5 &
+xmodmap ~/.xmodmap-sid &
+picom &
+xrdb merge ~/.Xresources &
+feh --bg-fill ~/Pictures/wall/gruvchad.png &
+
+# run bar script and dwm ( do not remove this )
+~/.config/chadwm/scripts/./bar.sh &
+dwm

+ 2 - 2
.dwm/bar/bar.sh → scripts/bar.sh

@@ -5,8 +5,8 @@
 
 interval=0
 
-# load colors!
-. ~/.dwm/bar/themes/onedark
+# load colors
+. ~/.config/chadwm/scripts/bar_themes/onedark
 
 cpu() {
 	cpu_val=$(grep -o "^[^ ]*" /proc/loadavg)

+ 0 - 0
.dwm/bar/themes/gruvchad → scripts/bar_themes/gruvchad


+ 0 - 0
.dwm/bar/themes/nord → scripts/bar_themes/nord


+ 0 - 0
.dwm/bar/themes/onedark → scripts/bar_themes/onedark