New version of dotfiles for both Linux and Windows-WSL

This commit is contained in:
Joseph Ferano 2021-10-21 21:41:01 +07:00
parent 73c1caa286
commit 191f4f3eec
224 changed files with 9736 additions and 1361 deletions

View File

@ -1,128 +0,0 @@
let mapleader = " "
set incsearch
set hlsearch
set clipboard+=unnamed
set number
set relativenumber
set surround
set multiple-cursors
set ideajoin
set idearefactormode=visual
set ignorecase
set commentary
" TODO Find bindings for these
" nnoremap <Leader>rc :action ChooseRcnConfiguration<CR>
" nnoremap ;b :action ToggleLineBreakpoint<CR>
" nnoremap ;e :action EvaluateExpression<CR>
" nnoremap ;d :action Debug<CR>
" nnoremap ;r :action Resume<CR>
" nnoremap ;s :action StepInto<CR>
" nnoremap ;n :action StepOver<CR>
" nmap :action<Up><CR> **** Repeat last command
" Find out about VCS tool
" We need to get good bindings for window navigation
" IDE has nice search behavior, consider adding these
" map / :action Find<CR>
" nnoremap n :action FindNext<CR>
" nnoremap N :action FindPrevious<CR>
" vnoremap n :action FindNext<CR>
" vnoremap N :action FindPrevious<CR>
" nnoremap * :action FindWordAtCaret<CR>
" nnoremap # :action FindWordAtCaret<CR>
nnoremap <Leader>f :action FindInPath<CR>
nnoremap <C-=> :action EditorIncreaseFontSize<CR>
nnoremap <C--> :action EditorDecreaseFontSize<CR>
nnoremap <C-0> :action EditorResetFontSize<CR>
nnoremap ) :action MethodDown<CR>
nnoremap ( :action MethodUp<CR>
nnoremap \ q
nnoremap q :action KJumpAction.Word0<CR>
noremap <Leader>rl :source ~/.ideavimrc<CR>
noremap <Leader>i :e C:/Users/josep/.ideavimrc<CR>
nnoremap <C-p>p :action SearchEverywhere<CR>
nnoremap <C-p>c :action GotoClass<CR>
nnoremap <C-p>t :action FileStructurePopup<CR>
nnoremap <C-p>f :action GotoFile<CR>
nnoremap <C-p>r :action RecentFiles<CR>
nnoremap <C-p>u :action GotoTest<CR>
nnoremap zd :action CollapseDocComments<CR>
nnoremap zD :action ExpandDocComments<CR>
nnoremap <C-w>H :action MoveEditorToOppositeTabGroup<CR>
nnoremap <C-w>L :action MoveEditorToOppositeTabGroup<CR>
nnoremap <C-e> 2<C-e>
nnoremap <C-y> 2<C-y>
nnoremap gt :action GotoTypeDeclaration<CR>
nnoremap <Leader>s :action KJumpAction.Word0<CR>
nnoremap <Leader>h :action HideAllWindows<CR>
nnoremap <Leader>q :action CloseContent<CR>
nnoremap <Leader>d :action QuickImplementations<CR>
nnoremap <Leader>t :action QuickJavaDoc<CR>
nnoremap <Leader>e :action ShowErrorDescription<CR>
nnoremap <Leader>u :action FindUsages<CR>
nnoremap <Leader>rn :action RenameElement<CR>
nnoremap <Leader>c :action ChangeColorScheme<CR>
nnoremap <Leader>; :actionlist<Space>
vnoremap <Leader>a :action StringManipulation.AlignToColumns<CR>
nnoremap <Leader>bb :action BuildCurrentProject<CR>
nnoremap <Leader>br :action Run<CR>
nnoremap <Leader>bd :action Debug<CR>
nnoremap <Leader>bs :action BuildSolutionAction<CR>
vnoremap gq :action aligncarets.AlignAction<CR>
nnoremap <Leader>w :action SaveDocument<CR>
noremap = :action ReformatCode<CR>
vnoremap = :action ReformatCode<CR>
nnoremap <Leader>/ :nohlsearch<CR>
nnoremap g/ :action Find<CR>
nnoremap ga :action GotoAction<CR>
" So we jump to both line and column for marks
nnoremap ' `
nnoremap Y y$
nnoremap $ g_
nnoremap vv ^vg_
nnoremap g; :action JumpToLastChange<CR>
nnoremap g, :action JumpToNextChange<CR>
nnoremap ; :
nnoremap : ;
nnoremap <C-1> :action GoToTab1<CR>
nnoremap <C-2> :action GoToTab2<CR>
nnoremap <C-3> :action GoToTab3<CR>
nnoremap <C-4> :action GoToTab4<CR>
nnoremap <C-5> :action GoToTab5<CR>
nnoremap <C-6> :action GoToTab6<CR>
nnoremap <C-7> :action GoToTab7<CR>
nnoremap <C-8> :action GoToTab8<CR>
nnoremap <C-9> :action GoToTab9<CR>
nnoremap <A-2> :action ActivateStructureToolWindow<CR>
nnoremap <C-j> :action MoveLineDown<CR>
nnoremap <C-k> :action MoveLineUp<CR>
nnoremap <C-h> <c-w>h
nnoremap <C-l> <c-w>l
noremap <C-S-s> :action SurroundWithLiveTemplate<CR>
nnoremap <A-h> gT
nnoremap <A-l> gt
nnoremap <A-j> :action EditorCloneCaretBelow<CR>
nnoremap <A-k> :action EditorCloneCaretAbove<CR>
nnoremap <A-;> A;<Esc>
inoremap <A-;> <Esc>A;<Esc>
nnoremap <A-d> :action ToggleDistractionFreeMode<CR>
nnoremap <A-f> :action ToggleFullScreen<CR>
nnoremap <A-e> :action GotoNextError<CR>
nnoremap <S-A-e> :action GotoPreviousError<CR>
nnoremap <A-o> moo<Esc>'o
nnoremap <A-S-o> moO<Esc>'o

View File

@ -1,239 +0,0 @@
; This AutoHotkey script is to Open, Restore or Minimize the desires Apps using the configured shortcuts key (hotkeys) you want.
; There are three functions you can use for this:
;
;
; a) OpenOrShowAppBasedOnExeName(AppAddress) //Useful for regular Window Apps
; b) OpenOrShowAppBasedOnWindowTitle(WindowTitleWord, AppAddress) //Specially useful for Chrome Apps and Chrome Shortcuts
; c) OpenOrShowAppBasedOnAppModelUserID(AppTitle, AppModelUserID) //Useful for Windows Store Apps (contained in the "shell:AppsFolder\")
; Additionally, pressing Alt + ` (key above Tab key) you can switch between open Windows of the same "type" and same App (.exe)
; The "type" checking is based on the App's Title convention that stipulates that the App name should be at the end of the Window title (Eg: New Document - Word )
/* ;
*****************************
***** UTILITY FUNCTIONS *****
*****************************
*/
CycleCurrentWindowOfSameApp()
{
WinGet, ActiveProcess, ProcessName, A
WinGet, OpenWindowsAmount, Count, ahk_exe %ActiveProcess%
If OpenWindowsAmount = 1 ; If only one Window exist, do nothing
Return
Else
{
WinGetTitle, FullTitle, A
AppTitle := ExtractAppTitle(FullTitle)
SetTitleMatchMode, 2
WinGet, WindowsWithSameTitleList, List, %AppTitle%
If WindowsWithSameTitleList > 1 ; If several Window of same type (title checking) exist
{
WinActivate, % "ahk_id " WindowsWithSameTitleList%WindowsWithSameTitleList% ; Activate next Window
}
}
Return
}
#WinActivateForce ; Prevent task bar buttons from flashing when different windows are activated quickly one after the other.
; AppAddress: The address to the .exe (Eg: "C:\Windows\System32\SnippingTool.exe")
OpenOrShowAppBasedOnExeName(AppAddress)
{
AppExeName := SubStr(AppAddress, InStr(AppAddress, "\", false, -1) + 1)
IfWinExist ahk_exe %AppExeName%
{
IfWinActive
{
CycleCurrentWindowOfSameApp()
Return
}
else
{
WinActivate
Return
}
}
else
{
Run, %AppAddress%, UseErrorLevel
If ErrorLevel
{
Msgbox, File %AppAddress% Not Found
Return
}
else
{
WinWait, ahk_exe %AppExeName%
WinActivate ahk_exe %AppExeName%
Return
}
}
}
; WindowTitleWord: Usually the word at the end of the app window title (Eg: in: "New Document - Word" will be "Word")
; AppAddress: The address to the .exe (Eg: "C:\Windows\System32\SnippingTool.exe")
OpenOrShowAppBasedOnWindowTitle(WindowTitleWord)
{
SetTitleMatchMode, 2
IfWinExist, %WindowTitleWord%
{
IfWinActive
{
; CycleCurrentWindowOfSameApp()
Return
}
else
{
WinActivate
Return
}
}
}
; AppTitle: Usually the word at the end of the app window title(Eg: in: "New Document - Word" will be "Word")
; AppModelUserID: A comprehensive guide on how to find the AppModelUserID of a windows store app can be found here: https://jcutrer.com/windows/find-aumid
OpenOrShowAppBasedOnAppModelUserID(AppTitle, AppModelUserID)
{
SetTitleMatchMode, 2
IfWinExist, %AppTitle%
{
IfWinActive
{
Return
}
else
{
WinActivateBottom %AppTitle%
}
}
else
{
Run, shell:AppsFolder\%AppModelUserID%, UseErrorLevel
If ErrorLevel
{
Msgbox, File %AppModelUserID% Not Found
Return
}
}
}
ExtractAppTitle(FullTitle)
{
AppTitle := SubStr(FullTitle, InStr(FullTitle, " ", false, -1) + 1)
Return AppTitle
}
#k::
WinSet, Style, -0x800000, A
return
;
#+k::
WinSet, Style, +0x800000, A
return
;
/* ;
***********************************
***** SHORTCUTS CONFIGURATION *****
***********************************
*/
; F7 - Open||Show "SnippingTool"
F7:: OpenOrShowAppBasedOnExeName("C:\Windows\System32\SnippingTool.exe")
; Terminal
#1:: OpenOrShowAppBasedOnExeName("C:\tools\alacritty\alacritty.exe")
; Firefox
#2:: OpenOrShowAppBasedOnExeName("C:\Program Files (x86)\Mozilla Firefox\firefox.exe")
; Slack (now Teams)
#s:: OpenOrShowAppBasedOnExeName("C:\Users\josep\AppData\Local\Microsoft\Teams\current\Teams.exe")
; Youtube Music
#m:: OpenOrShowAppBasedOnExeName("C:\Users\josep\AppData\Local\Programs\youtube-music-desktop-app\YouTube Music Desktop App.exe")
; Rider
#3:: OpenOrShowAppBasedOnExeName("C:\Program Files\JetBrains\JetBrains Rider 2019.3.4\bin\rider64.exe")
; Whatsapp
#w:: OpenOrShowAppBasedOnWindowTitle("WhatsApp")
; Mail
#t:: OpenOrShowAppBasedOnWindowTitle("Thunderbird")
; Discord
#d:: OpenOrShowAppBasedOnWindowTitle("Discord")
#+d::WinMinimizeAll
; Alt + ` - Activate NEXT Window of same type (title checking) of the current APP
#`::CycleCurrentWindowOfSameApp()
#q::Send !{F4}
F5::Send {Volume_Down 2}
F6::Send {Volume_Up 2}
F3::Send {Volume_Mute}
>!n::Send { Asc 164 }
>!a::Send { Asc 160 }
>!e::Send { Asc 130 }
>!i::Send { Asc 161 }
>!o::Send { Asc 162 }
>!u::Send { Asc 163 }
>!+n::Send { Asc 165 }
>!+a::Send { Asc 0193 }
>!+e::Send { Asc 144 }
>!+i::Send { Asc 0205 }
>!+o::Send { Asc 0211 }
>!+u::Send { Asc 0218 }
>!h::Send { Left }
>!j::Send { Down }
>!k::Send { Up }
>!l::Send { Right }
#+r::
Reload
TrayTip, AutoHotKey, Config Reloaded, 2, 48
return
;
*RAlt::
Send {Blind}{RAlt Down}
rAltDown := A_TickCount
Return
*RAlt up::
If ((A_TickCount-rAltDown)<200) ; Modify press time as needed (milliseconds)
Send {Blind}{RAlt Up}{Esc}
Else
Send {Blind}{RAlt Up}
Return

View File

