diff --git a/modules/user/hyprland/ashell.patch b/modules/user/hyprland/ashell.patch index f45c9035..76bea3a8 100644 --- a/modules/user/hyprland/ashell.patch +++ b/modules/user/hyprland/ashell.patch @@ -1,32 +1,39 @@ diff --git a/src/modules/workspaces.rs b/src/modules/workspaces.rs -index 806d499..3737a82 100644 +index 1bafb6d..c448b02 100644 --- a/src/modules/workspaces.rs +++ b/src/modules/workspaces.rs -@@ -41,6 +41,7 @@ fn get_workspaces(enable_workspace_filling: bool) -> Vec { - let mut workspaces = hyprland::data::Workspaces::get() - .map(|w| w.to_vec()) - .unwrap_or_default(); -+ workspaces.retain(|w| w.id > 0); +@@ -51,20 +51,20 @@ fn get_workspaces(config: &WorkspacesModuleConfig) -> Vec { + let (special, normal): (Vec<_>, Vec<_>) = workspaces.into_iter().partition(|w| w.id < 0); - workspaces.sort_by_key(|w| w.id); + // map special workspaces +- for w in special.iter() { +- result.push(Workspace { +- id: w.id, +- name: w +- .name +- .split(":") +- .last() +- .map_or_else(|| "".to_string(), |s| s.to_owned()), +- monitor_id: Some(w.monitor_id as usize), +- monitor: w.monitor.clone(), +- active: monitors.iter().any(|m| m.special_workspace.id == w.id), +- windows: w.windows, +- }); +- } ++ //for w in special.iter() { ++ // result.push(Workspace { ++ // id: w.id, ++ // name: w ++ // .name ++ // .split(":") ++ // .last() ++ // .map_or_else(|| "".to_string(), |s| s.to_owned()), ++ // monitor_id: Some(w.monitor_id as usize), ++ // monitor: w.monitor.clone(), ++ // active: monitors.iter().any(|m| m.special_workspace.id == w.id), ++ // windows: w.windows, ++ // }); ++ //} -diff --git a/src/outputs.rs b/src/outputs.rs -index adc616b..ce63b57 100644 ---- a/src/outputs.rs -+++ b/src/outputs.rs -@@ -58,6 +58,7 @@ impl Outputs { - id, - size: Some((None, Some(HEIGHT))), - layer: Layer::Bottom, -+ namespace: String::from("ashell"), - pointer_interactivity: true, - keyboard_interactivity: KeyboardInteractivity::None, - exclusive_zone: HEIGHT as i32, -@@ -77,6 +78,7 @@ impl Outputs { - id: menu_id, - size: Some((None, None)), - layer: Layer::Background, -+ namespace: String::from("ashell"), - pointer_interactivity: true, - keyboard_interactivity: KeyboardInteractivity::None, - output: wl_output.map_or(IcedOutput::Active, |wl_output| { + // map normal workspaces + for w in normal.iter() { diff --git a/modules/user/hyprland/default.nix b/modules/user/hyprland/default.nix index 2596b1e4..af6a105f 100644 --- a/modules/user/hyprland/default.nix +++ b/modules/user/hyprland/default.nix @@ -361,18 +361,18 @@ in layerrule = [ "blur,waybar" - "blur,ashell" + "blur,ashell-main-layer" "blur,launcher # fuzzel" "blur,~nwggrid" "blur,gtk-layer-shell" "xray 1,waybar" - "xray 1,ashell" + "xray 1,ashell-main-layer" "xray 1,~nwggrid" "xray 1,gtk-layer-shell" "ignorezero, gtk-layer-shell" - "ignorezero, ashell" + "ignorezero, ashell-main-layer" "animation fade,~nwggrid" - "animation popin 80%, ashell" + "animation popin 80%, ashell-main-layer" ]; blurls = [ @@ -406,11 +406,11 @@ in polkit_gnome (ashell.overrideAttrs (o: { patches = (o.patches or [ ]) ++ [ - ./ashell.patch + ./ashell.patch ]; })) nwg-launchers - papirus-icon-theme + (lib.hiPrio papirus-icon-theme) (pkgs.writeScriptBin "nwggrid-wrapper" '' #!/bin/sh if pgrep -x "nwggrid-server" > /dev/null @@ -543,57 +543,52 @@ in then echo "Shouldn't suspend"; sleep 10; else echo "Should suspend"; systemctl suspend; fi '') ]); - home.file.".config/ashell.yml".text = '' -outputs: All -position: Top -modules: - left: - - [ AppLauncher, SystemInfo ] - center: - - Workspaces - right: - - [Clock, Settings, Tray] -appLauncherCmd: "nwggrid-wrapper" # optional, default None -truncateTitleAfterLength: 150 # optional, default 150 -workspaces: - visibilityMode: MonitorSpecific # optional, default All - enableWorkspaceFilling: true # optional, default false -system: - cpuWarnThreshold: 80 # cpu indicator warning level (default 60) - cpuAlertThreshold: 95 # cpu indicator alert level (default 80) - memWarnThreshold: 50 # mem indicator warning level (default 70) - memAlertThreshold: 75 # mem indicator alert level (default 85) - tempWarnThreshold: 90 # temperature indicator warning level (default 60) - tempAlertThreshold: 95 # temperature indicator alert level (default 80) -clock: - format: "%a %d %b %R" # optional, default: %a %d %b %R -mediaPlayer: - maxTitleLength: 100 # optional, default 100 -settings: - lockCmd: "hyprlock &" # optional, default None - audioSinksMoreCmd: "pavucontrol -t 3" # optional default None - audioSourcesMoreCmd: "pavucontrol -t 4" # optional, default None - wifiMoreCmd: "nm-connection-editor" # optional, default None - vpnMoreCmd: "nm-connection-editor" # optional, default None - bluetoothMoreCmd: "blueman-manager" # optional, default None -appearance: - backgroundColor: "#${config.lib.stylix.colors.base00}88" # used as a base background color for header module button - primaryColor: "#${config.lib.stylix.colors.base0B}" # used as a accent color - secondaryColor: "#${config.lib.stylix.colors.base01}" # used for darker background color - successColor: "#${config.lib.stylix.colors.base0A}" # used for success message or happy state - dangerColor: "#${config.lib.stylix.colors.base08}" # used for danger message or danger state (the weak version is used for the warning state - textColor: "#${config.lib.stylix.colors.base07}" # base default text color - # this is a list of color that will be used in the workspace module (one color for each monitor) - workspaceColors: - - "#${config.lib.stylix.colors.base0B}" - - "#${config.lib.stylix.colors.base0B}" - # this is a list of color that will be used in the workspace module - # for the special workspace (one color for each monitor) - # optional, default None - # without a value the workspaceColors list will be used - specialWorkspaceColors: - - "#${config.lib.stylix.colors.base0B}" - - "#${config.lib.stylix.colors.base0B}" + home.file.".config/ashell/config.toml".text = '' +outputs = "All" +position = "Top" +app_launcher_cmd = "nwggrid-wrapper" +truncate_title_after_length = 150 +[modules] +left = [ "AppLauncher", "SystemInfo" ] +center = [ "Workspaces" ] +right = [ "Clock", "Settings", "Tray" ] +[workspaces] +visibility_mode = "MonitorSpecific" +enable_workspace_filling = true +[system.cpu] +warn_threshold = 80 +alert_threshold = 95 +[system.mem] +warn_threshold = 50 +alert_threshold = 75 +[system.temp] +warn_threshold = 90 +alert_threshold = 95 +[clock] +format = "%a %d %b %R" +[mediaPlayer] +max_title_length = 100 +[settings] +lockCmd = "hyprlock &" +audio_sinks_more_cmd = "pavucontrol -t 3" +audio_sources_more_cmd = "pavucontrol -t 4" +wifi_more_cmd = "nm-connection-editor" +vpn_more_cmd = "nm-connection-editor" +bluetooth_more_cmd = "blueman-manager" +[appearance] +style = "Solid" +opacity = 0.7 +background_color = "#${config.lib.stylix.colors.base00}88" +primary_color = "#${config.lib.stylix.colors.base0B}" +secondary_color = "#${config.lib.stylix.colors.base01}" +success_color = "#${config.lib.stylix.colors.base0A}" +danger_color = "#${config.lib.stylix.colors.base08}" +text_color = "#${config.lib.stylix.colors.base07}" +workspace_colors = [ "#${config.lib.stylix.colors.base0B}", "#${config.lib.stylix.colors.base0B}" ] +specialWorkspaceColors = [ "#${config.lib.stylix.colors.base0B}", "#${config.lib.stylix.colors.base0B}" ] +[appearance.menu] +opacity = 0.7 +backdrop = 0.0 ''; home.file.".config/hypr/hypridle.conf".text = '' general {