dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit 0afc627656f4ef83c3104bb140de98392eb8c0bb parent f32fbc0ef2284def6b4c9ca706b6821b546def63 Author: maydayv7 <maydayv7@gmail.com> Date: Sun, 1 Dec 2024 01:45:00 +0530 feat: Add Logseq Configuration Also: + Fix Hyprland panel and workflow + Refactor `apps/office` and split out `media`
Diffstat:
24 files changed, 258 insertions(+), 38 deletions(-)
diff --git a/README.md b/README.md @@ -447,6 +447,8 @@ The [`home-manager`](https://github.com/nix-community/home-manager) module is us - ULauncher [Arc Theme](https://github.com/tjquillan/Arc-Dark-ULauncher): An Arc Dark Theme for ULauncher - ULauncher [Elementary Theme](https://github.com/heidefinnischen/ULauncher-elementary): ULauncher Themes for Elementary OS - [Catppuccin](https://github.com/catppuccin) Theme: A community-driven Pastel Theme consisting of 4 soothing warm Flavors with 26 eye-candy Colors each +- Logseq [Bonofix Theme][https://github.com/Sansui233/logseq-bonofix-theme]: A clean Logseq theme with focus on long-time writing experience +- Logseg [Nord Theme](https://github.com/Bad3r/Logseq-Nord-Theme): Logseq in an arctic, north-bluish color palette ### Important Links @@ -785,15 +787,18 @@ You can navigate to the `README`s present in the various directories to know mor <summary><b>Known Limitations</b></summary> - Home Configuration isn't be decoupled from System -- [Wine](./packages/wine) Applications have to be manually updated -### TO FIX +### Manual Intervention -- GNOME [Pano](https://github.com/oae/gnome-shell-pano) needs to be manually updated till upstream stabilises +- Online accounts have to be manually signed into +- [Wine](./packages/wine) Applications have to be manually updated +- Plugins for Discord, ULauncher have to be manually updated +- Logseq Plugins have to be manually installed +- GNOME [Pano](https://github.com/oae/gnome-shell-pano) has to be manually updated until upstream stabilises </details> -> Last Updated: **November** 2024 +> Last Updated: **December** 2024 If you like this project, consider leaving a [star](https://github.com/maydayv7/dotfiles) diff --git a/devices/valkyrie/default.nix b/devices/valkyrie/default.nix @@ -34,6 +34,8 @@ "discord" "firefox" "git" + "media" + "notes" "office" "spotify" "vscode" diff --git a/files/flake.nix b/files/flake.nix @@ -102,6 +102,12 @@ # Pictures images.profile = ./images/Profile.png; + # Logseq Notes + logseq = { + settings = ./logseq/settings; + prefs = readFile ./logseq/preferences.json; + }; + # Configuration Mutability mutability = rec { src = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375"; diff --git a/files/hyprland/waybar.css b/files/hyprland/waybar.css @@ -31,6 +31,7 @@ window#waybar { .modules-left #workspaces button { border: 2px solid @base00; + padding: 4px 6px; } .modules-left #workspaces button.active { @@ -140,7 +141,11 @@ window#waybar { #taskbar, #user, #window, -#wireplumber, +#wireplumber { + padding: 3px 5px; + margin: 1px; +} + #workspaces { - padding: 3px 5px 3px 5px; + margin: 0 3px; } diff --git a/files/logseq/preferences.json b/files/logseq/preferences.json @@ -0,0 +1,22 @@ +{ + "theme": null, + "themes": { + "mode": "dark", + "light": null, + "dark": { + "name": "Default Dark Theme", + "url": null, + "description": "Logseq default dark theme.", + "mode": "dark", + "selected": true, + "group-first": true, + "group-desc": "dark themes" + } + }, + "externals": [], + "pinnedToolbarItems": [ + "logseq-git:git", + "logseq-tocgen:open-toc", + "logseq-journals-calendar:open-calendar" + ] +} diff --git a/files/logseq/settings/logseq-bullet-threading.json b/files/logseq/settings/logseq-bullet-threading.json @@ -0,0 +1,6 @@ +{ + "disabled": false, + "color": "", + "customColor": false, + "width": "2px" +} diff --git a/files/logseq/settings/logseq-git.json b/files/logseq/settings/logseq-git.json @@ -0,0 +1,9 @@ +{ + "disabled": false, + "autoCheckSynced": true, + "autoPush": false, + "checkWhenDBChanged": true, + "customCommitMessage": "feat: Notes", + "typeCommitMessage": "Custom Message With Date", + "buttons": ["Check Status", "Show Log", "Pull Rebase", "Commit & Push"] +} diff --git a/files/logseq/settings/logseq-journals-calendar.json b/files/logseq/settings/logseq-journals-calendar.json @@ -0,0 +1,10 @@ +{ + "disabled": false, + "backgroundColorOfContainerDark": "#@bg", + "backgroundColorOfContainerLight": "#@bg", + "firstDayOfWeek": 1, + "hotkey": null, + "keepOpenOnSelect": false, + "showTodayBtn": false, + "showWeekNumbers": true +} diff --git a/files/logseq/settings/logseq-move-block.json b/files/logseq/settings/logseq-move-block.json @@ -0,0 +1,7 @@ +{ + "disabled": false, + "settingsVersion": "v1", + "keyBindings": { + "moveBlock": "mod+shift+m" + } +} diff --git a/files/logseq/settings/logseq-pdf-export-plugin.json b/files/logseq/settings/logseq-pdf-export-plugin.json @@ -0,0 +1,14 @@ +{ + "disabled": false, + "blockExportHandling": "Keep title as heading of block", + "retainedOptions": "", + "template1CSS": "", + "template1Choice": "Bullets for non top level elements", + "template1Options": ["Inherit logseq CSS"], + "template2CSS": "", + "template2Choice": "Bullets througout the document", + "template2Options": ["Inherit logseq CSS"], + "template3CSS": "", + "template3Choice": "", + "template3Options": ["Inherit logseq CSS"] +} diff --git a/files/logseq/settings/logseq-tabs.json b/files/logseq/settings/logseq-tabs.json @@ -0,0 +1,11 @@ +{ + "disabled": false, + "tabs:close-button-left": false, + "tabs:close": "mod+shift+w", + "tabs:hide-close-all-button": false, + "tabs:inherit-custom-css": true, + "tabs:select-next": "ctrl+tab", + "tabs:select-prev": "ctrl+shift+tab", + "tabs:show-single-tab": true, + "tabs:toggle-pin": "" +} diff --git a/files/logseq/settings/logseq-tocgen.json b/files/logseq/settings/logseq-tocgen.json @@ -0,0 +1,13 @@ +{ + "disabled": false, + "defaultExpansionLevel": 1, + "defaultHeadingType": "h", + "defaultLevels": 6, + "hideBackTop": false, + "hideGoDown": false, + "maxScrollTryCount": 20, + "noPageJump": false, + "openShortcut": "", + "pageScrollBehavior": "top", + "showTags": false +} diff --git a/files/vscode/keybindings.json b/files/vscode/keybindings.json @@ -10,5 +10,14 @@ { "key": "alt+t", "command": "workbench.action.terminal.focus" + }, + { + "key": "ctrl+shift+t", + "command": "workbench.action.createTerminalEditor" + }, + { + "key": "ctrl+'", + "command": "editor.action.addCommentLine", + "when": "editorTextFocus && !editorReadonly" } ] diff --git a/files/vscode/settings.json b/files/vscode/settings.json @@ -2,6 +2,7 @@ "better-comments.highlightPlainText": true, "editor.cursorSmoothCaretAnimation": "on", "editor.cursorStyle": "line-thin", + "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, "editor.smoothScrolling": true, "editor.suggest.preview": true, @@ -34,6 +35,34 @@ "terminal.integrated.cursorStyle": "line", "terminal.integrated.enableVisualBell": true, "terminal.integrated.tabs.separator": " / ", + "todohighlight.isCaseSensitive": true, + "todohighlight.keywords": [ + { + "text": "TODO", + "color": "#333", + "backgroundColor": "#2ecc71" + }, + { + "text": "FIXME", + "color": "#333", + "backgroundColor": "#e67e22" + }, + { + "text": "BUG", + "color": "#333", + "backgroundColor": "#e74c3c" + }, + { + "text": "HACK", + "color": "#333", + "backgroundColor": "#f1c40f" + }, + { + "text": "WONTFIX", + "color": "#333", + "backgroundColor": "#3498db" + } + ], "update.mode": "none", "window.autoDetectColorScheme": false, "window.closeWhenEmpty": true, diff --git a/modules/apps/media.nix b/modules/apps/media.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + ... +}: let + enable = builtins.elem "media" config.apps.list; +in { + ## Media Configuration ## + config = lib.mkIf enable { + environment.systemPackages = with pkgs; [ + pitivi + pwvucontrol + qpwgraph + ]; + + user = { + persist = { + files = [".config/rncbc.org/qpwgraph"]; + directories = [".config/pitivi"]; + }; + + # Audio Effects + homeConfig.services.easyeffects.enable = true; + }; + }; +} diff --git a/modules/apps/notes.nix b/modules/apps/notes.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + util, + pkgs, + files, + ... +}: +with files.logseq; let + enable = builtins.elem "notes" config.apps.list; +in { + ## Logseq Configuration ## + config = lib.mkIf enable { + environment.systemPackages = [pkgs.logseq]; + + user = { + persist.directories = [".logseq" ".config/Logseq"]; + homeConfig.home.file = + { + ".config/logseq/configs.edn".text = ''{:window/native-titlebar? true}''; + ".logseq/preferences.json".text = prefs; + } + // util.map.folder { + directory = settings; + path = ".logseq/settings"; + extension = ".json"; + apply = text: {inherit text;}; + replace = { + placeholders = ["@bg"]; + values = [config.lib.stylix.colors.base00]; + }; + }; + }; + }; +} diff --git a/modules/apps/office.nix b/modules/apps/office.nix @@ -39,7 +39,6 @@ in { gimp handbrake inkscape - pitivi xournalpp # Internet @@ -51,10 +50,6 @@ in { whatsapp-for-linux zoom-us - # Sound - pwvucontrol - qpwgraph - # Utilities hunspell hunspellDicts.en_US-large @@ -72,7 +67,6 @@ in { # Persisted Files persist.files = [ ".config/gscan2pdfrc" - ".config/rncbc.org/qpwgraph" ".config/zoomus.conf" ]; @@ -87,7 +81,6 @@ in { ".config/libreoffice" ".config/obs-studio" ".config/onlyoffice" - ".config/pitivi" ".config/whatsapp-for-linux" ".local/share/data" ".local/share/onlyoffice" @@ -98,22 +91,17 @@ in { ".cache/zoom" ]; - homeConfig = { - # Utilities - services.easyeffects.enable = true; - - home.file = { - # Document Templates - "Templates" = { - source = files.templates; - recursive = true; - }; + homeConfig.home.file = { + # Document Templates + "Templates" = { + source = files.templates; + recursive = true; + }; - # Font Rendering - ".local/share/fonts" = { - source = "${pkgs.custom.fonts}/share/fonts"; - recursive = true; - }; + # Font Rendering + ".local/share/fonts" = { + source = "${pkgs.custom.fonts}/share/fonts"; + recursive = true; }; }; }; diff --git a/modules/apps/vscode.nix b/modules/apps/vscode.nix @@ -26,7 +26,9 @@ in { ]; # Environment - xdg.mimeApps.defaultApplications = util.build.mime files.xdg.mime {text = ["code.desktop"];}; + xdg.mimeApps.defaultApplications = + util.build.mime files.xdg.mime {text = ["code.desktop"];}; + programs.vscode = { enable = true; package = pkgs.vscode; @@ -55,12 +57,15 @@ in { ms-python.python ms-vscode-remote.remote-ssh ms-vscode.cpptools + naumovs.color-highlight redhat.java - redhat.vscode-yaml + ritwickdey.liveserver yzhang.markdown-all-in-one ] ++ (with pkgs.code.vscode-marketplace; [ + kisstkondoros.vscode-gutter-preview vscode-org-mode.org-mode + wayou.vscode-todo-highlight ]); }; }; diff --git a/modules/gui/desktop/gnome/default.nix b/modules/gui/desktop/gnome/default.nix @@ -218,6 +218,11 @@ in { # Discord DNOME Theme ".config/BetterDiscord/data/stable/custom.css" = mkIf (exists "discord") {text = ''@import url("https://raw.githack.com/GeopJr/DNOME/dist/DNOME.css");'';}; + + # Logseq Bonofix Theme + ".logseq/config.edn" = + mkIf (exists "notes") + {text = ''{:custom-css-url "@import url('https://cdn.jsdelivr.net/gh/sansui233/logseq-bonofix-theme/custom.css');"}'';}; }; # Code Editor diff --git a/modules/gui/desktop/hyprland/apps/bar.nix b/modules/gui/desktop/hyprland/apps/bar.nix @@ -103,7 +103,7 @@ in rec { "hyprland/workspaces" = { all-outputs = true; show-special = true; - format = "{icon}"; + format = "<small>{name}</small> {icon}"; on-scroll-up = "hyprctl dispatch workspace m+1"; on-scroll-down = "hyprctl dispatch workspace m-1"; persistent-workspaces."${sys.gui.display}" = 3; @@ -142,6 +142,7 @@ in rec { "kitty" = "Terminal"; "(.*) - kitty" = "Terminal"; "clipse" = "Clipboard"; + "Kebihelp" = "Shortcuts"; "nwg-displays" = "Displays"; "Ulauncher(.*)" = "Launcher"; "(.*) - Geany" = "Text Editor"; diff --git a/modules/gui/desktop/hyprland/apps/default.nix b/modules/gui/desktop/hyprland/apps/default.nix @@ -334,6 +334,10 @@ in { # Discord Chat ".config/BetterDiscord/data/stable/custom.css" = with theme; mkIf (exists "discord") {text = ''@import url("https://${name}.github.io/discord/dist/${name}-${variant}-${accent}.theme.css");'';}; + + # Logseq Notes + ".logseq/config.edn" = with theme; + mkIf (exists "notes") {text = ''{:custom-css-url "@import url('https://logseq.${name}.com/ctp-${variant}.css');"}'';}; }; # Code Editor diff --git a/modules/gui/desktop/hyprland/settings/default.nix b/modules/gui/desktop/hyprland/settings/default.nix @@ -63,8 +63,8 @@ in { workspace_swipe = true; workspace_swipe_fingers = 3; workspace_swipe_forever = true; - workspace_swipe_use_r = true; - workspace_swipe_create_new = true; + workspace_swipe_use_r = false; + workspace_swipe_create_new = false; }; # Cursor Settings diff --git a/modules/gui/desktop/hyprland/settings/plugins.nix b/modules/gui/desktop/hyprland/settings/plugins.nix @@ -34,6 +34,7 @@ workspace_method = "first 1"; enable_gesture = true; gesture_positive = false; + gesture_fingers = 4; }; # Application Overview @@ -58,8 +59,8 @@ centerAligned = true; hideTopLayers = true; hideOverlayLayers = false; - showNewWorkspace = true; - showEmptyWorkspace = false; + showNewWorkspace = false; + showEmptyWorkspace = true; overrideGaps = true; gapsIn = gaps; gapsOut = gaps; diff --git a/modules/gui/desktop/xfce/default.nix b/modules/gui/desktop/xfce/default.nix @@ -220,9 +220,15 @@ in { ## 3rd Party Apps Configuration (mkIf (desktop == "xfce") { user.homeConfig = { - # Discord Arc Theme - home.file.".config/BetterDiscord/data/stable/custom.css" = - mkIf (exists "discord") {text = ''@import url(https://rawcdn.githack.com/orblazer/discord-nordic/f3f6833c70d0b27b1cde986233b7009d61917812/nordic.theme.css);'';}; + home.file = { + # Discord Nord Theme + ".config/BetterDiscord/data/stable/custom.css" = + mkIf (exists "discord") {text = ''@import url(https://rawcdn.githack.com/orblazer/discord-nordic/f3f6833c70d0b27b1cde986233b7009d61917812/nordic.theme.css);'';}; + + # Logseq Nord Theme + ".logseq/config.edn" = + mkIf (exists "notes") {text = ''{:custom-css-url "@import url('https://cdn.jsdelivr.net/gh/bad3r/logseq-nord-theme@latest/custom.min.css');"}'';}; + }; # Code Editor programs.vscode = mkIf (exists "vscode") {