diff --git a/README.md b/README.md index 0065120..34f1ee5 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ My dotfiles managed with [home manager](https://github.com/nix-community/home-ma * Mimeapps * Catppuccin * Home Manager +* Obsidian ## Screenshot ![Desktop screenshot](assets/screenshot.png) @@ -77,6 +78,103 @@ You need to edit `flake.nix` to match your preferences. } ``` +# Binds +## System & Power +| Bind | Action | +| :--- | :--- | +| **SUPER + Shift + Ctrl + L** | Lock screen | +| **SUPER + Shift + Ctrl + R** | Restart | +| **SUPER + Shift + Ctrl + P** | Power off | +| **SUPER + Shift + Ctrl + S** | Go to sleep | +| **SUPER + Shift + Ctrl + M** | Logout | +| **SUPER + V** | Show clipboard | +| **SUPER + Alt + V** | Clear clipboard | + +### Windows management +| Bind | Action | +| :--- | :--- | +| **SUPER + Q** | Close active window | +| **SUPER + F** | Fullscreen | +| **SUPER + T** | Toggle floating window | +| **SUPER + P** | Toggle pseudo layout | +| **SUPER + S** | Toggle split / Swap with master window | +| **SUPER + N** / **P** | Swap with next / previous window | +| **SUPER + vim keys** | Move focus (Left / Down / Up / Right) | +| **SUPER + Shift + vim keys** | Resize active window | +| **SUPER + Left Mouse Button** | Move window | +| **SUPER + Right Mouse Button**| Resize window | + +### Workspaces +| Bind | Action | +| :--- | :--- | +| **SUPER + 1-0** | Go to workspace 1-10 | +| **SUPER + Shift + 1-0** | Move active window to workspace 1-10 | +| **SUPER + Mouse Scroll** | Go to next/previous workspace | +| **SUPER + Shift + Right / Left** | Move current workspace to next/previous monitor | +| **SUPER + Tab** | Toggle scratchpad workspace | +| **SUPER + Shift + Tab** | Move window to scratchpad | + +### Applications +| Bind | Action | +| :--- | :--- | +| **SUPER + Enter** | Open terminal | +| **SUPER + Ctrl + Enter** | Open terminal (current workspace) | +| **SUPER + Space** | Open app menu | +| **SUPER + M** | Open waypaper menu | +| **SUPER + Alt + C** | Apply OpenRGB color | +| **SUPER + Ctrl + B** | Open/Focus web browser | +| **SUPER + Ctrl + N** | Open/Focus notes app | +| **SUPER + Ctrl + M** | Open/Focus music player | +| **SUPER + Ctrl + S** | Open/Focus Signal | +| **SUPER + Ctrl + V** | Open/quick switcher Vesktop | +| **SUPER + Ctrl + G** | Open/Focus Steam | +| **SUPER + Ctrl + F** | Open/Focus FreeTube | +| **SUPER + Ctrl + X** | Open/Focus X app | +| **SUPER + Ctrl + Shift + B** | Restart status bar | + +### Zoom +| Bind | Action | +| :--- | :--- | +| **SUPER + Alt + =** | Zoom in (+10%) | +| **SUPER + Alt + -** | Zoom out (-10%) | +| **SUPER + Alt + 0** | Reset zoom | + +### Screenshots & Media +| Bind | Action | +| :--- | :--- | +| **Print Screen** | Screenshot selected area | +| **SUPER + Print Screen** | Screenshot fullscreen | +| **Alt + Print Screen** | Screenshot active window | +| **Pause** | Play / Pause media | +| **SUPER + Pause** | Play / Pause Spotify | +| **Brightness Keys** | Change screen brightness (+/- 10) | +| **Volume Keys** | Change volume (+/- 5%) | +| **Mic Mute Key** | Mute / Unmute microphone | + +# Default apps +| Type | Application | +| :--- | :--- | +| Web Browser | Zen Browser | +| Terminal | kitty | +| Notes | Obsidian | +| Music Player | Spotify | +| App Launcher | hyprlauncher | +| Signal | Signal-desktop | +| Discord Client | Vesktop | +| YouTube Client | FreeTube | +| Gaming Platform | Steam | +| Screen Recording | OBS Studio | +| Image Editor | GIMP | +| Wallpaper Picker | Waypaper / swww | +| Screenshot Tool | grim (capture) & satty (editor) | +| Screen Locker | hyprlock | +| Clipboard Manager | cliphist & wl-clipboard | +| RGB Lighting Control | OpenRGB | +| Audio Volume Control | pavucontrol | +| Screen Color (Night Light) | hyprsunset | +| Status bar | AShell | +| Web Apps (PWAs) | Facebook, Twitter, ProtonMail | + --- I hope you'll enjoy it, if you for whatever reason want to try this random ass dotfiles found on the internet… diff --git a/arch_packages.txt b/arch_packages.txt index 923b0ed..5c70251 100644 --- a/arch_packages.txt +++ b/arch_packages.txt @@ -8,3 +8,5 @@ hyprsunset satty kitty mangohud +brave-bin +zen-browser-bin diff --git a/flake.lock b/flake.lock index 391b770..1d93ec0 100644 --- a/flake.lock +++ b/flake.lock @@ -117,11 +117,11 @@ ] }, "locked": { - "lastModified": 1771851181, - "narHash": "sha256-gFgE6mGUftwseV3DUENMb0k0EiHd739lZexPo5O/sdQ=", + "lastModified": 1772060133, + "narHash": "sha256-VuyRptb8v1lVGMlLp4/1vRX3Efwec0CN0S6mKmDPzLg=", "owner": "nix-community", "repo": "home-manager", - "rev": "9a4b494b1aa1b93d8edf167f46dc8e0c0011280c", + "rev": "ce9b6e52500a0ea0ec48f0bbf6d7a3e431d9dfa4", "type": "github" }, "original": { @@ -205,11 +205,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1771959711, - "narHash": "sha256-fVxN49l5Tu/iCSGuQuyR7HLBl9qJyg/4kt8WHTFn3MY=", + "lastModified": 1772107319, + "narHash": "sha256-qdeeNrWmUe1P2FsnNU1ngoZl8UxczEMJBziwm78V42I=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "c60b3cb2ed0404d9573b2801b51ba7be1da999d9", + "rev": "c71fbd854dfdedaae011f4b8b1fdb81f8054b309", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index aeed265..d45799e 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,7 @@ pathConfig = { wallpaper = "Obrazy/tapety/catppuccin"; screenshot = "Obrazy/zrzuty/"; + obsidian = "Dokumenty/obsidian"; }; }; in diff --git a/home.nix b/home.nix index e4f234f..17a1b8c 100644 --- a/home.nix +++ b/home.nix @@ -48,6 +48,7 @@ ./modules/gui/mako.nix ./modules/gui/mangohud.nix ./modules/gui/browsers.nix + ./modules/gui/obsidian.nix # status bars ./modules/bars/ashell.nix ./modules/bars/waybar.nix @@ -73,6 +74,7 @@ home.sessionVariables = { EDITOR = "nvim"; VISUAL = "nvim"; + XDG_DATA_DIRS = "$HOME/.nix-profile/share/applications:$XDG_DATA_DIRS"; }; programs.home-manager.enable = true; diff --git a/modules/cli/nixvim.nix b/modules/cli/nixvim.nix index c5acb94..3b6c61f 100644 --- a/modules/cli/nixvim.nix +++ b/modules/cli/nixvim.nix @@ -177,6 +177,8 @@ }; # nix nil_ls.enable = true; + # other + marksman.enable = true; }; keymaps = { lspBuf = { diff --git a/modules/desktop.nix b/modules/desktop.nix index 158fedf..169d339 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -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"; }; }; } diff --git a/modules/gui/mako.nix b/modules/gui/mako.nix index 37375b2..01d3d49 100644 --- a/modules/gui/mako.nix +++ b/modules/gui/mako.nix @@ -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] diff --git a/modules/gui/obsidian-catppuccin.nix b/modules/gui/obsidian-catppuccin.nix new file mode 100644 index 0000000..449fd49 --- /dev/null +++ b/modules/gui/obsidian-catppuccin.nix @@ -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/ + ''; +} diff --git a/modules/gui/obsidian.nix b/modules/gui/obsidian.nix new file mode 100644 index 0000000..6c343ab --- /dev/null +++ b/modules/gui/obsidian.nix @@ -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"; + }; + }; + }; + +} diff --git a/modules/hypr/hyprland.nix b/modules/hypr/hyprland.nix index c9a2e1f..91d8349 100644 --- a/modules/hypr/hyprland.nix +++ b/modules/hypr/hyprland.nix @@ -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" ];