diff options
| author | adikro <adikro@disroot.org> | 2026-03-17 23:25:22 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-03-17 23:25:22 +0100 |
| commit | e7549665587b1e4a11225bce0c70ff74fe171e5f (patch) | |
| tree | f502cebd865ca728ede83c8fb30e30bbb44f67ea /hm | |
| parent | 2e7f564763826013eeff22ecfce99c462829e2ec (diff) | |
some age key shenanigans
Diffstat (limited to 'hm')
| -rw-r--r-- | hm/dotfiles/fastfetch/config.jsonc | 0 | ||||
| -rw-r--r-- | hm/dotfiles/fsel/config.toml | 0 | ||||
| -rw-r--r-- | hm/dotfiles/mako/config | 0 | ||||
| -rw-r--r-- | hm/dotfiles/otter/config.toml | 0 | ||||
| -rw-r--r-- | hm/dotfiles/waybar/config.jsonc | 0 | ||||
| -rw-r--r-- | hm/dotfiles/waybar/style.css | 0 | ||||
| -rw-r--r-- | hm/env/fsel.nix | 2 | ||||
| -rw-r--r-- | hm/env/mako.nix | 6 | ||||
| -rw-r--r-- | hm/env/otter.nix | 175 | ||||
| -rw-r--r-- | hm/env/waybar.nix | 12 | ||||
| -rw-r--r-- | hm/shell/cli.nix | 4 | ||||
| -rw-r--r-- | hm/soft/librewolf/browser.nix (renamed from hm/soft/browser.nix) | 5 | ||||
| -rw-r--r-- | hm/soft/librewolf/extensions/keepass-tusk.nix | 20 | ||||
| -rw-r--r-- | hm/soft/librewolf/extensions/popup-blocker.nix | 20 | ||||
| -rw-r--r-- | hm/soft/librewolf/extensions/user-agent-switcher.nix | 20 | ||||
| -rw-r--r-- | hm/soft/soft.nix | 2 |
16 files changed, 85 insertions, 181 deletions
diff --git a/hm/dotfiles/fastfetch/config.jsonc b/hm/dotfiles/fastfetch/config.jsonc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hm/dotfiles/fastfetch/config.jsonc diff --git a/hm/dotfiles/fsel/config.toml b/hm/dotfiles/fsel/config.toml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hm/dotfiles/fsel/config.toml diff --git a/hm/dotfiles/mako/config b/hm/dotfiles/mako/config new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hm/dotfiles/mako/config diff --git a/hm/dotfiles/otter/config.toml b/hm/dotfiles/otter/config.toml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hm/dotfiles/otter/config.toml diff --git a/hm/dotfiles/waybar/config.jsonc b/hm/dotfiles/waybar/config.jsonc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hm/dotfiles/waybar/config.jsonc diff --git a/hm/dotfiles/waybar/style.css b/hm/dotfiles/waybar/style.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hm/dotfiles/waybar/style.css diff --git a/hm/env/fsel.nix b/hm/env/fsel.nix index faa7f24..636cb3c 100644 --- a/hm/env/fsel.nix +++ b/hm/env/fsel.nix @@ -12,5 +12,7 @@ in options.hm.env.fsel.enable = lib.mkEnableOption "enables fsel"; config = lib.mkIf cfg.enable { home.packages = [ inputs.fsel.packages.${pkgs.stdenv.hostPlatform.system}.default ]; + xdg.configFile."fsel/config.toml".source = + config.lib.file.mkOutOfStoreSymlink "../dotfiles/fsel/config.toml"; }; } diff --git a/hm/env/mako.nix b/hm/env/mako.nix index 3f9e3ef..3adc5d7 100644 --- a/hm/env/mako.nix +++ b/hm/env/mako.nix @@ -7,9 +7,9 @@ in config = lib.mkIf cfg.enable { services.mako = { enable = true; - settings = { - - }; }; + xdg.configFile."mako/config".source = lib.mkForce ( + config.lib.file.mkOutOfStoreSymlink "../dotfiles/mako/config" + ); }; } diff --git a/hm/env/otter.nix b/hm/env/otter.nix index b7324e0..966bbb7 100644 --- a/hm/env/otter.nix +++ b/hm/env/otter.nix @@ -14,178 +14,9 @@ in config = lib.mkIf cfg.enable { programs.otter-launcher = { enable = true; - # settings = { - # interface = { - # suggestion_mode = "list"; - # }; - # }; - settingsExtra = '' - [general] - default_module = "gg" # module to run when no prefix is matched - empty_module = "app" # run with an empty prompt - exec_cmd = "sh -c" # exec command of your shell - # for example: "bach -c" for bash; "zsh -c" for zsh; also accept wm commands like "hyprctl dispatch exec" - vi_mode = false # set true to use vi keybinds, false emacs keybinds - esc_to_abort = true # useful for vi users - cheatsheet_entry = "?" # when prompted, will show a list of configured modules - cheatsheet_viewer = "less -R; clear" # command to show cheatsheet; through piping stdout - clear_screen_after_execution = false - loop_mode = false # don't quit after executing a module, useful with scratchpads; stderr is hidden in loop mode - external_editor = "vi" # if set, press ctrl+x ctrl+ee (or v in vi normal mode) to edit prompt in the specified program - delay_startup = 0 # sometimes the otter runs too fast even before the terminal window is ready; this slows it down by milliseconds; useful when chafa image is skewed - #callback = "" # if set, will run after module execution; for example, calling swaymsg to adjust window size - - - # ANSI color codes are allowed. However, \x1b should be replaced with \u001B, because the rust toml crate cannot read \x as an escaped character - [interface] - # use three quotes to write longer codes - header = """ - \u001B[34;1m$USER@$(printf $HOSTNAME)\u001B[0m \u001B[31m\u001B[0m $(mpstat | awk 'FNR ==4 {print $4}') - """ - header_cmd = "" # run a command and print stdout above the header - header_cmd_trimmed_lines = 0 # remove trailing lines from header_cmd output, in case of some programs appending excessive empty lines - place_holder = "otterly awesome" # at the input field - suggestion_mode = "list" # available options: list, hint - separator = " \u001B[90mmodules ────────────────" # add a line between intput field and suggestion list; only effective in list mode - footer = "" # add a line after suggestion list - suggestion_lines = 3 # 0 to disable suggestions and tab completion - list_prefix = " " - selection_prefix = "\u001B[31;1m▌ " - prefix_padding = 3 # format prefixes to have a uniformed width - default_module_message = " \u001B[33msearch\u001B[0m the internet" # shown when the default module is in use - empty_module_message = "" # shown when the empty module is in use - customized_list_order = false # false to list modules alphabetically; true to list as per the configured order in the below [[modules]] section - indicator_with_arg_module = "" # the sign showing whether a module should run with an argument - indicator_no_arg_module = "" - # below color options affect all modules; per-module coloring can be configured using ansi codes individually - prefix_color = "\u001B[33m" - description_color = "\u001B[39m" - place_holder_color = "\u001B[30m" - hint_color = "\u001B[30m" # suggestion color in hint mode - # move the interface rightward or downward - move_interface_right = 16 - move_interface_down = 1 - - - # overlay is a floating layer that can be printed with stdout and moved around; useful for integrating chafa images - [overlay] - overlay_cmd = """ - """ - overlay_height = 0 - - - # modules are defined as followed - [[modules]] - description = "google search" - prefix = "gg" - cmd = "xdg-open https://www.google.com/search?q='{}'" - with_argument = true # if true, {} in cmd will be replaced with user input. if not explicitly set, taken as false. - url_encode = true # should be true when calling webpages; this ensures special characters in url being readable to browsers; taken as false if not explicitly set - unbind_proc = true # run cmd in a forked shell as opposed to as a child process (simply by prepending setsid -f to the configured cmd); useful for launching gui programs; taken as false if not explicitly set; try wm's exec command for unbinding if this option goes wrong (like swaymsg exec) - - # fzf is needed to run below functions - [[modules]] - description = "desktop programs" - prefix = "app" - cmd = """ - desktop_file() { - find /usr/share/applications -name "*.desktop" 2>/dev/null - find /usr/local/share/applications -name "*.desktop" 2>/dev/null - find "$HOME/.local/share/applications" -name "*.desktop" 2>/dev/null - find /var/lib/flatpak/exports/share/applications -name "*.desktop" 2>/dev/null - find "$HOME/.local/share/flatpak/exports/share/applications" -name "*.desktop" 2>/dev/null - } - selected="$(desktop_file | awk -F/ '{name=$NF; sub(/\\.desktop$/, "", name); print name}' | sort -k1,1 | cut -f2- | fzf --reverse --padding 1,3 --info-command 'echo -e " desktop apps ($FZF_POS/$FZF_TOTAL_COUNT)"' --cycle --gutter " " --pointer " ▌" --color "bg+:-1,pointer:1,info:8,separator:8,scrollbar:0" --prompt ' ' -m -d / --with-nth -1 )" - [ -z "$selected" ] && exit - echo "$selected" | while read -r line ; do setsid -f gtk-launch "$(basename $line)"; done - """ - - [[modules]] - description = "power menu (fzf)" - prefix = "po" - cmd = """ - function power { - if [[ -n $1 ]]; then - case $1 in - "logout") session=`loginctl session-status | head -n 1 | awk '{print $1}'`; loginctl terminate-session $session ;; - "suspend") systemctl suspend ;; - "hibernate") systemctl hibernate ;; - "reboot") systemctl reboot ;; - "shutdown") systemctl poweroff ;; - esac fi } - power $(echo -e 'reboot\nshutdown\nlogout\nsuspend\nhibernate' | fzf --reverse --padding 1,2 --info-command 'printf " power menu ($FZF_POS/$FZF_TOTAL_COUNT)"' --cycle --gutter " " --pointer " ▌" --color "bg+:-1,pointer:1,info:8,separator:8,scrollbar:0" --prompt ' ' | tail -1) - """ - - [[modules]] - description = "run commands" - prefix = "sh" - cmd = """ - $(printf $TERM | sed 's/xterm-//g') -e sh -c "{}" - """ - with_argument = true - unbind_proc = true - - [[modules]] - description = "search archwiki" - prefix = "aw" - cmd = "xdg-open https://wiki.archlinux.org/index.php?search='{}'" - with_argument = true - url_encode = true - unbind_proc = true - - [[modules]] - description = "search packages" - prefix = "pac" - cmd = "xdg-open https://archlinux.org/packages/?q='{}'" - with_argument = true - url_encode = true - unbind_proc = true - - [[modules]] - description = "search the AUR" - prefix = "aur" - cmd = "xdg-open https://aur.archlinux.org/packages?K='{}'" - with_argument = true - url_encode = true - unbind_proc = true - - [[modules]] - description = "cambridge dict" - prefix = "dc" - cmd = "xdg-open 'https://dictionary.cambridge.org/dictionary/english/{}'" - with_argument = true - url_encode = true - unbind_proc = true - - [[modules]] - description = "open files (fzf)" - prefix = "fo" - cmd = """ - find $HOME -type f -not -path '*/.cache/*' 2>/dev/null | fzf --reverse --padding 1,3 --info-command 'printf " files ($FZF_POS/$FZF_TOTAL_COUNT)"' --cycle --gutter ' ' --pointer ' ▌' --color 'bg+:-1,pointer:1,info:8,separator:8,scrollbar:0' --prompt ' ' | setsid -f xargs -r -I [] xdg-open '[]' - """ - - [[modules]] - description = "open dirs (yazi)" - prefix = "yz" - cmd = """ - find $HOME -type d -not -path '*/.cache/*' 2>/dev/null | fzf --reverse --padding 1,3 --info-command 'printf " directories ($FZF_POS/$FZF_TOTAL_COUNT)"' --cycle --gutter ' ' --pointer ' ▌' --color 'bg+:-1,pointer:1,info:8,separator:8,scrollbar:0' --prompt ' ' | xargs -r -I [] setsid -f "$(echo $TERM | sed 's/xterm-//g')" -e yazi '[]' - """ - - [[modules]] - description = "ChatGPT prompt" - prefix = "gpt" - with_argument = true - unbind_proc = true - cmd = """ - function chat { - encoded="$(jq -sRr @uri)" - exec xdg-open "https://chat.openai.com/?prompt=$encoded" - } - chat <<'EOF' - {} - EOF - """ - ''; }; + xdg.configFile."otter-launcher/config.toml".source = lib.mkForce ( + config.lib.file.mkOutOfStoreSymlink "../dotfiles/otter/config.toml" + ); }; } diff --git a/hm/env/waybar.nix b/hm/env/waybar.nix index b75cc91..5b6762e 100644 --- a/hm/env/waybar.nix +++ b/hm/env/waybar.nix @@ -2,9 +2,11 @@ config, lib, ... -}: let +}: +let cfg = config.hm.env.waybar; -in { +in +{ options.hm.env.waybar.enable = lib.mkEnableOption "enables waybar"; config = lib.mkIf cfg.enable { programs.waybar = { @@ -14,5 +16,11 @@ in { target = "graphical-session.target"; }; }; + xdg.configFile."waybar/config.jsonc".source = lib.mkForce ( + config.lib.file.mkOutOfStoreSymlink "../dotfiles/waybar/config.jsonc" + ); + xdg.configFile."waybar/style.css".source = lib.mkForce ( + config.lib.file.mkOutOfStoreSymlink "../dotfiles/waybar/style.css" + ); }; } diff --git a/hm/shell/cli.nix b/hm/shell/cli.nix index 7011d4d..73db375 100644 --- a/hm/shell/cli.nix +++ b/hm/shell/cli.nix @@ -99,9 +99,10 @@ in "disk" "localip" "break" - "colors" + # "colors" ]; }; + # xdg.configFile."fastfetch/config.jsonc".source = config.lib.file.mkOutOfStoreSymlink "../dotfiles/fastfetch/config.jsonc"; }; programs.direnv = { enable = true; @@ -189,6 +190,7 @@ in }; home.packages = with pkgs; [ + entr sd choose doggo diff --git a/hm/soft/browser.nix b/hm/soft/librewolf/browser.nix index 25d1f07..b67d71f 100644 --- a/hm/soft/browser.nix +++ b/hm/soft/librewolf/browser.nix @@ -53,8 +53,9 @@ in extensions = { force = true; packages = with pkgs.nur.repos.rycee.firefox-addons; [ - ublock-origin - ff2mpv + (pkgs.callPackage ./extensions/keepass-tusk.nix { }) + (pkgs.callPackage ./extensions/popup-blocker.nix { }) + (pkgs.callPackage ./extensions/user-agent-switcher.nix { }) link-cleaner privacy-badger to-deepl diff --git a/hm/soft/librewolf/extensions/keepass-tusk.nix b/hm/soft/librewolf/extensions/keepass-tusk.nix new file mode 100644 index 0000000..e197cb9 --- /dev/null +++ b/hm/soft/librewolf/extensions/keepass-tusk.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "KeePass Tusk - Password Access and Autofill"; + version = "2024.8.20"; + + src = fetchurl { + url = "https://addons.mozilla.org/firefox/downloads/file/4340608/keepass_tusk-${version}.xpi"; + sha256 = "sha256-RaViUTzo+JOmgnUB1cr4cCb1AEI2QDiR0frxYCpi8oE="; + }; + + dontUnpack = true; + + addonId = "brandon@subdavis.com"; + + installPhase = '' + mkdir -p $out + cp $src $out/${addonId}.xpi + ''; +} diff --git a/hm/soft/librewolf/extensions/popup-blocker.nix b/hm/soft/librewolf/extensions/popup-blocker.nix new file mode 100644 index 0000000..f1fe451 --- /dev/null +++ b/hm/soft/librewolf/extensions/popup-blocker.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "Popup Blocker (strict)"; + version = "0.9.1"; + + src = fetchurl { + url = "https://addons.mozilla.org/firefox/downloads/file/4674849/popup_blocker-${version}.xpi"; + sha256 = "sha256-Zw9jUeP8r+FhMuK23Xwelb9NOXawqYs4pZx0oVbVLOs="; + }; + + dontUnpack = true; + + addonId = "{de22fd49-c9ab-4359-b722-b3febdc3a0b0}"; + + installPhase = '' + mkdir -p $out + cp $src $out/${addonId}.xpi + ''; +} diff --git a/hm/soft/librewolf/extensions/user-agent-switcher.nix b/hm/soft/librewolf/extensions/user-agent-switcher.nix new file mode 100644 index 0000000..5168ead --- /dev/null +++ b/hm/soft/librewolf/extensions/user-agent-switcher.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "User-Agent Switcher and Manager"; + version = "0.6.6"; + + src = fetchurl { + url = "https://addons.mozilla.org/firefox/downloads/file/4593736/user_agent_string_switcher-${version}.xpi"; + sha256 = "sha256-nB/uKb2JpyH3r412qZeqytAn1PKxQc2wQ+6QJ7iWdZk="; + }; + + dontUnpack = true; + + addonId = "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}"; + + installPhase = '' + mkdir -p $out + cp $src $out/${addonId}.xpi + ''; +} diff --git a/hm/soft/soft.nix b/hm/soft/soft.nix index f6a9a69..80a0c04 100644 --- a/hm/soft/soft.nix +++ b/hm/soft/soft.nix @@ -1,7 +1,7 @@ { ... }: { imports = [ - ./browser.nix + ./librewolf/browser.nix ./email.nix ./kdenlive.nix ./mangohud.nix |
