chore: removed unused eww-custom module
This commit is contained in:
@@ -120,74 +120,6 @@
|
|||||||
xdg.portal.config.common.default = ["gtk"];
|
xdg.portal.config.common.default = ["gtk"];
|
||||||
xdg.portal.xdgOpenUsePortal = true;
|
xdg.portal.xdgOpenUsePortal = true;
|
||||||
|
|
||||||
# Status bar
|
|
||||||
# programs.eww-custom.enable = true;
|
|
||||||
# programs.eww-custom.widgets = let
|
|
||||||
# hyprland-workspaces = lib.getExe pkgs.hyprland-workspaces;
|
|
||||||
# hyprctl = lib.getExe' config.wayland.windowManager.hyprland.package "hyprctl";
|
|
||||||
# jq = lib.getExe pkgs.jq;
|
|
||||||
# awk = lib.getExe' pkgs.gawk "awk";
|
|
||||||
# socat = lib.getExe pkgs.socat;
|
|
||||||
#
|
|
||||||
# # Currently borked
|
|
||||||
# eww-active-workspace = pkgs.writeShellScriptBin "eww-active-workspace" ''
|
|
||||||
# ${hyprctl} monitors -j |
|
|
||||||
# ${jq} '.[] | select(.focused) | .activeWorkspace.id'
|
|
||||||
#
|
|
||||||
# ${socat} -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
|
||||||
# stdbuf -o0 ${awk} -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
|
||||||
# '';
|
|
||||||
#
|
|
||||||
# pulsemixer = lib.getExe pkgs.pulsemixer;
|
|
||||||
#
|
|
||||||
# eww-volume = pkgs.writeShellScriptBin "eww-volume" ''
|
|
||||||
# sink="$(echo $(${pulsemixer} -l | grep 'Default' | grep 'sink-' | awk '{print $3}') | rev | cut -c 2- | rev)"
|
|
||||||
#
|
|
||||||
# echo "$(${pulsemixer} --id "$sink" --get-volume | awk '{print $1}')"
|
|
||||||
# '';
|
|
||||||
# in
|
|
||||||
# ''''
|
|
||||||
# + (with config.wayland.windowManager.hyprland.settings; ''
|
|
||||||
# (defvar MONITOR_W "${toString 2560}")
|
|
||||||
# (defvar GAPS_IN "${toString general.gaps_in}")
|
|
||||||
# (defvar GAPS_OUT "${toString general.gaps_out}")
|
|
||||||
# '')
|
|
||||||
# + (builtins.readFile ./eww/eww.yuck);
|
|
||||||
# programs.eww-custom.addPath = [
|
|
||||||
# pkgs.coreutils
|
|
||||||
# ];
|
|
||||||
# programs.eww-custom.style =
|
|
||||||
# (with config.wayland.windowManager.hyprland.settings; ''
|
|
||||||
# $rounding: ${toString decoration.rounding}px;
|
|
||||||
# $gaps-in: ${toString general.gaps_in}px;
|
|
||||||
# $gaps-out: ${toString general.gaps_out}px;
|
|
||||||
# '')
|
|
||||||
# + (with config.stylix.fonts; ''
|
|
||||||
# $font-serif: '${serif.name}';
|
|
||||||
# $font-sans-serif: '${sansSerif.name}';
|
|
||||||
# $font-monospace: '${monospace.name}';
|
|
||||||
# $font-emoji: '${emoji.name}';
|
|
||||||
# '')
|
|
||||||
# + (with config.lib.stylix.colors.withHashtag; ''
|
|
||||||
# $base00: ${base00};
|
|
||||||
# $base01: ${base01};
|
|
||||||
# $base02: ${base02};
|
|
||||||
# $base03: ${base03};
|
|
||||||
# $base04: ${base04};
|
|
||||||
# $base05: ${base05};
|
|
||||||
# $base06: ${base06};
|
|
||||||
# $base07: ${base07};
|
|
||||||
# $base08: ${base08};
|
|
||||||
# $base09: ${base09};
|
|
||||||
# $base0A: ${base0A};
|
|
||||||
# $base0B: ${base0B};
|
|
||||||
# $base0C: ${base0C};
|
|
||||||
# $base0D: ${base0D};
|
|
||||||
# $base0E: ${base0E};
|
|
||||||
# $base0F: ${base0F};
|
|
||||||
# '')
|
|
||||||
# + (builtins.readFile ./eww/eww.scss);
|
|
||||||
|
|
||||||
## Temp status bar
|
## Temp status bar
|
||||||
programs.waybar.enable = true;
|
programs.waybar.enable = true;
|
||||||
programs.waybar.style = builtins.readFile ./waybar.css;
|
programs.waybar.style = builtins.readFile ./waybar.css;
|
||||||
|
|||||||
@@ -1,119 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.eww-custom;
|
|
||||||
|
|
||||||
eww = cfg.package;
|
|
||||||
ewwBin = lib.getExe eww;
|
|
||||||
|
|
||||||
# https://github.com/fufexan/dotfiles/blob/eww/home/services/eww/default.nix
|
|
||||||
reloadScript = let
|
|
||||||
systemctl = lib.getExe' pkgs.systemdUkify "systemctl";
|
|
||||||
in
|
|
||||||
pkgs.writeShellScript "reload_eww" ''
|
|
||||||
${systemctl} --user restart "eww"
|
|
||||||
|
|
||||||
readarray -t windows < $(${ewwBin} list-windows)
|
|
||||||
|
|
||||||
for w in "$${windows[@]}"; do
|
|
||||||
${systemctl} --user restart "eww-open@$w"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
options.programs.eww-custom = with lib; {
|
|
||||||
enable = mkEnableOption "";
|
|
||||||
package = mkOption {
|
|
||||||
type = with types; package;
|
|
||||||
default = pkgs.eww;
|
|
||||||
};
|
|
||||||
|
|
||||||
widgets = mkOption {
|
|
||||||
type = with types; either path lines;
|
|
||||||
};
|
|
||||||
style = mkOption {
|
|
||||||
type = with types; either path lines;
|
|
||||||
};
|
|
||||||
|
|
||||||
autoReload = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
addPath = mkOption {
|
|
||||||
type = with types; listOf package;
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
xdg.configFile."eww/eww.yuck" =
|
|
||||||
(
|
|
||||||
if builtins.isPath cfg.widgets
|
|
||||||
then {
|
|
||||||
source = cfg.widgets;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
text = cfg.widgets;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
// {
|
|
||||||
onChange =
|
|
||||||
if cfg.autoReload
|
|
||||||
then reloadScript.outPath
|
|
||||||
else "";
|
|
||||||
};
|
|
||||||
xdg.configFile."eww/eww.scss" =
|
|
||||||
(
|
|
||||||
if builtins.isPath cfg.style
|
|
||||||
then {
|
|
||||||
source = cfg.style;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
text = cfg.style;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
// {
|
|
||||||
onChange =
|
|
||||||
if cfg.autoReload
|
|
||||||
then reloadScript.outPath
|
|
||||||
else "";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = [eww];
|
|
||||||
|
|
||||||
systemd.user.services = {
|
|
||||||
"eww" = {
|
|
||||||
Unit = {
|
|
||||||
PartOf = ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "exec";
|
|
||||||
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath cfg.addPath}";
|
|
||||||
ExecStart = "${ewwBin} daemon --no-daemonize";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# https://github.com/Loara/eww-systemd/blob/master/eww-open%40.service
|
|
||||||
"eww-open@" = {
|
|
||||||
Unit = {
|
|
||||||
Requires = ["eww.service"];
|
|
||||||
After = ["eww.service"];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${ewwBin} open --no-daemonize \"%i\"";
|
|
||||||
ExecStop = "${ewwBin} close --no-daemonize \"%i\"";
|
|
||||||
RemainAfterExit = "yes";
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user