mirror of
https://github.com/js0ny/dotfiles.git
synced 2026-03-22 02:36:19 +00:00
feishin, fsearch, mkMergedIni
This commit is contained in:
parent
a799c465db
commit
5386c02b23
14 changed files with 213 additions and 34 deletions
|
|
@ -22,6 +22,7 @@ in {
|
|||
[
|
||||
gnome-tweaks
|
||||
sushi
|
||||
nautilus-open-any-terminal
|
||||
]
|
||||
++ extensions;
|
||||
programs.gnome-shell.enable = true;
|
||||
|
|
|
|||
|
|
@ -21,22 +21,24 @@ in {
|
|||
"Mod+B".action = spawn "${lib.getExe nirictl.focusOrLaunch}" "firefox" "firefox";
|
||||
"Mod+Shift+B".hotkey-overlay.title = "Launch web browser in private mode";
|
||||
"Mod+Shift+B".action = spawn "firefox" "--private-window";
|
||||
"Mod+A".action = spawn-sh "${term} --class=kitty-terminal-popup -e aichat --session";
|
||||
"Mod+A".action = spawn-sh "${term} --class=terminal-popup -e aichat --session";
|
||||
"Mod+Shift+A".hotkey-overlay.title = "Focus or launch CherryStudio (AI assistant)";
|
||||
"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";
|
||||
"Mod+Shift+O".action = spawn-sh "${term} --app-id=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";
|
||||
"Mod+Alt+Return".action = spawn-sh "${term} --class=kitty-terminal-popup";
|
||||
"Mod+Shift+Alt+Return".action = spawn-sh "${term} --class=kitty--terminal-popup --working-directory='${config.home.homeDirectory}/.config/shells/nohist' -e nix develop";
|
||||
"Mod+E".hotkey-overlay.title = "Launch file explorer";
|
||||
# "Mod+E".action = spawn "${lib.getExe nirictl.focusOrLaunch}" "org.kde.dolphin" "dolphin";
|
||||
"Mod+E".action = spawn-sh "xdg-open ~";
|
||||
"Mod+Shift+E".action = spawn "fsearch";
|
||||
"Mod+Shift+Return".action = spawn-sh "${term} --app-id=terminal-popup";
|
||||
# "Mod+Shift+Alt+Return".action = spawn-sh "${term} --app-id=kitty--terminal-popup --working-directory='${config.home.homeDirectory}/.config/shells/nohist' -e nix develop";
|
||||
|
||||
"Mod+Shift+Return".action = spawn "neovide" "${config.home.homeDirectory}/Atelier";
|
||||
"Mod+Alt+Return".action = spawn "neovide" "${config.home.homeDirectory}/Atelier";
|
||||
"Mod+Apostrophe".action =
|
||||
spawn-sh "EDITOR_MINIMAL=1 ${term} -o close_on_child_death=yes --class=kitty-terminal-popup -e edit-clipboard --minimal";
|
||||
spawn-sh "EDITOR_MINIMAL=1 ${term} -o close_on_child_death=yes --app-id=terminal-popup -e edit-clipboard --minimal";
|
||||
|
||||
"Mod+Shift+Slash".action = show-hotkey-overlay;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,27 @@
|
|||
{
|
||||
app-id = "^.*terminal-popup$";
|
||||
}
|
||||
{
|
||||
app-id = "^fsearch$";
|
||||
}
|
||||
];
|
||||
|
||||
open-floating = true;
|
||||
opacity = 0.8;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
app-id = "^org.gnome.NautilusPreviewer$";
|
||||
}
|
||||
{
|
||||
app-id = "^org.gnome.Nautilus$";
|
||||
title = "^Select Document$";
|
||||
}
|
||||
];
|
||||
|
||||
open-floating = true;
|
||||
}
|
||||
# {{{ float, opacity 0.8, top right: Picture-in-Picture // waybar childs
|
||||
{
|
||||
matches = [
|
||||
|
|
|
|||
28
nixcfgs/users/js0ny/programs/feishin.nix
Normal file
28
nixcfgs/users/js0ny/programs/feishin.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
mergetools = import ../lib/mergetools.nix {inherit pkgs lib config;};
|
||||
mkMergedJson = mergetools.mkMergedJson;
|
||||
feishinConfig = mkMergedJson {
|
||||
name = "feishin-config";
|
||||
target = ".config/feishin/config.json";
|
||||
settings = {
|
||||
theme = "system";
|
||||
window_has_frame = false;
|
||||
release_channel = "latest";
|
||||
global_media_hotkeys = true;
|
||||
window_window_bar_style = "windows";
|
||||
disable_auto_updates = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
home.packages = [
|
||||
pkgs.feishin
|
||||
];
|
||||
imports = [
|
||||
feishinConfig
|
||||
];
|
||||
}
|
||||
|
|
@ -33,6 +33,18 @@
|
|||
# * 3: Restore Previous Session
|
||||
"browser.startup.page" = 3;
|
||||
"browser.sessionstore.resume_from_crash" = true;
|
||||
### Sync
|
||||
"services.sync.declinedEngines" = "creditcards,passwords,addresses,prefs,addons";
|
||||
"services.sync.engine.addons" = false;
|
||||
"services.sync.engine.addresses" = false;
|
||||
"services.sync.engine.bookmarks" = true;
|
||||
"services.sync.engine.creditcards" = false;
|
||||
"services.sync.engine.history" = true;
|
||||
"services.sync.engine.passwords" = false;
|
||||
"services.sync.engine.prefs" = false;
|
||||
"services.sync.engine.prefs.modified" = false;
|
||||
"services.sync.engine.tabs" = true;
|
||||
"services.sync.engins.tabs.filteredSchemes" = "about|resource|chrome|file|blob|moz-extension|data";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
54
nixcfgs/users/js0ny/programs/fsearch.nix
Normal file
54
nixcfgs/users/js0ny/programs/fsearch.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
mergetools = import ../lib/mergetools.nix {inherit pkgs lib config;};
|
||||
mkMergeIni = mergetools.mkMergedIni;
|
||||
# username = config.home.username;
|
||||
fsearchConf = mkMergeIni {
|
||||
name = "fsearch-conf";
|
||||
target = ".config/fsearch/fsearch.conf";
|
||||
settings = {
|
||||
Interface = {
|
||||
single_click_open = false;
|
||||
launch_desktop_files = true;
|
||||
highlight_search_terms = true;
|
||||
double_click_path = false;
|
||||
enable_list_tooltips = true;
|
||||
enable_dark_theme = true;
|
||||
show_menubar = true;
|
||||
show_statusbar = true;
|
||||
show_filter = true;
|
||||
};
|
||||
Search = {
|
||||
search_as_you_type = true;
|
||||
auto_search_in_path = true;
|
||||
hide_results_on_empty_search = true;
|
||||
};
|
||||
Database = {
|
||||
update_database_on_launch = true;
|
||||
update_database_every = false;
|
||||
update_database_every_hours = 0;
|
||||
update_database_every_minutes = 15;
|
||||
exclude_hidden_files_and_folders = false;
|
||||
follow_symbolic_links = false;
|
||||
exclude_location_1 = "/proc";
|
||||
exclude_location_enabled_1 = true;
|
||||
exclude_location_2 = "/sys";
|
||||
exclude_location_enabled_2 = true;
|
||||
exclude_location_3 = "/nix";
|
||||
exclude_location_enabled_3 = true;
|
||||
exclude_location_4 = "/tmp";
|
||||
exclude_location_enabled_4 = true;
|
||||
exclude_files = ".git;.Xil;.filen_trash_local;.direnv;.devcontainer;.cache;.bin;.github;.idea*;.bak;.history;.metadata;.jj;.jobs;node_modules;.log;.gradle;.fingerprint;.filen.trash.local;.settings;.vscode;__pycache__;xwechat_files;SiYuan;.trash;.obsidian;.project;.cproject;.gitignore;*.mk;*.o;*.d;*.checksum;*.bit;top.mmi;*.elf;*.log;impl_1;*.cache;*.runs;*.sim;hw.xml;*.hw;*.ip_user_files;*.runs;vivado.jou;vivado.log;vivado*.jou;vivado*.log;utils_1";
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
imports = [fsearchConf];
|
||||
home.packages = with pkgs; [
|
||||
fsearch
|
||||
];
|
||||
}
|
||||
|
|
@ -74,7 +74,8 @@ in {
|
|||
mkAssoc "sioyek.desktop;org.kde.okular;" ["application/pdf"]
|
||||
// mkAssoc gvim simpleText
|
||||
// {
|
||||
"inode/directory" = "org.kde.dolphin.desktop";
|
||||
# "inode/directory" = "org.kde.dolphin.desktop";
|
||||
"inode/directory" = "org.gnome.Nautilus.desktop";
|
||||
}
|
||||
// mkAssoc imageViewers image
|
||||
// mkAssoc "onlyoffice-desktopeditors.desktop" [
|
||||
|
|
|
|||
|
|
@ -3,86 +3,90 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
mod =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then "meta"
|
||||
else "alt";
|
||||
shortcuts = builtins.toJSON [
|
||||
{
|
||||
command = "previous_chat";
|
||||
keys = "alt+k";
|
||||
keys = "${mod}+k";
|
||||
}
|
||||
{
|
||||
command = "next_chat";
|
||||
keys = "alt+j";
|
||||
keys = "${mod}+j";
|
||||
}
|
||||
{
|
||||
command = "self_chat";
|
||||
keys = "alt+0";
|
||||
keys = "${mod}+0";
|
||||
}
|
||||
{
|
||||
command = "pinned_chat1";
|
||||
keys = "alt+1";
|
||||
keys = "${mod}+1";
|
||||
}
|
||||
{
|
||||
command = "all_chats";
|
||||
keys = "alt+1";
|
||||
keys = "${mod}+1";
|
||||
}
|
||||
{
|
||||
command = "pinned_chat2";
|
||||
keys = "alt+2";
|
||||
keys = "${mod}+2";
|
||||
}
|
||||
{
|
||||
command = "folder1";
|
||||
keys = "alt+2";
|
||||
keys = "${mod}+2";
|
||||
}
|
||||
{
|
||||
command = "pinned_chat3";
|
||||
keys = "alt+3";
|
||||
keys = "${mod}+3";
|
||||
}
|
||||
{
|
||||
command = "folder2";
|
||||
keys = "alt+3";
|
||||
keys = "${mod}+3";
|
||||
}
|
||||
{
|
||||
command = "pinned_chat4";
|
||||
keys = "alt+4";
|
||||
keys = "${mod}+4";
|
||||
}
|
||||
{
|
||||
command = "folder3";
|
||||
keys = "alt+4";
|
||||
keys = "${mod}+4";
|
||||
}
|
||||
{
|
||||
command = "pinned_chat5";
|
||||
keys = "alt+5";
|
||||
keys = "${mod}+5";
|
||||
}
|
||||
{
|
||||
command = "folder4";
|
||||
keys = "alt+5";
|
||||
keys = "${mod}+5";
|
||||
}
|
||||
{
|
||||
command = "pinned_chat6";
|
||||
keys = "alt+6";
|
||||
keys = "${mod}+6";
|
||||
}
|
||||
{
|
||||
command = "folder5";
|
||||
keys = "alt+6";
|
||||
keys = "${mod}+6";
|
||||
}
|
||||
{
|
||||
command = "pinned_chat7";
|
||||
keys = "alt+7";
|
||||
keys = "${mod}+7";
|
||||
}
|
||||
{
|
||||
command = "folder6";
|
||||
keys = "alt+7";
|
||||
keys = "${mod}+7";
|
||||
}
|
||||
{
|
||||
command = "pinned_chat8";
|
||||
keys = "alt+8";
|
||||
keys = "${mod}+8";
|
||||
}
|
||||
{
|
||||
command = "last_folder";
|
||||
keys = "alt+8";
|
||||
keys = "${mod}+8";
|
||||
}
|
||||
{
|
||||
command = "show_archive";
|
||||
keys = "alt+9";
|
||||
keys = "${mod}+9";
|
||||
}
|
||||
];
|
||||
in {
|
||||
|
|
@ -95,4 +99,10 @@ in {
|
|||
"materialgram/tdata/shortcuts-custom.json".text = shortcuts;
|
||||
"TelegramDesktop/tdata/shortcuts-custom.json".text = shortcuts;
|
||||
};
|
||||
home.file =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then {
|
||||
"Library/Application Support/Telegram Desktop/tdata/shortcuts-custom.json".text = shortcuts;
|
||||
}
|
||||
else {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue