Skip to content

Commit

Permalink
Remove weston, use hi-res icons for launchers
Browse files Browse the repository at this point in the history
Also removes old icons that are no longer used.

Signed-off-by: Humaid Alqasimi <humaid.alqassimi@tii.ae>
  • Loading branch information
humaidq-tii committed Apr 29, 2024
1 parent 1eae3af commit c37bb2c
Show file tree
Hide file tree
Showing 27 changed files with 50 additions and 1,167 deletions.
Binary file removed assets/icons/png/app.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.

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: 0 additions & 6 deletions assets/icons/svg/windows.svg

This file was deleted.

2 changes: 0 additions & 2 deletions modules/desktop/graphics/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 12 additions & 18 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 @@ -39,29 +33,29 @@ 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";
};
environment.systemPackages =
lib.optional cfg.chromium pkgs.chromium
Expand Down
4 changes: 2 additions & 2 deletions modules/desktop/graphics/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/desktop/graphics/waybar.config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" = {
Expand Down
72 changes: 0 additions & 72 deletions modules/desktop/graphics/weston.ini.nix

This file was deleted.

73 changes: 0 additions & 73 deletions modules/desktop/graphics/weston.nix

This file was deleted.

3 changes: 0 additions & 3 deletions modules/desktop/profiles/applications.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions modules/desktop/profiles/graphics.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -48,7 +48,6 @@ in
};

config = mkIf cfg.enable {
ghaf.graphics.weston.enable = cfg.compositor == "weston";
ghaf.graphics.labwc.enable = cfg.compositor == "labwc";
};
}
4 changes: 2 additions & 2 deletions modules/desktop/windows-launcher/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
];

Expand Down
Loading

0 comments on commit c37bb2c

Please sign in to comment.