gtkcord4: rename to dissent

This commit is contained in:
Colin 2024-03-16 11:17:47 +00:00
parent b82a31a3ac
commit b8bf763c11
5 changed files with 19 additions and 20 deletions

View File

@ -25,6 +25,7 @@
./deadd-notification-center
./dialect.nix
./dino.nix
./dissent.nix
./element-desktop.nix
./epiphany.nix
./evince.nix
@ -50,7 +51,6 @@
./gpodder.nix
./grimshot.nix
./gthumb.nix
./gtkcord4.nix
./handbrake.nix
./helix.nix
./imagemagick.nix

View File

@ -3,10 +3,10 @@
# - notification sounds can be handled by swaync
{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.gtkcord4;
cfg = config.sane.programs.dissent;
in
{
sane.programs.gtkcord4 = {
sane.programs.dissent = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
@ -17,15 +17,15 @@ in
};
};
packageUnwrapped = pkgs.gtkcord4.overrideAttrs (upstream: {
packageUnwrapped = pkgs.dissent.overrideAttrs (upstream: {
postConfigure = (upstream.postConfigure or "") + ''
# gtkcord4 uses go-keyring to interface with the org.freedesktop.secrets provider (i.e. gnome-keyring).
# dissent uses go-keyring to interface with the org.freedesktop.secrets provider (i.e. gnome-keyring).
# go-keyring hardcodes `login.keyring` as the keyring to store secrets in, instead of reading `~/.local/share/keyring/default`.
# `login.keyring` seems to be a special keyring preconfigured (by gnome-keyring) to encrypt everything to the user's password.
# that's redundant with my fs-level encryption and makes the keyring less inspectable,
# so patch gtkcord4 to use Default_keyring instead.
# so patch dissent to use Default_keyring instead.
# see:
# - <https://github.com/diamondburned/gtkcord4/issues/139>
# - <https://github.com/diamondburned/dissent/issues/139>
# - <https://github.com/zalando/go-keyring/issues/46>
substituteInPlace vendor/github.com/zalando/go-keyring/secret_service/secret_service.go \
--replace '"login"' '"Default_keyring"'
@ -51,18 +51,17 @@ in
];
persist.byStore.private = [
".cache/gtkcord4"
".config/gtkcord4" # empty?
".cache/dissent"
".config/dissent" # empty?
];
services.gtkcord4 = {
description = "gtkcord4 Discord client";
services.dissent = {
description = "dissent Discord client";
after = [ "graphical-session.target" ];
# partOf = [ "graphical-session.target" ];
wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/gtkcord4";
ExecStart = "${cfg.package}/bin/dissent";
Type = "simple";
Restart = "always";
RestartSec = "20s";

View File

@ -164,7 +164,7 @@ assign [app_id="im.dino.Dino"] workspace number 1
assign [app_id="org.gnome.Fractal"] workspace number 1
assign [app_id="geary"] workspace number 1
assign [app_id="signal"] workspace number 1
assign [app_id="so.libdb.gtkcord4"] workspace number 1
assign [app_id="so.libdb.dissent"] workspace number 1
assign [app_id="abaddon"] workspace number 1
# window display settings

View File

@ -250,7 +250,7 @@ in
incoming-im-known-app-name = {
# trigger notification sound on behalf of these IM clients.
app-name = "(Chats|Dino|discord|Element|Fractal|gtkcord4)";
app-name = "(Chats|Dino|discord|dissent|Element|Fractal)";
body = "^(?!Incoming call).*$"; #< don't match Dino Incoming calls
exec = "${fbcli} --event proxied-message-new-instant";
};
@ -403,7 +403,7 @@ in
active = true;
}
# ] ++ lib.optionals config.sane.programs.abaddon.enabled [
# # XXX: disabled in favor of gtkcord4: abaddon has troubles auto-connecting at start
# # XXX: disabled in favor of dissent: abaddon has troubles auto-connecting at start
# {
# type = "toggle";
# label = "󰊴"; # Discord chat client; icons: 󰊴, 🎮
@ -411,12 +411,12 @@ in
# update-command = "${printIsActive}/bin/print-is-active --user abaddon";
# active = true;
# }
] ++ lib.optionals config.sane.programs.gtkcord4.enabled [
] ++ lib.optionals config.sane.programs.dissent.enabled [
{
type = "toggle";
label = "󰊴"; # Discord chat client; icons: 󰊴, 🎮
command = "${systemctl-toggle}/bin/systemctl-toggle --user gtkcord4";
update-command = "${printIsActive}/bin/print-is-active --user gtkcord4";
command = "${systemctl-toggle}/bin/systemctl-toggle --user dissent";
update-command = "${printIsActive}/bin/print-is-active --user dissent";
active = true;
}
] ++ lib.optionals config.sane.programs.signal-desktop.enabled [

View File

@ -60,6 +60,7 @@ in
"delfin" # Jellyfin client
"dialect" # language translation
"dino" # XMPP client
"dissent" # Discord client (formerly known as: gtkcord4)
# "emote"
# "evince" # PDF viewer
# "flare-signal" # gtk4 signal client
@ -82,7 +83,6 @@ in
"gnome-frog" # OCR/QR decoder
"gpodder"
# "gthumb"
"gtkcord4" # Discord client. 2023/11/21: disabled because v0.0.12 leaks memory
# "lemoa" # lemmy app
"libnotify" # for notify-send; debugging
# "lollypop"