Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce to Waybar #386

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/ref_impl/creating_appvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Each VM has the following properties:

## Adding Application Launcher in GUI VM

To add an app launcher, add an element in the [guivm.nix](../../../modules/virtualization/microvm/guivm.nix) file to the **graphics.weston.launchers** list.
To add an app launcher, add an element in the [guivm.nix](../../../modules/virtualization/microvm/guivm.nix) file to the **graphics.launchers** list.

A launcher element has 2 properties:

Expand Down
1 change: 1 addition & 0 deletions modules/graphics/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
./weston.nix
./labwc.nix
./weston.ini.nix
./waybar.config.nix
./demo-apps.nix
./fonts.nix
./gnome.nix
Expand Down
16 changes: 10 additions & 6 deletions modules/graphics/demo-apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
...
}: let
cfg = config.ghaf.graphics.demo-apps;
inherit (config.ghaf.graphics) weston;

/*
Scaled down firefox icon
Expand Down Expand Up @@ -36,31 +35,36 @@
in {
options.ghaf.graphics.demo-apps = with lib; {
chromium = mkProgramOption "Chromium browser" false;
firefox = mkProgramOption "Firefox browser" weston.enableDemoApplications;
firefox = mkProgramOption "Firefox browser" config.ghaf.graphics.enableDemoApplications;
gala-app = mkProgramOption "Gala App" false;
element-desktop = mkProgramOption "Element desktop" weston.enableDemoApplications;
zathura = mkProgramOption "zathura" weston.enableDemoApplications;
element-desktop = mkProgramOption "Element desktop" config.ghaf.graphics.enableDemoApplications;
zathura = mkProgramOption "zathura" config.ghaf.graphics.enableDemoApplications;
};

config = lib.mkIf weston.enable {
ghaf.graphics.weston.launchers =
config = lib.mkIf config.ghaf.profiles.graphics.enable {
ghaf.graphics.launchers =
lib.optional cfg.chromium {
name = "chromium";
path = "${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.chromium}/share/icons/hicolor/24x24/apps/chromium.png";
}
++ lib.optional cfg.firefox {
name = "firefox";
path = "${pkgs.firefox}/bin/firefox";
icon = "${firefox-icon}/share/icons/hicolor/24x24/apps/firefox.png";
}
++ lib.optional cfg.element-desktop {
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";
}
++ lib.optional cfg.gala-app {
name = "gala";
path = "${pkgs.gala-app}/bin/gala --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.gala-app}/gala/resources/icon-24x24.png";
}
++ lib.optional cfg.zathura {
name = "zathura";
path = "${pkgs.zathura}/bin/zathura";
icon = "${pkgs.zathura}/share/icons/hicolor/32x32/apps/org.pwmt.zathura.png";
};
Expand Down
20 changes: 13 additions & 7 deletions modules/graphics/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@
config,
...
}: let
cfg = config.ghaf.graphics.weston;
inherit (config.ghaf.graphics) weston labwc;
in {
config = lib.mkIf cfg.enable {
fonts.packages = with pkgs; [
fira-code
hack-font
];
};
config =
lib.mkIf weston.enable {
fonts.fonts = with pkgs; [
fira-code
hack-font
];
}
// lib.mkIf labwc.enable {
fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];})
];
};
}
Loading