.hive/modules/home/plasma.nix

162 lines
3.8 KiB
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.hive.plasma;
in {
options.hive.plasma.enable = lib.mkEnableOption "Plasma configuration";
config = lib.mkIf cfg.enable {
# load hm-vars in x-session
xsession.enable = true;
# symlink wallpapers
home.file.".local/share/wallpaper" = {
source = ../../static/wallpaper;
recursive = true;
};
# Use kvantum-theme
# home.sessionVariables = {
# QT_STYLE_OVERRIDE = "kvantum";
# };
# provide kvantum and nord theme
home.packages = [
pkgs.layan-kde
pkgs.kdePackages.qtstyleplugin-kvantum
pkgs.tela-circle-icon-theme
pkgs.nordzy-cursor-theme
];
programs.konsole = {
enable = true;
defaultProfile = "default";
profiles = {
default = {
name = "default";
colorScheme = "Layan";
font = {
name = "Fira Code";
size = 10;
};
};
};
};
# use kvantum theme
qt.enable = false;
qt.style.name = "Layan";
# add nord like gtk theme
gtk = {
enable = false;
cursorTheme = {
package = pkgs.nordzy-cursor-theme;
name = "Nordzy-cursors";
};
theme = {
package = pkgs.nordic;
name = "Nordic";
};
iconTheme = {
package = pkgs.tela-circle-icon-theme;
name = "Tela-circle-nord";
};
};
programs.plasma = {
enable = false;
#
# Some high-level settings:
#
workspace = {
clickItemTo = "select";
lookAndFeel = "com.github.vinceliuice.Layan";
cursor = {
theme = "Nordzy-cursors";
size = 24;
};
iconTheme = "Tela-circle-nord";
wallpaper = "/home/jonas/.local/share/wallpaper/nord.png";
};
hotkeys.commands."launch-konsole" = {
name = "Launch Konsole";
key = "Meta+Return";
command = "konsole";
};
kwin = {
edgeBarrier = 0; # Disables the edge-barriers introduced in plasma 6.1
cornerBarrier = false;
scripts.polonium.enable = false;
};
kscreenlocker = {
lockOnResume = true;
timeout = 10;
};
#
# Some mid-level settings:
#
shortcuts = {
ksmserver = {
"Lock Session" = ["Screensaver" "Meta+Ctrl+Alt+L"];
};
kwin =
{
"Expose" = "Meta+,";
"Switch Window Down" = "Meta+J";
"Switch Window Left" = "Meta+H";
"Switch Window Right" = "Meta+L";
"Switch Window Up" = "Meta+K";
"Window Quick Tile Bottom" = "Meta+Shift+J";
"Window Quick Tile Left" = "Meta+Shift+H";
"Window Quick Tile Right" = "Meta+Shift+L";
"Window Quick Tile Top" = "Meta+Shift+K";
"Kill Window" = "Meta+Alt+Q";
"Window Close" = "Meta+Shift+Q";
}
// (
with lib; let
desktops = map toString (lists.range 1 8);
in
listToAttrs
(map
(i: {
name = "Switch to Desktop ${i}";
value = "Meta+${i}";
})
desktops)
// listToAttrs (map
(i: {
name = "Window to Desktop ${i}";
value = "Meta+Shift+${i}";
})
desktops)
);
};
#
# Some low-level settings:
#
configFile = {
baloofilerc."Basic Settings"."Indexing-Enabled" = false;
kwinrc."org.kde.kdecoration2".ButtonsOnLeft = "SF";
kwinrc.Desktops.Number = {
value = 8;
# Forces kde to not change this value (even through the settings app).
immutable = true;
};
};
};
};
}