Skip to content

Commit

Permalink
Fully migrate to labwc, remove weston
Browse files Browse the repository at this point in the history
This patch fully migrates Ghaf to labwc, removing Weston compositor
support, improves usability and performance of the labwc environment.

Signed-off-by: Humaid Alqasimi <humaid.alqassimi@tii.ae>
  • Loading branch information
humaidq-tii committed May 7, 2024
1 parent d77f0a8 commit 3d9e6cd
Show file tree
Hide file tree
Showing 40 changed files with 527 additions and 1,680 deletions.
Binary file removed assets/icons/png/app.png
Binary file not shown.
Binary file removed assets/icons/png/appflowy.png
Binary file not shown.
Binary file removed assets/icons/png/browser.png
Binary file not shown.
Binary file removed assets/icons/png/element.png
Binary file not shown.
Binary file removed assets/icons/png/pdf.png
Binary file not shown.
Binary file removed assets/icons/png/settings.png
Binary file not shown.
Binary file removed assets/icons/png/windows.png
Binary file not shown.
27 changes: 0 additions & 27 deletions assets/icons/svg/app.svg

This file was deleted.

29 changes: 0 additions & 29 deletions assets/icons/svg/appflowy.svg

This file was deleted.

11 changes: 0 additions & 11 deletions assets/icons/svg/browser.svg

This file was deleted.

27 changes: 0 additions & 27 deletions assets/icons/svg/pdf.svg

This file was deleted.

9 changes: 0 additions & 9 deletions assets/icons/svg/settings.svg

This file was deleted.

6 changes: 6 additions & 0 deletions assets/icons/svg/wifi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions assets/icons/svg/windows.svg

This file was deleted.

1 change: 1 addition & 0 deletions modules/common/development/authorized_ssh_keys.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICKm9NtS/ZmrxQhY/pbRlX+9O1VaBEd8D9vojDtvS0Ru juliuskoskela@vega"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDJau0tg0qHhqFVarjNOJLi+ekSZNNqxal4iRD/pwM5W tervis@tervis-thinkpad"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAHVXc4s7e8j1uFsgHPBzpWvSI/hk5Zf6Btuj79D4hf3 tervis@tervis-servu"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB/iv9RWMN6D9zmEU85XkaU8fAWJreWkv3znan87uqTW"

# For ghaf-installer automated testing:
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAolaKCuIUBQSBFGFZI1taNX+JTAr8edqUts7A6k2Kv7"
Expand Down
5 changes: 2 additions & 3 deletions modules/desktop/graphics/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# SPDX-License-Identifier: Apache-2.0
{
imports = [
./weston.nix
./labwc.nix
./weston.ini.nix
./waybar.config.nix
./labwc.config.nix
./ironbar.config.nix
./demo-apps.nix
./fonts.nix
./window-manager.nix
Expand Down
34 changes: 14 additions & 20 deletions modules/desktop/graphics/demo-apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -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.icon-pack}/chromium.svg";
}
++ lib.optional cfg.firefox {
name = "firefox";
name = "Firefox";
path = "${pkgs.firefox}/bin/firefox";
icon = "${firefox-icon}";
icon = "${pkgs.icon-pack}/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.icon-pack}/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.icon-pack}/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.icon-pack}/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
Expand Down
5 changes: 3 additions & 2 deletions modules/desktop/graphics/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
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.enableDefaultPackages = true;
fonts.packages = with pkgs; [
inter
fira-code-nerdfont
Expand Down
10 changes: 9 additions & 1 deletion modules/desktop/graphics/ghaf-launcher.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
writeTextDir,
coreutils,
nwg-drawer,
foot,
callPackage,
config,
...
}: let
drawerCSS = writeTextDir "nwg-drawer/drawer.css" ''
Expand Down Expand Up @@ -53,12 +56,17 @@
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
while true; do
${nwg-drawer}/bin/nwg-drawer -r -mb 60 -ml 440 -mr 440 -mt 420 -nofs \
-nocats -ovl
done
''
Loading

0 comments on commit 3d9e6cd

Please sign in to comment.