2022-07-31 11:03:59 +02:00
|
|
|
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
2021-01-24 17:43:50 +01:00
|
|
|
{
|
2022-07-31 11:03:59 +02:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.magic_rb.programs.xmonad;
|
|
|
|
in {
|
2021-04-11 00:25:36 +02:00
|
|
|
options.magic_rb.programs.xmonad = {
|
|
|
|
enable = mkEnableOption "Enable xmonad config";
|
2021-01-24 17:43:50 +01:00
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
enableDunst = mkOption {
|
|
|
|
description = "Enable dunst";
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
enablePicom = mkOption {
|
|
|
|
description = "Enable picom";
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
2022-04-15 09:52:23 +02:00
|
|
|
enableKeynav = mkOption {
|
|
|
|
description = "Enable keynav";
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
picomExperimentalBackends = mkOption {
|
|
|
|
description = "Enable experimental backends in picom";
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
powerline-fonts
|
|
|
|
font-awesome
|
|
|
|
dejavu_fonts
|
|
|
|
];
|
|
|
|
|
2022-04-15 09:52:23 +02:00
|
|
|
home.file.".keynavrc".source = ./keynavrc;
|
|
|
|
|
2021-12-22 23:48:31 +01:00
|
|
|
home.file.".xmonad/xmonad.hs".source = pkgs.writeSubstitutedFile {
|
2021-04-11 00:25:36 +02:00
|
|
|
name = "xmonad.hs";
|
|
|
|
file = ./xmonad.hs;
|
|
|
|
substitutes = {
|
|
|
|
"xmobar" = "${pkgs.xmobar}/bin/xmobar";
|
|
|
|
"xmobarConfig" = ./xmobarrc;
|
|
|
|
"screenshot" = "${pkgs.magic_rb.screenshot}/bin/screenshot";
|
|
|
|
"dmenu_run" = "${pkgs.dmenu}/bin/dmenu_run";
|
|
|
|
|
2021-04-11 01:03:36 +02:00
|
|
|
"dunst" = "${pkgs.dunst}/bin/dunst";
|
2022-07-31 11:03:59 +02:00
|
|
|
"enableDunst" =
|
|
|
|
if cfg.enableDunst
|
|
|
|
then "True"
|
|
|
|
else "False";
|
2021-04-11 00:25:36 +02:00
|
|
|
"dunstConfig" = ./dunstrc;
|
|
|
|
|
2021-04-11 01:03:36 +02:00
|
|
|
"picom" = "${pkgs.picom}/bin/picom";
|
2022-07-31 11:03:59 +02:00
|
|
|
"enablePicom" =
|
|
|
|
if cfg.enablePicom
|
|
|
|
then "True"
|
|
|
|
else "False";
|
2021-04-11 00:25:36 +02:00
|
|
|
"picomConfig" = ./picom.conf;
|
2022-07-31 11:03:59 +02:00
|
|
|
"experimentalBackends" =
|
|
|
|
if cfg.picomExperimentalBackends
|
|
|
|
then "--experimental-backends"
|
|
|
|
else "";
|
2022-04-15 09:52:23 +02:00
|
|
|
|
|
|
|
"keynav" = "${pkgs.keynav}/bin/keynav";
|
2022-07-31 11:03:59 +02:00
|
|
|
"enableKeynav" =
|
|
|
|
if cfg.enableKeynav
|
|
|
|
then "True"
|
|
|
|
else "False";
|
2022-09-15 14:45:48 +02:00
|
|
|
|
|
|
|
"lightLocker" = "${pkgs.lightlocker}/bin/light-locker";
|
2021-04-11 00:25:36 +02:00
|
|
|
};
|
2021-01-24 17:43:50 +01:00
|
|
|
};
|
2021-02-26 10:24:58 +01:00
|
|
|
};
|
2021-01-24 17:43:50 +01:00
|
|
|
}
|