From 8132ea8455f458a4e7a1c5b0c2e3f225fb8cea10 Mon Sep 17 00:00:00 2001 From: Ray Andrew Date: Sat, 7 Jun 2025 21:33:23 -0700 Subject: [PATCH] update --- darwin/homebrew.nix | 12 ++++++++++++ home/default.nix | 2 +- home/emacs/config/pre-init.el | 2 +- home/shell/bin/b | 20 ++++++++++++++++++++ home/{shell.nix => shell/default.nix} | 11 +++++++++++ hosts/dango/default.nix | 2 ++ 6 files changed, 47 insertions(+), 2 deletions(-) create mode 100755 home/shell/bin/b rename home/{shell.nix => shell/default.nix} (81%) diff --git a/darwin/homebrew.nix b/darwin/homebrew.nix index 9c075a9..c65896a 100644 --- a/darwin/homebrew.nix +++ b/darwin/homebrew.nix @@ -48,6 +48,8 @@ parsify = mkEnableOption "Enable Parsify"; soulver = mkEnableOption "Enable Soulver"; pika = mkEnableOption "Enable Pika"; + transmission = mkEnableOption "Enable Transmission"; + alt-tab = mkEnableOption "Enable Alt-Tab"; }; config = lib.mkMerge [ @@ -273,5 +275,15 @@ "pika" ]; }) + (lib.mkIf config.custom.brew.transmission { + homebrew.casks = [ + "transmission" + ]; + }) + (lib.mkIf config.custom.brew.alt-tab { + homebrew.casks = [ + "alt-tab" + ]; + }) ]; } diff --git a/home/default.nix b/home/default.nix index 1e30b2a..e7c9ea6 100644 --- a/home/default.nix +++ b/home/default.nix @@ -15,7 +15,7 @@ ./gui.nix ./latex.nix ./ssh - ./shell.nix + ./shell ./neovim ]; diff --git a/home/emacs/config/pre-init.el b/home/emacs/config/pre-init.el index e845219..ed0cb69 100644 --- a/home/emacs/config/pre-init.el +++ b/home/emacs/config/pre-init.el @@ -47,7 +47,7 @@ (cond ((eq system-type 'windows-nt) "Consolas-11") ((eq system-type 'gnu/linux) "Consolas-11") - ((eq system-type 'darwin) "Consolas-14"))) + ((eq system-type 'darwin) "Consolas-12"))) ;; (defun rs/get-default-font () ;; (cond diff --git a/home/shell/bin/b b/home/shell/bin/b new file mode 100755 index 0000000..2928830 --- /dev/null +++ b/home/shell/bin/b @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +# https://github.com/soulim/bookmarks.txt/blob/main/bin/bookmarks + +set -o errexit +set -o nounset + +url=${1:-} +title=${2:-} + +global="$HOME/Personal/bookmarks.txt" + +if [ -n "$url" ] +then + echo "$url $title" >> $global +else + local="$PWD/bookmarks.txt" + + (cat "$global" "$local" 2>/dev/null || true) | fzf | cut -d ' ' -f 1 | xargs open +fi diff --git a/home/shell.nix b/home/shell/default.nix similarity index 81% rename from home/shell.nix rename to home/shell/default.nix index 23eaf1a..1904667 100644 --- a/home/shell.nix +++ b/home/shell/default.nix @@ -45,6 +45,17 @@ }; config = { + # xdg.configFile."emacs".source = config.lib.file.mkOutOfStoreSymlink "${dots}/home/emacs/config"; + programs.bash = { + bashrcExtra = lib.mkAfter '' + export PATH="${dots}/home/shell/bin:$PATH" + ''; + }; + programs.zsh = { + initExtra = lib.mkAfter '' + export PATH="${dots}/home/shell/bin:$PATH" + ''; + }; # programs.bash = lib.mkIf (config.custom.shell.additionalSourceFile != null) { # bashrcExtra = lib.mkAfter '' # source ${config.custom.shell.additionalSourceFile} diff --git a/hosts/dango/default.nix b/hosts/dango/default.nix index ece2c87..2885fc0 100644 --- a/hosts/dango/default.nix +++ b/hosts/dango/default.nix @@ -52,6 +52,8 @@ drawio = true; soulver = true; pika = true; + transmission = true; + alt-tab = true; }; };