Tidy up and move things to XDG

This commit is contained in:
Max Bucknell 2024-11-14 18:51:46 +11:00
parent 36d009705d
commit 75b6774ac7
No known key found for this signature in database
14 changed files with 4 additions and 398 deletions

12
.gitignore vendored
View file

@ -3,15 +3,10 @@ fish/fish_history
fish/fish_read_history fish/fish_read_history
fish/fishd* fish/fishd*
configstore configstore
hub
vim/vim.symlink/.netrwhist vim/vim.xdg.symlink/.netrwhist
vim/vim.symlink/plugged vim/vim.xdg.symlink/plugged
vim/vim.symlink/plugged-update vim/vim.xdg.symlink/plugged-update
nvim/nvim.symlink/.netrwhist
nvim/nvim.symlink/plugged
nvim/nvim.symlink/plugged-update
zsh/zsh.symlink/liquidprompt zsh/zsh.symlink/liquidprompt
zsh/zsh.symlink/zsh-completions zsh/zsh.symlink/zsh-completions
@ -24,4 +19,3 @@ __pycache__
*.pyc *.pyc
*.mdb *.mdb
zed/zed.xdg.symlink/prompts/index.json

View file

@ -1,5 +1,5 @@
[core] [core]
excludesfile = ~/.gitignore excludesfile = ~/.config/git/gitignore
editor = vim editor = vim
pager = delta pager = delta
autocrlf = input autocrlf = input

View file

@ -1,165 +0,0 @@
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
font pango:System San Francisco Text 16
# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up k
set $down j
set $left h
set $right l
# Command key for all system things, ctrl for stuff in windows
set $mod Mod4
# Colour, baby
set $bg-color #2f343f
set $inactive-bg-color #2f343f
set $text-color #f3f4f5
set $inactive-text-color #676e7d
set $urgent-bg-color #e53935
set $indicator-color #00ff00
bar {
status_command i3status
}
bindsym $mod+shift+apostrophe exec i3lock --color "$bg-color"
# use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+n exec google-chrome --force-device-scale-factor=1.15
# kill focused window
bindsym $mod+q kill
bindsym $mod+space exec dmenu_run -i -fn "System San Francisco Text 16"
# change focus
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# move focused window
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# split in horizontal orientation
bindsym $mod+z split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+d focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-msg exit"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle # mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness
hide_edge_borders both
focus_follows_mouse no
exec xmodmap ~/.xmodmap
# Mouse controls. I am so happy I found this
exec synclient HorizTwoFingerScroll=1
exec synclient PalmDetect=1
exec synclient TapButton1=0
exec synclient TapButton2=0
# Natural scrolling
exec synclient VertScrollDelta=-243
exec synclient HorizScrollDelta=-243

View file

@ -1,64 +0,0 @@
# Reload Tmux configuration
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# Enable Tmux's mouse mode.
#
# In iTerm, this mostly does what I want, in that it allows me to click on
# things to bring them into focus (windows, panes). It also handles scrolling
# more elegantly.
set-option -g mouse on
# Mouse mode isn't perfect. By default, ending a drag cancels the selection,
# which is a jarring on non-default behaviour. This makes sure this doesn't
# happen anymore.
unbind-key -T copy-mode MouseDragEnd1Pane
# Because we cancelled the mouse drag ending a selection, we don't have an
# easy and convenient way to make get back to normal. When using a GUI, a
# single click usually does the trick. This command restores that behaviour.
bind-key -T copy-mode MouseUp1Pane send-keys -X cancel
# Use the Vim yank mnemonic to commit a copy when in copy mode.
# I don't actually hit "y" to copy, though. In iTerm, I have Cmd+C set up
# to send the hexcode for y to the terminal, which means the normal macOS
# copy shortcut does the right thing, so long as I'm in Tmux.
bind-key -T copy-mode y send-keys -X copy-pipe "pbcopy"
# When I delete a window, relabel them automatically.
set-option -g renumber-windows on
# Neovim told me to do this
set-option -sg escape-time 10
# Enable true color support in Tmux
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color*:Tc"
# Pane switching. These interface with Vim to ensure that pane switching is
# both consistent and sensible.
#
# Borrowed from Chris Toomey: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# When zooming a pane in a window, also zoom the vim split
# Used to be z, but it interefered with backgrounding processes
bind-key v if-shell "$is_vim" "resize-pane -Z \; send-keys ' v' " "resize-pane -Z"
# All pane and window creations use the same path as the current process,
# which I have found to be a good default.
#
# I don't typically hit <prefix>c to open a new window, I have that bound
# to Cmd+T in iTerm the same way I manage the clipboard. I also add the
# tab traversal shortcuts to move between Tmux windows.
bind-key c new-window -c "#{pane_current_path}"
# Backslash is the unshifted version of |
bind-key \ split-window -h -c '#{pane_current_path}'
# Ditto, hyphen is the unshifted version of _
bind-key - split-window -v -c '#{pane_current_path}'

