nixos-config/home-manager/plasma.nix

144 lines
3.4 KiB
Nix
Raw Normal View History

2024-10-17 15:10:59 +02:00
{ extra, config, ... }:
2024-06-25 12:11:51 +02:00
{
programs.plasma = {
enable = true;
2024-07-27 13:37:52 +02:00
overrideConfig = true;
2024-06-25 12:11:51 +02:00
2024-10-17 15:10:59 +02:00
workspace = {
lookAndFeel = "org.kde.breezedark.desktop";
} // (if config.i3-plasma then {} else {
wallpaper = "${extra.wall}";
});
2024-06-25 12:11:51 +02:00
kscreenlocker = {
2024-08-23 22:07:47 +02:00
appearance.wallpaper = "${extra.wall}";
2024-06-25 12:11:51 +02:00
};
2024-10-17 15:10:59 +02:00
hotkeys.commands = if config.i3-plasma then {} else ({
"launch-terminal" = {
name = "Launch terminal";
key = "Meta+Return";
command = "wezterm";
};
"cpypsk" = {
name = "Launch cpypsk";
key = "Meta+p";
command = "${extra.cpypsk}";
};
} // (if config.mcsr then {
"eye" = {
name = "eye zoom";
key = "Alt+PgUp";
command = "${extra.eyezoom} eye";
};
"default" = {
name = "default zoom";
key = "Alt+PgDown";
command = "${extra.eyezoom} default";
};
"thin" = {
name = "thin zoom";
key = "Alt+End";
command = "${extra.eyezoom} tiktok";
};
"wide" = {
name = "wide zoom";
key = "Alt+Home";
command = "${extra.eyezoom} wide";
};
} else {}));
2024-06-25 12:11:51 +02:00
fonts = {
general = {
family = "SAX2 Nerd Font";
pointSize = 10;
};
};
2024-08-23 22:07:47 +02:00
powerdevil = {
AC.whenLaptopLidClosed = "hibernate";
battery.whenLaptopLidClosed = "hibernate";
lowBattery.whenLaptopLidClosed = "hibernate";
};
2024-06-25 12:11:51 +02:00
panels = [
{
2024-10-17 15:10:59 +02:00
location = if config.i3-plasma then "top" else "bottom";
2024-06-25 12:11:51 +02:00
floating = true;
2024-10-17 15:10:59 +02:00
height = if config.i3-plasma then 36 else 44;
widgets = let
clock = {
2024-10-17 14:44:15 +02:00
digitalClock = {
calendar.firstDayOfWeek = "monday";
time.format = "24h";
2024-06-25 12:11:51 +02:00
};
2024-10-17 15:10:59 +02:00
};
spacer = {
2024-10-17 14:44:15 +02:00
name = "org.kde.plasma.panelspacer";
config = { General.expanding = true; };
2024-10-17 15:10:59 +02:00
};
nolaunchtasks = {
2024-06-25 12:11:51 +02:00
name = "org.kde.plasma.icontasks";
2024-10-17 14:44:15 +02:00
config = { General.launchers = [ ]; };
2024-10-17 15:10:59 +02:00
};
launchtasks = {
name = "org.kde.plasma.icontasks";
config = {
General.launchers = [
"applications:thunderbird.desktop"
"applications:org.wezfurlong.wezterm.desktop"
"applications:firefox.desktop"
"applications:discord.desktop"
];
};
};
kickoff = {
name = "org.kde.plasma.kickoff";
config = {
General.icon = "nix-snowflake-white";
};
};
systray = {
2024-06-25 12:11:51 +02:00
systemTray.items = {
shown = [
"org.kde.plasma.battery"
"org.kde.plasma.bluetooth"
"org.kde.plasma.networkmanagement"
"org.kde.plasma.volume"
];
};
2024-10-17 15:10:59 +02:00
};
in if config.i3-plasma then [
clock
spacer
nolaunchtasks
systray
] else [
kickoff
launchtasks
systray
clock
2024-06-25 12:11:51 +02:00
];
}
];
2024-08-26 15:43:01 +02:00
configFile."kcminputrc" = {
2024-08-25 17:53:55 +02:00
"Mouse"."X11LibInputXAccelProfileFlat" = true;
"Mouse"."XLbInptPointerAcceleration" = 0;
};
2024-10-16 19:22:16 +02:00
2024-10-17 15:10:59 +02:00
configFile."startkderc" = if config.i3-plasma then {
2024-10-16 23:57:18 +02:00
"General"."systemdBoot" = false; # needed to use i3 in place of KWin
2024-10-17 15:10:59 +02:00
} else {};
2024-06-25 12:11:51 +02:00
};
home.packages = [
extra.rc2nix
];
}