plasma-manager: init

This commit is contained in:
2024-02-09 14:59:33 +08:00
parent 4aead6cfc6
commit 6672ea7f4f
8 changed files with 240 additions and 215 deletions

34
flake.lock generated
View File

@@ -844,6 +844,22 @@
"type": "github"
}
},
"fluent-kde": {
"flake": false,
"locked": {
"lastModified": 1685119052,
"narHash": "sha256-jm8ztgoWV8sewCYbFxReiVPjuHY97NslKM1AIoooSiY=",
"owner": "vinceliuice",
"repo": "Fluent-kde",
"rev": "83d5cc2013751aa9eeb944dafa3a3460652690ce",
"type": "github"
},
"original": {
"owner": "vinceliuice",
"repo": "Fluent-kde",
"type": "github"
}
},
"format-all": {
"flake": false,
"locked": {
@@ -1289,6 +1305,22 @@
"type": "github"
}
},
"nixos-wallpaper": {
"flake": false,
"locked": {
"lastModified": 1707468537,
"narHash": "sha256-JcigJOb2yt7Vrdr91ccgYhRucm7zURIZEiaPNkuVhRc=",
"ref": "refs/heads/main",
"rev": "1240affcd31ec8e7fee869590533574011a1e974",
"revCount": 1,
"type": "git",
"url": "ssh://gitea@ssh.git.chn.moe/chn/nixos-wallpaper.git"
},
"original": {
"type": "git",
"url": "ssh://gitea@ssh.git.chn.moe/chn/nixos-wallpaper.git"
}
},
"nixpak": {
"inputs": {
"flake-parts": "flake-parts_4",
@@ -1785,6 +1817,7 @@
"dguibert-nur-packages": "dguibert-nur-packages",
"eigen": "eigen",
"envfs": "envfs",
"fluent-kde": "fluent-kde",
"home-manager": "home-manager",
"impermanence": "impermanence",
"lmix": "lmix",
@@ -1799,6 +1832,7 @@
"nixd": "nixd",
"nixos-cn": "nixos-cn",
"nixos-hardware": "nixos-hardware",
"nixos-wallpaper": "nixos-wallpaper",
"nixpak": "nixpak",
"nixpkgs": "nixpkgs_2",
"nixpkgs-2305": "nixpkgs-2305",

View File

@@ -58,6 +58,8 @@
tgbot-cpp = { url = "github:reo7sp/tgbot-cpp"; flake = false; };
v-sim = { url = "gitlab:l_sim/v_sim"; flake = false; };
win11os-kde = { url = "github:yeyushengfan258/Win11OS-kde"; flake = false; };
fluent-kde = { url = "github:vinceliuice/Fluent-kde"; flake = false; };
nixos-wallpaper = { url = "git+ssh://gitea@ssh.git.chn.moe/chn/nixos-wallpaper.git"; flake = false; };
};
outputs = inputs:

View File

@@ -46,4 +46,5 @@
torchdata = python3Packages.callPackage ./torchdata {};
torchtext = python3Packages.callPackage ./torchtext { inherit torchdata; };
win11os-kde = callPackage ./win11os-kde { src = topInputs.win11os-kde; };
fluent-kde = callPackage ./fluent-kde { src = topInputs.fluent-kde; };
}

View File