View file

@ -1,4 +0,0 @@
! Fix some lingering keyboard layout issues
keycode 94 = grave asciitilde
keycode 50 = grave asciitilde
keycode 135 = Super_R

1
zed/.gitignore vendored
View file

@ -1 +0,0 @@
zed.xdg.symlink/.tmp*

View file

@ -1,6 +0,0 @@
- Dockerfile
- SQL
- GitHub Theme
- Make
- TOML
- GraphQL

View file

@ -1,67 +0,0 @@
[
{
"bindings": {
"cmd-o": "file_finder::Toggle"
}
},
{
"context": "ProjectPanel",
"bindings": {
"shift-cmd-n": "project_panel::NewDirectory",
"cmd-n": "project_panel::NewFile",
"enter": "project_panel::Rename",
"cmd-o": "project_panel::OpenPermanent"
}
},
{
"context": "Pane",
"bindings": {
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Right"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Down"],
"cmd-shift-g": "pane::RevealInProjectPanel"
}
},
{
"context": "Editor",
"bindings": {
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
"cmd-enter": "repl::Run"
}
},
{
"context": "vim_mode == normal",
"bindings": {
"shift-y": "vim::YankLine",
"shift-d": ["workspace::SendKeystrokes", "d d"],
"-": ["workspace::SendKeystrokes", "d d p"],
"_": ["workspace::SendKeystrokes", "d d 2 k p"],
"= =": "editor::Format",
"escape": "repl::ClearOutputs"
}
},
{
"context": "VimControl && !menu",
"bindings": {
";": "command_palette::Toggle",
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"]
}
},
{
"context": "Editor && vim_mode == insert",
"bindings": {
"j k": "vim::NormalBefore",
"left": null,
"down": null,
"up": null,
"right": null
}
}
]

View file

@ -1,81 +0,0 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"auto_update": false,
"theme": {
"dark": "Github Dark",
"light": "Github Light"
},
"scrollbar": {
"cursors": false,
"git_diff": false,
"search_results": false,
"selected_symbol": false,
"diagnostics": false
},
"git": {
"git_gutter": "hide",
"inline_blame": {
"enabled": true
}
},
"vim_mode": true,
"vim": {
"use_system_clipboard": "never"
},
"relative_line_numbers": true,
"buffer_font_size": 12,
"buffer_font_family": "Input Mono",
"buffer_font_weight": 400,
"buffer_font_features": {
"calt": false,
"liga": false
},
"ui_font_family": "SF Pro",
"ui_font_size": 15,
"project_panel": {
"dock": "right"
},
"collaboration_panel": {
"button": false
},
"chat_panel": {
"button": false
},
"assistant": {
"version": "2",
"button": false
},
"notification_panel": {
"button": false
},
"languages": {
"TypeScript": {
"tab_size": 4
},
"JavaScript": {
"tab_size": 4
},
"TSX": {
"tab_size": 4
},
"Markdown": {
"tab_size": 4
},
"JSON": {
"tab_size": 4
},
"Make": {
"tab_size": 8
}
},
"features": {
"copilot": false
}
}