From 4808dbb549f11d775505a3540a5d39b508ba5aca Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Wed, 1 May 2024 04:35:50 +0200 Subject: [PATCH] Dedicated obsidian app and more --- docs/history.md | 1 + home/features/desktop/default.nix | 7 ++++++- home/features/desktop/discord/default.nix | 6 +++--- home/features/desktop/obsidian.nix | 19 +++++++++++++++++++ home/features/desktop/spotify.nix | 1 + home/features/wayland/hyprland/hyprland.conf | 11 +++++++++-- home/tethys.nix | 9 ++++++--- 7 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 home/features/desktop/obsidian.nix diff --git a/docs/history.md b/docs/history.md index 5c87642..423d153 100644 --- a/docs/history.md +++ b/docs/history.md @@ -7,6 +7,7 @@ This file tells the story of my setup throughout it's history. This document is Warm light passing through the trees. - [Hikari (Arcaea) wallpaper](https://wallhaven.cc/w/85doxj) +- gruvbox colors - apps on display: [pipes](https://github.com/pipeseroni/pipes.sh), [uptimes script](../home/features/cli/scripts/uptimes.sh), [bottom](https://github.com/ClementTsang/bottom), [Neovim](https://neovim.io/), [Zathura](https://pwmt.org/projects/zathura/) ![terminals](img/2024-04-29-terminals.png) diff --git a/home/features/desktop/default.nix b/home/features/desktop/default.nix index 01d29af..afb2e5a 100644 --- a/home/features/desktop/default.nix +++ b/home/features/desktop/default.nix @@ -1,4 +1,4 @@ -{ +{ pkgs, ... }: { imports = [ ./wezterm # terminal ./dunst.nix # notifaction handler @@ -9,4 +9,9 @@ # Use a base16 theme for gtk apps! stylix.targets.gtk.enable = true; + + gtk.iconTheme = { + package = pkgs.papirus-icon-theme; + name = "Papirus"; + }; } diff --git a/home/features/desktop/discord/default.nix b/home/features/desktop/discord/default.nix index 5502b1a..2ab3033 100644 --- a/home/features/desktop/discord/default.nix +++ b/home/features/desktop/discord/default.nix @@ -4,12 +4,12 @@ let # REASON: newer discord versions don't work with the one in nixpkgs discocss = pkgs.discocss.overrideAttrs (old: rec { - version = "0.3.0"; + version = "unstable-2023-09-02"; src = pkgs.fetchFromGitHub { owner = "bddvlpr"; repo = "discocss"; - rev = "v${version}"; - hash = "sha256-2K7SPTvORzgZ1ZiCtS5TOShuAnmtI5NYkdQPRXIBP/I="; + rev = "37f1520bc90822b35e60baa9036df7a05f43fab8"; + sha256 = "1559mxmc0ppl4jxvdzszphysp1j31k2hm93qv7yz87xn9j0z2m04"; }; }); in diff --git a/home/features/desktop/obsidian.nix b/home/features/desktop/obsidian.nix new file mode 100644 index 0000000..ef27e6d --- /dev/null +++ b/home/features/desktop/obsidian.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: { + home.packages = + let + vaultDir = "${config.xdg.userDirs.extraConfig.XDG_PROJECTS_DIR}/stellar-sanctum"; + # Start nvim with a custom class so our WM can move it to the correct workspace + obsidiantui = pkgs.writeShellScriptBin "obsidiantui" '' + wezterm start --class "org.wezfurlong.wezterm.obsidian" --cwd ${vaultDir} nvim + ''; + in + [ obsidiantui pkgs.obsidian ]; + + xdg.desktopEntries.obsidiantui = { + name = "Obsidian TUI"; + type = "Application"; + exec = "obsidiantui"; + terminal = false; + icon = "obsidian"; + }; +} diff --git a/home/features/desktop/spotify.nix b/home/features/desktop/spotify.nix index 4bf6f5e..6ebde9e 100644 --- a/home/features/desktop/spotify.nix +++ b/home/features/desktop/spotify.nix @@ -23,6 +23,7 @@ let in { imports = [ ./audio.nix ]; + home.packages = [ pkgs.spot ]; programs.spicetify = { enable = true; diff --git a/home/features/wayland/hyprland/hyprland.conf b/home/features/wayland/hyprland/hyprland.conf index c2184bd..8ba6dff 100644 --- a/home/features/wayland/hyprland/hyprland.conf +++ b/home/features/wayland/hyprland/hyprland.conf @@ -61,14 +61,21 @@ animations { } # Execute apps at launch -exec-once = wezterm & firefox & discocss & spotify & obsidian & smosgui +exec-once = wezterm & firefox & discocss & spot & obsidian & obsidiantui & smosgui # {{{ Window rules # {{{ Automatically move stuff to workspaces windowrulev2 = workspace 2 silent, title:^(.*Firefox.*)$ + windowrulev2 = workspace 3 silent, title:^(.*(Disc|WebC)ord.*)$ -windowrulev2 = workspace 6 silent, title:^(.*Spotify.*)$ +windowrulev2 = workspace 3 silent, title:^(.*Element.*)$ + +windowrulev2 = workspace 6 silent, title:^(.*(S|s)pot(ify)?.*)$ + windowrulev2 = workspace 7 silent, title:^(.*Obsidian.*)$ +windowrulev2 = workspace 7 silent, title:^(.*stellar-sanctum)$ +windowrulev2 = workspace 7 silent, class:^(org\.wezfurlong\.wezterm\.obsidian)$ + windowrulev2 = workspace 8 silent, class:^(org\.wezfurlong\.wezterm\.smos)$ # }}} # {{{ Idleinhibit rules diff --git a/home/tethys.nix b/home/tethys.nix index 0332292..51508ff 100644 --- a/home/tethys.nix +++ b/home/tethys.nix @@ -1,9 +1,10 @@ -{ pkgs, lib, config, ... }: { +{ pkgs, upkgs, lib, config, ... }: { imports = [ ./global.nix ./features/desktop/zathura.nix ./features/desktop/spotify.nix + ./features/desktop/obsidian.nix ./features/desktop/firefox ./features/desktop/discord ./features/cli/productivity @@ -38,11 +39,13 @@ # sherlock # Search for usernames across different websites # }}} # {{{ Misc - obsidian # Note-taking bitwarden # Password-manager - # plover.dev # steno engine qbittorrent # Torrent client # google-chrome # Not my primary browser, but sometimes needed in webdev + # plover.dev # steno engine + + # REASON: not available in nixpkgs-stable just yet + upkgs.overskride # Bluetooth client # }}} # {{{ Media playing/recording mpv # Video player