This commit is contained in:
2026-02-26 13:39:32 +01:00
11 changed files with 236 additions and 33 deletions

View File

@@ -177,6 +177,8 @@
};
# nix
nil_ls.enable = true;
# other
marksman.enable = true;
};
keymaps = {
lspBuf = {

View File

@@ -1,31 +1,44 @@
{ ... }:
{
xdg.desktopEntries = {
x = {
name = "X";
genericName = "Social Media Client";
comment = "Open X (twitter)";
exec = "uwsm app -- chromium --app=https://x.com";
icon = "twitter";
let
mkWebApp =
{
name,
url,
icon,
wmClass,
}:
{
inherit name icon;
genericName = "Web app";
comment = "Open ${name}";
exec = "uwsm app -- brave --app=https://${url}";
terminal = false;
categories = [
"Network"
"WebBrowser"
"X-Social"
];
settings = {
StartupWMClass = wmClass;
};
};
in
{
xdg.desktopEntries = {
x = mkWebApp {
name = "X";
url = "x.com";
icon = "twitter";
wmClass = "brave-x.com__-Default";
};
proton-mail = {
name = "Proton mail";
genericName = "Proton mail";
comment = "Open Proton Mail";
exec = "uwsm app -- chromium --app=https://mail.proton.me/u/0/inbox.com";
terminal = false;
categories = [ "Email" ];
settings = {
StartupWMClass = "proton-mail.com";
};
proton-mail = mkWebApp {
name = "Proton-mail";
url = "mail.proton.me/u/0/inbox.com";
icon = "proton-mail";
wmClass = "brave-mail.proton.me__u_0_inbox.com-Default";
};
};
}

View File

@@ -35,13 +35,12 @@
border-color=#FF6347
[urgency=critical]
on-notify =
${
if isNixOS then
"exec ${pkgs.pulseaudio}/bin/paplay ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/dialog-information.oga"
else
"exec paplay /usr/share/sounds/freedesktop/stereo/dialog-information.oga"
};
on-notify=${
if isNixOS then
"exec ${pkgs.pulseaudio}/bin/paplay ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/dialog-information.oga"
else
"exec paplay /usr/share/sounds/freedesktop/stereo/dialog-information.oga"
}
border-color=#FF0000
[mode=do-not-disturb]

View File

@@ -0,0 +1,21 @@
{
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "obsidian-catppuccin";
version = "main";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "obsidian";
rev = "main";
hash = "sha256-sN5k263geOtJ1mOCQGM8UdmA/71OhBI5NRwGxJwd80E=";
};
installPhase = ''
mkdir -p $out
cp theme.css manifest.json $out/
'';
}

65
modules/gui/obsidian.nix Normal file
View File

@@ -0,0 +1,65 @@
{
isNixOS,
lib,
pkgs,
userConfig,
...
}:
{
programs.obsidian = {
enable = true;
package = lib.mkIf (!isNixOS) null;
defaultSettings = {
app = {
vimMode = true;
alwaysUpdateLinks = true;
attachmentFolderPath = "media";
newLinkFormat = "relative";
newFileLocation = "current";
useMarkdownLinks = true;
showUnsupportedFiles = true;
pdfExportSettings = {
pageSize = "A4";
landscape = false;
margin = "0";
downscalePercent = 100;
};
};
themes = [
(pkgs.callPackage ./obsidian-catppuccin.nix { })
];
corePlugins = [
"file-explorer"
"global-search"
"switcher"
"graph"
"backlink"
"canvas"
"outgoing-link"
"tag-pane"
"page-preview"
"note-composer"
"command-palette"
"editor-status"
"bookmarks"
"outline"
"word-count"
"bases"
];
};
vaults = {
"Notatki-szkolne" = {
target = "${userConfig.pathConfig.obsidian}/notatki-szkolne";
};
"Studia" = {
target = "${userConfig.pathConfig.obsidian}/ZUT-notatki";
};
};
};
}

View File

@@ -199,7 +199,7 @@ in
"match:class ^(zen)$, workspace 2"
"match:class ^(com.github.IsmaelMartinez.teams_for_linux)$, workspace 2"
"match:class ^(FreeTube)$, workspace 2"
"match:class ^(chrome-x.com__-Default)$, workspace 2"
"match:class ^(brave-x.com__-Default)$, workspace 2"
"match:class ^(chrome-www.inoreader.com__all_articles-Default)$, workspace 2"
"match:class ^(chrome-mail.proton.me__u_0_inbox.com-Default)$, workspace 2"
"match:class ^(chrome-app.tuta.com__-Default)$, workspace 2"
@@ -287,7 +287,7 @@ in
"$mainMod Control_L, m, exec, [workspace 9] uwsm app -- $music_player"
"$mainMod Control_L, f, exec, uwsm app -- freetube"
"$mainMod Control_L, f, focuswindow, class:^(freetube)$"
"$mainMod Control_L, x, exec, uwsm app -- ~/.local/share/applications/x.desktop"
"$mainMod Control_L, x, exec, uwsm app -- ~/.nix-profile/share/applications/x.desktop"
"$mainMod Control_L, x, focuswindow, class:^(chrome-x.com__-Default)$"
"$mainMod CONTROL_L L_SHIFT, B, exec, killall ashell && uwsm app -- ashell"
];