Skip to content

Commit

Permalink
Desktop: Add BT system tray applet, global labwc options, desktop ref…
Browse files Browse the repository at this point in the history
…actoring

- Added global labwc options for GTK+ (font, theme, icon theme, color scheme)
- Changed the default icon theme to Papirus
- Enabled icon theme support via gsettings
- Set default values for XDG base directories in guivm
- Added Bluetooth applet to the system tray
- Adjusted behavior of nm-launcher and bt-launcher
- Adjusted Mako notification configuration
- Moved Bluetooth and nm applet services configuration under labwc config
- Refactored ghaf launcher implementation
- Removed icon-pack, global icon theme is used wherever applicable

Signed-off-by: Kajus Naujokaitis <[email protected]>
  • Loading branch information
kajusnau authored and brianmcgillion committed Nov 18, 2024
1 parent 942a9ef commit 713d13c
Show file tree
Hide file tree
Showing 16 changed files with 267 additions and 192 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 @@ -61,4 +61,4 @@ To create an App VM, do the following:

* **name**: the name of the launcher;
* **path**: path to the executable you want to run, like a graphical application;
* **icon**: path to an icon to show. If you have an icon package for your launcher, add it here as well: [packages/icon-pack/default.nix](https://github.com/tiiuae/ghaf/blob/main/packages/icon-pack/default.nix).
* **icon**: an optional icon for the launcher. If not specified, the system will attempt to find an icon matching the `name`. You can set this to the name of an icon you expect to be available in the current icon theme (currently "Papirus," defined in `modules/desktop/graphics/labwc.nix`), or provide a full path to a specific icon file.
37 changes: 18 additions & 19 deletions modules/common/services/desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ in
# description = "Isolated General Browsing";
# vm = "Chromium";
# path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start chromium";
# icon = "${pkgs.icon-pack}/chromium.svg";
# icon = "chromium";
# }

{
name = "Trusted Browser";
description = "Isolated Trusted Browsing";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm google-chrome";
icon = "${pkgs.icon-pack}/thorium-browser.svg";
icon = "thorium-browser";
}
{
# The SPKI fingerprint is calculated like this:
Expand All @@ -78,91 +78,90 @@ in
description = "Isolated General Browsing";
vm = "Chrome";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm chrome-vm google-chrome";
icon = "${pkgs.icon-pack}/google-chrome.svg";
icon = "google-chrome";
}

{
name = "VPN";
description = "GlobalProtect VPN Client";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm gpclient";
icon = "${pkgs.icon-pack}/yast-vpn.svg";
icon = "yast-vpn";
}

{
name = "Microsoft Outlook";
description = "Microsoft Email Client";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm outlook";
icon = "${pkgs.icon-pack}/ms-outlook.svg";
icon = "ms-outlook";
}
{
name = "Microsoft 365";
description = "Microsoft 365 Software Suite";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm office";
icon = "${pkgs.icon-pack}/microsoft-365.svg";
icon = "microsoft-365";
}
{
name = "Teams";
description = "Microsoft Teams Collaboration Application";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm teams";
icon = "${pkgs.icon-pack}/teams-for-linux.svg";
icon = "teams-for-linux";
}
{
name = "Text Editor";
description = "Simple Text Editor";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm gnome-text-editor";
icon = "${pkgs.icon-pack}/org.gnome.TextEditor.svg";
icon = "org.gnome.TextEditor";
}
{
name = "Xarchiver";
description = "File Compressor";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm xarchiver";
icon = "${pkgs.icon-pack}/xarchiver.svg";
icon = "xarchiver";
}

{
name = "GALA";
description = "Secure Android-in-the-Cloud";
vm = "GALA";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start gala";
icon = "${pkgs.icon-pack}/distributor-logo-android.svg";
icon = "distributor-logo-android";
}

{
name = "PDF Viewer";
description = "Isolated PDF Viewer";
vm = "Zathura";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm zathura-vm zathura";
icon = "${pkgs.icon-pack}/document-viewer.svg";
icon = "document-viewer";
}

{
name = "Element";
description = "General Messaging Application";
vm = "Comms";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm comms-vm element";
icon = "${pkgs.icon-pack}/element-desktop.svg";
icon = "element-desktop";
}

{
name = "Slack";
description = "Teams Collaboration & Messaging Application";
vm = "Comms";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm comms-vm slack";
icon = "${pkgs.icon-pack}/slack.svg";
icon = "slack";
}

{
name = "Zoom";
description = "Zoom Videoconferencing Application";
vm = "Comms";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm comms-vm zoom";
icon = "${pkgs.icon-pack}/Zoom.svg";
}

{
Expand All @@ -183,21 +182,21 @@ in
name = "File Manager";
description = "Organize & Manage Files";
path = "${pkgs.pcmanfm}/bin/pcmanfm";
icon = "${pkgs.icon-pack}/system-file-manager.svg";
icon = "system-file-manager";
}

{
name = "Bluetooth Settings";
description = "Manage Bluetooth Devices & Settings";
path = "${pkgs.bt-launcher}/bin/bt-launcher";
icon = "${pkgs.icon-pack}/bluetooth-48.svg";
icon = "bluetooth-48";
}

{
name = "Audio Control";
description = "System Audio Control";
path = "${pkgs.ghaf-audio-control}/bin/GhafAudioControlStandalone --pulseaudio_server=audio-vm:${toString pulseaudioTcpControlPort}";
icon = "${pkgs.icon-pack}/preferences-sound.svg";
icon = "preferences-sound";
}

{
Expand All @@ -218,15 +217,15 @@ in
{
name = "Control panel";
path = "${pkgs.ctrl-panel}/bin/ctrl-panel";
icon = "${pkgs.icon-pack}/utilities-tweak-tool.svg";
icon = "utilities-tweak-tool";
}
]
++ optionals config.ghaf.reference.programs.windows-launcher.enable [
{
name = "Windows";
description = "Virtualized Windows System";
path = "${pkgs.virt-viewer}/bin/remote-viewer -f spice://${winConfig.spice-host}:${toString winConfig.spice-port}";
icon = "${pkgs.icon-pack}/distributor-logo-windows.svg";
icon = "distributor-logo-windows";
}
];
};
Expand Down
14 changes: 7 additions & 7 deletions modules/desktop/graphics/demo-apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,37 @@ in
name = "Google Chrome";
description = "Web Browser";
path = "${pkgs.google-chrome}/bin/google-chrome-stable --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.icon-pack}/google-chrome.svg";
icon = "google-chrome";
}
++ lib.optional cfg.chromium {
name = "Chromium";
description = "Web Browser";
path = "${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.icon-pack}/chromium.svg";
icon = "chromium";
}
++ lib.optional cfg.firefox {
name = "Firefox";
description = "Web Browser";
path = "${pkgs.firefox}/bin/firefox";
icon = "${pkgs.icon-pack}/firefox.svg";
icon = "firefox";
}
++ lib.optional cfg.element-desktop {
name = "Element";
description = "General Messing Application";
description = "General Messaging Application";
path = "${pkgs.element-desktop}/bin/element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.icon-pack}/element-desktop.svg";
icon = "element-desktop";
}
++ lib.optional cfg.gala-app {
name = "GALA";
description = "Secure Android-in-the-Cloud";
path = "${pkgs.gala-app}/bin/gala --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.icon-pack}/distributor-logo-android.svg";
icon = "distributor-logo-android";
}
++ lib.optional cfg.zathura {
name = "PDF Viewer";
description = "PDF Viewer Application";
path = "${pkgs.zathura}/bin/zathura";
icon = "${pkgs.icon-pack}/document-viewer.svg";
icon = "document-viewer";
};
};
}
15 changes: 7 additions & 8 deletions modules/desktop/graphics/ewwbar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,7 @@ in
:spacing 10
:orientation "v"
(etc)
(sys_sliders)
(settings_buttons))))
(sys_sliders))))
;; Power Menu Widget ;;
(defwidget power-menu-widget []
Expand Down Expand Up @@ -830,7 +829,7 @@ in
:halign "end"
:valign "center"
:spacing 14
(systray :prepend-new true :class "tray")
(systray :orientation "h" :spacing 14 :prepend-new true :class "tray")
(divider)
${lib.optionalString useGivc "(control :screen screen) (divider)"}
(datetime-locale :screen screen)
Expand Down Expand Up @@ -948,7 +947,7 @@ in
* {
color: $text-base;
font-family: "Inter";
font-family: "${cfg.gtk.fontName}";
font-size: 14px;
:disabled {
color: $text-disabled;
Expand Down Expand Up @@ -1091,7 +1090,7 @@ in
.header {
font-size: 0.9em;
font-weight: 500;
font-family: Inter;
font-family: ${cfg.gtk.fontName};
}
.settings{
Expand Down Expand Up @@ -1149,7 +1148,7 @@ in
.title {
font-size: 0.9em;
font-weight: 500;
font-family: Inter;
font-family: ${cfg.gtk.fontName};
}
.subtitle {
Expand Down Expand Up @@ -1281,7 +1280,7 @@ in
}
.tray menu {
font-family: Inter;
font-family: ${cfg.gtk.fontName};
font-size: 1.1em;
background-color: $bg-primary;
Expand Down Expand Up @@ -1362,7 +1361,7 @@ in
description = "eww-restart";
serviceConfig = {
Type = "oneshot";
ExecStart = "systemctl --user reload ewwbar.service";
ExecStart = "systemctl --user try-reload-or-restart ewwbar.service";
Restart = "on-failure";
RestartSec = "100ms";
};
Expand Down
26 changes: 0 additions & 26 deletions modules/desktop/graphics/ghaf-launcher.nix

This file was deleted.

Loading

0 comments on commit 713d13c

Please sign in to comment.