integrate Signal into swaync and sway/autostart

This commit is contained in:
Colin 2023-11-17 04:05:59 +00:00
parent 5c7851e4d9
commit 850354b7d7
5 changed files with 39 additions and 3 deletions

View File

@ -28,6 +28,7 @@
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ]; sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ];
# sane.programs.devPkgs.enableFor.user.colin = true; # sane.programs.devPkgs.enableFor.user.colin = true;
sane.programs.signal-desktop.config.autostart = true;
sane.programs."gnome.geary".config.autostart = true; sane.programs."gnome.geary".config.autostart = true;
boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.canTouchEfiVariables = false;

View File

@ -50,6 +50,7 @@
# sane.programs.ntfy-sh.config.autostart = true; # sane.programs.ntfy-sh.config.autostart = true;
sane.programs.dino.config.autostart = true; sane.programs.dino.config.autostart = true;
# sane.programs.signal-desktop.config.autostart = true;
# sane.programs."gnome.geary".config.autostart = true; # sane.programs."gnome.geary".config.autostart = true;
# sane.programs.calls.config.autostart = true; # sane.programs.calls.config.autostart = true;
sane.programs.mpv.config.vo = "wlshm"; #< see hosts/common/programs/mpv.nix for details sane.programs.mpv.config.vo = "wlshm"; #< see hosts/common/programs/mpv.nix for details

View File

@ -1,10 +1,35 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
let
cfg = config.sane.programs.signal-desktop;
in
{ {
sane.programs.signal-desktop = { sane.programs.signal-desktop = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
};
};
};
package = pkgs.signal-desktop-from-src; package = pkgs.signal-desktop-from-src;
# creds, media # creds, media
persist.byStore.private = [ persist.byStore.private = [
".config/Signal" ".config/Signal"
]; ];
services.signal-desktop = {
description = "Signal Messenger";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/signal-desktop";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
};
}; };
} }

View File

@ -358,6 +358,13 @@ in
command = "${systemctl-toggle}/bin/systemctl-toggle --user geary"; command = "${systemctl-toggle}/bin/systemctl-toggle --user geary";
active = "${pkgs.systemd}/bin/systemctl is-active --user geary"; active = "${pkgs.systemd}/bin/systemctl is-active --user geary";
} }
] ++ lib.optionals config.sane.programs.signal-desktop.enabled [
{
type = "toggle";
label = "💬"; # Signal messenger
command = "${systemctl-toggle}/bin/systemctl-toggle --user signal-desktop";
active = "${pkgs.systemd}/bin/systemctl is-active --user signal-desktop";
}
] ++ lib.optionals config.sane.programs.dino.enabled [ ] ++ lib.optionals config.sane.programs.dino.enabled [
{ {
type = "toggle"; type = "toggle";

View File

@ -142,11 +142,13 @@ bar {
for_window [app_id="pinentry-.*"] floating true for_window [app_id="pinentry-.*"] floating true
for_window [app_id="foot" title=".*sxmo/modem/.*/draft.txt.*"] resize set height 25 for_window [app_id="foot" title=".*sxmo/modem/.*/draft.txt.*"] resize set height 25
for_window [title="megapixels"] inhibit_idle open for_window [title="megapixels"] inhibit_idle open
# Dino (XMPP) is ordinarily started for the purpose of daemonizing (but still visible). keep it on a predictable, out-of-the-way workspace
# TODO: could be neat to somehow do this in a way that it never steals focus from anything... # workspace assignments
# mostly, messengers belong on WS 1
for_window [app_id="im.dino.Dino"] move container to workspace number 1 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="org.gnome.Fractal"] move container to workspace number 1
for_window [app_id="geary"] 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
### displays ### displays
## DESKTOP ## DESKTOP