@@ -0,0 +1,22 @@
{ lib, stdenv, src }: stdenv.mkDerivation
{
name = "fluent-kde";
inherit src;
installPhase =
''
mkdir -p $out/share/aurorae/themes
cp -r $src/aurorae/* $out/share/aurorae/themes
mkdir -p $out/share/color-schemes
cp -r $src/color-schemes/*.colors $out/share/color-schemes
mkdir -p $out/share/Kvantum
cp -r $src/Kvantum/Fluent* $out/share/Kvantum
mkdir -p $out/share/plasma/desktoptheme
cp -r $src/plasma/desktoptheme/* $out/share/plasma/desktoptheme
mkdir -p $out/share/plasma/layout-templates
cp -r $src/plasma/layout-templates/* $out/share/plasma/layout-templates
mkdir -p $out/share/plasma/look-and-feel
cp -r $src/plasma/look-and-feel/com.github.vinceliuice.Fluent* $out/share/plasma/look-and-feel
mkdir -p $out/share/wallpapers
cp -r $src/wallpaper/* $out/share/wallpapers
'';
}

View File

@@ -30,16 +30,19 @@ inputs:
# media
mpv nomacs
# themes
tela-circle-icon-theme localPackages.win11os-kde
tela-circle-icon-theme localPackages.win11os-kde localPackages.fluent-kde
];
users.sharedModules =
[{
config.home.file.".config/baloofilerc".text =
''
[Basic Settings]
Indexing-Enabled=false
'';
}];
[(homeInputs: {
config.home.file = mkIf (!homeInputs.config.programs.plasma.enable)
{
".config/baloofilerc".text =
''
[Basic Settings]
Indexing-Enabled=false
'';
};
})];
};
programs =
{

View File

@@ -1,6 +1,6 @@
inputs:
{
# imports = inputs.localLib.mkModules [ ./plasma.nix ];
imports = inputs.localLib.mkModules [ ./plasma.nix ];
config =
let
inherit (inputs.lib) mkIf;

View File

@@ -1,111 +1,161 @@
inputs:
{
config.home-manager.users.chn.config.programs.plasma =
{
enable = true;
shortcuts = inputs.lib.mkMerge
[
# firefox
{ "firefox.desktop"._launch = "Meta+B"; }
# crow translate
{ "io.crow_translate.CrowTranslate.desktop".TranslateSelectedText = "Ctrl+Alt+E"; }
# display
config.home-manager.users.chn.config.programs.plasma = inputs.lib.mkMerge
[
# TODO: autostart, panel, discard user changed settings
# general
{
enable = inputs.config.nixos.system.gui.enable;
configFile.plasma-localerc = { Formats.LANG = "en_US.UTF-8"; Translations.LANGUAGE = "zh_CN"; };
}
# theme, wallpaper, etc.
rec {
workspace =
{
kded5.display = [ "Display" "Meta+P" ];
kwin = { view_actual_size = "Meta+0"; view_zoom_in = [ "Meta++" "Meta+=" ]; view_zoom_out = "Meta+-"; };
org_kde_powerdevil =
theme = "Fluent-round-light";
colorScheme = "FluentLight";
cursorTheme = "Breeze_Snow";
lookAndFeel = "com.github.vinceliuice.Fluent-round-light";
iconTheme = "breeze";
wallpaper = "${inputs.topInputs.nixos-wallpaper}/pixiv-96734339-x2.png";
};
configFile =
{
kdeglobals.KDE.widgetStyle = "kvantum";
"Kvantum/kvantum.kvconfig".General.theme = "Fluent-round";
kwinrc =
{
"Decrease Screen Brightness" = "Monitor Brightness Down";
"Increase Screen Brightness" = "Monitor Brightness Up";
Effect-blur.BlurStrength = 10;
Effect-kwin4_effect_translucency.MoveResize = 75;
Effect-wobblywindows = { AdvancedMode = true; Drag = 85; Stiffness = 10; WobblynessLevel = 1; };
Plugins =
{
blurEnabled = true;
kwin4_effect_dimscreenEnabled = true;
kwin4_effect_translucencyEnabled = true;
padding = 4;
wobblywindowsEnabled = true;
};
};
}
# volume
{
kmix =
kscreenlockerrc."Greeter.Wallpaper.org.kde.image.General" = rec
{ Image = builtins.toString workspace.wallpaper; PreviewImage = Image; };
};
}
# shortcuts
{
spectacle.shortcuts.captureRectangularRegion = "Print";
shortcuts = inputs.lib.mkMerge
[
# firefox
{ "firefox.desktop"._launch = "Meta+B"; }
# crow translate
{ "io.crow_translate.CrowTranslate.desktop".TranslateSelectedText = "Ctrl+Alt+E"; }
# display
{
decrease_volume = "Volume Down";
increase_volume = "Volume Up";
mic_mute = [ "Meta+Volume Mute" ];
mute = "Volume Mute";
};
}
# session
{
ksmserver = { "Lock Session" = [ "Meta+L" "Screensaver" ]; "Log Out" = "Ctrl+Alt+Del"; };
org_kde_powerdevil."Turn Off Screen" = "Meta+Ctrl+L";
}
# window
{
kwin =
kded5.display = [ "Display" "Meta+P" ];
kwin = { view_actual_size = "Meta+0"; view_zoom_in = [ "Meta++" "Meta+=" ]; view_zoom_out = "Meta+-"; };
org_kde_powerdevil =
{
"Decrease Screen Brightness" = "Monitor Brightness Down";
"Increase Screen Brightness" = "Monitor Brightness Up";
};
}
# volume
{
Overview = "Meta+Tab";
"Show Desktop" = "Meta+D";
"Suspend Compositing" = "Alt+Shift+F12";
"Walk Through Windows" = "Alt+Tab";
"Walk Through Windows (Reverse)" = "Alt+Shift+Backtab";
"Window Above Other Windows" = "Meta+Shift+PgUp";
"Window Below Other Windows" = "Meta+Shift+PgDown";
"Window Close" = "Alt+F4";
"Window Maximize" = "Meta+PgUp";
"Window Minimize" = "Meta+PgDown";
"Window Operations Menu" = "Alt+F3";
"Window Quick Tile Bottom" = "Meta+Down";
"Window Quick Tile Left" = "Meta+Left";
"Window Quick Tile Right" = "Meta+Right";
"Window Quick Tile Top" = "Meta+Up";
};
}
# virtual desktop
{
kwin =
kmix =
{
decrease_volume = "Volume Down";
increase_volume = "Volume Up";
mic_mute = [ "Meta+Volume Mute" ];
mute = "Volume Mute";
};
}
# session
{
"Switch One Desktop Down" = "Meta+Ctrl+Down";
"Switch One Desktop Up" = "Meta+Ctrl+Up";
"Switch One Desktop to the Left" = "Meta+Ctrl+Left";
"Switch One Desktop to the Right" = "Meta+Ctrl+Right";
"Window One Desktop Down" = "Meta+Ctrl+Shift+Down";
"Window One Desktop Up" = "Meta+Ctrl+Shift+Up";
"Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left";
"Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right";
};
}
# media
{
mediacontrol =
ksmserver = { "Lock Session" = [ "Meta+L" "Screensaver" ]; "Log Out" = "Ctrl+Alt+Del"; };
org_kde_powerdevil."Turn Off Screen" = "Meta+Ctrl+L";
}
# window
{
nextmedia = "Media Next";
pausemedia = "Media Pause";
playpausemedia = [ "Pause" "Media Play" ];
previousmedia = "Media Previous";
stopmedia = "Media Stop";
};
}
# dolphin
{ "org.kde.dolphin.desktop"._launch = "Meta+E"; }
# konsole
{ "org.kde.konsole.desktop"._launch = "Ctrl+Alt+T"; }
# krunner
{ "org.kde.krunner.desktop"._launch = "Alt+Space"; }
# screenshot
{
"org.kde.spectacle.desktop" =
kwin =
{
Overview = "Meta+Tab";
"Show Desktop" = "Meta+D";
"Suspend Compositing" = "Alt+Shift+F12";
"Walk Through Windows" = "Alt+Tab";
"Walk Through Windows (Reverse)" = "Alt+Shift+Backtab";
"Window Above Other Windows" = "Meta+Shift+PgUp";
"Window Below Other Windows" = "Meta+Shift+PgDown";
"Window Close" = "Alt+F4";
"Window Maximize" = "Meta+PgUp";
"Window Minimize" = "Meta+PgDown";
"Window Operations Menu" = "Alt+F3";
"Window Quick Tile Bottom" = "Meta+Down";
"Window Quick Tile Left" = "Meta+Left";
"Window Quick Tile Right" = "Meta+Right";
"Window Quick Tile Top" = "Meta+Up";
};
}
# virtual desktop
{
OpenWithoutScreenshot = "Ctrl+Print";
RectangularRegionScreenShot = "Print";
kwin =
{
"Switch One Desktop Down" = "Meta+Ctrl+Down";
"Switch One Desktop Up" = "Meta+Ctrl+Up";
"Switch One Desktop to the Left" = "Meta+Ctrl+Left";
"Switch One Desktop to the Right" = "Meta+Ctrl+Right";
"Window One Desktop Down" = "Meta+Ctrl+Shift+Down";
"Window One Desktop Up" = "Meta+Ctrl+Shift+Up";
"Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left";
"Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right";
};
}
# media
{
mediacontrol =
{
nextmedia = "Media Next";
pausemedia = "Media Pause";
playpausemedia = [ "Pause" "Media Play" ];
previousmedia = "Media Previous";
stopmedia = "Media Stop";
};
}
# dolphin
{ "org.kde.dolphin.desktop"._launch = "Meta+E"; }
# konsole
{ "org.kde.konsole.desktop"._launch = "Ctrl+Alt+T"; }
# krunner
{ "org.kde.krunner.desktop"._launch = "Alt+Space"; }
# settings
{ "systemsettings.desktop"._launch = "Meta+I"; }
# yakuake
{ yakuake.toggle-window-state = "Meta+Space"; }
# virt-manager
{ "virt-manager.desktop"._launch = "Meta+V"; }
];
}
# kwin
{
kwin.titlebarButtons.right = [ "help" "keep-below-windows" "keep-above-windows" "minimize" "maximize" "close" ];
windows.allowWindowsToRememberPositions = false;
configFile =
{
plasmanotifyrc.Notifications.PopupPosition = "BottomRight";
kwinrc =
{
Tiling.padding = 4;
Wayland."InputMethod[$e]" = "/run/current-system/sw/share/applications/org.fcitx.Fcitx5.desktop";
Windows.RollOverDesktops = true;
Compositing = { AllowTearing = false; WindowsBlockCompositing = false; };
};
}
# settings
{ "systemsettings.desktop"._launch = "Meta+I"; }
# yakuake
{ yakuake.toggle-window-state = "Meta+Space"; }
# virt-manager
{ "virt-manager.desktop"._launch = "Meta+V"; }
];
configFile = inputs.lib.mkMerge
[
# baloo
# "baloofilerc"."Basic Settings"."Indexing-Enabled" = false;
# dolphin
};
}
# baloo
{ configFile.baloofilerc."Basic Settings".Indexing-Enabled = false; }
# dolphin and file chooser
{
configFile =
{
dolphinrc =
{
@@ -142,110 +192,26 @@ inputs:
"audiothumbnail"
];
};
}
# theme
{
kcminputrc.Mouse.cursorTheme = "breeze_cursors";
}
]
{
"kcminputrc"."Mouse"."cursorTheme" = "breeze_cursors";
"kdeglobals"."KDE"."widgetStyle" = "kvantum";
"kdeglobals"."KFileDialog Settings"."Allow Expansion" = true;
"kdeglobals"."KFileDialog Settings"."Automatically select filename extension" = true;
"kdeglobals"."KFileDialog Settings"."Show Bookmarks" = true;
"kdeglobals"."KFileDialog Settings"."Show Full Path" = true;
"kdeglobals"."KFileDialog Settings"."Show Inline Previews" = true;
"kdeglobals"."KFileDialog Settings"."Show Preview" = true;
"kdeglobals"."KFileDialog Settings"."Show Speedbar" = true;
"kdeglobals"."KFileDialog Settings"."Show hidden files" = true;
"kdeglobals"."KFileDialog Settings"."Sort by" = "Name";
"kdeglobals"."KFileDialog Settings"."Sort directories first" = true;
"kdeglobals"."KFileDialog Settings"."Sort hidden files last" = true;
"kdeglobals"."KFileDialog Settings"."View Style" = "DetailTree";
"krunnerrc"."General"."FreeFloating" = true;
"krunnerrc"."Plugins"."baloosearchEnabled" = false;
"kscreenlockerrc"."Daemon"."Autolock" = false;
# https://www.fanbox.cc/@peas0125/posts/5405326
"kscreenlockerrc"."Greeter.Wallpaper.org.kde.image.General"."Image" = ./wallpaper/fanbox-5405326-x4-chop.png;
"kscreenlockerrc"."Greeter.Wallpaper.org.kde.image.General"."PreviewImage" =
./wallpaper/fanbox-5405326-x4-chop.png;
"kwinrc"."Effect-blur"."BlurStrength" = 10;
"kwinrc"."Effect-kwin4_effect_translucency"."MoveResize" = 75;
"kwinrc"."Effect-wobblywindows"."AdvancedMode" = true;
"kwinrc"."Effect-wobblywindows"."Drag" = 85;
"kwinrc"."Effect-wobblywindows"."Stiffness" = 10;
"kwinrc"."Effect-wobblywindows"."WobblynessLevel" = 1;
"kwinrc"."Plugins"."blurEnabled" = true;
"kwinrc"."Plugins"."contrastEnabled" = false;
"kwinrc"."Plugins"."kwin4_effect_dimscreenEnabled" = true;
"kwinrc"."Plugins"."kwin4_effect_translucencyEnabled" = true;
"kwinrc"."Plugins"."padding" = 4;
"kwinrc"."Plugins"."wobblywindowsEnabled" = true;
"kwinrc"."SubSession: 3435a388-a8b3-4d1d-9794-b8c30162ce16"."active" = "-1";
"kwinrc"."SubSession: 3435a388-a8b3-4d1d-9794-b8c30162ce16"."count" = 0;
"kwinrc"."SubSession: 6a473a77-85df-4e49-8c74-bdb06d1f0efd"."active" = "-1";
"kwinrc"."SubSession: 6a473a77-85df-4e49-8c74-bdb06d1f0efd"."count" = 0;
"kwinrc"."Tiling"."padding" = 4;
"kwinrc"."Wayland"."InputMethod[$e]" = "/run/current-system/sw/share/applications/org.fcitx.Fcitx5.desktop";
"kwinrc"."Windows"."RollOverDesktops" = true;
"kwinrc"."Xwayland"."Scale" = 1;
"kwinrc"."Xwayland"."XwaylandEavesdrops" = "Combinations";
"kwinrc"."org.kde.kdecoration2"."ButtonsOnLeft" = "M";
"kwinrc"."org.kde.kdecoration2"."ButtonsOnRight" = "BFIAX";
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."Description" = "org.kde.kruler ";
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."above" = true;
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."aboverule" = 2;
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."skipswitcher" = true;
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."skipswitcherrule" = 2;
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."wmclass" = "org.kde.kruler";
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."wmclassmatch" = 1;
"kwinrulesrc"."1"."Description" = "element ";
"kwinrulesrc"."1"."activity" = "00000000-0000-0000-0000-000000000000";
"kwinrulesrc"."1"."activityrule" = 2;
"kwinrulesrc"."1"."wmclass" = "element";
"kwinrulesrc"."1"."wmclassmatch" = 1;
"kwinrulesrc"."2"."Description" = "org.telegram.desktop ";
"kwinrulesrc"."2"."activity" = "00000000-0000-0000-0000-000000000000";
"kwinrulesrc"."2"."activityrule" = 2;
"kwinrulesrc"."2"."wmclass" = "org.telegram.desktop";
"kwinrulesrc"."2"."wmclassmatch" = 1;
"kwinrulesrc"."3"."Description" = "org.kde.kruler ";
"kwinrulesrc"."3"."above" = true;
"kwinrulesrc"."3"."aboverule" = 2;
"kwinrulesrc"."3"."skipswitcher" = true;
"kwinrulesrc"."3"."skipswitcherrule" = 2;
"kwinrulesrc"."3"."wmclass" = "org.kde.kruler";
"kwinrulesrc"."3"."wmclassmatch" = 1;
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."Description" = "element ";
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."activity" = "00000000-0000-0000-0000-000000000000";
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."activityrule" = 2;
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."wmclass" = "element";
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."wmclassmatch" = 1;
"kwinrulesrc"."General"."count" = 3;
"kwinrulesrc"."General"."rules" = "1,2,3";
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."Description" = "org.telegram.desktop ";
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."activity" = "00000000-0000-0000-0000-000000000000";
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."activityrule" = 2;
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."wmclass" = "org.telegram.desktop";
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."wmclassmatch" = 1;
"kxkbrc"."Layout"."DisplayNames" = "";
"kxkbrc"."Layout"."LayoutList" = "us";
"kxkbrc"."Layout"."Use" = true;
"kxkbrc"."Layout"."VariantList" = "";
"plasma-localerc"."Formats"."LANG" = "en_US.UTF-8";
"plasma-localerc"."Translations"."LANGUAGE" = "zh_CN";
"plasmanotifyrc"."Notifications"."PopupPosition" = "BottomRight";
"plasmarc"."Wallpapers"."usersWallpapers" = "/home/chn/Desktop/./twin_96734339_x2.png,/home/chn/Desktop/./E_yCTfDUUAgykjX_x8.jpeg,/home/chn/Desktop/./102692178_p0_[L1][x2.00].png,/home/chn/Desktop/./111392869_p0.png,/home/chn/Desktop/./HlszomyrfyxKLtpkVixEtikq_x4_chop.png";
};
};
kdeglobals."KFileDialog Settings" =
{
"Allow Expansion" = true;
"Automatically select filename extension" = true;
"Show Bookmarks" = true;
"Show Full Path" = true;
"Show Inline Previews" = true;
"Show Preview" = true;
"Show Speedbar" = true;
"Show hidden files" = true;
"Sort by" = "Name";
"Sort directories first" = true;
"Sort hidden files last" = true;
"View Style" = "DetailTree";
};
};
}
# krunner
{ configFile.krunnerrc = { General.FreeFloating = true; Plugins.baloosearchEnabled = false; }; }
# lock screen
{ configFile.kscreenlockerrc.Daemon.Autolock = false; }
];
}