aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Goncharow <alec@goncharow.dev>2025-04-20 15:46:33 -0400
committerAlec Goncharow <alec@goncharow.dev>2025-04-20 15:48:01 -0400
commit973673083f215451b7674a22533b4e7dfdfb81fd (patch)
treebe7942cc9e98755edeb24427e4776b75e7485f73
parent78efc3eb493b40ad2f79408a47bb873b5eea9db0 (diff)
maybe useful
idk
-rw-r--r--.config/fish/config.fish24
-rw-r--r--.config/ghostty/config18
-rw-r--r--.config/nvim/lua/autocomplete.lua13
-rw-r--r--.config/nvim/lua/fzf.lua1
-rw-r--r--.config/sway/config3
-rw-r--r--.zimrc6
-rwxr-xr-xbin/rgf27
-rwxr-xr-xfunctions/fzf.sh11
8 files changed, 87 insertions, 16 deletions
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
new file mode 100644
index 0000000..8f69dcb
--- /dev/null
+++ b/.config/fish/config.fish
@@ -0,0 +1,24 @@
+if status is-interactive
+ # Commands to run in interactive sessions can go here
+end
+
+# Add to PATH
+fish_add_path ~/bin
+fish_add_path ~/go/bin
+fish_add_path ~/.local/bin
+
+if [ -f "$HOME/.zig/env" ];
+ fish_add_path /home/algo/.zig/bin
+ fish_add_path /home/algo/.zig/zig
+end
+fish_add_path --prepend $HOME/.cargo/bin
+
+# Set editor
+set -gx EDITOR nvim
+
+# Man page settings
+set -gx MANPAGER 'nvim +Man!'
+set -gx MANWIDTH 80
+
+
+starship init fish | source
diff --git a/.config/ghostty/config b/.config/ghostty/config
new file mode 100644
index 0000000..d401ac1
--- /dev/null
+++ b/.config/ghostty/config
@@ -0,0 +1,18 @@
+command = /usr/bin/fish
+click-repeat-interval = 500
+auto-update-channel = tip
+
+background-opacity = 0.95
+foreground = #d3b58d
+background = #062625
+
+selection-invert-fg-bg = true
+
+window-theme = dark
+window-decoration = false
+
+cursor-text = #2c4e6c
+cursor-color = #90ee90
+
+font-size = 13
+font-family = FiraMono
diff --git a/.config/nvim/lua/autocomplete.lua b/.config/nvim/lua/autocomplete.lua
index 4ada86b..1de4271 100644
--- a/.config/nvim/lua/autocomplete.lua
+++ b/.config/nvim/lua/autocomplete.lua
@@ -23,7 +23,7 @@ cmp.setup({
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
- ['<C-y>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
+ ['<C-y>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
['<C-e>'] = cmp.mapping.abort(),
}),
sources = cmp.config.sources({
@@ -35,9 +35,14 @@ cmp.setup({
-- { name = 'snippy' }, -- For snippy users.
}, {
{ name = 'buffer' },
- })
+ }),
+ completion = {
+ autocomplete = false
+ }
})
+vim.keymap.set('i', '<C-c>', cmp.mapping.complete(), {})
+
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
@@ -57,9 +62,9 @@ cmp.setup.cmdline({ '/', '?' }, {
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
sources = cmp.config.sources({
- { name = 'path' }
- }, {
{ name = 'cmdline' }
+ }, {
+ { name = 'path' }
}),
matching = { disallow_symbol_nonprefix_matching = false }
})
diff --git a/.config/nvim/lua/fzf.lua b/.config/nvim/lua/fzf.lua
index 170158a..3dd5645 100644
--- a/.config/nvim/lua/fzf.lua
+++ b/.config/nvim/lua/fzf.lua
@@ -1,5 +1,6 @@
local fzf = require('fzf-lua')
vim.keymap.set('n', '<c-b>', fzf.buffers, {})
+vim.keymap.set('n', '<c-t>', fzf.marks, {})
vim.keymap.set('n', '<leader>fb', fzf.lines, {})
vim.keymap.set('n', '<leader>ff', fzf.files, {})
vim.keymap.set('n', '<leader>fg', fzf.live_grep, {})
diff --git a/.config/sway/config b/.config/sway/config
index 271edd2..dcf3f92 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -26,7 +26,7 @@ font pango:Fira Mono 8
floating_modifier $mod
# start a terminal
-set $my-term alacritty
+set $my-term ghostty
bindsym $mod+Return exec --no-startup-id $my-term
bindsym $mod+t exec --no-startup-id $my-term
bindsym $mod+n exec --no-startup-id neovide '+Notes'
@@ -227,6 +227,7 @@ for_window {
[class="firefox"] border none
[app_id="firefox"] border none
[app_id="Alacritty"] border pixel 2
+ [app_id="com.mitchellh.ghostty"] border pixel 2
[app_id="neovide"] border pixel 2
[class="steam"] border none
[class="Godot"] floating enable
diff --git a/.zimrc b/.zimrc
index a11c745..ecb8c97 100644
--- a/.zimrc
+++ b/.zimrc
@@ -61,11 +61,5 @@ zmodule zsh-users/zsh-history-substring-search
zmodule zsh-users/zsh-autosuggestions
# }}} End configuration added by Zim install
-# Start configuration added by Zim install {{{
-#
-# This is not sourced during shell startup, and it's only used to configure the
-# zimfw plugin manager.
-#
-
zmodule joke/zim-starship
zmodule kiesman99/zim-zoxide
diff --git a/bin/rgf b/bin/rgf
new file mode 100755
index 0000000..881359d
--- /dev/null
+++ b/bin/rgf
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+if [[ "${TRACE-0}" == "1" ]]; then
+ set -o xtrace
+fi
+
+main() {
+ result=$(rg --ignore-case --color=always --line-number --no-heading "$@" |
+ fzf --ansi \
+ --color 'hl:-1:underline,hl+:-1:underline:reverse' \
+ --delimiter ':' \
+ --preview "bat --color=always {1} --theme='gruvbox-dark' --highlight-line {2}" \
+ --preview-window 'up,60%,border-bottom,+{2}+3/3,~3')
+
+
+ file=${result%%:*}
+ line=$(echo "${result}" | cut -d: -f2)
+
+ if [[ -n "$file" ]]; then
+ nvim +"${line}" "$file"
+ fi
+}
+
+main "$@"
+
diff --git a/functions/fzf.sh b/functions/fzf.sh
index 8761247..e806da1 100755
--- a/functions/fzf.sh
+++ b/functions/fzf.sh
@@ -7,11 +7,12 @@ function frg {
--delimiter ':' \
--preview "bat --color=always {1} --theme='gruvbox-dark' --highlight-line {2}" \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3')
- file=${result%%:*}
- linenumber=$(echo "${result}" | cut -d: -f2)
- if [[ -n "$file" ]]; then
- nvim +"${linenumber}" "$file"
- fi
+
+ file=${result%%:*}
+ linenumber=$(echo "${result}" | cut -d: -f2)
+ if [[ -n "$file" ]]; then
+ nvim +"${linenumber}" "$file"
+ fi
}
alias rgf=frg