mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 09:44:18 +00:00
waybar: add hyprlandSupport feature flag
This commit is contained in:
parent
684f53f7c0
commit
179f481687
@ -18,6 +18,7 @@
|
||||
, libxkbcommon
|
||||
, cavaSupport ? true, alsa-lib, fftw, iniparser, ncurses, pipewire, portaudio, SDL2
|
||||
, evdevSupport ? true, libevdev
|
||||
, hyprlandSupport ? false, hyprland
|
||||
, inputSupport ? true, libinput
|
||||
, jackSupport ? true, libjack2
|
||||
, mpdSupport ? true, libmpdclient
|
||||
@ -65,6 +66,10 @@ stdenv.mkDerivation rec {
|
||||
)
|
||||
'';
|
||||
|
||||
# Patch for workspaces support in wlr/workspaces
|
||||
# See https://wiki.hyprland.org/Useful-Utilities/Status-Bars/#waybar
|
||||
patches = lib.optional hyprlandSupport [ ./hyprland.diff ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson ninja pkg-config scdoc wrapGAppsHook
|
||||
] ++ lib.optional withMediaPlayer gobject-introspection;
|
||||
@ -88,6 +93,7 @@ stdenv.mkDerivation rec {
|
||||
++ optional cavaSupport portaudio
|
||||
++ optional cavaSupport SDL2
|
||||
++ optional evdevSupport libevdev
|
||||
++ optional hyprlandSupport hyprland
|
||||
++ optional inputSupport libinput
|
||||
++ optional jackSupport libjack2
|
||||
++ optional mpdSupport libmpdclient
|
||||
@ -126,7 +132,7 @@ stdenv.mkDerivation rec {
|
||||
"-Dsystemd=disabled"
|
||||
"-Dgtk-layer-shell=enabled"
|
||||
"-Dman-pages=enabled"
|
||||
];
|
||||
] ++ lib.optional hyprlandSupport "-Dexperimental=true";
|
||||
|
||||
preFixup = lib.optionalString withMediaPlayer ''
|
||||
cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py
|
||||
@ -139,7 +145,7 @@ stdenv.mkDerivation rec {
|
||||
changelog = "https://github.com/alexays/waybar/releases/tag/${version}";
|
||||
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ FlorianFranzen minijackson synthetica lovesegfault rodrgz ];
|
||||
maintainers = with maintainers; [ FlorianFranzen minijackson synthetica lovesegfault rodrgz jtbx ];
|
||||
platforms = platforms.unix;
|
||||
homepage = "https://github.com/alexays/waybar";
|
||||
mainProgram = "waybar";
|
||||
|
12
pkgs/applications/misc/waybar/hyprland.diff
Normal file
12
pkgs/applications/misc/waybar/hyprland.diff
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/src/modules/wlr/workspace_manager.cpp
|
||||
+++ b/src/modules/wlr/workspace_manager.cpp
|
||||
@@ -523,7 +523,8 @@
|
||||
if (action.empty())
|
||||
return true;
|
||||
else if (action == "activate") {
|
||||
- zext_workspace_handle_v1_activate(workspace_handle_);
|
||||
+ const std::string command = "hyprctl dispatch workspace " + name_;
|
||||
+ system(command.c_str());
|
||||
} else if (action == "close") {
|
||||
zext_workspace_handle_v1_remove(workspace_handle_);
|
||||
} else {
|
@ -32354,6 +32354,10 @@ with pkgs;
|
||||
|
||||
waybar = callPackage ../applications/misc/waybar { };
|
||||
|
||||
waybar-hyprland = callPackage ../applications/misc/waybar {
|
||||
hyprlandSupport = true;
|
||||
};
|
||||
|
||||
waycorner = callPackage ../applications/misc/waycorner { };
|
||||
|
||||
waylock = callPackage ../applications/misc/waylock {
|
||||
|
Loading…
Reference in New Issue
Block a user