From 1f862c844cce664b9155018a941dc96d66a2557d Mon Sep 17 00:00:00 2001 From: Humaid Alqasimi Date: Fri, 26 Apr 2024 13:03:35 +0400 Subject: [PATCH] Remove weston, use hi-res icons for launchers and other fixes Improves performance of labwc in Nvidia, fix duplicate icons in launcher, and other fixes. Signed-off-by: Humaid Alqasimi --- assets/icons/png/app.png | Bin 857 -> 0 bytes assets/icons/png/appflowy.png | Bin 1848 -> 0 bytes assets/icons/png/browser.png | Bin 1116 -> 0 bytes assets/icons/png/element.png | Bin 978 -> 0 bytes assets/icons/png/pdf.png | Bin 1133 -> 0 bytes assets/icons/png/settings.png | Bin 1335 -> 0 bytes assets/icons/png/windows.png | Bin 145 -> 0 bytes assets/icons/svg/app.svg | 27 - assets/icons/svg/appflowy.svg | 29 - assets/icons/svg/browser.svg | 11 - assets/icons/svg/pdf.svg | 27 - assets/icons/svg/settings.svg | 9 - assets/icons/svg/windows.svg | 6 - modules/desktop/graphics/default.nix | 2 - modules/desktop/graphics/demo-apps.nix | 34 +- modules/desktop/graphics/fonts.nix | 4 +- modules/desktop/graphics/ghaf-launcher.nix | 4 + modules/desktop/graphics/labwc.nix | 14 +- modules/desktop/graphics/waybar.config.nix | 2 +- modules/desktop/graphics/weston.ini.nix | 72 -- modules/desktop/graphics/weston.nix | 73 -- modules/desktop/profiles/applications.nix | 3 - modules/desktop/profiles/graphics.nix | 5 +- modules/desktop/windows-launcher/default.nix | 4 +- .../microvm/virtualization/microvm/guivm.nix | 2 +- overlays/cross-compilation/default.nix | 3 + overlays/cross-compilation/gcr/default.nix | 25 + overlays/custom-packages/default.nix | 6 +- overlays/custom-packages/htop/default.nix | 11 - .../networkmanagerapplet/default.nix | 11 - overlays/custom-packages/waybar/default.nix | 28 +- overlays/custom-packages/weston/default.nix | 29 - .../weston/weston-backport-workspaces.patch | 807 ------------------ packages/nm-launcher/default.nix | 4 +- packages/powercontrol/png-icons.nix | 48 -- targets/lenovo-x1/guivmExtraModules.nix | 55 +- targets/nvidia-jetson-orin/flake-module.nix | 1 + 37 files changed, 124 insertions(+), 1232 deletions(-) delete mode 100644 assets/icons/png/app.png delete mode 100644 assets/icons/png/appflowy.png delete mode 100644 assets/icons/png/browser.png delete mode 100644 assets/icons/png/element.png delete mode 100644 assets/icons/png/pdf.png delete mode 100644 assets/icons/png/settings.png delete mode 100644 assets/icons/png/windows.png delete mode 100644 assets/icons/svg/app.svg delete mode 100644 assets/icons/svg/appflowy.svg delete mode 100644 assets/icons/svg/browser.svg delete mode 100644 assets/icons/svg/pdf.svg delete mode 100644 assets/icons/svg/settings.svg delete mode 100644 assets/icons/svg/windows.svg delete mode 100644 modules/desktop/graphics/weston.ini.nix delete mode 100644 modules/desktop/graphics/weston.nix create mode 100644 overlays/cross-compilation/gcr/default.nix delete mode 100644 overlays/custom-packages/htop/default.nix delete mode 100644 overlays/custom-packages/networkmanagerapplet/default.nix delete mode 100644 overlays/custom-packages/weston/default.nix delete mode 100644 overlays/custom-packages/weston/weston-backport-workspaces.patch delete mode 100644 packages/powercontrol/png-icons.nix diff --git a/assets/icons/png/app.png b/assets/icons/png/app.png deleted file mode 100644 index 86e64c069e9c376c9dbcf0cdb793cdc37d1b504a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 857 zcmV-f1E&0mP)%ehBRIgi3KUrg#{9=1&NL{1Y3{IG(!*)Dzy;A zMo5S@nn;PZRu)AYu@Dg=h-ipOlX|3d)T?v9V=*)Bl$m>J_$Oy^?|1(HbIy0~cg`pH zpt_@GTEBHFM073a43LuaiY7o_A=+v^=X&GHBX0_6NM7N)`=+KmJ%H*q!0}50upmv= zv$4kVW3K`OY`PP#6u1P8QPlwLjED$8(ik?^m(@1su9@72s`kCR1e#PeEv|}Me?t{b zTgY0jRkg===B;4Uop_}PO(;fH2^EcI|H2)ND;f)cqTGG=5P)Tq79knx`|lq)`uH5l zA79dy2-XPevy})yv@KSmuJaUSAoIE7BW#bX=gRAwDEYTa5H?I-#hK@gy!`YAM6yAW zR=m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cfv}4Eiv+eDjvE|6mo%?lzR^;{9J-Wu@cDq4o?!P_X*&VpjH`oyh zO?{ZZ?DzX!)8SjQxjAIXxkOxsf;Z%uGpBE!Jb7aKV)C}Ovrl(-og1H;oRG7Lxa7=| zHfM4=5;g;YfIFXIA!ulD;H$Ou>)vzH6e0`87zPIVc_b1UqAKllt8RFTJkPJLu5PMd zw_evY4T^HNJfZQ>HybxLy}Lw!bG{{;NncDP;=Zb?RrzK)Ykqznw{PDDA-Or^cDtb{ z1OUl5HyVwiw6v5_)%C2d>peihuv35+iK_ZE&5Kwpii(O#5ONo+>pFB@zi+c+u^2oa zH&j(EmJlxh=vm-hXjo_G5MvxZpAR072f<))xp%$9gb)aYf^fN9FpLs#ZsYv<3&RD0 z=WN%mUB6tq@YhGCX~O3-kVwo8c6E1sGBPq8w{5la=)f&0Dx2~1%;BY zdwU1=@7c2_-P+pfo9B1-rA797bMt3E14QCsthcvsuk#F@XWZZ4zi%a2^}$zwwzl8C tou1zInoCum1b|E?+t<^3`SeP#{{!5LivG!Qu8;r#002ovPDHLkV1f{{dA0xm diff --git a/assets/icons/png/windows.png b/assets/icons/png/windows.png deleted file mode 100644 index 78442b82d0b1308126197f71c4347b1bdb464eff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj5uPrNAr*{orzr9f&I3J13{@mMd*GG6<_?pQ0EBHNGSYZ}5+zBw_nipU7u`1()iRJVn5 smdKI;Vst03+5f*8l(j diff --git a/assets/icons/svg/app.svg b/assets/icons/svg/app.svg deleted file mode 100644 index 56f1376983..0000000000 --- a/assets/icons/svg/app.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/svg/appflowy.svg b/assets/icons/svg/appflowy.svg deleted file mode 100644 index 3958a1a253..0000000000 --- a/assets/icons/svg/appflowy.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/assets/icons/svg/browser.svg b/assets/icons/svg/browser.svg deleted file mode 100644 index d69e354333..0000000000 --- a/assets/icons/svg/browser.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/assets/icons/svg/pdf.svg b/assets/icons/svg/pdf.svg deleted file mode 100644 index ec974128cf..0000000000 --- a/assets/icons/svg/pdf.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/svg/settings.svg b/assets/icons/svg/settings.svg deleted file mode 100644 index 362ba2f3e9..0000000000 --- a/assets/icons/svg/settings.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/assets/icons/svg/windows.svg b/assets/icons/svg/windows.svg deleted file mode 100644 index 16a385c0ae..0000000000 --- a/assets/icons/svg/windows.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/modules/desktop/graphics/default.nix b/modules/desktop/graphics/default.nix index 4fb669933f..669b893cdb 100644 --- a/modules/desktop/graphics/default.nix +++ b/modules/desktop/graphics/default.nix @@ -2,9 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 { imports = [ - ./weston.nix ./labwc.nix - ./weston.ini.nix ./waybar.config.nix ./demo-apps.nix ./fonts.nix diff --git a/modules/desktop/graphics/demo-apps.nix b/modules/desktop/graphics/demo-apps.nix index 1abcff914d..6398aa4c7c 100644 --- a/modules/desktop/graphics/demo-apps.nix +++ b/modules/desktop/graphics/demo-apps.nix @@ -7,15 +7,9 @@ ... }: let cfg = config.ghaf.graphics.demo-apps; - inherit (import ../../../lib/icons.nix {inherit pkgs lib;}) resizePNG; /* - Scaled down firefox icon - */ - firefox-icon = resizePNG "firefox" "${pkgs.firefox}/share/icons/hicolor/128x128/apps/firefox.png" "24x24"; - - /* - Generate launchers to be used in weston.ini + Generate launchers to be used in the application drawer Type: mkProgramOption :: string -> bool -> option @@ -28,7 +22,7 @@ description = "Include package ${name} to menu and system environment"; }; in { - options.ghaf.graphics.demo-apps = with lib; { + options.ghaf.graphics.demo-apps = { chromium = mkProgramOption "Chromium browser" false; firefox = mkProgramOption "Firefox browser" config.ghaf.graphics.enableDemoApplications; gala-app = mkProgramOption "Gala App" false; @@ -40,34 +34,34 @@ in { config = lib.mkIf config.ghaf.profiles.graphics.enable { ghaf.graphics.launchers = lib.optional cfg.chromium { - name = "chromium"; + name = "Chromium"; path = "${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland"; - icon = "${pkgs.chromium}/share/icons/hicolor/24x24/apps/chromium.png"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/chromium.svg"; } ++ lib.optional cfg.firefox { - name = "firefox"; + name = "Firefox"; path = "${pkgs.firefox}/bin/firefox"; - icon = "${firefox-icon}"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/firefox.svg"; } ++ lib.optional cfg.element-desktop { - name = "element"; + name = "Element"; path = "${pkgs.element-desktop}/bin/element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland"; - icon = "${pkgs.element-desktop}/share/icons/hicolor/24x24/apps/element.png"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/element-desktop.svg"; } ++ lib.optional cfg.gala-app { - name = "gala"; + name = "GALA"; path = "${pkgs.gala-app}/bin/gala --enable-features=UseOzonePlatform --ozone-platform=wayland"; - icon = "${pkgs.gala-app}/gala/resources/icon-24x24.png"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/distributor-logo-android.svg"; } ++ lib.optional cfg.zathura { - name = "zathura"; + name = "PDF Viewer"; path = "${pkgs.zathura}/bin/zathura"; - icon = "${pkgs.zathura}/share/icons/hicolor/32x32/apps/org.pwmt.zathura.png"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/document-viewer.svg"; } ++ lib.optional (cfg.appflowy && pkgs.stdenv.isx86_64) { - name = "appflowy"; + name = "AppFlowy"; path = "${pkgs.appflowy}/bin/appflowy"; - icon = ../../../assets/icons/svg/appflowy.svg; + icon = "${pkgs.appflowy}/opt/data/flutter_assets/assets/images/flowy_logo.svg"; }; environment.systemPackages = lib.optional cfg.chromium pkgs.chromium diff --git a/modules/desktop/graphics/fonts.nix b/modules/desktop/graphics/fonts.nix index 75258d7e59..711d615cf1 100644 --- a/modules/desktop/graphics/fonts.nix +++ b/modules/desktop/graphics/fonts.nix @@ -6,9 +6,9 @@ config, ... }: let - inherit (config.ghaf.graphics) weston labwc; + inherit (config.ghaf.graphics) labwc; in { - config = lib.mkIf (weston.enable || labwc.enable) { + config = lib.mkIf labwc.enable { fonts.packages = with pkgs; [ inter fira-code-nerdfont diff --git a/modules/desktop/graphics/ghaf-launcher.nix b/modules/desktop/graphics/ghaf-launcher.nix index 59122a355b..8936f55479 100644 --- a/modules/desktop/graphics/ghaf-launcher.nix +++ b/modules/desktop/graphics/ghaf-launcher.nix @@ -5,6 +5,8 @@ writeTextDir, coreutils, nwg-drawer, + callPackage, + config, ... }: let drawerCSS = writeTextDir "nwg-drawer/drawer.css" '' @@ -53,12 +55,14 @@ border-radius: 15px } ''; + launchers = callPackage ./launchers.nix {inherit config;}; in writeShellScriptBin "ghaf-launcher" '' export XDG_CONFIG_HOME=${drawerCSS} export XDG_CACHE_HOME=$HOME/.cache + export XDG_DATA_DIRS=${launchers}/share ${coreutils}/bin/mkdir -p $XDG_CACHE_HOME ${nwg-drawer}/bin/nwg-drawer -mb 20 -ml 440 -mr 440 -mt 420 -nofs -nocats '' diff --git a/modules/desktop/graphics/labwc.nix b/modules/desktop/graphics/labwc.nix index 79998945dc..5391e5d329 100644 --- a/modules/desktop/graphics/labwc.nix +++ b/modules/desktop/graphics/labwc.nix @@ -170,11 +170,19 @@ ''; - launchers = pkgs.callPackage ./launchers.nix {inherit config;}; + renderers = [ "vulkan" "pixman" "egl2" ]; in { options.ghaf.graphics.labwc = { enable = lib.mkEnableOption "labwc"; lock.enable = lib.mkEnableOption "labwc screen locking"; + renderer = lib.mkOption { + type = lib.types.enum renderers; + default = "pixman"; + description = '' + Which wlroots renderer to use. + Choose one of: ${lib.concatStringsSep "," renderers} + ''; + }; wallpaper = lib.mkOption { type = lib.types.path; default = ../../../assets/wallpaper.png; @@ -229,7 +237,7 @@ in { ghaf.graphics.window-manager-common.enable = true; environment.systemPackages = with pkgs; - [labwc launchers] + [labwc] # Below sway packages needed for screen locking ++ lib.optionals config.ghaf.graphics.labwc.lock.enable [swaylock-effects swayidle] # Grim screenshot tool is used for labwc debug-builds @@ -276,7 +284,7 @@ in { Environment = "PATH=${pkgs.openssh}/bin:$PATH"; }; environment = { - WLR_RENDERER = "pixman"; + WLR_RENDERER = cfg.renderer; # See: https://github.com/labwc/labwc/blob/0.6.5/docs/environment XKB_DEFAULT_LAYOUT = "us,fi"; XKB_DEFAULT_OPTIONS = "XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle"; diff --git a/modules/desktop/graphics/waybar.config.nix b/modules/desktop/graphics/waybar.config.nix index 76386510d7..7a957ad71c 100644 --- a/modules/desktop/graphics/waybar.config.nix +++ b/modules/desktop/graphics/waybar.config.nix @@ -27,7 +27,7 @@ in { { name = "Terminal"; path = "${pkgs.foot}/bin/foot"; - icon = "${pkgs.foot}/share/icons/hicolor/48x48/apps/foot.png"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/utilities-terminal.svg"; } ]; environment.etc."waybar/config" = { diff --git a/modules/desktop/graphics/weston.ini.nix b/modules/desktop/graphics/weston.ini.nix deleted file mode 100644 index 144752c92c..0000000000 --- a/modules/desktop/graphics/weston.ini.nix +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors -# SPDX-License-Identifier: Apache-2.0 -{ - pkgs, - lib, - config, - ... -}: let - cfg = config.ghaf.graphics.weston; - mkLauncher = { - # Add the name field to unify with Labwc launchers - name, - path, - icon, - }: '' - [launcher] - name=${name} - path=${path} - icon=${icon} - - ''; - - /* - Generate launchers to be used in weston.ini - - Type: mkLaunchers :: [{path, icon}] -> string - - */ - mkLaunchers = lib.concatMapStrings mkLauncher; - - defaultLauncher = [ - # Keep weston-terminal launcher always enabled explicitly since if someone adds - # a launcher on the panel, the launcher will replace weston-terminal launcher. - { - name = "terminal"; - path = "${pkgs.weston}/bin/weston-terminal"; - icon = "${pkgs.weston}/share/weston/icon_terminal.png"; - } - ]; -in { - config = lib.mkIf cfg.enable { - ghaf.graphics.launchers = defaultLauncher; - environment.etc."xdg/weston/weston.ini" = { - text = - '' - # Disable screen locking - [core] - idle-time=0 - - [shell] - locking=false - background-image=${../../../assets/wallpaper.png} - background-type=scale-crop - num-workspaces=2 - - # Set the keyboard layout for weston to US by default - [keyboard] - keymap_layout=us,fi - - # Enable Hack font for weston-terminal - [terminal] - font=Hack - font-size=16 - - '' - + mkLaunchers config.ghaf.graphics.launchers; - - # The UNIX file mode bits - mode = "0644"; - }; - }; -} diff --git a/modules/desktop/graphics/weston.nix b/modules/desktop/graphics/weston.nix deleted file mode 100644 index 85a95bab8e..0000000000 --- a/modules/desktop/graphics/weston.nix +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors -# SPDX-License-Identifier: Apache-2.0 -{ - lib, - pkgs, - config, - ... -}: let - cfg = config.ghaf.graphics.weston; - waylandSocket = "wayland-1"; -in { - options.ghaf.graphics.weston = { - enable = lib.mkEnableOption "weston"; - }; - - config = lib.mkIf cfg.enable { - ghaf.graphics.window-manager-common.enable = true; - - environment.systemPackages = with pkgs; [ - weston - ]; - - # Next 2 services/targets are taken from official weston documentation: - # https://wayland.pages.freedesktop.org/weston/toc/running-weston.html - - # Weston socket - systemd.user.sockets."weston" = { - unitConfig = { - Description = "Weston, a Wayland compositor"; - Documentation = "man:weston(1) man:weston.ini(5)"; - }; - socketConfig = { - ListenStream = "%t/${waylandSocket}"; - }; - wantedBy = ["weston.service"]; - }; - - # Weston service - systemd.user.services."weston" = { - enable = true; - description = "Weston, a Wayland compositor, as a user service TEST"; - documentation = ["man:weston(1) man:weston.ini(5)" "https://wayland.freedesktop.org/"]; - requires = ["weston.socket"]; - after = ["weston.socket" "ghaf-session.service"]; - serviceConfig = { - Type = "notify"; - #TimeoutStartSec = "60"; - #WatchdogSec = "20"; - # Defaults to journal - StandardOutput = "journal"; - StandardError = "journal"; - ExecStart = "${pkgs.weston}/bin/weston --modules=systemd-notify.so"; - #GPU pt needs some time to start - weston fails to restart 3 times in avg. - ExecStartPre = "${pkgs.coreutils}/bin/sleep 3"; - # Set WAYLAND_DISPLAY variable to make it available to waypipe and other systemd services - ExecStartPost = "${pkgs.systemd}/bin/systemctl --user set-environment WAYLAND_DISPLAY=${waylandSocket}"; - Restart = "on-failure"; - RestartSec = "1"; - # Ivan N: I do not know if this is bug or feature of NixOS, but - # when I add weston.ini file to environment.etc, the file ends up in - # /etc/xdg directory on the filesystem, while NixOS uses - # /run/current-system/sw/etc/xdg directory and goes into same directory - # searching for weston.ini even if /etc/xdg is already in XDG_CONFIG_DIRS - # The solution is to add /etc/xdg one more time for weston service. - # It does not affect on system-wide XDG_CONFIG_DIRS variable. - # - # Ivan N: adding openssh into the PATH since it is needed for waypipe to work - Environment = "XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:/etc/xdg PATH=${pkgs.openssh}/bin:$PATH"; - }; - wantedBy = ["default.target"]; - }; - }; -} diff --git a/modules/desktop/profiles/applications.nix b/modules/desktop/profiles/applications.nix index c891708cc9..31d7760c4b 100644 --- a/modules/desktop/profiles/applications.nix +++ b/modules/desktop/profiles/applications.nix @@ -12,12 +12,9 @@ in options.ghaf.profiles.applications = { enable = mkEnableOption "Some sample applications"; #TODO Create options to allow enabling individual apps - #weston.ini.nix mods needed }; config = mkIf cfg.enable { - # TODO: Needs more generic support for defining application launchers - # across different window managers. ghaf = { profiles.graphics.enable = true; graphics.enableDemoApplications = true; diff --git a/modules/desktop/profiles/graphics.nix b/modules/desktop/profiles/graphics.nix index e00b4ea47d..26e8502e76 100644 --- a/modules/desktop/profiles/graphics.nix +++ b/modules/desktop/profiles/graphics.nix @@ -7,14 +7,14 @@ ... }: let cfg = config.ghaf.profiles.graphics; - compositors = ["weston" "labwc"]; + compositors = ["labwc"]; in with lib; { options.ghaf.profiles.graphics = { enable = mkEnableOption "Graphics profile"; compositor = mkOption { type = types.enum compositors; - default = "weston"; + default = "labwc"; description = '' Which Wayland compositor to use. @@ -48,7 +48,6 @@ in }; config = mkIf cfg.enable { - ghaf.graphics.weston.enable = cfg.compositor == "weston"; ghaf.graphics.labwc.enable = cfg.compositor == "labwc"; }; } diff --git a/modules/desktop/windows-launcher/default.nix b/modules/desktop/windows-launcher/default.nix index 4f113aa5d7..89ce638904 100644 --- a/modules/desktop/windows-launcher/default.nix +++ b/modules/desktop/windows-launcher/default.nix @@ -30,9 +30,9 @@ in { config = lib.mkIf cfg.enable { ghaf.graphics.launchers = lib.mkIf (!cfg.spice) [ { - name = "windows"; + name = "Windows"; path = "${windows-launcher}/bin/windows-launcher-ui"; - icon = "${pkgs.gnome.adwaita-icon-theme}/share/icons/Adwaita/16x16/mimetypes/application-x-executable.png"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/distributor-logo-windows.svg"; } ]; diff --git a/modules/microvm/virtualization/microvm/guivm.nix b/modules/microvm/virtualization/microvm/guivm.nix index 169a36255c..2ebe7b0d89 100644 --- a/modules/microvm/virtualization/microvm/guivm.nix +++ b/modules/microvm/virtualization/microvm/guivm.nix @@ -119,7 +119,7 @@ systemd.user.services.waypipe = { enable = true; description = "waypipe"; - after = ["weston.service" "labwc.service"]; + after = ["labwc.service"]; serviceConfig = { Type = "simple"; ExecStart = "${pkgs.waypipe}/bin/waypipe --vsock -s ${toString cfg.waypipePort} client"; diff --git a/overlays/cross-compilation/default.nix b/overlays/cross-compilation/default.nix index a7ec989397..49ef437732 100644 --- a/overlays/cross-compilation/default.nix +++ b/overlays/cross-compilation/default.nix @@ -13,4 +13,7 @@ # libck is dependency of sysbench libck = import ./libck {inherit prev;}; sysbench = import ./sysbench {inherit final prev;}; + + # gcr is dependency of libnma->networkmanagerapplet + gcr_4 = import ./gcr {inherit final prev;}; }) diff --git a/overlays/cross-compilation/gcr/default.nix b/overlays/cross-compilation/gcr/default.nix new file mode 100644 index 0000000000..508123640b --- /dev/null +++ b/overlays/cross-compilation/gcr/default.nix @@ -0,0 +1,25 @@ +# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors +# SPDX-License-Identifier: Apache-2.0 +# +# gcr cross-compilation fixes based on: +# https://github.com/NixOS/nixpkgs/pull/263158 +# +{ + prev, + final, +}: +prev.gcr_4.overrideAttrs (old: { + strictDeps = true; + + # Override + buildInputs = with final; [ + libgcrypt + libtasn1 + pango + libsecret + openssh + systemd + gtk4 + ]; + mesonFlags = old.mesonFlags ++ ["-Dgpg_path=${final.lib.getBin final.gnupg}/bin/gpg"]; +}) diff --git a/overlays/custom-packages/default.nix b/overlays/custom-packages/default.nix index e1add94996..b33cfcb9e7 100644 --- a/overlays/custom-packages/default.nix +++ b/overlays/custom-packages/default.nix @@ -11,15 +11,11 @@ element-web = final.callPackage ../../packages/element-web {}; systemd = import ./systemd {inherit final prev;}; waypipe = import ./waypipe {inherit final prev;}; - weston = import ./weston {inherit final prev;}; wifi-connector = final.callPackage ../../packages/wifi-connector {}; wifi-connector-nmcli = final.callPackage ../../packages/wifi-connector {useNmcli = true;}; qemu_kvm = import ./qemu {inherit final prev;}; nm-launcher = final.callPackage ../../packages/nm-launcher {}; labwc = import ./labwc {inherit prev;}; tpm2-pkcs11 = import ./tpm2-pkcs11 {inherit prev;}; - waybar = import ./waybar {inherit prev;}; - # launcher overlays - networkmanagerapplet = import ./networkmanagerapplet {inherit prev;}; - htop = import ./htop {inherit prev;}; + waybar = import ./waybar {inherit final prev;}; }) diff --git a/overlays/custom-packages/htop/default.nix b/overlays/custom-packages/htop/default.nix deleted file mode 100644 index 7fc7a7ed3d..0000000000 --- a/overlays/custom-packages/htop/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2024 TII (SSRC) and the Ghaf contributors -# SPDX-License-Identifier: Apache-2.0 -# -# This overlay hides the desktop entry for htop -# -{prev}: -prev.htop.overrideAttrs { - postInstall = '' - echo "Hidden=true" >> $out/share/applications/htop.desktop - ''; -} diff --git a/overlays/custom-packages/networkmanagerapplet/default.nix b/overlays/custom-packages/networkmanagerapplet/default.nix deleted file mode 100644 index fb840b72bd..0000000000 --- a/overlays/custom-packages/networkmanagerapplet/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2024 TII (SSRC) and the Ghaf contributors -# SPDX-License-Identifier: Apache-2.0 -# -# This overlay hides the desktop entry for network settings -# -{prev}: -prev.networkmanagerapplet.overrideAttrs { - postInstall = '' - echo "Hidden=true" >> $out/share/applications/nm-connection-editor.desktop - ''; -} diff --git a/overlays/custom-packages/waybar/default.nix b/overlays/custom-packages/waybar/default.nix index f303a54f4f..05bb0b815f 100644 --- a/overlays/custom-packages/waybar/default.nix +++ b/overlays/custom-packages/waybar/default.nix @@ -3,11 +3,33 @@ # # This overlay customizes waybar # -{prev}: ( - prev.waybar.override { +{ + prev, + final, +}: ( + prev.waybar.override + { hyprlandSupport = false; swaySupport = false; jackSupport = false; cavaSupport = false; } -) + ).overrideAttrs (old: { + #strictDeps = true; + ## Override + #buildInputs = with final; + # old.buildInputs + # ++ [ + # fmt + # ]; + ##depsBuildBuild = [ final.scdoc final.pkg-config ]; + #nativeBuildInputs = with final; + # old.nativeBuildInputs + # ++ [ + # pkg-config + # scdoc + # wayland + # fmt_9 + # ]; + #depsBuildBuild = [final.pkg-config]; + }) diff --git a/overlays/custom-packages/weston/default.nix b/overlays/custom-packages/weston/default.nix deleted file mode 100644 index d654397560..0000000000 --- a/overlays/custom-packages/weston/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors -# SPDX-License-Identifier: Apache-2.0 -# -# This overlay customizes weston - see comments for details -# -{ - final, - prev, -}: -# First, weston package is overridden -( - prev.weston.override { - freerdp = null; - pipewire = null; - pipewireSupport = false; - rdpSupport = false; - vncSupport = false; - xwayland = null; - xwaylandSupport = false; - } -) -# and then this overridden package's attributes are overridden -.overrideAttrs ( - _prevAttrs: - # TODO: Add patch for 13.0 which is coming in NixOS 24.05 - final.lib.optionalAttrs ((final.lib.versions.majorMinor prev.weston.version) == "12.0") { - patches = [./weston-backport-workspaces.patch]; - } -) diff --git a/overlays/custom-packages/weston/weston-backport-workspaces.patch b/overlays/custom-packages/weston/weston-backport-workspaces.patch deleted file mode 100644 index 9ab9cb5e15..0000000000 --- a/overlays/custom-packages/weston/weston-backport-workspaces.patch +++ /dev/null @@ -1,807 +0,0 @@ -commit 5aaed50e2cd1635084325ff5fe5fad2bd72354cf -Author: Yuri Nesterov -Date: Thu Oct 5 15:56:08 2023 +0300 - - Revert "desktop-shell: Remove multiple workspace support" - - This reverts commit 61d8238874d9c0ad6530c6826209f87c332627eb. - -diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c -index e4ea90f9..e57f5ccd 100644 ---- a/desktop-shell/shell.c -+++ b/desktop-shell/shell.c -@@ -127,6 +127,8 @@ struct shell_surface { - struct weston_curtain *black_view; - } fullscreen; - -+ struct weston_transform workspace_transform; -+ - struct weston_output *fullscreen_output; - struct weston_output *output; - struct wl_listener output_destroy_listener; -@@ -495,6 +497,9 @@ shell_configuration(struct desktop_shell *shell) - weston_config_section_get_string(section, "focus-animation", &s, "none"); - shell->focus_animation_type = get_animation_type(s); - free(s); -+ weston_config_section_get_uint(section, "num-workspaces", -+ &shell->workspaces.num, -+ DEFAULT_NUM_WORKSPACES); - } - - static int -@@ -510,6 +515,15 @@ focus_surface_committed(struct weston_surface *es, int32_t sx, int32_t sy) - { - } - -+static struct focus_surface * -+get_focus_surface(struct weston_surface *surface) -+{ -+ if (surface->committed == focus_surface_committed) -+ return surface->committed_private; -+ else -+ return NULL; -+} -+ - static bool - is_focus_view (struct weston_view *view) - { -@@ -541,6 +555,8 @@ create_focus_surface(struct weston_compositor *ec, - weston_view_set_output(fsurf->curtain->view, output); - fsurf->curtain->view->is_mapped = true; - -+ wl_list_init(&fsurf->workspace_transform.link); -+ - return fsurf; - } - -@@ -733,6 +749,21 @@ restore_focus_state(struct desktop_shell *shell, struct workspace *ws) - } - } - -+static void -+replace_focus_state(struct desktop_shell *shell, struct workspace *ws, -+ struct weston_seat *seat) -+{ -+ struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat); -+ struct focus_state *state; -+ -+ wl_list_for_each(state, &ws->focus_list, link) { -+ if (state->seat == seat) { -+ focus_state_set_focus(state, keyboard->focus); -+ return; -+ } -+ } -+} -+ - static void - drop_focus_state(struct desktop_shell *shell, struct workspace *ws, - struct weston_surface *surface) -@@ -826,6 +857,7 @@ workspace_destroy(struct workspace *ws) - focus_surface_destroy(ws->fsurf_back); - - desktop_shell_destroy_layer(&ws->layer); -+ free(ws); - } - - static void -@@ -842,13 +874,14 @@ seat_destroyed(struct wl_listener *listener, void *data) - wl_list_remove(&state->link); - } - --static void -+static struct workspace * - workspace_create(struct desktop_shell *shell) - { -- struct workspace *ws = &shell->workspace; -+ struct workspace *ws = malloc(sizeof *ws); -+ if (ws == NULL) -+ return NULL; - - weston_layer_init(&ws->layer, shell->compositor); -- weston_layer_set_position(&ws->layer, WESTON_LAYER_POSITION_NORMAL); - - wl_list_init(&ws->focus_list); - wl_list_init(&ws->seat_destroyed_listener.link); -@@ -856,12 +889,343 @@ workspace_create(struct desktop_shell *shell) - ws->fsurf_front = NULL; - ws->fsurf_back = NULL; - ws->focus_animation = NULL; -+ -+ return ws; -+} -+ -+static int -+workspace_is_empty(struct workspace *ws) -+{ -+ return wl_list_empty(&ws->layer.view_list.link); -+} -+ -+static struct workspace * -+get_workspace(struct desktop_shell *shell, unsigned int index) -+{ -+ struct workspace **pws = shell->workspaces.array.data; -+ assert(index < shell->workspaces.num); -+ pws += index; -+ return *pws; - } - - struct workspace * - get_current_workspace(struct desktop_shell *shell) - { -- return &shell->workspace; -+ return get_workspace(shell, shell->workspaces.current); -+} -+ -+static void -+activate_workspace(struct desktop_shell *shell, unsigned int index) -+{ -+ struct workspace *ws; -+ -+ ws = get_workspace(shell, index); -+ weston_layer_set_position(&ws->layer, WESTON_LAYER_POSITION_NORMAL); -+ -+ shell->workspaces.current = index; -+} -+ -+static unsigned int -+get_output_height(struct weston_output *output) -+{ -+ return abs(output->region.extents.y1 - output->region.extents.y2); -+} -+ -+static struct weston_transform * -+view_get_transform(struct weston_view *view) -+{ -+ struct focus_surface *fsurf = NULL; -+ struct shell_surface *shsurf = NULL; -+ -+ if (is_focus_view(view)) { -+ fsurf = get_focus_surface(view->surface); -+ return &fsurf->workspace_transform; -+ } -+ -+ shsurf = get_shell_surface(view->surface); -+ if (shsurf) -+ return &shsurf->workspace_transform; -+ -+ return NULL; -+} -+ -+static void -+view_translate(struct workspace *ws, struct weston_view *view, double d) -+{ -+ struct weston_transform *transform = view_get_transform(view); -+ -+ if (!transform) -+ return; -+ -+ if (wl_list_empty(&transform->link)) -+ wl_list_insert(view->geometry.transformation_list.prev, -+ &transform->link); -+ -+ weston_matrix_init(&transform->matrix); -+ weston_matrix_translate(&transform->matrix, -+ 0.0, d, 0.0); -+ weston_view_geometry_dirty(view); -+} -+ -+static void -+workspace_translate_out(struct workspace *ws, double fraction) -+{ -+ struct weston_view *view; -+ unsigned int height; -+ double d; -+ -+ wl_list_for_each(view, &ws->layer.view_list.link, layer_link.link) { -+ height = get_output_height(view->surface->output); -+ d = height * fraction; -+ -+ view_translate(ws, view, d); -+ } -+} -+ -+static void -+workspace_translate_in(struct workspace *ws, double fraction) -+{ -+ struct weston_view *view; -+ unsigned int height; -+ double d; -+ -+ wl_list_for_each(view, &ws->layer.view_list.link, layer_link.link) { -+ height = get_output_height(view->surface->output); -+ -+ if (fraction > 0) -+ d = -(height - height * fraction); -+ else -+ d = height + height * fraction; -+ -+ view_translate(ws, view, d); -+ } -+} -+ -+static void -+reverse_workspace_change_animation(struct desktop_shell *shell, -+ unsigned int index, -+ struct workspace *from, -+ struct workspace *to) -+{ -+ shell->workspaces.current = index; -+ -+ shell->workspaces.anim_to = to; -+ shell->workspaces.anim_from = from; -+ shell->workspaces.anim_dir = -1 * shell->workspaces.anim_dir; -+ shell->workspaces.anim_timestamp = (struct timespec) { 0 }; -+ -+ weston_layer_set_position(&to->layer, WESTON_LAYER_POSITION_NORMAL); -+ weston_layer_set_position(&from->layer, WESTON_LAYER_POSITION_NORMAL - 1); -+ -+ weston_compositor_schedule_repaint(shell->compositor); -+} -+ -+static void -+workspace_deactivate_transforms(struct workspace *ws) -+{ -+ struct weston_view *view; -+ struct weston_transform *transform; -+ -+ wl_list_for_each(view, &ws->layer.view_list.link, layer_link.link) { -+ transform = view_get_transform(view); -+ if (!transform) -+ continue; -+ -+ if (!wl_list_empty(&transform->link)) { -+ wl_list_remove(&transform->link); -+ wl_list_init(&transform->link); -+ } -+ weston_view_geometry_dirty(view); -+ } -+} -+ -+static void -+finish_workspace_change_animation(struct desktop_shell *shell, -+ struct workspace *from, -+ struct workspace *to) -+{ -+ struct weston_view *view; -+ -+ weston_compositor_schedule_repaint(shell->compositor); -+ -+ /* Views that extend past the bottom of the output are still -+ * visible after the workspace animation ends but before its layer -+ * is hidden. In that case, we need to damage below those views so -+ * that the screen is properly repainted. */ -+ wl_list_for_each(view, &from->layer.view_list.link, layer_link.link) -+ weston_view_damage_below(view); -+ -+ wl_list_remove(&shell->workspaces.animation.link); -+ workspace_deactivate_transforms(from); -+ workspace_deactivate_transforms(to); -+ shell->workspaces.anim_to = NULL; -+ -+ weston_layer_unset_position(&shell->workspaces.anim_from->layer); -+} -+ -+static void -+animate_workspace_change_frame(struct weston_animation *animation, -+ struct weston_output *output, -+ const struct timespec *time) -+{ -+ struct desktop_shell *shell = -+ container_of(animation, struct desktop_shell, -+ workspaces.animation); -+ struct workspace *from = shell->workspaces.anim_from; -+ struct workspace *to = shell->workspaces.anim_to; -+ int64_t t; -+ double x, y; -+ -+ if (workspace_is_empty(from) && workspace_is_empty(to)) { -+ finish_workspace_change_animation(shell, from, to); -+ return; -+ } -+ -+ if (timespec_is_zero(&shell->workspaces.anim_timestamp)) { -+ if (shell->workspaces.anim_current == 0.0) -+ shell->workspaces.anim_timestamp = *time; -+ else -+ timespec_add_msec(&shell->workspaces.anim_timestamp, -+ time, -+ /* Inverse of movement function 'y' below. */ -+ -(asin(1.0 - shell->workspaces.anim_current) * -+ DEFAULT_WORKSPACE_CHANGE_ANIMATION_LENGTH * -+ M_2_PI)); -+ } -+ -+ t = timespec_sub_to_msec(time, &shell->workspaces.anim_timestamp); -+ -+ /* -+ * x = [0, π/2] -+ * y(x) = sin(x) -+ */ -+ x = t * (1.0/DEFAULT_WORKSPACE_CHANGE_ANIMATION_LENGTH) * M_PI_2; -+ y = sin(x); -+ -+ if (t < DEFAULT_WORKSPACE_CHANGE_ANIMATION_LENGTH) { -+ weston_compositor_schedule_repaint(shell->compositor); -+ -+ workspace_translate_out(from, shell->workspaces.anim_dir * y); -+ workspace_translate_in(to, shell->workspaces.anim_dir * y); -+ shell->workspaces.anim_current = y; -+ -+ weston_compositor_schedule_repaint(shell->compositor); -+ } -+ else -+ finish_workspace_change_animation(shell, from, to); -+} -+ -+static void -+animate_workspace_change(struct desktop_shell *shell, -+ unsigned int index, -+ struct workspace *from, -+ struct workspace *to) -+{ -+ struct weston_output *output; -+ -+ int dir; -+ -+ if (index > shell->workspaces.current) -+ dir = -1; -+ else -+ dir = 1; -+ -+ shell->workspaces.current = index; -+ -+ shell->workspaces.anim_dir = dir; -+ shell->workspaces.anim_from = from; -+ shell->workspaces.anim_to = to; -+ shell->workspaces.anim_current = 0.0; -+ shell->workspaces.anim_timestamp = (struct timespec) { 0 }; -+ -+ output = container_of(shell->compositor->output_list.next, -+ struct weston_output, link); -+ wl_list_insert(&output->animation_list, -+ &shell->workspaces.animation.link); -+ -+ weston_layer_set_position(&to->layer, WESTON_LAYER_POSITION_NORMAL); -+ weston_layer_set_position(&from->layer, WESTON_LAYER_POSITION_NORMAL - 1); -+ -+ workspace_translate_in(to, 0); -+ -+ restore_focus_state(shell, to); -+ -+ weston_compositor_schedule_repaint(shell->compositor); -+} -+ -+static void -+update_workspace(struct desktop_shell *shell, unsigned int index, -+ struct workspace *from, struct workspace *to) -+{ -+ shell->workspaces.current = index; -+ weston_layer_set_position(&to->layer, WESTON_LAYER_POSITION_NORMAL); -+ weston_layer_unset_position(&from->layer); -+} -+ -+static void -+change_workspace(struct desktop_shell *shell, unsigned int index) -+{ -+ struct workspace *from; -+ struct workspace *to; -+ struct focus_state *state; -+ -+ if (index == shell->workspaces.current) -+ return; -+ -+ /* Don't change workspace when there is any fullscreen surfaces. */ -+ if (!wl_list_empty(&shell->fullscreen_layer.view_list.link)) -+ return; -+ -+ from = get_current_workspace(shell); -+ to = get_workspace(shell, index); -+ -+ if (shell->workspaces.anim_from == to && -+ shell->workspaces.anim_to == from) { -+ restore_focus_state(shell, to); -+ reverse_workspace_change_animation(shell, index, from, to); -+ return; -+ } -+ -+ if (shell->workspaces.anim_to != NULL) -+ finish_workspace_change_animation(shell, -+ shell->workspaces.anim_from, -+ shell->workspaces.anim_to); -+ -+ restore_focus_state(shell, to); -+ -+ if (shell->focus_animation_type != ANIMATION_NONE) { -+ wl_list_for_each(state, &from->focus_list, link) -+ if (state->keyboard_focus) -+ animate_focus_change(shell, from, -+ get_default_view(state->keyboard_focus), NULL); -+ -+ wl_list_for_each(state, &to->focus_list, link) -+ if (state->keyboard_focus) -+ animate_focus_change(shell, to, -+ NULL, get_default_view(state->keyboard_focus)); -+ } -+ -+ if (workspace_is_empty(to) && workspace_is_empty(from)) -+ update_workspace(shell, index, from, to); -+ else -+ animate_workspace_change(shell, index, from, to); -+} -+ -+static bool -+workspace_has_only(struct workspace *ws, struct weston_surface *surface) -+{ -+ struct wl_list *list = &ws->layer.view_list.link; -+ struct wl_list *e; -+ -+ if (wl_list_empty(list)) -+ return false; -+ -+ e = list->next; -+ -+ if (e->next != list) -+ return false; -+ -+ return container_of(e, struct weston_view, layer_link.link)->surface == surface; - } - - static void -@@ -884,6 +1248,68 @@ surface_keyboard_focus_lost(struct weston_surface *surface) - } - } - -+static void -+take_surface_to_workspace_by_seat(struct desktop_shell *shell, -+ struct weston_seat *seat, -+ unsigned int index) -+{ -+ struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat); -+ struct weston_surface *surface; -+ struct weston_view *view; -+ struct shell_surface *shsurf; -+ struct workspace *from; -+ struct workspace *to; -+ struct focus_state *state; -+ -+ surface = weston_surface_get_main_surface(keyboard->focus); -+ view = get_default_view(surface); -+ if (view == NULL || -+ index == shell->workspaces.current || -+ is_focus_view(view)) -+ return; -+ -+ from = get_current_workspace(shell); -+ to = get_workspace(shell, index); -+ -+ weston_layer_entry_remove(&view->layer_link); -+ weston_layer_entry_insert(&to->layer.view_list, &view->layer_link); -+ -+ shsurf = get_shell_surface(surface); -+ if (shsurf != NULL) -+ shell_surface_update_child_surface_layers(shsurf); -+ -+ replace_focus_state(shell, to, seat); -+ drop_focus_state(shell, from, surface); -+ -+ if (shell->workspaces.anim_from == to && -+ shell->workspaces.anim_to == from) { -+ reverse_workspace_change_animation(shell, index, from, to); -+ -+ return; -+ } -+ -+ if (shell->workspaces.anim_to != NULL) -+ finish_workspace_change_animation(shell, -+ shell->workspaces.anim_from, -+ shell->workspaces.anim_to); -+ -+ if (workspace_is_empty(from) && -+ workspace_has_only(to, surface)) -+ update_workspace(shell, index, from, to); -+ else { -+ if (shsurf != NULL && -+ wl_list_empty(&shsurf->workspace_transform.link)) -+ wl_list_insert(&shell->workspaces.anim_sticky_list, -+ &shsurf->workspace_transform.link); -+ -+ animate_workspace_change(shell, index, from, to); -+ } -+ -+ state = ensure_focus_state(shell, seat); -+ if (state != NULL) -+ focus_state_set_focus(state, surface); -+} -+ - static void - touch_move_grab_down(struct weston_touch_grab *grab, - const struct timespec *time, -@@ -1875,6 +2301,8 @@ desktop_surface_added(struct weston_desktop_surface *desktop_surface, - wl_list_init(&shsurf->rotation.transform.link); - weston_matrix_init(&shsurf->rotation.rotation); - -+ wl_list_init(&shsurf->workspace_transform.link); -+ - /* - * initialize list as well as link. The latter allows to use - * wl_list_remove() even when this surface is not in another list. -@@ -4234,6 +4662,86 @@ force_kill_binding(struct weston_keyboard *keyboard, - kill(pid, SIGKILL); - } - -+static void -+workspace_up_binding(struct weston_keyboard *keyboard, -+ const struct timespec *time, uint32_t key, void *data) -+{ -+ struct desktop_shell *shell = data; -+ unsigned int new_index = shell->workspaces.current; -+ -+ if (shell->locked) -+ return; -+ if (new_index != 0) -+ new_index--; -+ -+ change_workspace(shell, new_index); -+} -+ -+static void -+workspace_down_binding(struct weston_keyboard *keyboard, -+ const struct timespec *time, uint32_t key, void *data) -+{ -+ struct desktop_shell *shell = data; -+ unsigned int new_index = shell->workspaces.current; -+ -+ if (shell->locked) -+ return; -+ if (new_index < shell->workspaces.num - 1) -+ new_index++; -+ -+ change_workspace(shell, new_index); -+} -+ -+static void -+workspace_f_binding(struct weston_keyboard *keyboard, -+ const struct timespec *time, uint32_t key, void *data) -+{ -+ struct desktop_shell *shell = data; -+ unsigned int new_index; -+ -+ if (shell->locked) -+ return; -+ new_index = key - KEY_F1; -+ if (new_index >= shell->workspaces.num) -+ new_index = shell->workspaces.num - 1; -+ -+ change_workspace(shell, new_index); -+} -+ -+static void -+workspace_move_surface_up_binding(struct weston_keyboard *keyboard, -+ const struct timespec *time, uint32_t key, -+ void *data) -+{ -+ struct desktop_shell *shell = data; -+ unsigned int new_index = shell->workspaces.current; -+ -+ if (shell->locked) -+ return; -+ -+ if (new_index != 0) -+ new_index--; -+ -+ take_surface_to_workspace_by_seat(shell, keyboard->seat, new_index); -+} -+ -+static void -+workspace_move_surface_down_binding(struct weston_keyboard *keyboard, -+ const struct timespec *time, uint32_t key, -+ void *data) -+{ -+ struct desktop_shell *shell = data; -+ unsigned int new_index = shell->workspaces.current; -+ -+ if (shell->locked) -+ return; -+ -+ if (new_index < shell->workspaces.num - 1) -+ new_index++; -+ -+ take_surface_to_workspace_by_seat(shell, keyboard->seat, new_index); -+} -+ - static void - shell_reposition_view_on_output_change(struct weston_view *view) - { -@@ -4287,12 +4795,16 @@ void - shell_for_each_layer(struct desktop_shell *shell, - shell_for_each_layer_func_t func, void *data) - { -+ struct workspace **ws; -+ - func(shell, &shell->fullscreen_layer, data); - func(shell, &shell->panel_layer, data); - func(shell, &shell->background_layer, data); - func(shell, &shell->lock_layer, data); - func(shell, &shell->input_panel_layer, data); -- func(shell, &shell->workspace.layer, data); -+ -+ wl_array_for_each(ws, &shell->workspaces.array) -+ func(shell, &(*ws)->layer, data); - } - - static void -@@ -4497,6 +5009,7 @@ shell_destroy(struct wl_listener *listener, void *data) - { - struct desktop_shell *shell = - container_of(listener, struct desktop_shell, destroy_listener); -+ struct workspace **ws; - struct shell_output *shell_output, *tmp; - struct shell_seat *shseat, *shseat_next; - -@@ -4529,7 +5042,9 @@ shell_destroy(struct wl_listener *listener, void *data) - - weston_desktop_destroy(shell->desktop); - -- workspace_destroy(&shell->workspace); -+ wl_array_for_each(ws, &shell->workspaces.array) -+ workspace_destroy(*ws); -+ wl_array_release(&shell->workspaces.array); - - desktop_shell_destroy_layer(&shell->panel_layer); - desktop_shell_destroy_layer(&shell->background_layer); -@@ -4546,6 +5061,7 @@ static void - shell_add_bindings(struct weston_compositor *ec, struct desktop_shell *shell) - { - uint32_t mod; -+ int i, num_workspace_bindings; - - if (shell->allow_zap) - weston_compositor_add_key_binding(ec, KEY_BACKSPACE, -@@ -4611,6 +5127,27 @@ shell_add_bindings(struct weston_compositor *ec, struct desktop_shell *shell) - ec); - weston_compositor_add_key_binding(ec, KEY_K, mod, - force_kill_binding, shell); -+ weston_compositor_add_key_binding(ec, KEY_UP, mod, -+ workspace_up_binding, shell); -+ weston_compositor_add_key_binding(ec, KEY_DOWN, mod, -+ workspace_down_binding, shell); -+ weston_compositor_add_key_binding(ec, KEY_UP, mod | MODIFIER_SHIFT, -+ workspace_move_surface_up_binding, -+ shell); -+ weston_compositor_add_key_binding(ec, KEY_DOWN, mod | MODIFIER_SHIFT, -+ workspace_move_surface_down_binding, -+ shell); -+ -+ /* Add bindings for mod+F[1-6] for workspace 1 to 6. */ -+ if (shell->workspaces.num > 1) { -+ num_workspace_bindings = shell->workspaces.num; -+ if (num_workspace_bindings > 6) -+ num_workspace_bindings = 6; -+ for (i = 0; i < num_workspace_bindings; i++) -+ weston_compositor_add_key_binding(ec, KEY_F1 + i, mod, -+ workspace_f_binding, -+ shell); -+ } - - weston_install_debug_key_binding(ec, mod); - } -@@ -4631,6 +5168,8 @@ wet_shell_init(struct weston_compositor *ec, - { - struct weston_seat *seat; - struct desktop_shell *shell; -+ struct workspace **pws; -+ unsigned int i; - struct wl_event_loop *loop; - - shell = zalloc(sizeof *shell); -@@ -4666,6 +5205,8 @@ wet_shell_init(struct weston_compositor *ec, - weston_layer_set_position(&shell->background_layer, - WESTON_LAYER_POSITION_BACKGROUND); - -+ wl_array_init(&shell->workspaces.array); -+ wl_list_init(&shell->workspaces.client_list); - wl_list_init(&shell->seat_list); - - if (input_panel_setup(shell) < 0) -@@ -4677,10 +5218,23 @@ wet_shell_init(struct weston_compositor *ec, - - shell_configuration(shell); - -- workspace_create(shell); -+ for (i = 0; i < shell->workspaces.num; i++) { -+ pws = wl_array_add(&shell->workspaces.array, sizeof *pws); -+ if (pws == NULL) -+ return -1; -+ -+ *pws = workspace_create(shell); -+ if (*pws == NULL) -+ return -1; -+ } -+ activate_workspace(shell, 0); - - weston_layer_init(&shell->minimized_layer, ec); - -+ wl_list_init(&shell->workspaces.anim_sticky_list); -+ wl_list_init(&shell->workspaces.animation.link); -+ shell->workspaces.animation.frame = animate_workspace_change_frame; -+ - shell->desktop = weston_desktop_create(ec, &shell_desktop_api, shell); - if (!shell->desktop) - return -1; -diff --git a/desktop-shell/shell.h b/desktop-shell/shell.h -index e9e123e9..f4cb40fd 100644 ---- a/desktop-shell/shell.h -+++ b/desktop-shell/shell.h -@@ -47,6 +47,7 @@ enum fade_type { - - struct focus_surface { - struct weston_curtain *curtain; -+ struct weston_transform workspace_transform; - }; - - struct workspace { -@@ -127,7 +128,21 @@ struct desktop_shell { - struct weston_surface *lock_surface; - struct wl_listener lock_surface_listener; - -- struct workspace workspace; -+ struct { -+ struct wl_array array; -+ unsigned int current; -+ unsigned int num; -+ -+ struct wl_list client_list; -+ -+ struct weston_animation animation; -+ struct wl_list anim_sticky_list; -+ int anim_dir; -+ struct timespec anim_timestamp; -+ double anim_current; -+ struct workspace *anim_from; -+ struct workspace *anim_to; -+ } workspaces; - - struct { - struct wl_resource *binding; -diff --git a/man/weston-bindings.man b/man/weston-bindings.man -index d528a807..bdeb9912 100644 ---- a/man/weston-bindings.man -+++ b/man/weston-bindings.man -@@ -58,6 +58,21 @@ Make the active window tiled bottom. - Switch active window - .P - .RE -+.B mod + Up, mod + Down -+.RS 4 -+Increment/decrement active workspace number, if there are multiple -+.P -+.RE -+.B mod + Shift + Up, mod + Shift + Down -+.RS 4 -+Move active window to the succeeding/preceding workspace, if possible -+.P -+.RE -+.B mod + F1/F2/F3/F4/F5/F6 -+.RS 4 -+Jump to the numbered workspace, if it exists -+.P -+.RE - .B Ctrl + Alt + Backspace - .RS 4 - If supported, terminate Weston. (Note this combination often is used to hard restart Xorg.) -diff --git a/man/weston.ini.man b/man/weston.ini.man -index 179e0882..d9b17d85 100644 ---- a/man/weston.ini.man -+++ b/man/weston.ini.man -@@ -426,6 +426,11 @@ for windows, controlling the backlight and zooming the desktop. See - .BR weston-bindings (7). - Possible values: none, ctrl, alt, super (default) - .TP 7 -+.BI "num-workspaces=" 6 -+defines the number of workspaces (unsigned integer). The user can switch -+workspaces by using the -+binding+F1, F2 keys. If this key is not set, fall back to one workspace. -+.TP 7 - .BI "cursor-theme=" theme - sets the cursor theme (string). - .TP 7 diff --git a/packages/nm-launcher/default.nix b/packages/nm-launcher/default.nix index d624dd2c1d..7c57603542 100644 --- a/packages/nm-launcher/default.nix +++ b/packages/nm-launcher/default.nix @@ -32,8 +32,6 @@ writeShellApplication { meta = with lib; { description = "Script to launch nm-connection-editor to configure network of netvm using D-Bus over SSH."; - platforms = [ - "x86_64-linux" - ]; + platforms = platforms.linux; }; } diff --git a/packages/powercontrol/png-icons.nix b/packages/powercontrol/png-icons.nix deleted file mode 100644 index e3a7d06696..0000000000 --- a/packages/powercontrol/png-icons.nix +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2024 TII (SSRC) and the Ghaf contributors -# SPDX-License-Identifier: Apache-2.0 -{ - adwaita-icon-theme, - librsvg, - stdenv, -}: let - shutdownIconName = "system-shutdown-symbolic"; - rebootIconName = "system-reboot-symbolic"; - - iconColor = "white"; - - changeColorCcs = "path { fill: ${iconColor} !important; }"; - changeColorCcsPath = "$out/bin/color.css"; - - getIconPath = {iconName}: "bin/${iconName}.png"; -in - stdenv.mkDerivation { - name = "powercontrol-png-icons"; - - phases = ["installPhase"]; - - relativeShutdownIconPath = getIconPath {iconName = shutdownIconName;}; - relativeRebootIconPath = getIconPath {iconName = rebootIconName;}; - - installPhase = let - adwaitaRoot = "${adwaita-icon-theme}/share/icons/Adwaita/symbolic/actions/"; - convertIconCommand = {iconName}: let - outIconPath = getIconPath {inherit iconName;}; - in "${librsvg}/bin/rsvg-convert --stylesheet=${changeColorCcsPath} ${adwaitaRoot}/${iconName}.svg -o $out/${outIconPath}"; - - shutdown = convertIconCommand {iconName = shutdownIconName;}; - reboot = convertIconCommand {iconName = rebootIconName;}; - in '' - mkdir -p $out/bin; - - echo '${changeColorCcs}' > ${changeColorCcsPath}; - - ${shutdown}; - ${reboot}; - ''; - - meta = { - description = "Icons for power control"; - inherit (adwaita-icon-theme.meta) license; - inherit (librsvg.meta) platforms; - }; - } diff --git a/targets/lenovo-x1/guivmExtraModules.nix b/targets/lenovo-x1/guivmExtraModules.nix index 3a486f6dcc..229aa8d53a 100644 --- a/targets/lenovo-x1/guivmExtraModules.nix +++ b/targets/lenovo-x1/guivmExtraModules.nix @@ -42,79 +42,86 @@ ghaf.graphics.launchers = let hostAddress = "192.168.101.2"; powerControl = pkgs.callPackage ../../packages/powercontrol {}; - powerControlIcons = pkgs.gnome.callPackage ../../packages/powercontrol/png-icons.nix {}; privateSshKeyPath = configH.ghaf.security.sshKeys.sshKeyPath; in [ { - name = "chromium"; + name = "Chromium"; path = "${pkgs.openssh}/bin/ssh -i ${privateSshKeyPath} -o StrictHostKeyChecking=no chromium-vm.ghaf run-waypipe chromium --enable-features=UseOzonePlatform --ozone-platform=wayland"; - icon = "${../../assets/icons/png/browser.png}"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/chromium.svg"; } { - name = "gala"; + name = "GALA"; path = "${pkgs.openssh}/bin/ssh -i ${privateSshKeyPath} -o StrictHostKeyChecking=no gala-vm.ghaf run-waypipe gala --enable-features=UseOzonePlatform --ozone-platform=wayland"; - icon = "${../../assets/icons/png/app.png}"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/distributor-logo-android.svg"; } { - name = "zathura"; + name = "PDF Viewer"; path = "${pkgs.openssh}/bin/ssh -i ${privateSshKeyPath} -o StrictHostKeyChecking=no zathura-vm.ghaf run-waypipe zathura"; - icon = "${../../assets/icons/png/pdf.png}"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/document-viewer.svg"; } { - name = "element"; + name = "Element"; path = "${pkgs.openssh}/bin/ssh -i ${configH.ghaf.security.sshKeys.sshKeyPath} -o StrictHostKeyChecking=no element-vm.ghaf run-waypipe element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland"; - icon = "${../../assets/icons/png/element.png}"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/element-desktop.svg"; } { - name = "appflowy"; + name = "AppFlowy"; path = "${pkgs.openssh}/bin/ssh -i ${configH.ghaf.security.sshKeys.sshKeyPath} -o StrictHostKeyChecking=no appflowy-vm.ghaf run-waypipe appflowy"; - icon = "${../../assets/icons/svg/appflowy.svg}"; + icon = "${pkgs.appflowy}/opt/data/flutter_assets/assets/images/flowy_logo.svg"; } { - name = "windows"; + name = "Windows"; path = "${pkgs.virt-viewer}/bin/remote-viewer -f spice://${winConfig.spice-host}:${toString winConfig.spice-port}"; - icon = "${../../assets/icons/png/windows.png}"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/distributor-logo-windows.svg"; } { - name = "nm-launcher"; + name = "Network Settings"; path = "${pkgs.nm-launcher}/bin/nm-launcher"; - icon = "${pkgs.networkmanagerapplet}/share/icons/hicolor/22x22/apps/nm-device-wwan.png"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/preferences-system-network.svg"; } { - name = "poweroff"; + name = "Shutdown"; path = "${powerControl.makePowerOffCommand { inherit hostAddress; inherit privateSshKeyPath; }}"; - icon = "${powerControlIcons}/${powerControlIcons.relativeShutdownIconPath}"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/system-shutdown.svg"; } { - name = "reboot"; + name = "Reboot"; path = "${powerControl.makeRebootCommand { inherit hostAddress; inherit privateSshKeyPath; }}"; - icon = "${powerControlIcons}/${powerControlIcons.relativeRebootIconPath}"; + icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/system-reboot.svg"; } - # Temporarly disabled as it doesn't work stable + # Temporarly disabled as it fails to turn off display when suspended # { - # path = powerControl.makeSuspendCommand {inherit hostAddress waypipeSshPublicKeyFile;}; - # icon = "${adwaitaIconsRoot}/media-playback-pause-symbolic.symbolic.png"; + # name = "Suspend"; + # path = "${powerControl.makeSuspendCommand { + # inherit hostAddress; + # inherit privateSshKeyPath; + # }}"; + # icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/system-suspend.svg"; # } # Temporarly disabled as it doesn't work at all # { - # path = powerControl.makeHibernateCommand {inherit hostAddress waypipeSshPublicKeyFile;}; - # icon = "${adwaitaIconsRoot}/media-record-symbolic.symbolic.png"; + # name = "Hibernate"; + # path = "${powerControl.makeHibernateCommand { + # inherit hostAddress; + # inherit privateSshKeyPath; + # }}"; + # icon = "${pkgs.papirus-icon-theme}/share/icons/Papirus/64x64/apps/system-suspend-hibernate.svg"; # } ]; diff --git a/targets/nvidia-jetson-orin/flake-module.nix b/targets/nvidia-jetson-orin/flake-module.nix index 0afea98542..3f96907981 100644 --- a/targets/nvidia-jetson-orin/flake-module.nix +++ b/targets/nvidia-jetson-orin/flake-module.nix @@ -78,6 +78,7 @@ debug.enable = variant == "debug"; }; windows-launcher.enable = true; + graphics.labwc.renderer = "egl2"; }; }