@ -1,534 +0,0 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
TERM: xterm-256color
window:
# Window dimensions (changes require restart)
#
# Specified in number of columns/lines, not pixels.
# If both are `0`, this setting is ignored.
dimensions:
columns: 200
lines: 55
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
position:
x: 0
y: 0
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 2
y: 2
# Spread additional padding evenly around the terminal content.
#dynamic_padding: true
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
#
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background, but no title bar buttons
decorations: full
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
startup_mode: Windowed
# Window title
title: Alacritty
# Window class (Linux/BSD only):
#class:
# Application instance name
#instance: Alacritty
# General application class
#general: Alacritty
# GTK theme variant (Linux/BSD only)
#
# Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
# Set this to `None` to use the default theme variant.
#gtk_theme_variant: None
#scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
#history: 10000
# Number of lines the viewport will move for every line scrolled when
# scrollback is enabled (history > 0).
#multiplier: 3
# Font configuration
font:
# Normal (roman) font face
# normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
# family: Fira Code Medium
# The `style` can be specified to pick a specific face.
#style: Regular
# Bold font face
#bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Bold
# Italic font face
#italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Italic
# Bold italic font face
#bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Bold Italic
# Point size
size: 10.0
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
#offset:
# x: 0
# y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the right,
# increasing `y` moves the glyph upwards.
#glyph_offset:
# x: 0
# y: 0
# Thin stroke font rendering (macOS only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`
#
# macOS >= 10.14.x:
#
# If the font quality on non-retina display looks bad then set
# `use_thin_strokes` to `true` and enable font smoothing by running the
# following command:
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
#
# This is a global setting and will require a log out or restart to take
# effect.
#use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: false
schemes:
## [New Moon](https://github.com/taniarascia/new-moon)
New Moon: &newmoon
# Default colors
primary:
background: '#2D2D2D'
foreground: '#B3B9C5'
# Normal colors
normal:
black: '#2D2D2D'
red: '#F2777A'
green: '#92D192'
yellow: '#FFD479'
blue: '#6AB0F3'
magenta: '#E1A6F2'
cyan: '#76D4D6'
white: '#B3B9C5'
# Bright colors
bright:
black: '#777C85'
red: '#F2777A'
green: '#76D4D6'
yellow: '#FFEEA6'
blue: '#6AB0F3'
magenta: '#E1A6F2'
cyan: '#76D4D6'
white: '#FFFFFF'
colors: *newmoon
custom_cursor_colors: true
# black
# red
# green
# yellow
# blue
# magenta
# cyan
# white
# brblack
# brred
# brgreen
# bryellow
# brblue
# brmagenta
# brcyan
# brwhite
# normal
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#
# Specifying a `duration` of `0` will disable the visual bell.
#visual_bell:
# animation: EaseOutExpo
# duration: 0
# color: '#ffffff'
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
background_opacity: 1
#selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
#save_to_clipboard: false
# Allow terminal applications to change Alacritty's window title.
#dynamic_title: true
#cursor:
# Cursor style
#
# Values for `style`:
# - ▇ Block
# - _ Underline
# - | Beam
#style: Block
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
#unfocused_hollow: true
# Live config reload (changes require restart)
#live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
# Entries in `shell.args` are passed unmodified as arguments to the shell.
#
# Default:
# - (macOS) /bin/bash --login
# - (Linux/BSD) user login shell
# - (Windows) powershell
shell:
program: fish
# args:
# - --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
working_directory: /home/joe
# WinPTY backend (Windows only)
#
# Alacritty defaults to using the newer ConPTY backend if it is available,
# since it resolves a lot of bugs and is quite a bit faster. If it is not
# available, the the WinPTY backend will be used instead.
#
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
# even if the ConPTY backend is available.
#winpty_backend: false
# Send ESC (\x1b) before characters when alt is pressed.
#alt_send_esc: true
mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
double_click: { threshold: 300 }
#triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
#hide_when_typing: false
#url:
# URL launcher
#
# This program is executed when clicking on a text which is recognized as a URL.
# The URL is always added to the command as the last parameter.
#
# When set to `None`, URL launching will be disabled completely.
#
# Default:
# - (macOS) open
# - (Linux/BSD) xdg-open
# - (Windows) explorer
#launcher:
# program: xdg-open
# args: []
# URL modifiers
#
# These are the modifiers that need to be held down for opening URLs when clicking
# on them. The available modifiers are documented in the key binding section.
#modifiers: None
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty captures the mouse, the
# `Shift` modifier is automatically added as a requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings)
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Middle, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - Copy
# - Paste
# - PasteSelection
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# - Hide
# - Minimize
# - Quit
# - ToggleFullscreen
# - SpawnNewInstance
# - ClearLogNotice
# - ReceiveChar
# - None
#
# (macOS only):
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Alt
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# at once.
key_bindings:
# (Windows, Linux, and BSD only)
- { key: V, mods: Alt, action: Paste }
- { key: C, mods: Alt, action: Copy }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Add, mods: Control, action: IncreaseFontSize }
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Add, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: K, mods: Command, action: ClearHistory }
#- { key: K, mods: Command, chars: "\x0c" }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: H, mods: Command, action: Hide }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, chars: "\x0c" }
#- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
#- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
#- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt }
#- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt }
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - None
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Print all received window events.
#print_events: false

View File

@ -0,0 +1,7 @@
complete --command fisher --exclusive --long help --description "Print help"
complete --command fisher --exclusive --long version --description "Print version"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"

View File

@ -0,0 +1,7 @@
complete fzf_configure_bindings --no-files
complete fzf_configure_bindings --long help --short h --description "Print help"
complete fzf_configure_bindings --long directory --description "Change the key binding for searching directory"
complete fzf_configure_bindings --long git_log --description "Change the key binding for searching git log"
complete fzf_configure_bindings --long git_status --description "Change the key binding for searching git status"
complete fzf_configure_bindings --long history --description "Change the key binding for searching history"
complete fzf_configure_bindings --long variables --description "Change the key binding for searching variables"

View File

