Update waybar module for new hyprland autostart opt
This commit is contained in:
@ -2,7 +2,6 @@
|
|||||||
# - It should especially be possible to set styling programatically, for themes
|
# - It should especially be possible to set styling programatically, for themes
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
nixosConfig,
|
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -14,35 +13,37 @@ with mylib.modules; let
|
|||||||
in {
|
in {
|
||||||
options.modules.waybar = import ./options.nix {inherit lib mylib;};
|
options.modules.waybar = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
|
/*
|
||||||
config = let
|
config = let
|
||||||
# Taken from https://github.com/Ruixi-rebirth/flakes/blob/main/modules/programs/wayland/waybar/workspace-patch.nix
|
# Taken from https://github.com/Ruixi-rebirth/flakes/blob/main/modules/programs/wayland/waybar/workspace-patch.nix
|
||||||
# hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||||
# workspaces-patch = pkgs.writeTextFile {
|
workspaces-patch = pkgs.writeTextFile {
|
||||||
# name = "waybar-hyprctl.diff";
|
name = "waybar-hyprctl.diff";
|
||||||
# text = ''
|
text = ''
|
||||||
# diff --git a/src/modules/wlr/workspace_manager.cpp b/src/modules/wlr/workspace_manager.cpp
|
diff --git a/src/modules/wlr/workspace_manager.cpp b/src/modules/wlr/workspace_manager.cpp
|
||||||
# index 6a496e6..a689be0 100644
|
index 6a496e6..a689be0 100644
|
||||||
# --- a/src/modules/wlr/workspace_manager.cpp
|
--- a/src/modules/wlr/workspace_manager.cpp
|
||||||
# +++ b/src/modules/wlr/workspace_manager.cpp
|
+++ b/src/modules/wlr/workspace_manager.cpp
|
||||||
# @@ -511,7 +511,9 @@ auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {
|
@@ -511,7 +511,9 @@ auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {
|
||||||
# if (action.empty())
|
if (action.empty())
|
||||||
# return true;
|
return true;
|
||||||
# else if (action == "activate") {
|
else if (action == "activate") {
|
||||||
# - zext_workspace_handle_v1_activate(workspace_handle_);
|
- zext_workspace_handle_v1_activate(workspace_handle_);
|
||||||
# + // zext_workspace_handle_v1_activate(workspace_handle_);
|
+ // zext_workspace_handle_v1_activate(workspace_handle_);
|
||||||
# + const std::string command = "${hyprctl} dispatch workspace " + name_;
|
+ const std::string command = "${hyprctl} dispatch workspace " + name_;
|
||||||
# + system(command.c_str());
|
+ system(command.c_str());
|
||||||
# } else if (action == "close") {
|
} else if (action == "close") {
|
||||||
# zext_workspace_handle_v1_remove(workspace_handle_);
|
zext_workspace_handle_v1_remove(workspace_handle_);
|
||||||
# } else {
|
} else {
|
||||||
# '';
|
'';
|
||||||
# };
|
};
|
||||||
# waybar-hyprland = pkgs.waybar.overrideAttrs (oldAttrs: {
|
waybar-hyprland = pkgs.waybar.overrideAttrs (oldAttrs: {
|
||||||
# mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
|
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
|
||||||
# patches = (oldAttrs.patches or []) ++ [workspaces-patch];
|
patches = (oldAttrs.patches or []) ++ [workspaces-patch];
|
||||||
# });
|
});
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
*/
|
||||||
|
config = mkIf cfg.enable {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# package = waybar-hyprland;
|
# package = waybar-hyprland;
|
||||||
@ -53,7 +54,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
modules.hyprland.autostart = let
|
modules.hyprland.autostart.immediate = let
|
||||||
waybar-reload = pkgs.writeScript "waybar-reload" ''
|
waybar-reload = pkgs.writeScript "waybar-reload" ''
|
||||||
#! ${pkgs.bash}/bin/bash
|
#! ${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user