gtkcord4: add swaync icon and user service

This commit is contained in:
Colin 2023-11-17 09:18:14 +00:00
parent 130268491c
commit 2f320db5e2
5 changed files with 46 additions and 9 deletions

View File

@ -256,11 +256,6 @@ in
"gnome.gnome-maps".persist.byStore.plaintext = [ ".cache/shumate" ];
"gnome.gnome-maps".persist.byStore.private = [ ".local/share/maps-places.json" ];
gtkcord4.persist.byStore.private = [
".cache/gtkcord4"
".config/gtkcord4" # empty?
];
# actual monero blockchain (not wallet/etc; safe to delete, just slow to regenerate)
# XXX: is it really safe to persist this? it doesn't have info that could de-anonymize if captured?
monero-gui.persist.byStore.plaintext = [ ".bitmonero" ];

View File

@ -32,6 +32,7 @@
./gnome-weather.nix
./gpodder.nix
./gthumb.nix
./gtkcord4.nix
./helix.nix
./imagemagick.nix
./jellyfin-media-player.nix

View File

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.gtkcord4;
in
{
sane.programs.gtkcord4 = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
};
};
};
persist.byStore.private = [
".cache/gtkcord4"
".config/gtkcord4" # empty?
];
services.gtkcord4 = {
description = "unofficial Discord chat client";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/gtkcord4";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
};
};
}

View File

@ -328,13 +328,13 @@ in
lib.optionals config.sane.programs.eg25-control.enabled [
{
type = "toggle";
label = "gps"; # GPS services; other icons:
label = ""; # GPS services; other icons: gps, , 🛰, 🌎, 
command = "/run/wrappers/bin/sudo ${systemctl-toggle}/bin/systemctl-toggle eg25-control-gps";
active = "${pkgs.systemd}/bin/systemctl is-active eg25-control-gps.service";
}
{
type = "toggle";
label = "5g";
label = "󰺐"; # icons: 5g, 📡, 📱, ᯤ, ⚡, , 🌐, 📶, 🗼, 󰀂, , 󰺐, 󰩯
# modem and NetworkManager auto-establishes a connection when powered.
# though some things like `wg-home` VPN tunnel will remain routed over the old interface.
command = "/run/wrappers/bin/sudo ${systemctl-toggle}/bin/systemctl-toggle eg25-control-powered";
@ -357,14 +357,21 @@ in
] ++ lib.optionals config.sane.programs."gnome.geary".enabled [
{
type = "toggle";
label = "[E]"; # email (Geary); other icons: ✉, 📧
label = "󰇮"; # email (Geary); other icons: ✉, [E], 📧, 󰇮
command = "${systemctl-toggle}/bin/systemctl-toggle --user geary";
active = "${pkgs.systemd}/bin/systemctl is-active --user geary";
}
] ++ lib.optionals config.sane.programs.gtkcord4.enabled [
{
type = "toggle";
label = "󰊴"; # Discord chat client; icons: 󰊴, 🎮
command = "${systemctl-toggle}/bin/systemctl-toggle --user gtkcord4";
active = "${pkgs.systemd}/bin/systemctl is-active --user gtkcord4";
}
] ++ lib.optionals config.sane.programs.signal-desktop.enabled [
{
type = "toggle";
label = "💬"; # Signal messenger
label = "💬"; # Signal messenger; other icons: 󰍦
command = "${systemctl-toggle}/bin/systemctl-toggle --user signal-desktop";
active = "${pkgs.systemd}/bin/systemctl is-active --user signal-desktop";
}

View File

@ -149,6 +149,7 @@ for_window [app_id="im.dino.Dino"] move container to workspace number 1
for_window [app_id="org.gnome.Fractal"] move container to workspace number 1
for_window [app_id="geary"] move container to workspace number 1
for_window [class="Signal"] move container to workspace number 1
for_window [app_id="xyz.diamondb.gtkcord4"] move container to workspace number 1
### displays
## DESKTOP