Skip to content

Commit

Permalink
Add Waybar configuration
Browse files Browse the repository at this point in the history
Waybar configuration modified based on the default bar configuration and launchers added.
Pulseaudio is added to guivm.
Nmcli is used to get the network connection data in wifi-signal-strength script and nm-launcher connection structure is copied.
Weston and waybar launchers are unified and name section added.

Nerdfonts FiraCode is added.
All the style and configuration files are created in weston.config.nix.

Compositor and waypipe display name must be overriden as in comments in guivm.nix to use waybar properly.

Signed-off-by: Berk Arslan <[email protected]>
  • Loading branch information
Nerox9 committed Jan 31, 2024
1 parent 46bf722 commit 46cc0d7
Show file tree
Hide file tree
Showing 14 changed files with 475 additions and 41 deletions.
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

0 comments on commit 46cc0d7

Please sign in to comment.