@ -0,0 +1,543 @@
# MIT (c) Chris Apple
function forgit::warn
printf "%b[Warn]%b %s\n" '\e[0;33m' '\e[0m' "$argv" >&2;
end
function forgit::info
printf "%b[Info]%b %s\n" '\e[0;32m' '\e[0m' "$argv" >&2;
end
function forgit::inside_work_tree
git rev-parse --is-inside-work-tree >/dev/null;
end
set -g forgit_pager "$FORGIT_PAGER"
set -g forgit_show_pager "$FORGIT_SHOW_PAGER"
set -g forgit_diff_pager "$FORGIT_DIFF_PAGER"
set -g forgit_ignore_pager "$FORGIT_IGNORE_PAGER"
set -g forgit_log_format "$FORGIT_LOG_FORMAT"
test -z "$forgit_pager"; and set -g forgit_pager (git config core.pager || echo 'cat')
test -z "$forgit_show_pager"; and set -g forgit_show_pager (git config pager.show || echo "$forgit_pager")
test -z "$forgit_diff_pager"; and set -g forgit_diff_pager (git config pager.diff || echo "$forgit_pager")
test -z "$forgit_ignore_pager"; and set -g forgit_ignore_pager (type -q bat >/dev/null 2>&1 && echo 'bat -l gitignore --color=always' || echo 'cat')
test -z "$forgit_log_format"; and set -g forgit_log_format "-%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset"
# https://github.com/wfxr/emoji-cli
type -q emojify >/dev/null 2>&1 && set -g forgit_emojify '|emojify'
# git commit viewer
function forgit::log -d "git commit viewer"
forgit::inside_work_tree || return 1
set files (echo $argv | sed -nE 's/.* -- (.*)/\1/p')
set cmd "echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | $forgit_show_pager"
if test -n "$FORGIT_COPY_CMD"
set copy_cmd $FORGIT_COPY_CMD
else
set copy_cmd pbcopy
end
set opts "
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--bind=\"enter:execute($cmd |env LESS='-r' less)\"
--bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]' |$copy_cmd)\"
$FORGIT_LOG_FZF_OPTS
"
if set -q FORGIT_LOG_GRAPH_ENABLE
set graph "--graph"
else
set graph ""
end
eval "git log $graph --color=always --format='$forgit_log_format' $argv $forgit_emojify" |
env FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd"
end
## git diff viewer
function forgit::diff -d "git diff viewer"
forgit::inside_work_tree || return 1
if count $argv > /dev/null
if git rev-parse "$argv[1]" > /dev/null 2>&1
set commit "$argv[1]" && set files "$argv[2..]"
else
set files "$argv"
end
end
set repo (git rev-parse --show-toplevel)
set cmd "echo {} |sed 's/.*] //' | xargs -I% git diff --color=always $commit -- '$repo/%' | $forgit_diff_pager"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
+m -0 --bind=\"enter:execute($cmd |env LESS='-r' less)\"
$FORGIT_DIFF_FZF_OPTS
"
eval "git diff --name-only $commit -- $files*| sed -E 's/^(.)[[:space:]]+(.*)\$/[\1] \2/'" | env FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd"
end
# git add selector
function forgit::add -d "git add selector"
forgit::inside_work_tree || return 1
# Add files if passed as arguments
count $argv >/dev/null && git add "$argv" && git status --short && return
set changed (git config --get-color color.status.changed red)
set unmerged (git config --get-color color.status.unmerged red)
set untracked (git config --get-color color.status.untracked red)
set extract_file "
sed 's/^[[:space:]]*//' | # remove leading whitespace
cut -d ' ' -f 2- | # cut the line after the M or ??, this leaves just the filename
sed 's/.* -> //' | # for rename case
sed -e 's/^\\\"//' -e 's/\\\"\$//' # removes surrounding quotes
"
set preview "
set file (echo {} | $extract_file)
# exit
if test (git status -s -- \$file | grep '^??') # diff with /dev/null for untracked files
git diff --color=always --no-index -- /dev/null \$file | $forgit_diff_pager | sed '2 s/added:/untracked:/'
else
git diff --color=always -- \$file | $forgit_diff_pager
end
"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
-0 -m --nth 2..,..
$FORGIT_ADD_FZF_OPTS
"
set files (git -c color.status=always -c status.relativePaths=true status -su |
grep -F -e "$changed" -e "$unmerged" -e "$untracked" |
sed -E 's/^(..[^[:space:]]*)[[:space:]]+(.*)\$/[\1] \2/' | # deal with white spaces internal to fname
env FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" |
sh -c "$extract_file") # for rename case
if test -n "$files"
for file in $files
echo $file | tr '\n' '\0' | xargs -I{} -0 git add {}
end
git status --short
return
end
echo 'Nothing to add.'
end
## git reset HEAD (unstage) selector
function forgit::reset::head -d "git reset HEAD (unstage) selector"
forgit::inside_work_tree || return 1
set cmd "git diff --cached --color=always -- {} | $forgit_diff_pager"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
-m -0
$FORGIT_RESET_HEAD_FZF_OPTS
"
set files (git diff --cached --name-only --relative | env FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd")
if test -n "$files"
for file in $files
echo $file | tr '\n' '\0' |xargs -I{} -0 git reset -q HEAD {}
end
git status --short
return
end
echo 'Nothing to unstage.'
end
# git checkout-restore selector
function forgit::checkout::file -d "git checkout-file selector" --argument-names 'file_name'
forgit::inside_work_tree || return 1
if test -n "$file_name"
git checkout -- "$file_name"
set checkout_status $status
git status --short
return $checkout_status
end
set cmd "git diff --color=always -- {} | $forgit_diff_pager"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
-m -0
$FORGIT_CHECKOUT_FILE_FZF_OPTS
"
set git_rev_parse (git rev-parse --show-toplevel)
set files (git ls-files --modified "$git_rev_parse" | env FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd")
if test -n "$files"
for file in $files
echo $file | tr '\n' '\0' | xargs -I{} -0 git checkout -q {}
end
git status --short
return
end
echo 'Nothing to restore.'
end
function forgit::checkout::commit -d "git checkout commit selector" --argument-names 'commit_id'
forgit::inside_work_tree || return 1
if test -n "$commit_id"
git checkout "$commit_id"
set checkout_status $status
git status --short
return $checkout_status
end
if test -n "$FORGIT_COPY_CMD"
set copy_cmd $FORGIT_COPY_CMD
else
set copy_cmd pbcopy
end
set cmd "echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % | $forgit_show_pager"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]' | $copy_cmd)\"
$FORGIT_COMMIT_FZF_OPTS
"
if set -q FORGIT_LOG_GRAPH_ENABLE
set graph "--graph"
else
set graph ""
end
eval "git log $graph --color=always --format='$forgit_log_format' $forgit_emojify" |
FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd" |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git checkout % --
end
function forgit::checkout::branch -d "git checkout branch selector" --argument-names 'input_branch_name'
forgit::inside_work_tree || return 1
if test -n "$input_branch_name"
git checkout -b "$input_branch_name"
set checkout_status $status
git status --short
return $checkout_status
end
set cmd "git branch --color=always --verbose --all | sort -k1.1,1.1 -r"
set preview "git log {1} --graph --pretty=format:'$forgit_log_format' --color=always --abbrev-commit --date=relative"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index --header-lines=1
$FORGIT_CHECKOUT_BRANCH_FZF_OPTS
"
set branch (eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" | awk '{print $1}')
test -z "$branch" && return 1
# track the remote branch if possible
if not git checkout --track "$branch" 2>/dev/null
git checkout "$branch"
end
end
# git stash viewer
function forgit::stash::show -d "git stash viewer"
forgit::inside_work_tree || return 1
set cmd "echo {} |cut -d: -f1 |xargs -I% git stash show --color=always --ext-diff % |$forgit_diff_pager"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
+s +m -0 --tiebreak=index --bind=\"enter:execute($cmd |env LESS='-r' less)\"
$FORGIT_STASH_FZF_OPTS
"
git stash list | env FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd"
end
# git clean selector
function forgit::clean -d "git clean selector"
forgit::inside_work_tree || return 1
set opts "
$FORGIT_FZF_DEFAULT_OPTS
-m -0
$FORGIT_CLEAN_FZF_OPTS
"
set files (git clean -xdffn $argv| awk '{print $3}'| env FZF_DEFAULT_OPTS="$opts" fzf |sed 's#/$##')
if test -n "$files"
for file in $files
echo $file | tr '\n' '\0'| xargs -0 -I{} git clean -xdff {}
end
git status --short
return
end
echo 'Nothing to clean.'
end
function forgit::cherry::pick -d "git cherry-picking" --argument-names 'target'
forgit::inside_work_tree || return 1
set base (git branch --show-current)
if test -z "$target"
echo "Please specify target branch"
return 1
end
set preview "echo {1} | xargs -I% git show --color=always % | $forgit_show_pager"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
-m -0
"
echo $base
echo $target
git cherry "$base" "$target" --abbrev -v | cut -d ' ' -f2- |
env FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" | cut -d' ' -f1 |
xargs -I% git cherry-pick %
end
function forgit::fixup -d "git fixup"
forgit::inside_work_tree || return 1
git diff --cached --quiet && echo 'Nothing to fixup: there are no staged changes.' && return 1
if set -q FORGIT_LOG_GRAPH_ENABLE
set graph "--graph"
else
set graph ""
end
set cmd "git log $graph --color=always --format='$forgit_log_format' $argv $forgit_emojify"
set files (echo $argv | sed -nE 's/.* -- (.*)/\1/p')
set preview "echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | $forgit_show_pager"
if test -n "$FORGIT_COPY_CMD"
set copy_cmd $FORGIT_COPY_CMD
else
set copy_cmd pbcopy
end
set opts "
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]' |$copy_cmd)\"
$FORGIT_FIXUP_FZF_OPTS
"
set target_commit (eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" | grep -Eo '[a-f0-9]+' | head -1)
if test -n "$target_commit" && git commit --fixup "$target_commit"
# "$target_commit~" is invalid when the commit is the first commit, but we can use "--root" instead
set prev_commit "$target_commit~"
if test "(git rev-parse '$target_commit')" = "(git rev-list --max-parents=0 HEAD)"
set prev_commit "--root"
end
GIT_SEQUENCE_EDITOR=: git rebase --autostash -i --autosquash "$prev_commit"
end
end
function forgit::rebase -d "git rebase"
forgit::inside_work_tree || return 1
if set -q FORGIT_LOG_GRAPH_ENABLE
set graph "--graph"
else
set graph ""
end
set cmd "git log $graph --color=always --format='$forgit_log_format' $argv $forgit_emojify"
set files (echo $argv | sed -nE 's/.* -- (.*)/\1/p')
set preview "echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | $forgit_show_pager"
if test -n "$FORGIT_COPY_CMD"
set copy_cmd $FORGIT_COPY_CMD
else
set copy_cmd pbcopy
end
set opts "
$FORGIT_FZF_DEFAULT_OPTS
+s +m --tiebreak=index
--bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]' |$copy_cmd)\"
$FORGIT_REBASE_FZF_OPTS
"
set commit (eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" |
grep -Eo '[a-f0-9]+' | head -1)
if test $commit
git rebase -i "$commit"
end
end
# git ignore generator
if test -z "$FORGIT_GI_REPO_REMOTE"
set -g FORGIT_GI_REPO_REMOTE https://github.com/dvcs/gitignore
end
if test -z "$FORGIT_GI_REPO_LOCAL"
if test -z "XDG_CACHE_HOME"
set -g FORGIT_GI_REPO_LOCAL $XDG_CACHE_HOME/forgit/gi/repos/dvcs/gitignore
else
set -g FORGIT_GI_REPO_LOCAL $HOME/.cache/forgit/gi/repos/dvcs/gitignore
end
end
if test -z "$FORGIT_GI_TEMPLATES"
set -g FORGIT_GI_TEMPLATES $FORGIT_GI_REPO_LOCAL/templates
end
function forgit::ignore -d "git ignore generator"
if not test -d "$FORGIT_GI_REPO_LOCAL"
forgit::ignore::update
end
set cmd "$forgit_ignore_pager $FORGIT_GI_TEMPLATES/{2}{,.gitignore} 2>/dev/null"
set opts "
$FORGIT_FZF_DEFAULT_OPTS
-m --preview-window='right:70%'
$FORGIT_IGNORE_FZF_OPTS
"
set IFS '\n'
set args $argv
if not count $argv > /dev/null
set args (forgit::ignore::list | nl -nrn -w4 -s' ' |
env FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd" |awk '{print $2}')
end
if not count $args > /dev/null
return 1
end
forgit::ignore::get $args
end
function forgit::ignore::update
if test -d "$FORGIT_GI_REPO_LOCAL"
forgit::info 'Updating gitignore repo...'
set pull_result (git -C "$FORGIT_GI_REPO_LOCAL" pull --no-rebase --ff)
test -n "$pull_result" || return 1
else
forgit::info 'Initializing gitignore repo...'
git clone --depth=1 "$FORGIT_GI_REPO_REMOTE" "$FORGIT_GI_REPO_LOCAL"
end
end
function forgit::ignore::get
for item in $argv
set filename (find -L "$FORGIT_GI_TEMPLATES" -type f \( -iname "$item.gitignore" -o -iname "$item}" \) -print -quit)
if test -n "$filename"
set header $filename && set header (echo $filename | sed 's/.*\.//')
echo "### $header" && cat "$filename" && echo
else
forgit::warn "No gitignore template found for '$item'." && continue
end
end
end
function forgit::ignore::list
find "$FORGIT_GI_TEMPLATES" -print |sed -e 's#.gitignore$##' -e 's#.*/##' | sort -fu
end
function forgit::ignore::clean
setopt localoptions rmstarsilent
[[ -d "$FORGIT_GI_REPO_LOCAL" ]] && rm -rf "$FORGIT_GI_REPO_LOCAL"
end
set -g FORGIT_FZF_DEFAULT_OPTS "
$FZF_DEFAULT_OPTS
--ansi
--height='80%'
--bind='alt-k:preview-up,alt-p:preview-up'
--bind='alt-j:preview-down,alt-n:preview-down'
--bind='ctrl-r:toggle-all'
--bind='ctrl-s:toggle-sort'
--bind='?:toggle-preview'
--bind='alt-w:toggle-preview-wrap'
--preview-window='right:60%'
+1
$FORGIT_FZF_DEFAULT_OPTS
"
# register aliases
if test -z "$FORGIT_NO_ALIASES"
if test -n "$forgit_add"
alias $forgit_add 'forgit::add'
else
alias ga 'forgit::add'
end
if test -n "$forgit_reset_head"
alias $forgit_reset_head 'forgit::reset::head'
else
alias grh 'forgit::reset::head'
end
if test -n "$forgit_log"
alias $forgit_log 'forgit::log'
else
alias glo 'forgit::log'
end
if test -n "$forgit_diff"
alias $forgit_diff 'forgit::diff'
else
alias gd 'forgit::diff'
end
if test -n "$forgit_ignore"
alias $forgit_ignore 'forgit::ignore'
else
alias gi 'forgit::ignore'
end
if test -n "$forgit_checkout_file"
alias $forgit_checkout_file 'forgit::checkout::file'
else
alias gcf 'forgit::checkout::file'
end
if test -n "$forgit_checkout_branch"
alias $forgit_checkout_branch 'forgit::checkout::branch'
else
alias gcb 'forgit::checkout::branch'
end
if test -n "$forgit_clean"
alias $forgit_clean 'forgit::clean'
else
alias gclean 'forgit::clean'
end
if test -n "$forgit_stash_show"
alias $forgit_stash_show 'forgit::stash::show'
else
alias gss 'forgit::stash::show'
end
if test -n "$forgit_cherry_pick"
alias $forgit_cherry_pick 'forgit::cherry::pick'
else
alias gcp 'forgit::cherry::pick'
end
if test -n "$forgit_rebase"
alias $forgit_rebase 'forgit::rebase'
else
alias grb 'forgit::rebase'
end
if test -n "$forgit_fixup"
alias $forgit_fixup 'forgit::fixup'
else
alias gfu 'forgit::fixup'
end
if test -n "$forgit_checkout_commit"
alias $forgit_checkout_commit 'forgit::checkout::commit'
else
alias gco 'forgit::checkout::commit'
end
end

View File

@ -0,0 +1,35 @@
# fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup
if not status is-interactive && test "$CI" != true
exit
end
# Because of scoping rules, to capture the shell variables exactly as they are, we must read
# them before even executing _fzf_search_variables. We use psub to store the
# variables' info in temporary files and pass in the filenames as arguments.
# # This variable is global so that it can be referenced by fzf_configure_bindings and in tests
set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)'
# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings
fzf_configure_bindings
# Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased
function _fzf_uninstall --on-event fzf_uninstall
_fzf_uninstall_bindings
set --erase _fzf_search_vars_command
functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings
complete --erase fzf_configure_bindings
set_color cyan
echo "fzf.fish uninstalled."
echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings."
set_color normal
end
function _fzf_migration_message --on-event fzf_update
set_color FF8C00 # dark orange
printf '\n%s\n' 'If you last updated fzf.fish before 2021-06-11, you need to migrate your key bindings.'
printf '%s\n\n' 'Check out https://github.com/PatrickF1/fzf.fish/wiki/Migration-Guides#v7.'
set_color normal
end

View File

@ -1,79 +1,60 @@
set -g fish_user_paths $fish_user_paths ~/bin ~/.cargo/bin ~/.local/bin
if status is-interactive
# Commands to run in interactive sessions can go here
end
set -gx XDG_CONFIG_HOME /home/joe/.config
set -gx XDG_DATA_HOME /home/joe/.local/share
set -gx XDG_CACHE_HOME /home/joe/.cache
set -g MANPAGER "sh -c 'col -bx | bat -l man -p'"
set EDITOR vim
set -U FZF_COMPLETE 0
set -U FZF_LEGACY_KEYBINDINGS 0
set -U FZF_DEFAULT_OPTS "--height 40% --reverse --border"
set -g DISPLAY (cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
set -gx VISUAL nvim
set -gx EDITOR nvim
source ~/.config/fish/dircolors.fish
source ~/.config/fish/marks.fish
fish_hybrid_key_bindings
set -gx MANPAGER "sh -c 'col -bx | bat -l man -p'"
bind \cx 'if jobs > /dev/null ; fg; fish_prompt; end'
abbr -a -g c "clip.exe"
abbr -a -g o wsl-open
abbr -a -g dot dotfiles
abbr -a -g fcon "source ~/.config/fish/config.fish"
alias ls "exa --group-directories-first"
alias ll "exa -la --group-directories-first"
alias lc "exa -1 --group-directories-first"
alias lt "exa -l --sort=modified"
alias vi "vim -u ~/.vimrc.basic"
# git
if [ (uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') ]
set -g DISPLAY (cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')
alias xdg-open wsl-open
end
abbr -a -g gs "git status --untracked-files"
abbr -a -g gl "git lop -10"
abbr -a -g gll "git lol -15"
abbr -a -g glp "git lfs pull"
abbr -a -g glm "gss git merge ; glp"
abbr -a -g ga "git add"
abbr -a -g gch "git checkout"
abbr -a -g gchm "git checkout master"
abbr -a -g gchb "git checkout -b"
abbr -a -g gd "git diff"
abbr -a -g gdh "git diff HEAD"
abbr -a -g gm "git merge"
abbr -a -g gms "git merge --squash"
abbr -a -g gb "git branch"
abbr -a -g gba "git branch -a"
abbr -a -g gf "git fetch"
abbr -a -g gr "git rebase"
abbr -a -g gch "git checkout"
abbr -a -g gc "git commit"
abbr -a -g gcm "git commit -m"
abbr -a -g gcau "git commit --author"
abbr -a -g gcam "git commit -am"
abbr -a -g ga "git add"
abbr -a -g gcamm "git commit --amend"
abbr -a -g gaa "git add -A"
abbr -a -g gpl "git pull"
abbr -a -g gp "git push"
abbr -a -g gpd "git push -d origin"
abbr -a -g gpu "git push -u origin"
abbr -a -g gpr "git remote prune origin"
abbr -a -g grh "git reset --hard"
abbr -a -g gcl "git clean -fd"
abbr -a -g gst "git stash"
abbr -a -g gsl "git stash list"
abbr -a -g gsp "git stash pop"
abbr -a -g gsu "git submodule update"
abbr -a -g glom "git lop -10 origin/master"
abbr -a -g gmom "git merge origin/master"
abbr -a -g gmm "git merge master"
abbr -a -g gss "env GIT_LFS_SKIP_SMUDGE=1"
# abbr -a -g glp "git lfs pull"
# abbr -a -g glm "gss git merge ; glp"
# abbr -a -g gd "git diff"
# abbr -a -g gdh "git diff HEAD"
# abbr -a -g gm "git merge"
# abbr -a -g gms "git merge --squash"
# abbr -a -g gb "git branch"
# abbr -a -g gba "git branch -a"
# abbr -a -g gf "git fetch"
# abbr -a -g gr "git rebase"
# abbr -a -g gpl "git pull"
# abbr -a -g gp "git push"
# abbr -a -g gpd "git push -d origin"
# abbr -a -g gpu "git push -u origin"
# abbr -a -g gpr "git remote prune origin"
# abbr -a -g grh "git reset --hard"
# abbr -a -g gcl "git clean -fd"
# abbr -a -g gst "git stash"
# abbr -a -g gsl "git stash list"
# abbr -a -g gsp "git stash pop"
# abbr -a -g gsu "git submodule update"
# abbr -a -g glom "git lop -10 origin/master"
# abbr -a -g gmom "git merge origin/master"
# abbr -a -g gmm "git merge master"
# abbr -a -g gss "env GIT_LFS_SKIP_SMUDGE=1"
alias xdg-open wsl-open
alias dotfiles "git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
alias g "bookmark go"
alias restart-tmux "not pgrep tmux && tmux new -d -s delete-me \
&& tmux run-shell ~/.tmux/plugins/tmux-resurrect/scripts/restore.sh \
&& tmux kill-session -t delete-me \
&& tmux attach || tmux attach "
# source /home/joe/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
# export NNN_FIFO="/tmp/nnn.fifo" # temporary buffer for the previews
# export NNN_PLUG='p:preview-tui'

View File

@ -0,0 +1,4 @@
jorgebucaran/fisher
sei40kr/fish-ranger-cd
PatrickF1/fzf.fish
wfxr/forgit

View File

@ -0,0 +1,42 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR EDITOR:nvim
SETUVAR VISUAL:nvim
SETUVAR XDG_CACHE_HOME:/home/joe/\x2ecache
SETUVAR XDG_CONFIG_HOME:/home/joe/\x2econfig
SETUVAR XDG_DATA_HOME:/home/joe/\x2elocal/share
SETUVAR __fish_initialized:3100
SETUVAR _fisher_PatrickF1_2F_fzf_2E_fish_files:/home/joe/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e/home/joe/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e/home/joe/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e/home/joe/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e/home/joe/\x2econfig/fish/completions/fzf_configure_bindings\x2efish
SETUVAR _fisher_jorgebucaran_2F_fisher_files:/home/joe/\x2econfig/fish/functions/fisher\x2efish\x1e/home/joe/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1esei40kr/fish\x2dranger\x2dcd\x1ePatrickF1/fzf\x2efish\x1ewfxr/forgit
SETUVAR _fisher_sei40kr_2F_fish_2D_ranger_2D_cd_files:/home/joe/\x2econfig/fish/functions/ranger\x2dcd\x2efish
SETUVAR _fisher_wfxr_2F_forgit_files:/home/joe/\x2econfig/fish/conf\x2ed/forgit\x2eplugin\x2efish
SETUVAR fish_color_autosuggestion:969896
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:b294bb
SETUVAR fish_color_comment:f0c674
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:b294bb
SETUVAR fish_color_error:cc6666
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:81a2be
SETUVAR fish_color_quote:b5bd68
SETUVAR fish_color_redirection:8abeb7
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_hybrid_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_user_paths:/home/joe/bin

View File

@ -0,0 +1,42 @@
function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings."
echo "\
USAGE:
fzf_configure_bindings [--FEATURE[=KEY_SEQUENCE]...]
DESCRIPTION
By default, fzf_configure_bindings installs mnemonic key bindings for fzf.fish's features. Each
feature's binding can be customized through a corresponding namesake option:
FEATURE | MNEMONIC KEY SEQUENCE | CORRESPONDING OPTION
Search directory | Ctrl+Alt+F (F for file) | --directory
Search git log | Ctrl+Alt+L (L for log) | --git_log
Search git status | Ctrl+Alt+S (S for status) | --git_status
Search history | Ctrl+R (R for reverse) | --history
Search variables | Ctrl+V (V for variable) | --variables
An option with a key sequence value overrides the binding for its feature, while an option
without a value disables the binding. A feature that is not customized retains its default
menomonic binding specified above. Key bindings are installed for default and insert modes.
In terms of validation, fzf_configure_bindings fails if passed unknown options. Furthermore, it
expects an equals sign between an option's name and value. However, it does not validate key
sequences. Rather, consider using fish_key_reader to manually validate them.
In terms of experimentation, fzf_configure_bindings erases any bindings it previously installed
before installing new ones so it can be repeatedly executed in the same fish session without
problem. Once the desired fzf_configure_bindings command has been found, add it to config.fish
in order to persist the bindings.
The -h and --help options print this help message.
EXAMPLES
Install the default mnemonic bindings
\$ fzf_configure_bindings
Install the default bindings but override git log's binding to Ctrl+G
\$ fzf_configure_bindings --git_log=\cg
Install the default bindings but leave search history unbound
\$ fzf_configure_bindings --history
Alternative style of disabling search history
\$ fzf_configure_bindings --history=
An agglomeration of all the options
\$ fzf_configure_bindings --git_status=\cg --history=\ch --variables --directory --git_log
"
end

View File

@ -0,0 +1,15 @@
# helper function for _fzf_search_variables
function _fzf_extract_var_info --argument-names variable_name set_show_output --description "Extract and reformat lines pertaining to \$variable_name from \$set_show_output."
# Extract only the lines about the variable, all of which begin with either
# $variable_name: ...or... $variable_name[
string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output |
# Strip the variable name prefix, including ": " for scope info lines
string replace --regex "^\\\$$variable_name(?:: )?" '' |
# Distill the lines of values, replacing...
# [1]: |value|
# ...with...
# [1] value
string replace --regex ": \|(.*)\|" ' \$1'
end

View File

@ -0,0 +1,43 @@
# helper function for _fzf_search_directory
function _fzf_preview_file --description "Print a preview for the given file based on its file type."
# because there's no way to guarantee that _fzf_search_directory passes the path to _fzf_preview_file
# as one argument, we collect all the arguments into one single variable and treat that as the path
set file_path $argv
if test -L "$file_path" # symlink
# notify user and recurse on the target of the symlink, which can be any of these file types
set -l target_path (realpath "$file_path")
set_color yellow
echo "'$file_path' is a symlink to '$target_path'."
set_color normal
_fzf_preview_file "$target_path"
else if test -f "$file_path" # regular file
if set --query fzf_preview_file_cmd
# need to escape quotes to make sure eval receives file_path as a single arg
eval "$fzf_preview_file_cmd '$file_path'"
else
bat --style=numbers --color=always "$file_path"
end
else if test -d "$file_path" # directory
if set --query fzf_preview_dir_cmd
# see above
eval "$fzf_preview_dir_cmd '$file_path'"
else
# -A list hidden files as well, except for . and ..
# -F helps classify files by appending symbols after the file name
command ls -A -F "$file_path"
end
else if test -c "$file_path"
_fzf_report_file_type "$file_path" "character device file"
else if test -b "$file_path"
_fzf_report_file_type "$file_path" "block device file"
else if test -S "$file_path"
_fzf_report_file_type "$file_path" socket
else if test -p "$file_path"
_fzf_report_file_type "$file_path" "named pipe"
else
echo "$file_path doesn't exist." >&2
end
end

View File

@ -0,0 +1,6 @@
# helper function for _fzf_preview_file
function _fzf_report_file_type --argument-names file_path file_type --description "Explain the file type for a file."
set_color red
echo "Cannot preview '$file_path': it is a $file_type."
set_color normal
end

View File

@ -0,0 +1,41 @@
function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths."
set fd_opts --color=always $fzf_fd_opts
set fzf_arguments --multi --ansi $fzf_dir_opts
set token (commandline --current-token)
# expand any variables or leading tilde (~) in the token
set expanded_token (eval echo -- $token)
# unescape token because it's already quoted so backslashes will mess up the path
set unescaped_exp_token (string unescape -- $expanded_token)
# If the current token is a directory and has a trailing slash,
# then use it as fd's base directory.
if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token"
set --append fd_opts --base-directory=$unescaped_exp_token
# use the directory name as fzf's prompt to indicate the search is limited to that directory
set --prepend fzf_arguments --prompt="$unescaped_exp_token" --preview="_fzf_preview_file $expanded_token{}"
set file_paths_selected $unescaped_exp_token(fd $fd_opts 2>/dev/null | _fzf_wrapper $fzf_arguments)
else
set --prepend fzf_arguments --query="$unescaped_exp_token" --preview='_fzf_preview_file {}'
set file_paths_selected (fd $fd_opts 2>/dev/null | _fzf_wrapper $fzf_arguments)
end
if test $status -eq 0
# Fish will cd implicitly if a directory name ending in a slash is provided.
# To help the user leverage this feature, we automatically append / to the selected path if
# - only one path was selected,
# - the user was in the middle of inputting the first token,
# - the path is a directory
# Then, the user only needs to hit Enter once more to cd into that directory.
if test (count $file_paths_selected) = 1
set commandline_tokens (commandline --tokenize)
if test "$commandline_tokens" = "$token" -a -d "$file_paths_selected"
set file_paths_selected $file_paths_selected/
end
end
commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ')
end
commandline --function repaint
end

View File

@ -0,0 +1,24 @@
function _fzf_search_git_log --description "Search the output of git log and preview commits. Replace the current token with the selected commit hash."
if not git rev-parse --git-dir >/dev/null 2>&1
echo '_fzf_search_git_log: Not in a git repository.' >&2
else
# see documentation for git format placeholders at https://git-scm.com/docs/git-log#Documentation/git-log.txt-emnem
# %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below
set log_fmt_str '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)'
set selected_log_line (
git log --color=always --format=format:$log_fmt_str --date=short | \
_fzf_wrapper --ansi \
--tiebreak=index \
--preview='git show --color=always {1}' \
--query=(commandline --current-token) \
$fzf_git_log_opts
)
if test $status -eq 0
set abbreviated_commit_hash (string split --max 1 " " $selected_log_line)[1]
set commit_hash (git rev-parse $abbreviated_commit_hash)
commandline --current-token --replace $commit_hash
end
end
commandline --function repaint
end

View File

@ -0,0 +1,33 @@
function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths."
if not git rev-parse --git-dir >/dev/null 2>&1
echo '_fzf_search_git_status: Not in a git repository.' >&2
else
set selected_paths (
# Pass configuration color.status=always to force status to use colors even though output is sent to a pipe
git -c color.status=always status --short |
_fzf_wrapper --ansi \
--multi \
--query=(commandline --current-token) \
$fzf_git_status_opts
)
if test $status -eq 0
# git status --short automatically escapes the paths of most files for us so not going to bother trying to handle
# the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping")
set cleaned_paths
for path in $selected_paths
if test (string sub --length 1 $path) = R
# path has been renamed and looks like "R LICENSE -> LICENSE.md"
# extract the path to use from after the arrow
set --append cleaned_paths (string split -- "-> " $path)[-1]
else
set --append cleaned_paths (string sub --start=4 $path)
end
end
commandline --current-token --replace -- (string escape -- $cleaned_paths | string join ' ')
end
end
commandline --function repaint
end

View File

@ -0,0 +1,24 @@
function _fzf_search_history --description "Search command history. Replace the command line with the selected command."
# history merge incorporates history changes from other fish sessions
builtin history merge
set command_with_ts (
# Reference https://devhints.io/strftime to understand strftime format symbols
builtin history --null --show-time="%m-%d %H:%M:%S │ " |
_fzf_wrapper --read0 \
--tiebreak=index \
--query=(commandline) \
# preview current command using fish_ident in a window at the bottom 3 lines tall
--preview="echo -- {4..} | fish_indent --ansi" \
--preview-window="bottom:3:wrap" \
$fzf_history_opts |
string collect
)
if test $status -eq 0
set command_selected (string split --max 1 " │ " $command_with_ts)[2]
commandline --replace -- $command_selected
end
commandline --function repaint
end

View File

@ -0,0 +1,45 @@
# This function expects the following two arguments:
# argument 1 = output of (set --show | psub), i.e. a file with the scope info and values of all variables
# argument 2 = output of (set --names | psub), i.e. a file with all variable names
function _fzf_search_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable."
if test -z "$set_names_output"
printf '%s\n' '_fzf_search_variables requires 2 arguments.' >&2
commandline --function repaint
return 22 # 22 means invalid argument in POSIX
end
# Exclude the history variable from being piped into fzf because
# 1. it's not included in $set_names_output
# 2. it tends to be a very large value => increases computation time
# 3._fzf_search_history is a much better way to examine history anyway
set all_variable_names (string match --invert history <$set_names_output)
set current_token (commandline --current-token)
# Use the current token to pre-populate fzf's query. If the current token begins
# with a $, remove it from the query so that it will better match the variable names
set cleaned_curr_token (string replace -- '$' '' $current_token)
set variable_names_selected (
printf '%s\n' $all_variable_names |
_fzf_wrapper --preview "_fzf_extract_var_info {} $set_show_output" \
--multi \
--query=$cleaned_curr_token \
$fzf_shell_vars_opts
)
if test $status -eq 0
# If the current token begins with a $, do not overwrite the $ when
# replacing the current token with the selected variable.
# Uses brace expansion to prepend $ to each variable name.
commandline --current-token --replace (
if string match --quiet -- '$*' $current_token
string join " " \${$variable_names_selected}
else
string join " " $variable_names_selected
end
)
end
commandline --function repaint
end

View File

@ -0,0 +1,20 @@
function _fzf_wrapper --description "Prepares some environment variables before executing fzf."
# Make sure fzf uses fish to execute preview commands, some of which
# are autoloaded fish functions so don't exist in other shells.
# Use --local so that it doesn't clobber SHELL outside of this function.
set --local --export SHELL (command --search fish)
# If FZF_DEFAULT_OPTS is not set, then set some sane defaults.
# See https://github.com/junegunn/fzf#environment-variables
if not set --query FZF_DEFAULT_OPTS
# cycle allows jumping between the first and last results, making scrolling faster
# layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env
# border shows where the fzf window begins and ends
# height=90% leaves space to see the current command and some scrollback, maintaining context of work
# preview-window=wrap wraps long lines in the preview window, making reading easier
# marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >)
set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"'
end
fzf $argv
end

View File

@ -1,6 +0,0 @@
# Copy path to file to windows path
function cw
set -l wpath (wslpath -a -w (readlink -f "$argv[1]"))
echo Copied \"$wpath\" to clipboard
echo -n $wpath | clip.exe
end

View File

@ -1,6 +0,0 @@
# Defined in /tmp/fish.6qfkSz/dotfiles-update-win.fish @ line 1
function dotfiles_update_win
cp /mnt/c/Users/josep/AppData/Roaming/alacritty/alacritty.yml ~/.config/alacritty/alacritty.yml
cp /mnt/c/Users/josep/.ideavimrc ~/.config/.ideavimrc
cp /mnt/c/Users/josep/AutoHotkey-script-Open-Show-Apps.ahk ~/.config/AutoHotkey-script-Open-Show-Apps.ahk
end

View File

@ -0,0 +1,3 @@
function e --wraps=nvim --description 'alias e nvim'
nvim $argv;
end

View File

@ -1,13 +0,0 @@
function edit_dotfile
set -l fname (dotfiles ls-files --full-name ~ \
| sd '.*(/.*/)' "$1" \
| rg -v README\|tar.gz \
| fzf --height 40% --layout reverse)
if not test -z "$fname"
# We need a slash cause we have dotfiles and rg regex will treat the dot
set -l fpath (dotfiles ls-files --full-name $HOME | rg -F "$fname")
commandline -f repaint
commandline "$EDITOR $HOME/$fpath"
commandline -f execute
end
end

View File

@ -1,3 +0,0 @@
function fish_greeting
fortune | lolcat -p 2.5 -S 102
end

View File

@ -1,11 +1,12 @@
function fish_prompt
# This prompt shows:
# - green lines if the last return command is OK, red otherwise
# - your user name, in red if root or yellow otherwise
# - your hostname, in cyan if ssh or blue otherwise
# - the current path (with prompt_pwd)
# - date +%X
# - the current virtual environment, if any
# - the current git status, if any, with fish_git_prompt
# - the current battery state, if any, and if your power cable is unplugged, and if you have "acpi"
# - current background jobs, if any
@ -15,14 +16,20 @@ function fish_prompt
# To:
# ┬─[nim@Hattori:~/w/dashboard][11:37:14][V:django20][G:master↑1|111][B:85%, 05:41:42 remaining]
# │ 2 15054 0% arrêtée sleep 100000
# │ 1 15048 0% arrêtée sleep 100000
# │ 2 15054 0% arrêtée sleep 100000
# │ 1 15048 0% arrêtée sleep 100000
# ╰─>$ echo there
set -l retc red
test $status = 0; and set retc green
set -q __fish_git_prompt_showupstream
or set -g __fish_git_prompt_showupstream auto
function _nim_prompt_wrapper
set retc $argv[1]
set field_name $argv[2]
set field_value $argv[3]
set -l field_name $argv[2]
set -l field_value $argv[3]
set_color normal
set_color $retc
@ -37,43 +44,93 @@ function fish_prompt
set_color -o green
echo -n ']'
end
and set retc brgreen
or set retc green
set_color $retc
echo -n '┬─'
set_color -o green
echo -n [
if functions -q fish_is_root_user; and fish_is_root_user
set_color -o red
else
set_color -o yellow
end
echo -n $USER
set_color -o white
echo -n @
if [ -z "$SSH_CLIENT" ]
set_color -o blue
else
set_color -o cyan
end
echo -n (prompt_hostname)
set_color -o white
set -g fish_prompt_pwd_dir_length 5
echo -n :(prompt_pwd)
set_color -o green
echo -n ']'
# Date
_nim_prompt_wrapper cyan '' (date +%X)
_nim_prompt_wrapper $retc '' (date +%X)
# Current Directory
_nim_prompt_wrapper blue '' (pwd | sed 's/\/home\/joe/~/')
# Vi-mode
# The default mode prompt would be prefixed, which ruins our alignment.
function fish_mode_prompt
end
# Virtual Environment
set -q VIRTUAL_ENV
and _nim_prompt_wrapper $retc V (basename "$VIRTUAL_ENV")
if test "$fish_key_bindings" = fish_vi_key_bindings
or test "$fish_key_bindings" = fish_hybrid_key_bindings
set -l mode
switch $fish_bind_mode
case default
set mode (set_color --bold red)N
case insert
set mode (set_color --bold green)I
case replace_one
set mode (set_color --bold green)R
echo '[R]'
case replace
set mode (set_color --bold cyan)R
case visual
set mode (set_color --bold magenta)V
end
set mode $mode(set_color normal)
_nim_prompt_wrapper $retc '' $mode
end
# Battery status
type -q acpi
and test (acpi -a 2> /dev/null | string match -r off)
and _nim_prompt_wrapper $retc B (acpi -b | cut -d' ' -f 4-)
# git
set -l prompt_git (fish_git_prompt '%s')
test -n "$prompt_git"
and _nim_prompt_wrapper $retc G $prompt_git
# New line
echo
# Background jobs
set_color normal
for job in (jobs)
set_color $retc
echo -n '│ '
set_color brblack
set_color brown
echo $job
end
set_color normal
set_color $retc
echo -n '╰─>'
set_color -o brcyan
echo -n '$ '
set -l user (whoami)
if test "$user" = "root"
set_color -o red
echo -n '# '
else
set_color -o green
echo -n '$ '
end
set_color normal
end

View File

@ -0,0 +1,209 @@
function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.3.0
set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd"
case -v --version
echo "fisher, version $fisher_version"
case "" -h --help
echo "Usage: fisher install <plugins...> Install plugins"
echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher update <plugins...> Update installed plugins"
echo " fisher update Update all installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex"
echo "Options:"
echo " -v or --version Print version"
echo " -h or --help Print this help message"
case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove
isatty || read --local --null --array stdin && set --append argv $stdin
set --local install_plugins
set --local update_plugins
set --local remove_plugins
set --local arg_plugins $argv[2..-1]
set --local old_plugins $_fisher_plugins
set --local new_plugins
if ! set --query argv[2]
if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
else if test ! -e $fish_plugins
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end
set arg_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
end
for plugin in $arg_plugins
test -e "$plugin" && set plugin (realpath $plugin)
contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
end
if set --query argv[2]
for plugin in $new_plugins
if contains -- "$plugin" $old_plugins
test "$cmd" = remove &&
set --append remove_plugins $plugin ||
set --append update_plugins $plugin
else if test "$cmd" = install
set --append install_plugins $plugin
else
echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
end
end
else
for plugin in $new_plugins
contains -- "$plugin" $old_plugins &&
set --append update_plugins $plugin ||
set --append install_plugins $plugin
end
for plugin in $old_plugins
contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
end
end
set --local pid_list
set --local source_plugins
set --local fetch_plugins $update_plugins $install_plugins
echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
for plugin in $fetch_plugins
set --local source (command mktemp -d)
set --append source_plugins $source
command mkdir -p $source/{completions,conf.d,functions}
fish --command "
if test -e $plugin
command cp -Rf $plugin/* $source
else
set temp (command mktemp -d)
set name (string split \@ $plugin) || set name[2] HEAD
set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2]
echo Fetching (set_color --underline)\$url(set_color normal)
if curl --silent \$url | tar -xzC \$temp -f - 2>/dev/null
command cp -Rf \$temp/*/* $source
else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source
end
command rm -rf \$temp
end
set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
" &
set --append pid_list (jobs --last --pid)
end
wait $pid_list 2>/dev/null
for plugin in $fetch_plugins
if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
if set --local index (contains --index -- "$plugin" $install_plugins)
set --erase install_plugins[$index]
else
set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
end
end
end
for plugin in $update_plugins $remove_plugins
if set --local index (contains --index -- "$plugin" $_fisher_plugins)
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
if contains -- "$plugin" $remove_plugins
for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
emit {$name}_uninstall
end
printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var
end
command rm -rf $$plugin_files_var
functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
complete --erase --command $name
end
set --erase _fisher_plugins[$index]
set --erase $plugin_files_var
end
end
if set --query update_plugins[1] || set --query install_plugins[1]
command mkdir -p $fisher_path/{functions,conf.d,completions}
end
for plugin in $update_plugins $install_plugins
set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
set --local files $source/{functions,conf.d,completions}/*
if set --local index (contains --index -- $plugin $install_plugins)
set --local user_files $fisher_path/{functions,conf.d,completions}/*
set --local conflict_files
for file in (string replace -- $source/ $fisher_path/ $files)
contains -- $file $user_files && set --append conflict_files $file
end
if set --query conflict_files[1] && set --erase install_plugins[$index]
echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
continue
end
end
for file in (string replace -- $source/ "" $files)
command cp -Rf $source/$file $fisher_path/$file
end
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files)
contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
contains -- $plugin $install_plugins && set --local event install || set --local event update
printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var)
source $file
if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
emit {$name}_$event
end
end
end
command rm -rf $source_plugins
set --query _fisher_plugins[1] || set --erase _fisher_plugins
set --query _fisher_plugins &&
printf "%s\n" $_fisher_plugins >$fish_plugins ||
command rm -f $fish_plugins
set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
test "$total" != "0 0 0" && echo (string join ", " (
test $total[1] = 0 || echo "Installed $total[1]") (
test $total[2] = 0 || echo "Updated $total[2]") (
test $total[3] = 0 || echo "Removed $total[3]")
) plugin/s
case \*
echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
end
end
## Migrations ##
function _fisher_fish_postexec --on-event fish_postexec
if functions --query _fisher_list
fisher update >/dev/null 2>/dev/null
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
test -e $XDG_DATA_HOME/fisher && command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_list _fisher_plugin_parse
set --erase fisher_data
end
functions --erase _fisher_fish_postexec
end

View File

@ -1,10 +0,0 @@
function fuzzy_bookmarks
if test -z "$argv"
set -l result (bml | fzf --height 40% --ansi --preview "tree -L 2 (echo {2})" | awk '{print $1}')
if not test -z "$result"
go_to_bookmark $result
end
else
go_to_bookmark $argv[1]
end
end

View File

@ -0,0 +1,44 @@
# Always installs bindings for insert and default mode for simplicity and b/c it has almost no side-effect
# https://gitter.im/fish-shell/fish-shell?at=60a55915ee77a74d685fa6b1
function fzf_configure_bindings --description "Installs the default key bindings for fzf.fish with user overrides passed as options."
# no need to install bindings if not in interactive mode or running tests
status is-interactive || test "$CI" = true; or return
set options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'variables=?'
argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null
if test $status -ne 0
echo "Invalid option or a positional argument was provided." 1>&2
_fzf_configure_bindings_help
return 22
else if set --query _flag_help
_fzf_configure_bindings_help
return
else
# Initialize with default key sequences and then override or disable them based on flags
# index 1 = directory, 2 = git_log, 3 = git_status, 4 = history, 5 = variables
set key_sequences \e\cf \e\cl \e\cs \cr \cv # \c = control, \e = escape
set --query _flag_directory && set key_sequences[1] "$_flag_directory"
set --query _flag_git_log && set key_sequences[2] "$_flag_git_log"
set --query _flag_git_status && set key_sequences[3] "$_flag_git_status"
set --query _flag_history && set key_sequences[4] "$_flag_history"
set --query _flag_variables && set key_sequences[5] "$_flag_variables"
# If fzf bindings already exists, uninstall it first for a clean slate
if functions --query _fzf_uninstall_bindings
_fzf_uninstall_bindings
end
for mode in default insert
test -n $key_sequences[1] && bind --mode $mode $key_sequences[1] _fzf_search_directory
test -n $key_sequences[2] && bind --mode $mode $key_sequences[2] _fzf_search_git_log
test -n $key_sequences[3] && bind --mode $mode $key_sequences[3] _fzf_search_git_status
test -n $key_sequences[4] && bind --mode $mode $key_sequences[4] _fzf_search_history
test -n $key_sequences[5] && bind --mode $mode $key_sequences[5] "$_fzf_search_vars_command"
end
function _fzf_uninstall_bindings --inherit-variable key_sequences
bind --erase -- $key_sequences
bind --erase --mode insert -- $key_sequences
end
end
end

View File

@ -0,0 +1,3 @@
function icat --wraps='kitty +kitten icat --align=left' --description 'alias icat kitty +kitten icat --align=left'
kitty +kitten icat --align=left $argv;
end

View File

@ -0,0 +1,3 @@
function n --wraps='env NNN_FIFO="/tmp/nnn.fifo" LC_COLLATE="C" SPLIT="h" nnn -eH -Pp' --wraps='env NNN_FIFO="/tmp/nnn.fifo" LC_COLLATE="C" SPLIT="h" nnn -edH -Pp' --wraps='env NNN_FIFO="/tmp/nnn.fifo" LC_COLLATE="C" SPLIT="h" nnn -edH' --description 'alias n env NNN_FIFO="/tmp/nnn.fifo" LC_COLLATE="C" SPLIT="h" nnn -edH'
env NNN_FIFO="/tmp/nnn.fifo" LC_COLLATE="C" SPLIT="h" nnn -edH $argv;
end

View File

@ -0,0 +1,3 @@
function r --wraps=ranger-cd --description 'alias r ranger-cd'
ranger-cd $argv;
end

View File

@ -0,0 +1,13 @@
# ranger-cd.fish
# author: Seong Yong-ju <sei40kr@gmail.com>
function ranger-cd -w 'ranger' -d 'Automatically change the directory in fish after closing ranger'
set -l tempfile (mktemp -t tmp.XXXXXX)
ranger --choosedir=$tempfile $argv
if [ -f $tempfile ]
cd (cat $tempfile)
end
rm -f $tempfile
end

View File

@ -0,0 +1,3 @@
function set-colors --wraps=kitty\ @\ set-colors\ -a\ -c\ \(cd\ \~/.config/kitty/kitty-themes/themes/preferred/\ \&\&\ fzf\ --height=35\%\ --preview\ \'echo\ \{\}\ \&\&\ kitty\ @\ set-colors\ -a\ -c\ \{\}\'\) --wraps=kitty\ @\ set-colors\ -a\ -c\ \(cd\ \~/.config/kitty/kitty-themes/themes/preferred/\ \&\&\ fzf\ --height=35\%\ --preview\ \'echo\ \{\}\ \&\&\ kitty\ @\ set-colors\ -a\ -c\ \{\}\'\)\ \&\&\ cd\ - --wraps=kitty\ @\ set-colors\ -a\ -c\ \(cd\ \~/.config/kitty/kitty-themes/themes/preferred/\ \&\&\ fzf\ --height=35\%\ --preview\ \'echo\ \{\}\ \&\&\ kitty\ @\ set-colors\ -a\ -c\ \{\}\'\ \&\&\ cd\ -\) --wraps=kitty\ @\ set-colors\ -a\ -c\ \(cd\ \~/.config/kitty/kitty-themes/themes/preferred/\ \&\&\ fzf\ --height=35\%\ --preview\ \'echo\ \{\}\ \&\&\ kitty\ @\ set-colors\ -a\ -c\ \{\}\'\)\ \;\ cd\ - --wraps=kitty\ @\ set-colors\ -a\ -c\ \(cd\ \~/.config/kitty/kitty-themes/themes/preferred/\ \&\&\ fzf\ --height=35\%\ --preview\ \'echo\ \{\}\ \&\&\ kitty\ @\ set-colors\ -a\ -c\ \{\}\'\ \;\;\ cd\ -\) --description alias\ set-colors\ kitty\ @\ set-colors\ -a\ -c\ \(cd\ \~/.config/kitty/kitty-themes/themes/preferred/\ \&\&\ fzf\ --height=35\%\ --preview\ \'echo\ \{\}\ \&\&\ kitty\ @\ set-colors\ -a\ -c\ \{\}\'\ \;\;\ cd\ -\)
kitty @ set-colors -a -c (cd ~/.config/kitty/kitty-themes/themes/preferred/ && fzf --height=35% --preview 'echo {} && kitty @ set-colors -a -c {}' ;; cd -) $argv;
end

View File

@ -1,6 +0,0 @@
# Copy a windows path to clipboard
function w2u
set -l wpath (wslpath "$argv[1]")
echo Copied \"$wpath\" to clipboard
echo -n "$wpath" | clip.exe
end

View File

@ -1,3 +0,0 @@
function winpwd
wslupath (pwd) | clip.exe
end

View File

@ -1,159 +0,0 @@
if not set -q BMS_FILE
set -gx BMS_FILE $HOME/.config/fish/bmarks
end
if not set -q BMS_OPENER
set -gx BMS_OPENER xdg-open
end
if [ ! -e "$BMS_FILE" ]
touch $BMS_FILE
end
set title_col (set_color cyan)
set text_col (set_color normal)
set error_col (set_color red)
function bookmark --description "Bookmark files and directories in fish"
if [ (count $argv) -lt 1 ]; or [ "-h" = $argv[1] ]; or [ "-help" = $argv[1] ]; or [ "--help" = $argv[1] ]
echo ''
echo 'Create bookmarks to all your favorite files and directories. Data written to $HOME/.config/fish/bmarks'
echo ''
echo -n 'add <bookmark name> <dir|file name> - Adds the file/directory directory as "bookmark_name". '
echo 'If no name is provided, the current working directory is used.'
echo 'go <bookmark_name> - Goes to the bookmark. Uses cd, $EDITOR, and kOPENER'
echo 'remove <bookmark_name> - Deletes the bookmark'
echo 'list - Lists all available bookmarks'
echo ''
end
switch $argv[1]
case "go"
if [ (count $argv) -lt 2 ]
__bookmarks_print_error "Please provide the bookmark name"
return 1
end
set -l bname $argv[2]
if not grep -q "^$bname " $BMS_FILE
__bookmarks_print_error "No bookmark by the name of $bname exists."
return 1
end
set bpath (grep "^$bname " $BMS_FILE | cut -f2- -d' ')
if [ -e "$bpath" ]
if [ -d "$bpath" ]
cd "$bpath"
return 0
else
__bookmarks_opener "$bpath"
end
else
__bookmarks_print_error "Bookmark is no longer valid for $bpath."
read -l -P 'Would you like to remove it?? [y/N] ' confirm
switch $confirm
case Y y
sed -i "/^$bname /d" $BMS_FILE
echo "Bookmark '$bname' removed."
__bookmarks_update_completions
case '' n N
return 1
end
end
case "add"
if [ (count $argv) -gt 1 ]
set bname $argv[2]
if echo $bname | not grep -q "^[a-zA-Z0-9_-]*\$"
__bookmarks_print_error "Bookmark names may only contain alphanumeric characters and underscores."
return 1
end
if [ (count $argv) -gt 2 ]
set bpath (readlink -f $argv[3])
if not [ -e "$bpath" ]
__bookmarks_print_error "No directory or path exist for provided argument."
return 1
end
else
set bpath (pwd)
end
else
set bname (string replace -ar [^a-zA-Z0-9] _ (basename (pwd)))
set bpath (pwd)
end
if grep -q "^$bname " $BMS_FILE
__bookmarks_print_error "Bookmark $bname already exists."
return 1
end
echo "$bname $bpath" >> $BMS_FILE
set -l ftype ([ -d $bname ] && echo "file" || echo "directory")
__bookmarks_update_completions
echo "Bookmark '$bname' added for $ftype $bpath"
case "remove"
if [ (count $argv) -lt 2 ]
__bookmarks_print_error "Please provide the bookmark name"
return 1
end
set -l bname $argv[2]
if not grep -q "^$bname " $BMS_FILE
__bookmarks_print_error "No bookmark by the name of $bname exists."
return 1
end
sed -i "/^$bname /d" $BMS_FILE
__bookmarks_update_completions
echo "Bookmark '$bname' removed."
case "list"
set bpath (grep "^$bname " $BMS_FILE | cut -f2- -d' ')
# Use a random delimeter {*#*} that's unlikely that someone has used for a file/dir name
# If not directories with spaces will be split into columns
echo -n (set_color green)
echo " Name {*#*} Path" | cat - $BMS_FILE | sed "2,\$ s/^\([[:alnum:]_-]\+\)/$title_col &{*#*}$text_col/" | column -t -s "{*#*}"
echo
end
end
function __bookmarks_opener --description "Default opener"
set -l f "$argv[1]"
switch (file --mime-type -b "$f")
case "text/*"
$EDITOR "$f"
case "application/*"
file "$f" | grep -iq text && $EDITOR "$f" || $BMS_OPENER "$f"
case "image/*"
sxiv "$f" 2> /dev/null && $BMS_OPENER "$f"
case "*"
$BMS_OPENER "$f"
end
end
function __bookmarks_print_error
echo -n $error_col
echo -n "Error: "
echo -n $text_col
echo $argv[1]
end
function __bookmarks_update_completions
set -l bmarks $HOME/.config/fish/bmarks
set -l cmds add remove go list
set -l cnd __fish_seen_subcommand_from $cmds
# set -l sub_cmd_cnd "(not __fish_seen_subcommand_from) $cmds"
complete -f -c bookmark -a "$cmds[1]" -n "not $cnd" -d "Description 1 with more words hello there"
complete -f -c bookmark -a "$cmds[2]" -n "not $cnd" -d "Description 2 how about this will this help create the other style?"
complete -f -c bookmark -a "$cmds[3]" -n "not $cnd" -d "Description 3"
complete -f -c bookmark -a "$cmds[4]" -n "not $cnd" -d "Description 3"
for bmark in (cat $bmarks)
set -l bname (echo $bmark | cut -f1 -d' ')
set -l bpath (echo $bmark | cut -f2- -d' ')
if [ -e "$bpath" ]
set description (echo -n $bpath; [ -d $bpath ] && echo -n ' - Dir' || echo -n ' - File')
else
set description "Bookmark target no longer exists"
end
complete -x -c bookmark -a "$bname" -n "__fish_seen_subcommand_from go remove" -d "$description"
end
complete -c g -w bookmark
end

5
.config/git/config Normal file
View File

@ -0,0 +1,5 @@
[user]
email = joseph@ferano.io
name = Joseph Ferano
[init]
defaultBranch = master

145
.config/kak/kakrc Normal file
View File

@ -0,0 +1,145 @@
source /home/joe/.config/kak/plugins/plug.kak/rc/plug.kak
colorscheme tomorrow-night
ranger-open-on-edit-directory
set-option global tabstop 4
hook global WinCreate .* %{
auto-pairs-enable
}
hook global BufCreate .*Fastfile %{
set buffer filetype ruby
}
# Plugins
plug "andreyorst/plug.kak" noload
plug "danr/kakoune-easymotion"
plug "h-youhei/kakoune-surround"
plug "Delapouite/kakoune-i3"
plug "lexherbo2/auto-pairs.kak"
plug "Delapouite/kakoune-buffers"
plug "Screwtapello/kakoune-cargo"
# Highlighters
addhl global/ number-lines -relative -hlcursor -separator ' '
# Custom Mappings
map global normal <minus> ':ranger<ret>' -docstring 'NERDTree style open ranger'
map global normal <space> , -docstring 'leader'
map global normal , ':enter-user-mode<space>easymotion<ret>'
map global user <space> <space> -docstring 'clear multiple selections'
# Surround
declare-user-mode surround
map global normal \' ':enter-user-mode<space>surround<ret>'
map global surround s ':surround<ret>' -docstring 'Add Surround'
map global surround c ":change-surround<ret>" -docstring 'Change Surround'
map global surround d ':delete-surround<ret>' -docstring 'Delete Surround'
# Map macros here
map global normal ^ q
map global normal <a-^> Q
def -params 1 extend-line-down %{
exec "<a-:>%arg{1}X"
}
def -params 1 extend-line-up %{
exec "<a-:><a-;>%arg{1}K<a-;>"
try %{
exec -draft ';<a-K>\n<ret>'
exec X
}
exec '<a-;><a-X>'
}
map global normal x ':extend-line-down %val{count}<ret>'
map global normal X ':extend-line-up %val{count}<ret>'
# Clipboard hooks
hook global NormalKey y|d|c %{ nop %sh{
printf %s "$kak_main_reg_dquote" | xsel --input --clipboard
}}
map global normal P '!xsel --output --clipboard<ret>'
map global normal p '<a-!>xsel --output --clipboard<ret>'
map global normal <c-v> ': select-block<ret>'
declare-user-mode window
map global normal <c-w> ':enter-user-mode<space>window<ret>'
# i3wm
map global window h ':i3-new-left<ret>'
map global window j ':i3-new-down<ret>'
map global window k ':i3-new-up<ret>'
map global window l ':i3-new-right<ret>'
# Comment with <C-/>
map global normal  ':comment-line<ret>' -docstring 'comment line'
# Increase/Decrease Count
# define-command -hidden -params 2 inc %{
# evaluate-commands %sh{
# if [ "$1" = 0 ]
# then
# count=1
# else
# count="$1"
# fi
# printf '%s%s\n' 'exec h"_xs\d<ret><a-i>na' "$2($count)<esc>|bc<ret>h"
# }
# }
# map global normal <c-a> ':inc %val{count} +<ret>'
# map global normal <c-x> ':inc %val{count} -<ret>'
# Experimental Word Lock
# source ./word-mode.kak
map global normal w e
map global normal W E
map global normal <a-w> <a-e>
map global normal <a-W> <a-E>
map global normal e <a-i>w
map global normal E '"_s.<ret><a-i>w'
map global normal <a-e> <a-i><a-w>
map global normal <a-E> '"_s.<ret><a-i><a-w>'
def -hidden select-next-subword %{
exec /[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
}
def -hidden extend-next-subword %{
exec ?[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
}
def -hidden select-prev-subword %{
exec <a-/>[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
}
def -hidden extend-prev-subword %{
exec <a-?>[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
}
map global normal q :select-next-subword<ret> -docstring 'select to next subword'
map global normal Q :extend-next-subword<ret> -docstring 'extend to next subword'
map global normal <a-q> :select-prev-subword<ret> -docstring 'select to previous subword'
map global normal <a-Q> :extend-prev-subword<ret> -docstring 'extend to previous subword'
# Buffers
map global user b ':enter-buffers-mode<ret>' -docstring 'buffers…'
map global user B ':info-buffers<ret>' -docstring 'buffer list'
# Rust
hook global BufCreate .*\.(py|rs) %{
eval %sh{kak-lsp --kakoune -s $kak_session}
set-option global lsp_auto_highlight_references true
# set-option global lsp_hover_insert_mode_trigger true
lsp-auto-hover-insert-mode-enable
lsp-auto-signature-help-enable
map global normal D ':lsp-hover<ret>'
map global insert <c-d> '<a-;>:lsp-hover<ret>'
map global normal '#' ':enter-user-mode lsp<ret>'
map global user c ':enter-user-mode<space>cargo<ret>'
map global cargo b ':cargo build<ret>'
}

View File

@ -0,0 +1,61 @@
import json
import sys
def env_to_str(env):
"""Convert an env list to a series of '--env key=value' parameters and return as a string."""
# FIXME: running launch with --env params doesn't seem to work - I get this error:
# Failed to launch child: --env
# With error: No such file or directory
# Press Enter to exit.
# So, skip this for now.
return ''
# s = ''
# for key in env:
# s += f"--env {key}={env[key]} "
# return s.strip()
def cmdline_to_str(cmdline):
"""Convert a cmdline list to a space separated string."""
s = ''
for e in cmdline:
s += f"{e} "
return s.strip()
def fg_proc_to_str(fg):
"""Convert a foreground_processes list to a space separated string."""
s = ''
fg = fg[0]
# s += f"--cwd {fg['cwd']} {cmdline_to_str(fg['cmdline'])}"
s += f"{cmdline_to_str(fg['cmdline'])}"
return s
def convert(session):
"""Convert a kitty session dict, into a kitty session file and output it."""
for os_window in session:
print('\nnew_os_window\n')
for tab in os_window['tabs']:
print(f"new_tab {tab['title']}")
# print('enabled_layouts *)
print(f"layout {tab['layout']}")
# This is a bit of a kludge to set cwd for the tab, as
# setting it in the launch command didn't work, for some reason?
if tab['windows']:
print(f"cd {tab['windows'][0]['cwd']}")
for w in tab['windows']:
print(f"title {w['title']}")
print(f"launch {env_to_str(w['env'])} {fg_proc_to_str(w['foreground_processes'])}")
if w['is_focused']:
print('focus')
if __name__ == "__main__":
stdin = sys.stdin.readlines()
session = json.loads(''.join(stdin))
convert(session)

35
.config/kitty/kitty.conf Normal file
View File

@ -0,0 +1,35 @@
include /home/joe/.config/kitty/theme.conf
font_size 14.0
allow_remote_control yes
single_instance yes
listen_on unix:/tmp/kitty
window_padding_width 5
tab_bar_style powerline
sync_to_monitor yes
input_delay 0
hide_window_decorations yes
map super+f pipe @ansi overlay /home/joe/bin/vim-ansi
map ctrl+shift+enter launch --cwd=current
map f5 load_config_file
enabled_layouts stack,tall,fat
map ctrl+shift+m toggle_layout stack
map ctrl+alt+h neighboring_window left
map ctrl+alt+j neighboring_window down
map ctrl+alt+k neighboring_window up
map ctrl+alt+l neighboring_window right
map shift+up move_window up
map shift+left move_window left
map shift+right move_window right
map shift+down move_window down
scrollback_pager bash -c 'nvim </dev/null -c "map q :qa!<CR>" -c "autocmd TermOpen * normal G" -c "terminal cat /proc/$$/fd/0 -" -c "set clipboard+=unnamedplus" -c "call cursor(CURSOR_LINE, CURSOR_COLUMN)"'

View File

@ -0,0 +1,21 @@
background #f7f7f7
foreground #494542
cursor #494542
selection_background #a4a1a1
color0 #090200
color8 #5b5754
color1 #da2c20
color9 #e8bacf
color2 #00a152
color10 #3a3332
color3 #fcec02
color11 #494542
color4 #00a0e4
color12 #7f7c7b
color5 #a06994
color13 #d6d4d3
color6 #b5e4f4
color14 #ccab53
color7 #a4a1a1
color15 #f7f7f7
selection_foreground #f7f7f7

View File

@ -0,0 +1,21 @@
background #090200
foreground #a4a1a1
cursor #a4a1a1
selection_background #494542
color0 #090200
color8 #5b5754
color1 #da2c20
color9 #e8bacf
color2 #00a152
color10 #3a3332
color3 #fcec02
color11 #494542
color4 #00a0e4
color12 #7f7c7b
color5 #a06994
color13 #d6d4d3
color6 #b5e4f4
color14 #ccab53
color7 #a4a1a1
color15 #f7f7f7
selection_foreground #090200

View File

@ -0,0 +1,21 @@
background #1e1c44
foreground #f8dbc0
cursor #eebf37
selection_background #6f6a4e
color0 #050404
color8 #4e7bbf
color1 #bc0013
color9 #fc5e59
color2 #49b117
color10 #9dff6e
color3 #e6741d
color11 #efc11a
color4 #0f49c6
color12 #1896c6
color5 #665992
color13 #9a5952
color6 #6fa497
color14 #c8f9f3
color7 #f8dbc0
color15 #f5f4fb
selection_foreground #1e1c44

View File

@ -0,0 +1,21 @@
background #0f160f
foreground #637d75
cursor #73f990
selection_background #1d4025
color0 #112615
color8 #3c4711
color1 #7f2b26
color9 #df8008
color2 #2f7e25
color10 #18e000
color3 #707f23
color11 #bde000
color4 #2f697f
color12 #00a9df
color5 #47577e
color13 #0058df
color6 #317f76
color14 #00dfc3
color7 #647d75
color15 #73f990
selection_foreground #0f160f

View File

@ -0,0 +1,21 @@
background #222330
foreground #cef3ff
cursor #ffffff
selection_background #44475a
color0 #000000
color8 #545454
color1 #ff5555
color9 #ff5454
color2 #fa0074
color10 #50fa7b
color3 #7f0a1f
color11 #f0fa8b
color4 #3282ff
color12 #1200f8
color5 #1b3cff
color13 #ff78c5
color6 #0037fc
color14 #8ae9fc
color7 #bbbbbb
color15 #ffffff
selection_foreground #222330

View File

@ -0,0 +1,26 @@
# Apprentice by Romain Lafourcade, https://github.com/romainl
# This work is licensed under the terms of the MIT license.
# For a copy, see https://opensource.org/licenses/MIT.
cursor #c7c7c7
cursor_text_color #feffff
selection_foreground #3e3e3e
selection_background #c1ddff
foreground #c8c8c8
background #323232
color0 #252525
color8 #555555
color1 #be7472
color9 #ff9900
color2 #709772
color10 #97bb98
color3 #989772
color11 #fefdbc
color4 #7199bc
color12 #9fbdde
color5 #727399
color13 #989abc
color6 #719899
color14 #6fbbbc
color7 #7f7f7f
color15 #feffff

View File

@ -0,0 +1,21 @@
background #0d0f18
foreground #fffaf3
cursor #ff0017
selection_background #002a3a
color0 #222222
color8 #444444
color1 #ff000f
color9 #ff273f
color2 #8ce00a
color10 #abe05a
color3 #ffb900
color11 #ffd141
color4 #008df8
color12 #0092ff
color5 #6c43a5
color13 #9a5feb
color6 #00d7eb
color14 #67ffef
color7 #ffffff
color15 #ffffff
selection_foreground #0d0f18

View File

@ -0,0 +1,21 @@
background #1c1c1c
foreground #ddeedd
cursor #e2bbef
selection_background #4d4d4d
color0 #3d352a
color8 #554444
color1 #cd5c5c
color9 #cc5533
color2 #86af80
color10 #88aa22
color3 #e8ae5b
color11 #ffa75d
color4 #6495ed
color12 #87ceeb
color5 #deb887
color13 #996600
color6 #b0c4de
color14 #b0c4de
color7 #bbaa99
color15 #ddccbb
selection_foreground #1c1c1c

View File

@ -0,0 +1,21 @@
background #202745
foreground #969cb3
cursor #969cb3
selection_background #5e6686
color0 #202745
color8 #6a7394
color1 #c84821
color9 #c76a28
color2 #ab9639
color10 #283256
color3 #c08a2f
color11 #5e6686
color4 #3d8ed0
color12 #898ea3
color5 #6678cc
color13 #dee1f0
color6 #21a1c8
color14 #9c6279
color7 #969cb3
color15 #f4f7ff
selection_foreground #202745

View File

@ -0,0 +1,21 @@
background #f8f8f8
foreground #2a2b33
cursor #bbbbbb
selection_background #ececec
color0 #000000
color8 #000000
color1 #de3d35
color9 #de3d35
color2 #3e953a
color10 #3e953a
color3 #d2b67b
color11 #d2b67b
color4 #2f5af3
color12 #2f5af3
color5 #950095
color13 #a00095
color6 #3e953a
color14 #3e953a
color7 #bbbbbb
color15 #ffffff
selection_foreground #f8f8f8

View File

@ -0,0 +1,21 @@
background #1b1d1e
foreground #6e6e6e
cursor #fcee0b
selection_background #4d4f4c
color0 #1b1d1e
color8 #505354
color1 #e6db43
color9 #fff68d
color2 #c8be46
color10 #fff27c
color3 #f3fd21
color11 #feed6c
color4 #737074
color12 #909495
color5 #737271
color13 #9a999d
color6 #615f5e
color14 #a2a2a5
color7 #c5c5be
color15 #dadad5
selection_foreground #1b1d1e

View File

@ -0,0 +1,21 @@
background #d4ccb9
foreground #45363b
cursor #45363b
selection_background #958b83
color0 #20111a
color8 #5e5252
color1 #bd100d
color9 #bd100d
color2 #858062
color10 #858062
color3 #e9a448
color11 #e9a448
color4 #416978
color12 #416978
color5 #96522b
color13 #96522b
color6 #98999c
color14 #98999c
color7 #958b83
color15 #d4ccb9
selection_foreground #d4ccb9

View File

@ -0,0 +1,21 @@
background #20111a
foreground #958b83
cursor #958b83
selection_background #45363b
color0 #20111a
color8 #5e5252
color1 #bd100d
color9 #bd100d
color2 #858062
color10 #858062
color3 #e9a448
color11 #e9a448
color4 #416978
color12 #416978
color5 #96522b
color13 #96522b
color6 #98999c
color14 #98999c
color7 #958b83
color15 #d4ccb9
selection_foreground #20111a

View File

@ -0,0 +1,21 @@
background #2a1e1d
foreground #dfdab7
cursor #573d25
selection_background #563c27
color0 #573d25
color8 #9a6b49
color1 #be2d26
color9 #e84526
color2 #6ba08a
color10 #94d7ba
color3 #e99c29
color11 #d0d04f
color4 #5a86ac
color12 #b8d3ed
color5 #ab80a6
color13 #d09dca
color6 #74a5ac
color14 #92ced6
color7 #dfdab7
color15 #fff9d4
selection_foreground #2a1e1d

View File

@ -0,0 +1,21 @@
background #0d1925
foreground #d9e5f1
cursor #d9e5f1
color0 #000000
color8 #252525
color1 #b87979
color9 #dabdbd
color2 #79b879
color10 #bddabd
color3 #b8b879
color11 #dadabd
color4 #7979b8
color12 #bdbdda
color5 #b879b8
color13 #dabdda
color6 #79b8b8
color14 #bddada
color7 #d9d9d9
color15 #ffffff
selection_foreground #0d1925
selection_background #d9e6f2

View File

@ -0,0 +1,21 @@
background #0000a3
foreground #ffff4d
cursor #ffa460
selection_background #a3a3a3
color0 #4e4e4e
color8 #7c7c7c
color1 #ff6b60
color9 #ffb6b0
color2 #a7ff60
color10 #ceffab
color3 #ffffb6
color11 #ffffcb
color4 #96cafd
color12 #b5dcfe
color5 #ff73fd
color13 #ff9cfe
color6 #c6c4fd
color14 #dfdffe
color7 #eeeeee
color15 #ffffff
selection_foreground #0000a3

View File

@ -0,0 +1,21 @@
background #191919
foreground #b2c8d6
cursor #f34a00
selection_background #b2c8d6
color0 #191919
color8 #191919
color1 #ff355b
color9 #ff355b
color2 #b6e875
color10 #b6e875
color3 #ffc150
color11 #ffc150
color4 #75d3ff
color12 #75d4ff
color5 #b975e6
color13 #b975e6
color6 #6cbeb5
color14 #6cbeb5
color7 #c1c8d6
color15 #c1c8d6
selection_foreground #191919

View File

@ -0,0 +1,21 @@
background #2b2b2b
foreground #e5e1db
cursor #ffffff
selection_background #5a637e
color0 #000000
color8 #323232
color1 #da4839
color9 #ff7b6a
color2 #509f50
color10 #83d082
color3 #ffd249
color11 #ffff7b
color4 #6d9cbd
color12 #9fcef0
color5 #cfcfff
color13 #ffffff
color6 #6d9cbd
color14 #a0cef0
color7 #ffffff
color15 #ffffff
selection_foreground #2b2b2b

View File

@ -0,0 +1,21 @@
background #131313
foreground #d6dae4
cursor #b9b9b9
selection_background #1f1f1f
color0 #1f1f1f
color8 #d6dae4
color1 #f71118
color9 #de342e
color2 #2cc55d
color10 #1dd260
color3 #ecb90f
color11 #f2bd09
color4 #2a84d2
color12 #0f80d5
color5 #4e59b7
color13 #524fb9
color6 #0f80d5
color14 #0f7cda
color7 #d6dae4
color15 #ffffff
selection_foreground #131313

View File

@ -0,0 +1,21 @@
background #40318d
foreground #7869c4
cursor #7869c4
selection_background #7869c4
color0 #090300
color8 #000000
color1 #883932
color9 #883932
color2 #55a049
color10 #55a049
color3 #bfce72
color11 #bfce72
color4 #40318d
color12 #40318d
color5 #8b3f96
color13 #8a3e95
color6 #67b6bd
color14 #67b6bd
color7 #ffffff
color15 #f7f7f7
selection_foreground #40318d

View File

@ -0,0 +1,21 @@
background #2b2c2e
foreground #d2d8d9
cursor #708183
selection_background #e3e8ed
color0 #7c8a8f
color8 #888888
color1 #b23a51
color9 #f24840
color2 #789a69
color10 #80c46f
color3 #b9ab4a
color11 #ffeb62
color4 #2a7fac
color12 #4095ff
color5 #bc4f5a
color13 #fb5175
color6 #44a799
color14 #52ccbd
color7 #d2d8d9
color15 #d2d8d9
selection_foreground #2b2c2e

View File

@ -0,0 +1,21 @@
background #29262f
foreground #d9e6f2
cursor #d9e6f2
selection_background #073642
color0 #000000
color8 #323232
color1 #c37372
color9 #dbaaaa
color2 #72c373
color10 #aadbaa
color3 #c2c372
color11 #dadbaa
color4 #7372c3
color12 #aaaadb
color5 #c372c2
color13 #dbaada
color6 #72c2c3
color14 #aadadb
color7 #d9d9d9
color15 #ffffff
selection_foreground #29262f

View File

@ -0,0 +1,21 @@
background #181c27
foreground #ada37a
cursor #91805a
selection_background #172539
color0 #181818
color8 #555555
color1 #800009
color9 #ab3834
color2 #48513b
color10 #a6a65d
color3 #cc8a3e
color11 #dcde7b
color4 #566d8c
color12 #2f97c6
color5 #724c7c
color13 #d33060
color6 #5b4f4a
color14 #f3dab1
color7 #ada37e
color15 #f3f3f3
selection_foreground #181c27

View File

@ -0,0 +1,21 @@
background #122637
foreground #ffffff
cursor #f0cb09
selection_background #18344f
color0 #000000
color8 #545454
color1 #ff0000
color9 #f40d17
color2 #37dd21
color10 #3bcf1d
color3 #fee409
color11 #ecc809
color4 #1460d2
color12 #5555ff
color5 #ff005d
color13 #ff55ff
color6 #00bbbb
color14 #6ae3f9
color7 #bbbbbb
color15 #ffffff
selection_foreground #122637

View File

@ -0,0 +1,21 @@
background #142838
foreground #8ff586
cursor #c4206f
selection_background #084fb0
color0 #142630
color8 #fff688
color1 #ff2320
color9 #d4312e
color2 #3aa5ff
color10 #8ff586
color3 #e9e75c
color11 #e9f06d
color4 #8ff586
color12 #3c7dd2
color5 #781aa0
color13 #8230a7
color6 #8ff586
color14 #6cbc67
color7 #ba45b1
color15 #8ff586
selection_foreground #142838

View File

@ -0,0 +1,21 @@
background #140607
foreground #685259
cursor #685259
selection_background #2a1a1c
color0 #2a1a1c
color8 #3c2a2e
color1 #90002a
color9 #c5245c
color2 #579523
color10 #8dff56
color3 #aa301b
color11 #c7371d
color4 #8b87af
color12 #cfc9ff
color5 #682e50
color13 #fb6cb9
color6 #e8a766
color14 #ffceae
color7 #685259
color15 #af949d
selection_foreground #140607

View File

@ -0,0 +1,21 @@
background #000000
foreground #ffffff
cursor #bbbbbb
selection_background #b5d5ff
color0 #000000
color8 #545454
color1 #ff5555
color9 #ff5555
color2 #55ff55
color10 #55ff55
color3 #ffff55
color11 #ffff55
color4 #5555ff
color12 #5555ff
color5 #ff55ff
color13 #ff55ff
color6 #55ffff
color14 #55ffff
color7 #bbbbbb
color15 #ffffff
selection_foreground #000000

View File

@ -0,0 +1,21 @@
background #333333
foreground #ffffff
cursor #00ff00
selection_background #b5d5ff
color0 #4d4d4d
color8 #545454
color1 #ff2b2b
color9 #ff5555
color2 #98fb98
color10 #55ff55
color3 #f0e68c
color11 #ffff55
color4 #cd853f
color12 #87ceff
color5 #ffdead
color13 #ff55ff
color6 #ffa0a0
color14 #ffd700
color7 #f5deb3
color15 #ffffff
selection_foreground #333333

View File

@ -0,0 +1,21 @@
background #1e1e1e
foreground #b8bcb9
cursor #f83d19
selection_background #292c31
color0 #3a3c43
color8 #888987
color1 #be3e48
color9 #fb001e
color2 #869a3a
color10 #0e712e
color3 #c4a535
color11 #c37033
color4 #4e76a1
color12 #176ce3
color5 #855b8d
color13 #fb0067
color6 #568ea3
color14 #2d6f6c
color7 #b8bcb9
color15 #fcffb8
selection_foreground #1e1e1e

View File

@ -0,0 +1,21 @@
background #252b35
foreground #eaeaea
cursor #d9002f
selection_background #194080
color0 #181818
color8 #181818
color1 #bf081d
color9 #bf081d
color2 #3d9751
color10 #3d9751
color3 #f6bb33
color11 #f6bb33
color4 #16b1df
color12 #16b1df
color5 #772fb0
color13 #772fb0
color6 #8bd1ed
color14 #8bd1ed
color7 #ffffff
color15 #ffffff
selection_foreground #252b35

View File

@ -0,0 +1,21 @@
background #1e1f28
foreground #f8f8f2
cursor #bbbbbb
selection_background #44475a
color0 #000000
color8 #545454
color1 #ff5555
color9 #ff5454
color2 #50fa7b
color10 #50fa7b
color3 #f0fa8b
color11 #f0fa8b
color4 #bd92f8
color12 #bd92f8
color5 #ff78c5
color13 #ff78c5
color6 #8ae9fc
color14 #8ae9fc
color7 #bbbbbb
color15 #ffffff
selection_foreground #1e1f28

View File

@ -0,0 +1,21 @@
background #422553
foreground #c4c8c5
cursor #c4c8c5
selection_background #008aff
color0 #2b283d
color8 #413e53
color1 #ae0000
color9 #d3a624
color2 #3e7c54
color10 #aaaaaa
color3 #f0c75e
color11 #716254
color4 #415baf
color12 #946a2c
color5 #9445ae
color13 #b294ba
color6 #008aff
color14 #25de50
color7 #850000
color15 #c9c9c9
selection_foreground #422553

View File

@ -0,0 +1,21 @@
background #1f1c27
foreground #b6a0ff
cursor #ff9738
selection_background #353146
color0 #1f1c27
color8 #353146
color1 #d8393d
color9 #d8393d
color2 #2dcc72
color10 #2dcc72
color3 #d8b76e
color11 #d8b76e
color4 #ffc183
color12 #ffc183
color5 #dd8d40
color13 #dd8d40
color6 #2388ff
color14 #2388ff
color7 #b6a0ff
color15 #e9e4ff
selection_foreground #1f1c27

View File

@ -0,0 +1,21 @@
background #000000
foreground #00a595
cursor #bbbbbb
selection_background #00a48c
color0 #000000
color8 #545454
color1 #9f0000
color9 #ff0000
color2 #008b00
color10 #00ee00
color3 #ffcf00
color11 #ffff00
color4 #0081ff
color12 #0000ff
color5 #bc00ca
color13 #ff00ff
color6 #008b8b
color14 #00cdcd
color7 #bbbbbb
color15 #ffffff
selection_foreground #000000

View File

@ -0,0 +1,21 @@
background #282420
foreground #e5c6a8
cursor #f6f6ec
selection_background #111417
color0 #111417
color8 #665e54
color1 #c84134
color9 #ff6459
color2 #84c44b
color10 #97e035
color3 #f4ae2e
color11 #dfd561
color4 #1397b9
color12 #5ed9ff
color5 #d0623c
color13 #ff9168
color6 #4f9452
color14 #83ef88
color7 #e5c5a9
color15 #f6f6ec
selection_foreground #282420

View File

@ -0,0 +1,21 @@
background #21211c
foreground #807973
cursor #facb7f
selection_background #403729
color0 #3c3b30
color8 #545444
color1 #97280f
color9 #df502a
color2 #479942
color10 #60e06f
color3 #7f7110
color11 #d69827
color4 #497f7d
color12 #78d8d8
color5 #7e4e2e
color13 #cd7c53
color6 #387f58
color14 #58d598
color7 #807974
color15 #fff1e8
selection_foreground #21211c

View File

@ -0,0 +1,27 @@
# Theme ported from the Mac Terminal application.
background #323232
foreground #ffffff
cursor #d6d6d6
selection_background #5b5b5b
selection_foreground #323232
color0 #353535
color8 #535353
color1 #d25252
color9 #f00c0c
color2 #a4c161
color10 #c1df74
color3 #ffc56d
color11 #e1e48a
color4 #6c99ba
color12 #8ab6d9
color5 #d096d9
color13 #efb5f7
color6 #bdd6ff
color14 #dbf4ff
color7 #ededec
color15 #ffffff
active_tab_foreground #ffffff
active_tab_background #535353
inactive_tab_foreground #ffffff
inactive_tab_background #353535

View File

@ -0,0 +1,21 @@
background #2a211c
foreground #b8a898
cursor #ffffff
selection_background #c3dcff
color0 #000000
color8 #545753
color1 #cc0000
color9 #ef2828
color2 #1a921c
color10 #9aff87
color3 #efe43a
color11 #fffa5c
color4 #0066ff
color12 #43a8ed
color5 #c5656b
color13 #ff8089
color6 #05989a
color14 #34e2e2
color7 #d3d7cf
color15 #ededec
selection_foreground #2a211c

View File

@ -0,0 +1,21 @@
background #282f32
foreground #dad9df
cursor #d35f5a
selection_background #eeb7ab
color0 #282f32
color8 #092027
color1 #ca1d2c
color9 #d35f5a
color2 #edb7ab
color10 #d35f5a
color3 #b7aa9a
color11 #a86571
color4 #2e78c1
color12 #7c84c4
color5 #c0226e
color13 #5b5db2
color6 #309185
color14 #81908f
color7 #e9e2cd
color15 #fcf4de
selection_foreground #282f32

View File

@ -0,0 +1,21 @@
background #222436
foreground #eceffd
cursor #fdcd5e
selection_background #fcf6e8
color0 #03063c
color8 #6c5a30
color1 #c60049
color9 #d94a8a
color2 #abf157
color10 #daffa8
color3 #fdcd5e
color11 #fee6a8
color4 #525fb8
color12 #b1bdf9
color5 #976f81
color13 #fda4cc
color6 #968662
color14 #a4bc86
color7 #eceffc
color15 #f6ffec
selection_foreground #222436

View File

@ -0,0 +1,21 @@
background #002240
foreground #2bc45d
cursor #e5bd0c
selection_background #782b9c
color0 #212c3e
color8 #202b3b
color1 #a72320
color9 #d3302e
color2 #32a448
color10 #2c9440
color3 #e58d11
color11 #e5bd0c
color4 #3066ab
color12 #3b7cd2
color5 #7819a0
color13 #822fa7
color6 #2b9270
color14 #35b286
color7 #afb6b9
color15 #e6ecec
selection_foreground #002240

View File

@ -0,0 +1,21 @@
background #0e0c15
foreground #dbd0b9
cursor #bbbbbb
selection_background #f3e0b8
color0 #08002e
color8 #331d4c
color1 #64002c
color9 #cf2062
color2 #5d731a
color10 #b3ce58
color3 #cd751c
color11 #fac357
color4 #1d6da1
color12 #40a4cf
color5 #b7077e
color13 #f02aae
color6 #42a38c
color14 #62caa8
color7 #f3e0b8
color15 #fff5db
selection_foreground #0e0c15

View File

@ -0,0 +1,21 @@
background #1b1b1d
foreground #acacac
cursor #cccccc
selection_background #e96153
color0 #242426
color8 #5eac6c
color1 #f8501a
color9 #f64319
color2 #565746
color10 #74eb4c
color3 #f9761d
color11 #fcc224
color4 #2c70b7
color12 #3393c9
color5 #f02d4e
color13 #e75e4e
color6 #3ba0a5
color14 #4ebce5
color7 #acacac
color15 #8b735a
selection_foreground #1b1b1d

View File

@ -0,0 +1,21 @@
background #241200
foreground #ddc165
cursor #e5591c
selection_background #e5591c
color0 #000000
color8 #7e6954
color1 #d5252b
color9 #e4591b
color2 #909b00
color10 #bfc659
color3 #bd8a13
color11 #ffca1b
color4 #4698a2
color12 #7cc9ce
color5 #8c4231
color13 #d16349
color6 #d98112
color14 #e6a96b
color7 #ddc165
color15 #ffe9a3
selection_foreground #241200

View File

@ -0,0 +1,21 @@
background #1c2836
foreground #ffffff
cursor #bbbbbb
selection_background #b4d5ff
color0 #000000
color8 #545454
color1 #f9555f
color9 #fa8b8e
color2 #20af89
color10 #34bb99
color3 #fdf029
color11 #ffff55
color4 #589cf5
color12 #589cf5
color5 #934d95
color13 #e75598
color6 #1e9ee6
color14 #3978bb
color7 #bbbbbb
color15 #ffffff
selection_foreground #1c2836

View File

@ -0,0 +1,21 @@
background #f4f4f4
foreground #3e3e3e
cursor #3f3f3f
selection_background #a9c1e2
color0 #3e3e3e
color8 #666666
color1 #970b16
color9 #de0000
color2 #07962a
color10 #87d5a2
color3 #f7edc7
color11 #f0cf06
color4 #003e8a
color12 #2e6cba
color5 #e94691
color13 #ffa29f
color6 #89d1ec
color14 #1cfafe
color7 #ffffff
color15 #ffffff
selection_foreground #f4f4f4

View File

@ -0,0 +1,21 @@
background #0c1115
foreground #ffffff
cursor #6c6c6c
selection_background #bd2523
color0 #2e343c
color8 #404a55
color1 #bd0f2f
color9 #bd0f2f
color2 #35a770
color10 #49e998
color3 #fb9435
color11 #fddf6e
color4 #1f5872
color12 #2a8bc1
color5 #bd2523
color13 #ea4727
color6 #778397
color14 #a0b6d3
color7 #ffffff
color15 #ffffff
selection_foreground #0c1115

View File

@ -0,0 +1,21 @@
background #2f0033
foreground #f6ed00
cursor #1a6500
selection_background #100a24
color0 #880041
color8 #411a6d
color1 #f78000
color9 #f800e1
color2 #249000
color10 #5743ff
color3 #f40000
color11 #ea00d7
color4 #000482
color12 #b90003
color5 #f43bff
color13 #9a5952
color6 #3affff
color14 #c8f9f3
color7 #000000
color15 #f5f4fb
selection_foreground #2f0033

View File

@ -0,0 +1,21 @@
background #161423
foreground #9e9ea0
cursor #a188f7
selection_background #483d70
color0 #2d283e
color8 #58506a
color1 #ec2160
color9 #f0719a
color2 #1fa91b
color10 #52a95d
color3 #8ddc1f
color11 #b2dc87
color4 #487cf4
color12 #a9bbeb
color5 #8c35c8
color13 #ac81c1
color6 #3added
color14 #9ce3ea
color7 #9e9ea0
color15 #a188f7
selection_foreground #161423

View File

@ -0,0 +1,23 @@
# Theme ported from the Mac Terminal application.
background #12773d
foreground #fff0a4
cursor #8b2800
selection_background #b64825
color0 #000000
color8 #545454
color1 #ba0000
color9 #ba0000
color2 #00ba00
color10 #00ba00
color3 #e6af00
color11 #e6af00
color4 #0000a3
color12 #0000ba
color5 #950062
color13 #ff54ff
color6 #00baba
color14 #54ffff
color7 #bababa
color15 #ffffff
selection_foreground #12773d

View File

@ -0,0 +1,21 @@
background #121212
foreground #a0a0a0
cursor #bbbbbb
selection_background #453a39
color0 #1b1d1e
color8 #505354
color1 #f92672
color9 #ff669d
color2 #a6e22e
color10 #beed5f
color3 #fd971f
color11 #e6db74
color4 #66d9ef
color12 #66d9ef
color5 #9e6ffe
color13 #9e6ffe
color6 #5e7175
color14 #a3babf
color7 #ccccc6
color15 #f8f8f2
selection_foreground #121212

View File

@ -0,0 +1,21 @@
background #000000
foreground #a7a39c
cursor #a7a39c
selection_background #5a5753
color0 #000000
color8 #716d69
color1 #f7b63e
color9 #f7b63e
color2 #7fb5e1
color10 #7fb5e1
color3 #d6da24
color11 #d6da24
color4 #489d48
color12 #489d48
color5 #b295c5
color13 #b295c5
color6 #f4bed6
color14 #f4bed6
color7 #a7a39c
color15 #fefbe9
selection_foreground #000000

View File

@ -0,0 +1,21 @@
background #212224
foreground #ededed
cursor #dfd9b8
selection_background #384563
color0 #000000
color8 #5c4f49
color1 #cf0d17
color9 #ef7d17
color2 #128033
color10 #b1d130
color3 #ffca3d
color11 #fff11f
color4 #006ab3
color12 #4fc2fd
color5 #6a2674
color13 #de0070
color6 #384563
color14 #5c4f49
color7 #ededed
color15 #fefffe
selection_foreground #212224

View File

@ -0,0 +1,21 @@
background #0f0a05
foreground #84c137
cursor #23ff18
selection_background #083905
color0 #000000
color8 #666666
color1 #b6204a
color9 #e50000
color2 #00a600
color10 #86a83e
color3 #bebe00
color11 #e5e500
color4 #246db2
color12 #0000ff
color5 #b200b2
color13 #e500e5
color6 #00a6b2
color14 #00e5e5
color7 #bfbfbf
color15 #e5e5e5
selection_foreground #0f0a05

View File

@ -0,0 +1,23 @@
# Theme ported from the Mac Terminal application.
background #000000
foreground #00ff00
cursor #23ff18
selection_background #083905
color0 #000000
color8 #666666
color1 #990000
color9 #e50000
color2 #00a600
color10 #00d900
color3 #999900
color11 #e5e500
color4 #0000b2
color12 #0000ff
color5 #b200b2
color13 #e500e5
color6 #00a6b2
color14 #00e5e5
color7 #bebebe
color15 #e5e5e5
selection_foreground #000000

View File

@ -0,0 +1,21 @@
background #000000
foreground #dadbda
cursor #bbbbbb
selection_background #b4d5ff
color0 #575757
color8 #252525
color1 #ff1b00
color9 #d41c00
color2 #a5df55
color10 #a5df55
color3 #fbe74a
color11 #fbe749
color4 #486387
color12 #89bdff
color5 #fc5ef0
color13 #bf00c0
color6 #85e9fe
color14 #85e9fe
color7 #cbcbcb
color15 #dbdbdb
selection_foreground #000000

View File

@ -0,0 +1,21 @@
background #161718
foreground #b7bcb9
cursor #b7bcb9
selection_background #1e1f22
color0 #2a2e33
color8 #1d1e21
color1 #b74d50
color9 #8c2d32
color2 #b3be5a
color10 #788331
color3 #e3b55e
color11 #e5894f
color4 #6d90b0
color12 #4b6b88
color5 #a07eab
color13 #6e4f79
color6 #7fbeb3
color14 #4d7b73
color7 #b5b8b6
color15 #5a6169
selection_foreground #161718

View File

@ -0,0 +1,21 @@
background #3a3c3e
foreground #d9eed2
cursor #41ff58
selection_background #2a9b34
color0 #1e1e1e
color8 #03260f
color1 #fb0029
color9 #a6ff3e
color2 #329b24
color10 #9fff6d
color3 #649a25
color11 #d1ff6d
color4 #149b45
color12 #72ffb5
color5 #53b82b
color13 #50ff3d
color6 #2bb767
color14 #22ff71
color7 #dffeee
color15 #daeed0
selection_foreground #3a3c3e

View File

@ -0,0 +1,21 @@
background #262626
foreground #ffcb83
cursor #fb521c
selection_background #c03f1f
color0 #000000
color8 #6a4e29
color1 #c03900
color9 #ff8b67
color2 #a3a900
color10 #f6ff3f
color3 #caae00
color11 #ffe36e
color4 #bd6c00
color12 #ffbd54
color5 #fb5d00
color13 #fc874f
color6 #f79400
color14 #c59752
color7 #ffc88a
color15 #f9f9fe
selection_foreground #262626

Some files were not shown because too many files have changed in this diff Show More