mirror of
https://github.com/mitchell/dotfiles.git
synced 2026-04-03 16:30:12 +00:00
feat/refactor: new computer, new configs, new desktop environment
This commit is contained in:
parent
44780e9a9e
commit
e3b1f60711
38 changed files with 854 additions and 1191 deletions
|
|
@ -1,45 +1,20 @@
|
|||
#!/usr/bin/fish
|
||||
|
||||
#if ! test -e ~/.bspwm_no_lock
|
||||
# slock &
|
||||
# touch ~/.bspwm_no_lock
|
||||
#end
|
||||
|
||||
if test $DISPLAY = ":0"
|
||||
setxkbmap -option ctrl:swapcaps
|
||||
setxkbmap -option altwin:swap_alt_win
|
||||
xset s off -dpms
|
||||
xinput set-prop 'MSFT0001:00 04F3:317C Touchpad' 'libinput Tapping Enabled' 1
|
||||
xinput set-prop 'MSFT0001:00 04F3:317C Touchpad' 'libinput Middle Emulation Enabled' 1
|
||||
end
|
||||
|
||||
sxhkd &
|
||||
#wmname LG3D
|
||||
|
||||
if test $DISPLAY = ":0"
|
||||
killall -q picom sxhkd
|
||||
picom -b
|
||||
else
|
||||
picom -b --backend xrender
|
||||
end
|
||||
|
||||
#wmname LG3D
|
||||
sxhkd &
|
||||
|
||||
if test $DISPLAY = ":0"
|
||||
killall -q polybar pasystray barrier barrierc
|
||||
barrier &
|
||||
keepassxc &
|
||||
~/.fehbg
|
||||
else
|
||||
feh --no-fehbg --bg-scale '/home/m/sync/maelstrom.jpg'
|
||||
end
|
||||
|
||||
polybar m-bar &
|
||||
pasystray &
|
||||
|
||||
bspc monitor -d I II III IV V VI VII
|
||||
bspc monitor -d I II III IV V
|
||||
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 10
|
||||
bspc config top_padding -10
|
||||
|
||||
bspc config split_ratio 0.52
|
||||
bspc config borderless_monocle false
|
||||
|
|
|
|||
14
.config/fish/conf.d/fish_frozen_key_bindings.fish
Normal file
14
.config/fish/conf.d/fish_frozen_key_bindings.fish
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||
# the 'fish_key_bindings' variable from its old default scope (universal)
|
||||
# to its new default scope (global). We recommend you delete this file
|
||||
# and configure key bindings in ~/.config/fish/config.fish if needed.
|
||||
|
||||
set --global fish_key_bindings fish_vi_key_bindings
|
||||
|
||||
# Prior to version 4.3, fish shipped an event handler that runs
|
||||
# `set --universal fish_key_bindings fish_default_key_bindings`
|
||||
# whenever the fish_key_bindings variable is erased.
|
||||
# This means that as long as any fish < 4.3 is still running on this system,
|
||||
# we cannot complete the migration.
|
||||
# As a workaround, erase the universal variable at every shell startup.
|
||||
set --erase --universal fish_key_bindings
|
||||
46
.config/fish/conf.d/fish_frozen_theme.fish
Normal file
46
.config/fish/conf.d/fish_frozen_theme.fish
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||
# theme variables from universal to global scope.
|
||||
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
|
||||
# To customize your theme, delete this file and see
|
||||
# help interactive#syntax-highlighting
|
||||
# or
|
||||
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
|
||||
# for appropriate commands to add to ~/.config/fish/config.fish instead.
|
||||
# See also the release notes for fish 4.3.0 (run `help relnotes`).
|
||||
|
||||
set --global fish_color_autosuggestion 727169 brblack
|
||||
set --global fish_color_cancel -r
|
||||
set --global fish_color_command 957FB8 magenta
|
||||
set --global fish_color_comment 727169 brblack
|
||||
set --global fish_color_cwd green
|
||||
set --global fish_color_cwd_root red
|
||||
set --global fish_color_end FF9E64 brred
|
||||
set --global fish_color_error C34043 red
|
||||
set --global fish_color_escape D27E99 brmagenta
|
||||
set --global fish_color_history_current --bold
|
||||
set --global fish_color_host normal
|
||||
set --global fish_color_host_remote yellow
|
||||
set --global fish_color_keyword D27E99 brmagenta
|
||||
set --global fish_color_normal DCD7BA normal
|
||||
set --global fish_color_operator 7AA89F cyan
|
||||
set --global fish_color_param DCD7BA normal
|
||||
set --global fish_color_quote C0A36E yellow
|
||||
set --global fish_color_redirection 76946A green
|
||||
set --global fish_color_search_match --background=2D4F67 --background=brcyan
|
||||
set --global fish_color_selection --background=2D4F67 --background=brcyan
|
||||
set --global fish_color_status red
|
||||
set --global fish_color_user brgreen
|
||||
set --global fish_color_valid_path --underline
|
||||
set --global fish_pager_color_background
|
||||
set --global fish_pager_color_completion DCD7BA normal
|
||||
set --global fish_pager_color_description 727169 brblack
|
||||
set --global fish_pager_color_prefix 957FB8 magenta
|
||||
set --global fish_pager_color_progress 727169 brblack
|
||||
set --global fish_pager_color_secondary_background
|
||||
set --global fish_pager_color_secondary_completion
|
||||
set --global fish_pager_color_secondary_description
|
||||
set --global fish_pager_color_secondary_prefix
|
||||
set --global fish_pager_color_selected_background -r
|
||||
set --global fish_pager_color_selected_completion
|
||||
set --global fish_pager_color_selected_description
|
||||
set --global fish_pager_color_selected_prefix
|
||||
|
|
@ -2,9 +2,6 @@ function configure_fish
|
|||
# Determine OS
|
||||
set uname (uname)
|
||||
|
||||
# Set umask
|
||||
umask 077
|
||||
|
||||
# Begin profile init
|
||||
# (These functions are defined in the functions/ directory.)
|
||||
define_global_variables
|
||||
|
|
|
|||
5
.config/fish/functions/adr.fish
Normal file
5
.config/fish/functions/adr.fish
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
function adr --wraps aider
|
||||
set -lx OPENAI_BASE_URL http://localhost:8080/v1
|
||||
set -lx OPENAI_API_KEY local
|
||||
aider $argv
|
||||
end
|
||||
3
.config/fish/functions/commit.fish
Normal file
3
.config/fish/functions/commit.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function commit -d 'Commit staged changes using Opencode'
|
||||
opencode run Commit the staged changes with conventional style.
|
||||
end
|
||||
|
|
@ -20,7 +20,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
|||
alias hx helix
|
||||
alias ai aichat
|
||||
alias ais aisearch
|
||||
alias adr aider
|
||||
alias fwl 'sudo firewall-cmd'
|
||||
|
||||
switch "$uname"
|
||||
case Linux
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ function define_global_variables -d 'Defines all and exclusively globally export
|
|||
|
||||
set -gx EDITOR nvim
|
||||
set -gx BROWSER firefox
|
||||
set -gx DIFFPROG nvim -d
|
||||
set -gx DIFFPROG delta
|
||||
|
||||
set -gx FZF_CTRL_T_COMMAND 'fd --type f --type d --hidden --exclude ".git/"'
|
||||
set -gx FZF_DEFAULT_COMMAND 'fd --type f --type d --hidden --exclude ".git/"'
|
||||
|
|
@ -15,8 +15,6 @@ function define_global_variables -d 'Defines all and exclusively globally export
|
|||
set -gx GOPATH $HOME/code/go
|
||||
set -gx GOBIN $GOPATH/bin
|
||||
|
||||
set -gx GTK_THEME Kanagawa-BL
|
||||
|
||||
set -gx BUN_INSTALL $HOME/.bun
|
||||
|
||||
set -gx LIBVIRT_DEFAULT_URI 'qemu:///system'
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ function fish_user_key_bindings
|
|||
bind --mode insert comma,r 'fzf-history-widget'
|
||||
bind --mode insert comma,c 'fzf-cd-widget'
|
||||
bind --mode insert comma,l 'clear; commandline -f repaint'
|
||||
bind --mode insert comma,o 'opencode; commandline -f repaint'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
function fwl -d 'Function to simplify interacting with firewalld'
|
||||
argparse --ignore-unknown \
|
||||
p/permanent \
|
||||
r/reset \
|
||||
'z/zone=' \
|
||||
'o/policy=' \
|
||||
's/service=' \
|
||||
-- $argv
|
||||
|
||||
if set -q _flag_reset
|
||||
echo 'Resetting fwl ...'
|
||||
_fwl_reset
|
||||
return
|
||||
end
|
||||
|
||||
if set -q _flag_permanent
|
||||
if set -q _fwl_perm
|
||||
set -ge _fwl_perm
|
||||
else
|
||||
set -g _fwl_perm --permanent
|
||||
end
|
||||
end
|
||||
|
||||
if set -q _flag_zone
|
||||
set -g _fwl_mode "--zone=$_flag_z"
|
||||
else if set -q _flag_policy
|
||||
set -g _fwl_mode "--policy=$_flag_o"
|
||||
else if set -q _flag_service
|
||||
set -g _fwl_mode "--service=$_flag_s"
|
||||
end
|
||||
|
||||
echo fwl_mode={$_fwl_perm} $_fwl_mode
|
||||
|
||||
test -z "$argv"; and return
|
||||
|
||||
switch $argv
|
||||
case i info
|
||||
set argv --list-all
|
||||
case a all
|
||||
set argv --list-all-zones
|
||||
case on all-on
|
||||
set argv --get-active-zones
|
||||
case s services
|
||||
set argv --get-services
|
||||
end
|
||||
|
||||
sudo firewall-cmd {$_fwl_perm} {$_fwl_mode} $argv
|
||||
end
|
||||
|
||||
function _fwl_reset -d 'Reset fwl global variables'
|
||||
set -ge _fwl_mode
|
||||
set -ge _fwl_perm
|
||||
return 0
|
||||
end
|
||||
|
|
@ -8,11 +8,7 @@ function import_sources -a uname -d 'Loads any additional fish files needed at i
|
|||
set _asdf_shims "$ASDF_DATA_DIR/shims"
|
||||
end
|
||||
|
||||
# Do not use fish_add_path (added in Fish 3.2) because it
|
||||
# potentially changes the order of items in PATH
|
||||
if not contains $_asdf_shims $PATH
|
||||
set -gx --prepend PATH $_asdf_shims
|
||||
end
|
||||
fish_add_path $_asdf_shims
|
||||
set --erase _asdf_shims
|
||||
|
||||
test -e /opt/homebrew/bin/brew
|
||||
|
|
|
|||
58
.config/ghostty/config
Normal file
58
.config/ghostty/config
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# This is the configuration file for Ghostty.
|
||||
#
|
||||
# This template file has been automatically created at the following
|
||||
# path since Ghostty couldn't find any existing config files on your system:
|
||||
#
|
||||
# /home/m/.config/ghostty/config
|
||||
#
|
||||
# The template does not set any default options, since Ghostty ships
|
||||
# with sensible defaults for all options. Users should only need to set
|
||||
# options that they want to change from the default.
|
||||
#
|
||||
# Run `ghostty +show-config --default --docs` to view a list of
|
||||
# all available config options and their default values.
|
||||
#
|
||||
# Additionally, each config option is also explained in detail
|
||||
# on Ghostty's website, at https://ghostty.org/docs/config.
|
||||
#
|
||||
# Ghostty can reload the configuration while running by using the menu
|
||||
# options or the bound key (default: Command + Shift + comma on macOS and
|
||||
# Control + Shift + comma on other platforms). Not all config options can be
|
||||
# reloaded while running; some only apply to new windows and others may require
|
||||
# a full restart to take effect.
|
||||
|
||||
# Config syntax crash course
|
||||
# ==========================
|
||||
# # The config file consists of simple key-value pairs,
|
||||
# # separated by equals signs.
|
||||
# font-family = Iosevka
|
||||
# window-padding-x = 2
|
||||
#
|
||||
# # Spacing around the equals sign does not matter.
|
||||
# # All of these are identical:
|
||||
# key=value
|
||||
# key= value
|
||||
# key =value
|
||||
# key = value
|
||||
#
|
||||
# # Any line beginning with a # is a comment. It's not possible to put
|
||||
# # a comment after a config option, since it would be interpreted as a
|
||||
# # part of the value. For example, this will have a value of "#123abc":
|
||||
# background = #123abc
|
||||
#
|
||||
# # Empty values are used to reset config keys to default.
|
||||
# key =
|
||||
#
|
||||
# # Some config options have unique syntaxes for their value,
|
||||
# # which is explained in the docs for that config option.
|
||||
# # Just for example:
|
||||
# resize-overlay-duration = 4s 200ms
|
||||
font-family = JetBrains Mono
|
||||
font-size = 11
|
||||
window-inherit-working-directory = false
|
||||
tab-inherit-working-directory = true
|
||||
quit-after-last-window-closed = true
|
||||
window-decoration = none
|
||||
background-opacity = 0.95
|
||||
gtk-wide-tabs = false
|
||||
theme = Kanagawa Wave
|
||||
357
.config/niri/config.kdl
Normal file
357
.config/niri/config.kdl
Normal file
|
|
@ -0,0 +1,357 @@
|
|||
environment {
|
||||
XDG_CURRENT_DESKTOP "niri"
|
||||
QT_QPA_PLATFORM "wayland"
|
||||
ELECTRON_OZONE_PLATFORM_HINT "auto"
|
||||
QT_QPA_PLATFORMTHEME "gtk3"
|
||||
QT_QPA_PLATFORMTHEME_QT6 "gtk3"
|
||||
}
|
||||
|
||||
prefer-no-csd
|
||||
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
}
|
||||
|
||||
numlock
|
||||
}
|
||||
|
||||
touchpad {
|
||||
tap
|
||||
natural-scroll
|
||||
}
|
||||
|
||||
mouse {
|
||||
accel-profile "flat"
|
||||
}
|
||||
|
||||
trackpoint {
|
||||
}
|
||||
}
|
||||
|
||||
output "ASUSTek COMPUTER INC VG27WQ L1LMDW002255" {
|
||||
mode "2560x1440@164.998"
|
||||
scale 1
|
||||
transform "normal"
|
||||
position x=2560 y=0
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 12
|
||||
center-focused-column "on-overflow"
|
||||
always-center-single-column
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
}
|
||||
default-column-width { proportion 0.5; }
|
||||
|
||||
focus-ring {
|
||||
off
|
||||
width 3
|
||||
active-color "#76946a"
|
||||
inactive-color "#505050"
|
||||
}
|
||||
|
||||
border {
|
||||
width 3
|
||||
active-color "#ffc87f"
|
||||
inactive-color "#505050"
|
||||
urgent-color "#9b0000"
|
||||
}
|
||||
|
||||
shadow {
|
||||
// on
|
||||
softness 30
|
||||
spread 5
|
||||
offset x=0 y=5
|
||||
color "#0007"
|
||||
}
|
||||
|
||||
struts {
|
||||
// left 64
|
||||
// right 64
|
||||
// top 64
|
||||
// bottom 64
|
||||
}
|
||||
}
|
||||
|
||||
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
|
||||
spawn-sh-at-startup "swayidle -w timeout 1800 'niri msg action power-off-monitors' timeout 1860 'qs -c noctalia-shell ipc call lockScreen lock'"
|
||||
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||
|
||||
animations {
|
||||
// off
|
||||
// slowdown 3.0
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||
default-column-width {}
|
||||
}
|
||||
|
||||
window-rule {
|
||||
// This app-id regular expression will work for both:
|
||||
// - host Firefox (app-id is "firefox")
|
||||
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
|
||||
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||
open-floating true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^Emulator$"#
|
||||
open-floating true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^Reactotron$"#
|
||||
default-column-width { proportion 0.33333; }
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||
|
||||
block-out-from "screen-capture"
|
||||
|
||||
// Use this instead if you want them visible on third-party screenshot tools.
|
||||
// block-out-from "screencast"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||
match app-id="Alacritty"
|
||||
match app-id="zen"
|
||||
match app-id="com.mitchellh.ghostty"
|
||||
match app-id="kitty"
|
||||
draw-border-with-background false
|
||||
}
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius 12
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
binds {
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
Mod+Return hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; }
|
||||
Mod+Space hotkey-overlay-title="Run an Application" { spawn-sh "qs -c noctalia-shell ipc call launcher toggle"; }
|
||||
Mod+S hotkey-overlay-title="Open the Settings" { spawn-sh "qs -c noctalia-shell ipc call settings toggle"; }
|
||||
Super+Alt+L hotkey-overlay-title="Lock the Screen" { spawn-sh "qs -c noctalia-shell ipc call lockScreen lock"; }
|
||||
Super+Alt+Q hotkey-overlay-title="Open the Session Menu" { spawn-sh "qs -c noctalia-shell ipc call sessionMenu toggle"; }
|
||||
|
||||
Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; }
|
||||
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume increase"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume decrease"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteOutput"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteInput"; }
|
||||
XF86AudioPlay allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; }
|
||||
XF86AudioPause allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media pause"; }
|
||||
XF86AudioNext allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media next"; }
|
||||
XF86AudioPrev allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media previous"; }
|
||||
|
||||
//XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
|
||||
//XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
|
||||
|
||||
Mod+O repeat=false { toggle-overview; }
|
||||
|
||||
Mod+Q repeat=false { close-window; }
|
||||
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+BracketLeft { focus-column-left; }
|
||||
Mod+Right { focus-column-right; }
|
||||
Mod+BracketRight { focus-column-right; }
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+J { focus-window-down; }
|
||||
Mod+K { focus-window-up; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
Mod+Ctrl+Left { move-column-left; }
|
||||
Mod+Ctrl+BracketLeft { move-column-left; }
|
||||
Mod+Ctrl+Right { move-column-right; }
|
||||
Mod+Ctrl+BracketRight { move-column-right; }
|
||||
Mod+Ctrl+H { move-column-left; }
|
||||
Mod+Ctrl+J { move-window-down; }
|
||||
Mod+Ctrl+K { move-window-up; }
|
||||
Mod+Ctrl+L { move-column-right; }
|
||||
|
||||
// Alternative commands that move across workspaces when reaching
|
||||
// the first or last window in a column.
|
||||
// Mod+J { focus-window-or-workspace-down; }
|
||||
// Mod+K { focus-window-or-workspace-up; }
|
||||
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
Mod+Shift+Left { focus-monitor-left; }
|
||||
Mod+Shift+Down { focus-monitor-down; }
|
||||
Mod+Shift+Up { focus-monitor-up; }
|
||||
Mod+Shift+Right { focus-monitor-right; }
|
||||
Mod+Shift+H { focus-monitor-left; }
|
||||
Mod+Shift+J { focus-monitor-down; }
|
||||
Mod+Shift+K { focus-monitor-up; }
|
||||
Mod+Shift+L { focus-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
// And you can also move a whole workspace to another monitor:
|
||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
Mod+Down { focus-workspace-down; }
|
||||
Mod+Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
Mod+Semicolon { focus-workspace-down; }
|
||||
Mod+Apostrophe { focus-workspace-up; }
|
||||
Mod+Ctrl+Down { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Up { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+Semicolon { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Apostrophe { move-column-to-workspace-up; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
// ...
|
||||
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
Mod+Shift+U { move-workspace-down; }
|
||||
Mod+Shift+I { move-workspace-up; }
|
||||
|
||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollRight { focus-column-right; }
|
||||
Mod+WheelScrollLeft { focus-column-left; }
|
||||
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||
|
||||
// Usually scrolling up and down with Shift in applications results in
|
||||
// horizontal scrolling; these binds replicate that.
|
||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||
|
||||
Mod+Comma { consume-or-expel-window-left; }
|
||||
Mod+Period { consume-or-expel-window-right; }
|
||||
|
||||
// Consume one window from the right to the bottom of the focused column.
|
||||
//Mod+Comma { consume-window-into-column; }
|
||||
// Expel the bottom window from the focused column to the right.
|
||||
//Mod+Period { expel-window-from-column; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
// Cycling through the presets in reverse order is also possible.
|
||||
// Mod+R { switch-preset-column-width-back; }
|
||||
Mod+Shift+R { switch-preset-window-height; }
|
||||
Mod+Ctrl+R { reset-window-height; }
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
|
||||
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||
|
||||
Mod+C { center-column; }
|
||||
|
||||
Mod+Ctrl+C { center-visible-columns; }
|
||||
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
|
||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||
|
||||
Mod+V { toggle-window-floating; }
|
||||
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
// Mod+Space { switch-layout "next"; }
|
||||
// Mod+Shift+Space { switch-layout "prev"; }
|
||||
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
// Applications such as remote-desktop clients and software KVM switches may
|
||||
// request that niri stops processing the keyboard shortcuts defined here
|
||||
// so they may, for example, forward the key presses as-is to a remote machine.
|
||||
// It's a good idea to bind an escape hatch to toggle the inhibitor,
|
||||
// so a buggy application can't hold your session hostage.
|
||||
//
|
||||
// The allow-inhibiting=false property can be applied to other binds as well,
|
||||
// which ensures niri always processes them, even when an inhibitor is active.
|
||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||
|
||||
Mod+Shift+E { quit; }
|
||||
Ctrl+Alt+Delete { quit; }
|
||||
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
}
|
||||
|
||||
gestures {
|
||||
hot-corners {
|
||||
top-right
|
||||
}
|
||||
}
|
||||
|
||||
// Noctalia
|
||||
spawn-sh-at-startup "qs -c noctalia-shell"
|
||||
|
||||
debug {
|
||||
// Allows notification actions and window activation from Noctalia.
|
||||
honor-xdg-activation-with-invalid-serial
|
||||
}
|
||||
|
||||
// Set the overview wallpaper on the backdrop.
|
||||
layer-rule {
|
||||
match namespace="^noctalia-overview*"
|
||||
place-within-backdrop true
|
||||
}
|
||||
|
||||
|
|
@ -5,7 +5,7 @@ local map_opts_silent = { noremap = true, silent = true }
|
|||
|
||||
-- General Mappings
|
||||
map("i", "jj", "<Esc>", { noremap = true, silent = true, desc = "Escape Insert Mode" })
|
||||
map("t", "<Esc>", "<C-\\><C-n>", { noremap = true, silent = true, desc = "Escape Terminal Mode" })
|
||||
-- map("t", "<Esc>", "<C-\\><C-n>", { noremap = true, silent = true, desc = "Escape Terminal Mode" })
|
||||
map("v", "//", function()
|
||||
vim.cmd("normal! y")
|
||||
local sel = vim.fn.getreg('"')
|
||||
|
|
|
|||
|
|
@ -1,57 +1,5 @@
|
|||
-- lua/plugins/tools.lua
|
||||
|
||||
local function create_adapter(adapter_type, name, opts)
|
||||
return require("codecompanion.adapters").extend(adapter_type, {
|
||||
name = name,
|
||||
schema = opts.schema or {},
|
||||
env = opts.env or {},
|
||||
parameters = opts.parameters or {},
|
||||
})
|
||||
end
|
||||
|
||||
local adapter_configs = {
|
||||
ollama = {
|
||||
type = "ollama",
|
||||
env = { url = "http://192.168.1.165:11434" },
|
||||
parameters = { sync = true },
|
||||
schema = { num_ctx = { default = 40960 } },
|
||||
},
|
||||
gemini_pro = {
|
||||
type = "gemini",
|
||||
schema = { model = { default = "gemini-2.5-pro-preview-05-06" } },
|
||||
},
|
||||
gemini_none = {
|
||||
type = "gemini",
|
||||
schema = {
|
||||
model = { default = "gemini-2.5-flash-preview-05-20" },
|
||||
reasoning_effort = { default = "none" },
|
||||
temperature = { default = 0 },
|
||||
},
|
||||
},
|
||||
gemini_high = {
|
||||
type = "gemini",
|
||||
schema = {
|
||||
model = { default = "gemini-2.5-flash-preview-05-20" },
|
||||
reasoning_effort = { default = "high" },
|
||||
},
|
||||
},
|
||||
openai_high = {
|
||||
type = "openai",
|
||||
schema = {
|
||||
model = { default = "o4-mini-2025-04-16" },
|
||||
reasoning_effort = { default = "high" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Dynamically generate adapter functions
|
||||
local adapters = {}
|
||||
for name, config in pairs(adapter_configs) do
|
||||
adapters[name] = function()
|
||||
return create_adapter(config.type, name, config)
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"olimorris/codecompanion.nvim",
|
||||
|
|
@ -68,22 +16,98 @@ return {
|
|||
window = { position = "right", opts = { number = false } },
|
||||
},
|
||||
},
|
||||
strategies = {
|
||||
chat = { adapter = "gemini_high" },
|
||||
inline = { adapter = "gemini_none" },
|
||||
cmd = { adapter = "gemini_none" },
|
||||
rules = {
|
||||
opts = {
|
||||
chat = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
interactions = {
|
||||
chat = {
|
||||
adapter = { name = "opencode", model = "llama.cpp/qwen3.5-35b-a3b-dev" },
|
||||
opts = {
|
||||
-- system_prompt = "",
|
||||
},
|
||||
tools = {
|
||||
opts = {
|
||||
system_prompt = {
|
||||
enabled = true, -- Enable the tools system prompt?
|
||||
replace_main_system_prompt = true, -- Replace the main system prompt with the tools system prompt?
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
inline = {
|
||||
adapter = { name = "llama.cpp", model = "qwen3.5-35b-a3b-dev" },
|
||||
},
|
||||
cmd = {
|
||||
adapter = { name = "llama.cpp", model = "qwen3.5-35b-a3b-dev" },
|
||||
},
|
||||
cli = {
|
||||
agent = "opencode",
|
||||
agents = {
|
||||
opencode = {
|
||||
cmd = "opencode",
|
||||
args = {},
|
||||
description = "OpenCode CLI",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
auto_insert = true, -- Enter insert mode when focusing the CLI terminal
|
||||
reload = true, -- Reload buffers when an agent modifies files on disk
|
||||
},
|
||||
},
|
||||
},
|
||||
adapters = {
|
||||
http = {
|
||||
["llama.cpp"] = function()
|
||||
return require("codecompanion.adapters").extend("openai_compatible", {
|
||||
schema = {
|
||||
model = {
|
||||
default = "qwen3.5-35b-a3b-dev",
|
||||
},
|
||||
},
|
||||
env = {
|
||||
url = "http://127.0.0.1:8080", -- replace with your llama.cpp instance
|
||||
api_key = "TERM",
|
||||
chat_url = "/v1/chat/completions",
|
||||
},
|
||||
handlers = {
|
||||
parse_message_meta = function(self, data)
|
||||
local extra = data.extra
|
||||
if extra and extra.reasoning_content then
|
||||
data.output.reasoning = { content = extra.reasoning_content }
|
||||
if data.output.content == "" then
|
||||
data.output.content = nil
|
||||
end
|
||||
end
|
||||
return data
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
adapters = adapters,
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>cc", "<cmd>CodeCompanionChat<cr>", desc = "CodeCompanion Chat", silent = true },
|
||||
{
|
||||
"<leader>cf",
|
||||
"<cmd>CodeCompanionChat gemini_none<cr>",
|
||||
desc = "CodeCompanion Chat (Fast)",
|
||||
"<leader>ca",
|
||||
"<cmd>CodeCompanionChat Add<cr>",
|
||||
mode = { "v" },
|
||||
desc = "CodeCompanion Chat Add",
|
||||
silent = true,
|
||||
},
|
||||
{ "<leader>ca", "<cmd>CodeCompanionActions<cr>", desc = "CodeCompanion Actions", silent = true },
|
||||
{ "<leader>cp", "<cmd>CodeCompanionActions<cr>", desc = "CodeCompanion Actions", silent = true },
|
||||
{
|
||||
"<leader>cl",
|
||||
"<cmd>CodeCompanionCLI<cr>",
|
||||
mode = { "n", "v" },
|
||||
desc = "CodeCompanion CLI",
|
||||
silent = true,
|
||||
},
|
||||
{ "<leader>ck", "<cmd>CodeCompanionCLI Ask<cr>", mode = { "n", "v" }, desc = "CodeCompanion CLI Ask" },
|
||||
{ "<leader>ci", ":CodeCompanion<space>", mode = { "n", "v" }, desc = "CodeCompanion Inline" },
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,9 +7,12 @@ return {
|
|||
opts = {
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"cpp",
|
||||
"lua",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"query",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"regex",
|
||||
"bash",
|
||||
"fish",
|
||||
|
|
@ -20,16 +23,10 @@ return {
|
|||
"go",
|
||||
"elixir",
|
||||
"vue",
|
||||
"groovy",
|
||||
"java",
|
||||
"objc",
|
||||
"swift",
|
||||
"hcl",
|
||||
"terraform",
|
||||
"yaml",
|
||||
"json",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
},
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ shadow = true
|
|||
shadow-radius = 12
|
||||
|
||||
fading = true
|
||||
fade-delta = 5
|
||||
fade-delta = 7
|
||||
|
||||
vsync = true
|
||||
|
||||
|
|
@ -13,4 +13,6 @@ wintypes:
|
|||
{
|
||||
dock = { shadow = false; };
|
||||
utility = { shadow = false; };
|
||||
menu = { shadow = false; };
|
||||
popup_menu = { shadow = false; };
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ configuration{
|
|||
icon-theme: "Adwaita";
|
||||
show-icons: true;
|
||||
terminal: "wezterm";
|
||||
location: 2;
|
||||
yoffset: 100;
|
||||
location: 0;
|
||||
disable-history: false;
|
||||
hide-scrollbar: true;
|
||||
display-combi: " Open";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# terminal emulator
|
||||
super + Return
|
||||
wezterm-gui start
|
||||
wezterm start
|
||||
|
||||
# browser
|
||||
super + shift + Return
|
||||
|
|
@ -60,7 +60,7 @@ super + alt + {q,r}
|
|||
bspc {quit,wm -r}
|
||||
|
||||
# close and kill
|
||||
super + {_,shift + }w
|
||||
super + {_,shift + }q
|
||||
bspc node -{c,k}
|
||||
|
||||
# alternate between the tiled and monocle layout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue