@@ -1,4 +1,5 @@
 | 
				
			|||||||
monitor=,preferred,auto,1
 | 
					monitor=,preferred,auto,1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
input {
 | 
					input {
 | 
				
			||||||
    kb_layout = us
 | 
					    kb_layout = us
 | 
				
			||||||
    kb_variant = colemak_dh
 | 
					    kb_variant = colemak_dh
 | 
				
			||||||
@@ -154,3 +155,5 @@ bind=$mainMod SHIFT, 7, movetoworkspacesilent, 7
 | 
				
			|||||||
bind=$mainMod SHIFT, 8, movetoworkspacesilent, 8
 | 
					bind=$mainMod SHIFT, 8, movetoworkspacesilent, 8
 | 
				
			||||||
bind=$mainMod SHIFT, 9, movetoworkspacesilent, 9
 | 
					bind=$mainMod SHIFT, 9, movetoworkspacesilent, 9
 | 
				
			||||||
bind=$mainMod SHIFT, 0, movetoworkspacesilent, 10
 | 
					bind=$mainMod SHIFT, 0, movetoworkspacesilent, 10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exec-once=eww open bar
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								home/natto/eww/README.org
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								home/natto/eww/README.org
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					#+OPTIONS: toc:nil
 | 
				
			||||||
 | 
					Inspired by
 | 
				
			||||||
 | 
					+ [[https://github.com/saimoomedits/eww-widgets/tree/cfb2523a4e37ed2979e964998d9a4c37232b2975][saimoomedits]]
 | 
				
			||||||
 | 
					+ [[https://github.com/fufexan/dotfiles/tree/db777ae5a76db34608dd486ed9238e9129252bbc/home/programs/eww][fufexan]]
 | 
				
			||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
(include "bar/music.yuck")
 | 
					(include "bar/music.yuck")
 | 
				
			||||||
(include "bar/workspaces.yuck")
 | 
					(include "bar/hyprworkspaces.yuck")
 | 
				
			||||||
(include "bar/system.yuck")
 | 
					(include "bar/system.yuck")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defwidget bar []
 | 
					(defwidget bar []
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@ workspaces() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
list_workspaces
 | 
					list_workspaces
 | 
				
			||||||
workspaces
 | 
					workspaces
 | 
				
			||||||
hyprctl dispatch workspace $current
 | 
					hyprctl dispatch workspace $current || true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
 | 
					socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
 | 
				
			||||||
  case ${event%>>*} in
 | 
					  case ${event%>>*} in
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,5 +10,4 @@
 | 
				
			|||||||
		              (button
 | 
							              (button
 | 
				
			||||||
                   :class "${ws == workspace.current ? 'workspace-active' : 'workspace-inactive'}"
 | 
					                   :class "${ws == workspace.current ? 'workspace-active' : 'workspace-inactive'}"
 | 
				
			||||||
					         :onclick "hyprctl dispatch workspace ${ws}"
 | 
										         :onclick "hyprctl dispatch workspace ${ws}"
 | 
				
			||||||
					         {ws <= 10 ? numerals[ws - 1] : ws }))
 | 
										         {ws <= 10 ? numerals[ws - 1] : ws })))))
 | 
				
			||||||
             )))
 | 
					 | 
				
			||||||
@@ -101,9 +101,6 @@
 | 
				
			|||||||
            (system_bright)
 | 
					            (system_bright)
 | 
				
			||||||
            (system_temp)))
 | 
					            (system_temp)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defpoll system_cpu_freq :interval "2s" :initial "0"
 | 
					 | 
				
			||||||
         "cat /proc/cpuinfo | awk '/cpu MHz/ { sum += $4; n++} END { if (n != 0) print sum / n; }'")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defwidget system_metric [value class tooltip]
 | 
					(defwidget system_metric [value class tooltip]
 | 
				
			||||||
           (box
 | 
					           (box
 | 
				
			||||||
            :orientation "h"
 | 
					            :orientation "h"
 | 
				
			||||||
@@ -126,8 +123,8 @@
 | 
				
			|||||||
             :space-evenly false
 | 
					             :space-evenly false
 | 
				
			||||||
             (system_metric
 | 
					             (system_metric
 | 
				
			||||||
              :value {EWW_CPU.avg}
 | 
					              :value {EWW_CPU.avg}
 | 
				
			||||||
              :tooltip "CPU Usage: ${round(EWW_CPU.avg, 2)}%${system_cpu_freq == '0' ? '' : '
 | 
					              :tooltip "CPU Usage: ${round(EWW_CPU.avg, 2)}%
 | 
				
			||||||
CPU Freq: ${system_cpu_freq} MHz'}"
 | 
					CPU Freq: ${EWW_CPU.cores[0].freq} MHz}"
 | 
				
			||||||
              :class "cpu")
 | 
					              :class "cpu")
 | 
				
			||||||
             (system_metric
 | 
					             (system_metric
 | 
				
			||||||
              :value {EWW_RAM.used_mem_perc}
 | 
					              :value {EWW_RAM.used_mem_perc}
 | 
				
			||||||
@@ -141,7 +138,7 @@ Free %: ${round(100 - EWW_RAM.used_mem_perc, 2)}%"
 | 
				
			|||||||
              :class "battery")
 | 
					              :class "battery")
 | 
				
			||||||
             (system_metric
 | 
					             (system_metric
 | 
				
			||||||
              :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
 | 
					              :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
 | 
				
			||||||
              :tooltip "Free Disk: ${round(EWW_DISK['/'].free / 1024 / 1024, 2)} GB
 | 
					              :tooltip "Free Disk: ${round(EWW_DISK['/'].free / 1024 / 1024 / 1024, 2)} GB
 | 
				
			||||||
Free Disk %: ${round(EWW_DISK['/'].free / EWW_DISK['/'].total * 100, 2)}%"
 | 
					Free Disk %: ${round(EWW_DISK['/'].free / EWW_DISK['/'].total * 100, 2)}%"
 | 
				
			||||||
              :class "disk"))))
 | 
					              :class "disk"))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,6 +16,7 @@
 | 
				
			|||||||
  systemd.user.services.eww = {
 | 
					  systemd.user.services.eww = {
 | 
				
			||||||
    Unit = {
 | 
					    Unit = {
 | 
				
			||||||
      Description = "EWW Daemon";
 | 
					      Description = "EWW Daemon";
 | 
				
			||||||
 | 
					      PartOf = ["graphical-session.target"];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    Service =
 | 
					    Service =
 | 
				
			||||||
      let
 | 
					      let
 | 
				
			||||||
@@ -25,8 +26,8 @@
 | 
				
			|||||||
        ] ++ (import ./bar pkgs);
 | 
					        ] ++ (import ./bar pkgs);
 | 
				
			||||||
      in
 | 
					      in
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        Environment = "PATH=${lib.makeBinPath deps}";
 | 
					 | 
				
			||||||
        Type = "simple";
 | 
					        Type = "simple";
 | 
				
			||||||
 | 
					        Environment = "PATH=${lib.makeBinPath deps}";
 | 
				
			||||||
        Restart = "on-failure";
 | 
					        Restart = "on-failure";
 | 
				
			||||||
        ExecStart = "${config.programs.eww.package}/bin/eww daemon --no-daemonize";
 | 
					        ExecStart = "${config.programs.eww.package}/bin/eww daemon --no-daemonize";
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user