discord envirnoment and minor things
This commit is contained in:
@@ -5,6 +5,28 @@
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkOption mkEnableOption types;
|
||||
variantMapping = {
|
||||
stable = {
|
||||
dir = "discord";
|
||||
package = pkgs.discord;
|
||||
};
|
||||
ptb = {
|
||||
dir = "discordptb";
|
||||
package = pkgs.discord-ptb;
|
||||
};
|
||||
canary = {
|
||||
dir = "discordcanary";
|
||||
package = pkgs.discord-canary.override {withOpenASAR = true;};
|
||||
};
|
||||
vesktop = {
|
||||
dir = "vesktop";
|
||||
package = pkgs.vesktop;
|
||||
};
|
||||
};
|
||||
getVariantConfig = variant:
|
||||
if builtins.hasAttr variant variantMapping
|
||||
then variantMapping.${variant}
|
||||
else throw "Unknown package variant: ${variant}";
|
||||
cfg = config.home.programs.discord;
|
||||
in {
|
||||
options = {
|
||||
@@ -17,21 +39,11 @@ in {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = let
|
||||
variant = cfg.variant or "stable";
|
||||
in
|
||||
if variant == "stable"
|
||||
then [pkgs.discord]
|
||||
else if variant == "ptb"
|
||||
then [pkgs.discord-ptb]
|
||||
else if variant == "canary"
|
||||
then [(pkgs.discord-canary.override {withOpenASAR = true;})]
|
||||
else if variant == "vesktop"
|
||||
then [pkgs.vesktop]
|
||||
else throw "Unknown package variant: ${variant}";
|
||||
|
||||
home = {
|
||||
sessionVariables.DISCORD_USER_DATA_DIR = "$HOME/.config/${(getVariantConfig cfg.variant).dir}";
|
||||
packages = [(getVariantConfig cfg.variant).package];
|
||||
};
|
||||
xdg.configFile = mkIf (cfg.variant == "vesktop") {
|
||||
"vesktop/themes/base16.css".text =
|
||||
/*
|
||||
|
||||
@@ -109,6 +109,8 @@ in {
|
||||
set -x fish_pager_color_description yellow
|
||||
set -x fish_pager_color_prefix 'white' '--bold' '--underline'
|
||||
set -x fish_pager_color_progress 'brwhite' '--background=cyan'
|
||||
|
||||
microfetch
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -27,17 +27,17 @@ in {
|
||||
"$launcher" = "rofi -show drun";
|
||||
|
||||
bind = [
|
||||
"$mod, SPACE, exec, uwsm app -- $launcher"
|
||||
"$mod, R, exec, uwsm app -- $launcher"
|
||||
"$mod, SPACE, exec, tuirun-toggle.sh"
|
||||
"$mod, R, exec, $launcher"
|
||||
"$mod, L, exec, ${toggle "nwg-bar"}"
|
||||
"$mod SHIFT, B, exec, pkill -SIGUSR2 waybar"
|
||||
"$mod, A, exec, pkill -SIGUSR1 waybar"
|
||||
"$mod, T, exec, uwsm app -- $terminal"
|
||||
"$mod, T, exec, $terminal"
|
||||
"$mod, W, exec, $browser"
|
||||
"$mod, K, exec, keepassxc"
|
||||
"$mod SHIFT, W, exec, $browserinc"
|
||||
"$mod, Q, killactive,"
|
||||
"$mod, E, exec, uwsm app -- $fileManager"
|
||||
"$mod, E, exec, $fileManager"
|
||||
"$mod SHIFT, E, exec, $yazi"
|
||||
"$mod, F, fullscreen,"
|
||||
"$mod SHIFT, F, togglefloating,"
|
||||
|
||||
@@ -16,7 +16,7 @@ in {
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"uwsm finalize"
|
||||
"sleep 2 && uwsm finalize"
|
||||
"hyprlock"
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user