.hive/modules/home/plasma.nix

168 lines
4.2 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;
# Use kvantum-theme
home.sessionVariables = {
QT_STYLE_OVERRIDE = "kvantum";
};
# provide kvantum and nord theme
home.packages = [
pkgs.utterly-nord-plasma
pkgs.libsForQt5.qtstyleplugin-kvantum
];
programs.konsole = {
enable = true;
defaultProfile = "default";
profiles = {
default = {
name = "default";
colorScheme = "Utterly-Nord-Konsole";
font = {
name = "Fira Code";
size = 10;
};
};
};
};
# use kvantum theme
qt.enable = true;
qt.style.name = "kvantum";
# add nord like gtk theme
gtk = {
enable = true;
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 = true;
overrideConfig = true;
#
# Some high-level settings:
#
workspace = {
clickItemTo = "select";
lookAndFeel = "Utterly-Nord";
theme = "breeze";
colorScheme = "UtterlyNord";
cursorTheme = "Breeze";
wallpaper = "/home/jonas/.local/share/wallpaper/nord.png";
};
hotkeys.commands."launch-konsole" = {
name = "Launch Konsole";
key = "Meta+Return";
command = "konsole";
};
panels = [
# Windows-like panel at the bottom
{
location = "bottom";
widgets = [
"org.kde.plasma.kickoff"
"org.kde.plasma.pager"
# We can also configure the widgets. For example if you want to pin
# konsole and dolphin to the task-launcher the following widget will
# have that.
{
name = "org.kde.plasma.icontasks";
config = {
General.launchers = [
"applications:org.kde.dolphin.desktop"
"applications:org.kde.konsole.desktop"
];
};
}
"org.kde.plasma.marginsseperator"
"org.kde.plasma.systemtray"
"org.kde.plasma.digitalclock"
];
hiding = null;
}
];
#
# 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".value = false;
"kwinrc"."org.kde.kdecoration2"."ButtonsOnLeft".value = "SF";
"kwinrc"."Desktops"."Number" = {
value = 8;
# Forces kde to not change this value (even through the settings app).
immutable = true;
};
};
};
};
}