From 42d7894d0a2f79c20df569ba5c05e61d1a45ece7 Mon Sep 17 00:00:00 2001 From: Uttarayan Date: Fri, 13 Oct 2023 13:25:16 +0530 Subject: [PATCH] [fix] Stuff Signed-off-by: Uttarayan --- config/fish/conf.d/abbr.fish | 1 + config/hypr/binds.conf | 3 ++- config/hypr/hyprland.conf | 3 ++- config/nushell/config.nu | 49 ++++++++++++++++++++++++++++++++++-- config/nvim/lua/plugins.lua | 4 ++- 5 files changed, 55 insertions(+), 5 deletions(-) diff --git a/config/fish/conf.d/abbr.fish b/config/fish/conf.d/abbr.fish index bc07a1a7..f4585782 100644 --- a/config/fish/conf.d/abbr.fish +++ b/config/fish/conf.d/abbr.fish @@ -31,3 +31,4 @@ end if not type -q wget abbr wget curl -O end +abbr rpc 'patch -p0 < ~/.local/share/console.diff' diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index 5ffa3091..3e0eebd4 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -6,7 +6,7 @@ $mainModShift = SUPER_SHIFT bind = $mainMod, Return, exec, foot bind = $mainModShift, Return, exec, wezterm bind = $mainModShift, Q, killactive, -bind = $mainMod, M, exit, +# bind = $mainMod, M, exit, bind = $mainMod, t, togglefloating, bind = $mainMod, f, fullscreen, bind = $mainMod, d, exec, anyrun @@ -26,6 +26,7 @@ bind = ,xf86audioplay, exec, /home/fs0c131y/.cargo/bin/mctl toggle # Screenshot bind = $mainMod,Print, exec, grim bind = $mainModShift,Print, exec, grim -g "$(slurp)" +bind = $mainModShift,s, exec, watershot # Move focus with mainMod + arrow keys diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index f77f7a8d..529c08a5 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -31,8 +31,9 @@ exec-once = swaync exec-once = ironbar exec-once = nextcloud --background exec-once = /usr/lib/polkit-kde-authentication-agent-1 -exec-once = /usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized +exec-once = /usr/local/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized exec-once = /usr/lib/kdeconnectd +exec-once = aa-notify -p -s 1 -w 60 -f /var/log/audit/audit.log # exec-once = linux-wallpaperengine --screen-root DP-2 2207659298 # exec-once = linux-wallpaperengine --screen-root DP-3 2207659298 diff --git a/config/nushell/config.nu b/config/nushell/config.nu index c19fe04d..1ef054c5 100644 --- a/config/nushell/config.nu +++ b/config/nushell/config.nu @@ -319,7 +319,7 @@ $env.config = { } explore: { - help_banner: true + help_banner: false exit_esc: true command_bar_text: '#C4C9C6' @@ -378,7 +378,8 @@ $env.config = { history: { max_size: 10000 # Session has to be reloaded for this to take effect sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file - file_format: "plaintext" # "sqlite" or "plaintext" + file_format: "sqlite" # "sqlite" or "plaintext" + isolation: true } completions: { case_sensitive: false # set to true to enable case-sensitive completions @@ -651,6 +652,50 @@ $env.config = { ] } +let fish_completer = {|spans| + fish --command $'complete "--do-complete=($spans | str join " ")"' + | $"value(char tab)description(char newline)" + $in + | from tsv --flexible --no-infer +} + +let carapace_completer = {|spans: list| + carapace $spans.0 nushell $spans + | from json + | if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null } +} + +# This completer will use carapace by default +let external_completer = {|spans| + let expanded_alias = scope aliases + | where name == $spans.0 + | get -i 0.expansion + + let spans = if $expanded_alias != null { + $spans + | skip 1 + | prepend ($expanded_alias | split row ' ') + } else { + $spans + } + + match $spans.0 { + nu => $fish_completer + git => $fish_completer + _ => $fish_completer + } | do $in $spans +} + +$env.config = { + # ... + completions: { + external: { + enable: true + completer: $external_completer + } + } + # ... +} + source starship.nu source zoxide.nu source alias.nu diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 5583e726..112037ff 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -203,7 +203,9 @@ return require('lazy').setup({ }, { 'LhKipp/nvim-nu', - config = function() require 'nu'.setup() end, + config = function() require 'nu'.setup({ + use_lsp_features = false, + }) end, ft = "nu" }, -- lsp