diff options
-rw-r--r-- | nixos/npins/sources.json | 4 | ||||
-rw-r--r-- | nixos/profiles/common/nixpkgs/overlays.nix | 8 | ||||
-rw-r--r-- | nixos/profiles/workstation/patches/skim-blank.patch | 73 | ||||
-rw-r--r-- | user/sway/config | 2 |
4 files changed, 3 insertions, 84 deletions
diff --git a/nixos/npins/sources.json b/nixos/npins/sources.json index 320dc04..46ec513 100644 --- a/nixos/npins/sources.json +++ b/nixos/npins/sources.json @@ -91,8 +91,8 @@ "nixos": { "type": "Channel", "name": "nixos-25.05", - "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.806273.650e572363c0/nixexprs.tar.xz", - "hash": "13lp33ghby413v1sshh9w0sazwz4sds3sqpa3gq4fz4fagsg48wg" + "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.808129.3385ca0cd7e1/nixexprs.tar.xz", + "hash": "0fm3h18h23nz1zyqjii1dfv4az7lmicx7h07klsig6zz4pp9by6s" }, "nixos-small": { "type": "Channel", diff --git a/nixos/profiles/common/nixpkgs/overlays.nix b/nixos/profiles/common/nixpkgs/overlays.nix index 2834325..40f9041 100644 --- a/nixos/profiles/common/nixpkgs/overlays.nix +++ b/nixos/profiles/common/nixpkgs/overlays.nix @@ -13,14 +13,6 @@ }; }); }) - (final: prev: { - skim = prev.skim.overrideAttrs (old: { - patches = old.patches ++ [ - # https://github.com/skim-rs/skim/issues/803 - ../../workstation/patches/skim-blank.patch - ]; - }); - }) # bug fixes (final: prev: { diff --git a/nixos/profiles/workstation/patches/skim-blank.patch b/nixos/profiles/workstation/patches/skim-blank.patch deleted file mode 100644 index 590515c..0000000 --- a/nixos/profiles/workstation/patches/skim-blank.patch +++ /dev/null @@ -1,73 +0,0 @@ -commit bd0a387d9a4c6ad2cea1a3270e2897f2b740ece4 -Author: Martin Fischer <martin@push-f.com> -Date: Sun Jun 15 08:37:25 2025 +0200 - - feat: add --blank option - -diff --git a/skim/src/model/mod.rs b/skim/src/model/mod.rs -index ff9ec6c..c3d2966 100644 ---- a/skim/src/model/mod.rs -+++ b/skim/src/model/mod.rs -@@ -93,6 +93,7 @@ pub struct Model { - info: InfoDisplay, - no_clear_if_empty: bool, - theme: Arc<ColorTheme>, -+ hide_results_for_empty_query: bool, - - // timer thread for scheduled events - timer: Timer, -@@ -177,6 +178,7 @@ impl Model { - info: InfoDisplay::Default, - no_clear_if_empty: false, - theme, -+ hide_results_for_empty_query: false, - timer: Timer::new(), - hb_timer_guard: None, - -@@ -201,6 +203,7 @@ impl Model { - } else { - options.info.clone() - }; -+ self.hide_results_for_empty_query = options.blank; - - self.use_regex = options.regex; - -@@ -316,7 +319,9 @@ impl Model { - } - }; - self.num_options += matched.len(); -- self.selection.append_sorted_items(matched); -+ if !self.hide_results_for_empty_query || !self.query.get_query().is_empty() { -+ self.selection.append_sorted_items(matched); -+ } - } - - let items_consumed = self.item_pool.num_not_taken() == 0; -diff --git a/skim/src/options.rs b/skim/src/options.rs -index 657130a..b78b3e7 100644 ---- a/skim/src/options.rs -+++ b/skim/src/options.rs -@@ -650,6 +650,10 @@ pub struct SkimOptions { - #[arg(long, default_value = "0", help_heading = "Display")] - pub header_lines: usize, - -+ /// Don't show results if the query is empty. -+ #[arg(long, help_heading = "Display")] -+ pub blank: bool, -+ - // --- History --- - /// History file - /// -diff --git a/skim/src/query.rs b/skim/src/query.rs -index 7a09091..9e9ff24 100644 ---- a/skim/src/query.rs -+++ b/skim/src/query.rs -@@ -170,7 +170,7 @@ impl Query { - .collect() - } - -- fn get_query(&mut self) -> String { -+ pub fn get_query(&mut self) -> String { - match self.mode { - QueryMode::Query => self.get_fz_query(), - QueryMode::Cmd => self.get_cmd_query(), diff --git a/user/sway/config b/user/sway/config index cf9101f..3b65353 100644 --- a/user/sway/config +++ b/user/sway/config @@ -90,7 +90,7 @@ input "10429:514:Hanvon_Ugee_Shortcut_Remote_Keyboard" { # Exit sway (logs you out of your Wayland session) bindsym $mod+Shift+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' - bindsym $mod+m exec foot zsh -c 'cd ~/repos/notes && ed --blank' + bindsym $mod+m exec foot zsh -c 'cd ~/repos/notes && ed --min-query-length 1' # # Moving around: # |