minor fix

This commit is contained in:
js0ny 2025-12-07 07:45:51 +00:00
parent 63861d797e
commit 117417f148
4 changed files with 44 additions and 14 deletions

View file

@ -71,8 +71,8 @@ in {
};
};
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-dawn.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-soft.yaml";
image = ./wallpaper.jpg;
polarity = "light";
polarity = "dark";
};
}

View file

@ -26,6 +26,8 @@ in {
"Mod+Shift+A".action = spawn "${lib.getExe nirictl.focusOrLaunch}" "CherryStudio" "cherry-studio";
"Mod+O".hotkey-overlay.title = "Focus or launch Obsidian";
"Mod+O".action = spawn "${lib.getExe nirictl.focusOrLaunch}" "obsidian" "obsidian";
# See: programs/obsidian/obsidian-grep.nix
"Mod+Shift+O".action = spawn-sh "${term} --class=kitty-terminal-popup -e obsidian-grep && ${lib.getExe nirictl.focusOrLaunch} obsidian obsidian";
# TODO: Change "org.kde.dolphin" to a more generic explorer app id via config.currentUser
"Mod+E".hotkey-overlay.title = "Focus or launch file explorer";
"Mod+E".action = spawn "${lib.getExe nirictl.focusOrLaunch}" "org.kde.dolphin" "dolphin";

View file

@ -15,14 +15,6 @@
# {{{ float, opacity 0.8, top right: Picture-in-Picture // waybar childs
{
matches = [
{
app-id = "^firefox$";
title = "^Picture-in-Picture$";
}
{
# Applies to all chromium
title = "^Picture in picture$";
}
{
app-id = "^org.pulseaudio.pavucontrol$";
title = "^Volume Control$";
@ -37,6 +29,39 @@
relative-to = "top-right";
};
}
{
matches = [
{
app-id = "^firefox$";
title = "^Picture-in-Picture$";
}
{
# Applies to all chromium
title = "^Picture in picture$";
}
];
open-floating = true;
opacity = 0.8;
default-floating-position = {
x = 50;
y = 50;
relative-to = "bottom-right";
};
}
{
matches = [
{
app-id = "^mpv$";
}
];
default-floating-position = {
x = 50;
y = 50;
relative-to = "bottom-right";
};
}
# }}}
{
matches = [

View file

@ -1,27 +1,30 @@
{pkgs, ...}: {
{pkgs, ...}: let
obsidian-grep = pkgs.writeShellApplication {
name = "obsidian-grep";
runtimeInputs = with pkgs; [fzf rg];
runtimeInputs = with pkgs; [fzf ripgrep];
text = ''
#!/usr/bin/env bash
BASE_DIR="$HOME/Obsidian"
VAULT="Obsidian"
# PATTERN="''${1:-ob}"
# PATTERN=""
cd "$BASE_DIR" || {
echo "Error: Cannot access $BASE_DIR"
exit 1
}
# TODO: Add tag search support
rg --line-number --color=always "" |
fzf --ansi \
--delimiter : \
--preview 'bat --color=always --highlight-line {2} {1}' \
--preview-window 'up,+{2}/2' \
--header $'Enter: open file Ctrl-O: open in Obsidian Ctrl-T: Tag search Esc: quit' \
--header $'Enter: open file Ctrl-O: open in Obsidian Esc: quit' \
--bind 'enter:execute(xdg-open {1})+abort' \
--bind "ctrl-o:execute(sh -c 'encoded=\$(printf %s \"{1}\" | sed \"s/ /%20/g\"); xdg-open \"obsidian://open?vault=''${VAULT}&file=\$encoded\"')+abort"
'';
};
in {
home.packages = [obsidian-grep];
}