mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-01 08:43:08 +01:00
Update
This commit is contained in:
parent
482ff562a8
commit
eda1b5c9d0
3
config/.config/bat/config
Normal file
3
config/.config/bat/config
Normal file
@ -0,0 +1,3 @@
|
||||
--theme=Catppuccin-mocha
|
||||
--style=plain
|
||||
--pager="less -FRX"
|
2048
config/.config/bat/themes/Catppuccin-mocha.tmTheme
Normal file
2048
config/.config/bat/themes/Catppuccin-mocha.tmTheme
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,22 @@
|
||||
[core]
|
||||
editor = "emacsclient"
|
||||
pager = "diff-so-fancy | less --tabs=4 -RFX"
|
||||
pager = "diff-so-fancy | less '--tabs=4' -RFX"
|
||||
|
||||
[diff-so-fancy]
|
||||
changeHunkIndicators = true
|
||||
markEmptyLines = true
|
||||
stripLeadingSymbols = true
|
||||
useUnicodeRuler = true
|
||||
|
||||
[init]
|
||||
defaultBranch = "main"
|
||||
|
||||
[interactive]
|
||||
diffFilter = "diff-so-fancy --patch"
|
||||
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[user]
|
||||
email = "23226432+hyperreal64@users.noreply.github.com"
|
||||
email = "hyperreal@moonshadow.dev"
|
||||
name = "Jeffrey Serio"
|
||||
|
@ -1,113 +1,115 @@
|
||||
# Sets user-defined palette
|
||||
palette = "catppuccin_mocha"
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
|
||||
format = """$time$container$directory$all$line_break$username$hostname$character"""
|
||||
right_format = """$cmd_duration $jobs $status"""
|
||||
## PROMPT FORMAT
|
||||
format = """$time$container$directory$all$cmd_duration$jobs$status$line_break$username$hostname$character"""
|
||||
|
||||
# # PALETTE
|
||||
palette = 'catppuccin_mocha'
|
||||
|
||||
[palettes.catppuccin_mocha]
|
||||
rosewater = '#f5e0dc'
|
||||
flamingo = '#f2cdcd'
|
||||
pink = '#f5c2e7'
|
||||
mauve = '#cba6f7'
|
||||
red = '#f38ba8'
|
||||
maroon = '#eba0ac'
|
||||
peach = '#fab387'
|
||||
yellow = '#f9e2af'
|
||||
green = '#a6e3a1'
|
||||
teal = '#94e2d5'
|
||||
sky = '#89dceb'
|
||||
sapphire = '#74c7ec'
|
||||
blue = '#89b4fa'
|
||||
lavender = '#b4befe'
|
||||
text = '#cdd6f4'
|
||||
subtext1 = '#bac2de'
|
||||
subtext0 = '#a6adc8'
|
||||
overlay2 = '#9399b2'
|
||||
overlay1 = '#7f849c'
|
||||
overlay0 = '#6c7086'
|
||||
surface2 = '#585b70'
|
||||
surface1 = '#45475a'
|
||||
surface0 = '#313244'
|
||||
base = '#1e1e2e'
|
||||
mantle = '#181825'
|
||||
crust = '#11111b'
|
||||
|
||||
## LEFT SIDE - FIRST LINE
|
||||
[time]
|
||||
disabled = false
|
||||
format = '[\[ $time \]]($style) '
|
||||
time_format = "%T"
|
||||
style = "bold peach"
|
||||
format = '[$time]($style) '
|
||||
time_format = '%T'
|
||||
style = 'bold peach'
|
||||
|
||||
[directory]
|
||||
style = 'subtext0'
|
||||
truncation_length = 8
|
||||
truncate_to_repo = true
|
||||
truncation_symbol = 'repo: '
|
||||
|
||||
[docker_context]
|
||||
symbol = 'docker: '
|
||||
format = '[$symbol$context]($style)'
|
||||
|
||||
[git_branch]
|
||||
symbol = ' '
|
||||
|
||||
[git_status]
|
||||
style = 'text'
|
||||
ahead = '⇡${count}'
|
||||
diverged = '⇕⇡${ahead_count}⇣${behind_count}'
|
||||
behind = '⇣${count}'
|
||||
deleted = 'x'
|
||||
|
||||
[golang]
|
||||
symbol = 'go: '
|
||||
format = '[$symbol($version )($style)'
|
||||
|
||||
[nix_shell]
|
||||
symbol = 'nix: '
|
||||
format = '[$symbol$state(\($name\))]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = 'node: '
|
||||
format = '[$symbol($version)]($style)'
|
||||
|
||||
[python]
|
||||
symbol = 'py: '
|
||||
format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = 'rust: '
|
||||
format = '[$symbol($version)]($style)'
|
||||
|
||||
[cmd_duration]
|
||||
min_time = 1
|
||||
style = 'yellow'
|
||||
format = 'duration: [$duration]($style) '
|
||||
disabled = false
|
||||
|
||||
[status]
|
||||
format = 'exit status: [$status = $common_meaning]($style) '
|
||||
disabled = false
|
||||
style = 'bold red'
|
||||
recognize_signal_code = true
|
||||
map_symbol = true
|
||||
|
||||
## LEFT SIDE - SECOND LINE
|
||||
[username]
|
||||
format = "[$user]($style)@"
|
||||
style_user = "red"
|
||||
style_root = "bold red"
|
||||
format = '[$user]($style)@'
|
||||
style_user = 'red'
|
||||
style_root = 'bold red'
|
||||
show_always = true
|
||||
|
||||
# Second param
|
||||
[hostname]
|
||||
format = "[$hostname]($style)"
|
||||
style = "lavender"
|
||||
trim_at = ".local"
|
||||
format = '[$hostname]($style)'
|
||||
style = 'lavender'
|
||||
trim_at = '.local'
|
||||
ssh_only = false
|
||||
disabled = false
|
||||
|
||||
# Third param
|
||||
[directory]
|
||||
style = "subtext0"
|
||||
truncation_length = 8
|
||||
truncate_to_repo = true
|
||||
truncation_symbol = "repo: "
|
||||
|
||||
# Before all the version info (python, nodejs, php, etc.)
|
||||
[git_status]
|
||||
style = "text"
|
||||
ahead = "⇡${count}"
|
||||
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
||||
behind = "⇣${count}"
|
||||
deleted = "x"
|
||||
|
||||
[container]
|
||||
style = "bold pink"
|
||||
format = "[$symbol \\[ $name \\]]($style) "
|
||||
|
||||
# Last param in the first line/row
|
||||
[cmd_duration]
|
||||
min_time = 1
|
||||
style = "yellow"
|
||||
format = "duration: [$duration]($style)"
|
||||
disabled = false
|
||||
|
||||
# Prompt: param 2
|
||||
[character]
|
||||
format = "$symbol "
|
||||
success_symbol = ' [%](teal)'
|
||||
error_symbol = ' [%](red)'
|
||||
vicmd_symbol = " [<](teal)"
|
||||
|
||||
# SYMBOLS
|
||||
[status]
|
||||
format = 'exit status: [$status_common_meaning$status_signal_name$status]($style)'
|
||||
disabled = false
|
||||
style = "bold red"
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[palettes.catppuccin_mocha]
|
||||
rosewater = "#f5e0dc"
|
||||
flamingo = "#f2cdcd"
|
||||
pink = "#f5c2e7"
|
||||
mauve = "#cba6f7"
|
||||
red = "#f38ba8"
|
||||
maroon = "#eba0ac"
|
||||
peach = "#fab387"
|
||||
yellow = "#f9e2af"
|
||||
green = "#a6e3a1"
|
||||
teal = "#94e2d5"
|
||||
sky = "#89dceb"
|
||||
sapphire = "#74c7ec"
|
||||
blue = "#89b4fa"
|
||||
lavender = "#b4befe"
|
||||
text = "#cdd6f4"
|
||||
subtext1 = "#bac2de"
|
||||
subtext0 = "#a6adc8"
|
||||
overlay2 = "#9399b2"
|
||||
overlay1 = "#7f849c"
|
||||
overlay0 = "#6c7086"
|
||||
surface2 = "#585b70"
|
||||
surface1 = "#45475a"
|
||||
surface0 = "#313244"
|
||||
base = "#1e1e2e"
|
||||
mantle = "#181825"
|
||||
crust = "#11111b"
|
||||
format = ' [$symbol]($style) '
|
||||
success_symbol = '[➜](bold teal)'
|
||||
error_symbol = '[➜](bold red)'
|
||||
vimcmd_symbol = '[V](bold green)'
|
||||
|
9
config/.config/systemd/user/sync_to_remotes.service
Normal file
9
config/.config/systemd/user/sync_to_remotes.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Daily sync_to_remotes.py
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/home/jas/repos/codeberg.org/hyperreal/admin-scripts/sync_to_remotes.py
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
10
config/.config/systemd/user/sync_to_remotes.timer
Normal file
10
config/.config/systemd/user/sync_to_remotes.timer
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Daily sync_to_remotes.py
|
||||
DefaultDependencies=yes
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 00:00:00
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
@ -0,0 +1 @@
|
||||
/home/jas/.config/systemd/user/sync_to_remotes.timer
|
@ -1,328 +1,19 @@
|
||||
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
|
||||
keybinds {
|
||||
normal {
|
||||
// uncomment this and adjust key if using copy_on_select=false
|
||||
// bind "Alt c" { Copy; }
|
||||
}
|
||||
locked {
|
||||
bind "Ctrl g" { SwitchToMode "Normal"; }
|
||||
}
|
||||
resize {
|
||||
bind "Ctrl n" { SwitchToMode "Normal"; }
|
||||
bind "h" "Left" { Resize "Increase Left"; }
|
||||
bind "j" "Down" { Resize "Increase Down"; }
|
||||
bind "k" "Up" { Resize "Increase Up"; }
|
||||
bind "l" "Right" { Resize "Increase Right"; }
|
||||
bind "H" { Resize "Decrease Left"; }
|
||||
bind "J" { Resize "Decrease Down"; }
|
||||
bind "K" { Resize "Decrease Up"; }
|
||||
bind "L" { Resize "Decrease Right"; }
|
||||
bind "=" "+" { Resize "Increase"; }
|
||||
bind "-" { Resize "Decrease"; }
|
||||
}
|
||||
pane {
|
||||
bind "Ctrl p" { SwitchToMode "Normal"; }
|
||||
bind "h" "Left" { MoveFocus "Left"; }
|
||||
bind "l" "Right" { MoveFocus "Right"; }
|
||||
bind "j" "Down" { MoveFocus "Down"; }
|
||||
bind "k" "Up" { MoveFocus "Up"; }
|
||||
bind "p" { SwitchFocus; }
|
||||
bind "n" { NewPane; SwitchToMode "Normal"; }
|
||||
bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
|
||||
bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
|
||||
bind "x" { CloseFocus; SwitchToMode "Normal"; }
|
||||
bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
|
||||
bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
|
||||
bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
|
||||
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
|
||||
bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
|
||||
}
|
||||
move {
|
||||
bind "Ctrl h" { SwitchToMode "Normal"; }
|
||||
bind "n" "Tab" { MovePane; }
|
||||
bind "h" "Left" { MovePane "Left"; }
|
||||
bind "j" "Down" { MovePane "Down"; }
|
||||
bind "k" "Up" { MovePane "Up"; }
|
||||
bind "l" "Right" { MovePane "Right"; }
|
||||
}
|
||||
tab {
|
||||
bind "Ctrl t" { SwitchToMode "Normal"; }
|
||||
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
|
||||
bind "h" "Left" "Up" "k" { GoToPreviousTab; }
|
||||
bind "l" "Right" "Down" "j" { GoToNextTab; }
|
||||
bind "n" { NewTab; SwitchToMode "Normal"; }
|
||||
bind "x" { CloseTab; SwitchToMode "Normal"; }
|
||||
bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
|
||||
bind "1" { GoToTab 1; SwitchToMode "Normal"; }
|
||||
bind "2" { GoToTab 2; SwitchToMode "Normal"; }
|
||||
bind "3" { GoToTab 3; SwitchToMode "Normal"; }
|
||||
bind "4" { GoToTab 4; SwitchToMode "Normal"; }
|
||||
bind "5" { GoToTab 5; SwitchToMode "Normal"; }
|
||||
bind "6" { GoToTab 6; SwitchToMode "Normal"; }
|
||||
bind "7" { GoToTab 7; SwitchToMode "Normal"; }
|
||||
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
|
||||
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
|
||||
bind "Tab" { ToggleTab; }
|
||||
}
|
||||
scroll {
|
||||
bind "Ctrl s" { SwitchToMode "Normal"; }
|
||||
bind "e" { EditScrollback; SwitchToMode "Normal"; }
|
||||
bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
|
||||
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
|
||||
bind "j" "Down" { ScrollDown; }
|
||||
bind "k" "Up" { ScrollUp; }
|
||||
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
|
||||
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
|
||||
bind "d" { HalfPageScrollDown; }
|
||||
bind "u" { HalfPageScrollUp; }
|
||||
// uncomment this and adjust key if using copy_on_select=false
|
||||
// bind "Alt c" { Copy; }
|
||||
}
|
||||
search {
|
||||
bind "Ctrl s" { SwitchToMode "Normal"; }
|
||||
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
|
||||
bind "j" "Down" { ScrollDown; }
|
||||
bind "k" "Up" { ScrollUp; }
|
||||
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
|
||||
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
|
||||
bind "d" { HalfPageScrollDown; }
|
||||
bind "u" { HalfPageScrollUp; }
|
||||
bind "n" { Search "down"; }
|
||||
bind "p" { Search "up"; }
|
||||
bind "c" { SearchToggleOption "CaseSensitivity"; }
|
||||
bind "w" { SearchToggleOption "Wrap"; }
|
||||
bind "o" { SearchToggleOption "WholeWord"; }
|
||||
}
|
||||
entersearch {
|
||||
bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
|
||||
bind "Enter" { SwitchToMode "Search"; }
|
||||
}
|
||||
renametab {
|
||||
bind "Ctrl c" { SwitchToMode "Normal"; }
|
||||
bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
|
||||
}
|
||||
renamepane {
|
||||
bind "Ctrl c" { SwitchToMode "Normal"; }
|
||||
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
|
||||
}
|
||||
session {
|
||||
bind "Ctrl o" { SwitchToMode "Normal"; }
|
||||
bind "Ctrl s" { SwitchToMode "Scroll"; }
|
||||
bind "d" { Detach; }
|
||||
}
|
||||
tmux {
|
||||
bind "[" { SwitchToMode "Scroll"; }
|
||||
bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
|
||||
bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
|
||||
bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
|
||||
bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
|
||||
bind "c" { NewTab; SwitchToMode "Normal"; }
|
||||
bind "," { SwitchToMode "RenameTab"; }
|
||||
bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
|
||||
bind "n" { GoToNextTab; SwitchToMode "Normal"; }
|
||||
bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
|
||||
bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
|
||||
bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
|
||||
bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
|
||||
bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
|
||||
bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
|
||||
bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
|
||||
bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
|
||||
bind "o" { FocusNextPane; }
|
||||
bind "d" { Detach; }
|
||||
}
|
||||
shared_except "locked" {
|
||||
bind "Ctrl g" { SwitchToMode "Locked"; }
|
||||
bind "Ctrl q" { Quit; }
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
|
||||
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
|
||||
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
|
||||
bind "Alt =" "Alt +" { Resize "Increase"; }
|
||||
bind "Alt -" { Resize "Decrease"; }
|
||||
}
|
||||
shared_except "normal" "locked" {
|
||||
bind "Enter" "Esc" { SwitchToMode "Normal"; }
|
||||
}
|
||||
shared_except "pane" "locked" {
|
||||
bind "Ctrl p" { SwitchToMode "Pane"; }
|
||||
}
|
||||
shared_except "resize" "locked" {
|
||||
bind "Ctrl n" { SwitchToMode "Resize"; }
|
||||
}
|
||||
shared_except "scroll" "locked" {
|
||||
bind "Ctrl s" { SwitchToMode "Scroll"; }
|
||||
}
|
||||
shared_except "session" "locked" {
|
||||
bind "Ctrl o" { SwitchToMode "Session"; }
|
||||
}
|
||||
shared_except "tab" "locked" {
|
||||
bind "Ctrl t" { SwitchToMode "Tab"; }
|
||||
}
|
||||
shared_except "move" "locked" {
|
||||
bind "Ctrl h" { SwitchToMode "Move"; }
|
||||
}
|
||||
shared_except "tmux" "locked" {
|
||||
bind "Ctrl b" { SwitchToMode "Tmux"; }
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
tab-bar { path "tab-bar"; }
|
||||
status-bar { path "status-bar"; }
|
||||
strider { path "strider"; }
|
||||
// compact-bar { path "compact-bar"; }
|
||||
}
|
||||
|
||||
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
|
||||
// eg. when terminal window with an active zellij session is closed
|
||||
// Options:
|
||||
// - detach (Default)
|
||||
// - quit
|
||||
//
|
||||
// on_force_close "quit"
|
||||
|
||||
// Send a request for a simplified ui (without arrow fonts) to plugins
|
||||
// Options:
|
||||
// - true
|
||||
// - false (Default)
|
||||
//
|
||||
// simplified_ui true
|
||||
|
||||
// Choose the path to the default shell that zellij will use for opening new panes
|
||||
// Default: $SHELL
|
||||
//
|
||||
// default_shell "fish"
|
||||
|
||||
// Toggle between having pane frames around the panes
|
||||
// Options:
|
||||
// - true (default)
|
||||
// - false
|
||||
//
|
||||
// pane_frames true
|
||||
|
||||
// Define color themes for Zellij
|
||||
// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
|
||||
// Once these themes are defined, one of them should to be selected in the "theme" section of this file
|
||||
//
|
||||
// themes {
|
||||
// dracula {
|
||||
// fg 248 248 242
|
||||
// bg 40 42 54
|
||||
// red 255 85 85
|
||||
// green 80 250 123
|
||||
// yellow 241 250 140
|
||||
// blue 98 114 164
|
||||
// magenta 255 121 198
|
||||
// orange 255 184 108
|
||||
// cyan 139 233 253
|
||||
// black 0 0 0
|
||||
// white 255 255 255
|
||||
// }
|
||||
// }
|
||||
copy_clipboard "system"
|
||||
copy_command "wl-copy"
|
||||
copy_on_select true
|
||||
theme "catppuccin-mocha"
|
||||
themes {
|
||||
catppuccin-mocha {
|
||||
bg "#585b70"
|
||||
fg "#cdd6f4"
|
||||
red "#f38ba8"
|
||||
green "#a6e3a1"
|
||||
black "#181825"
|
||||
blue "#89b4fa"
|
||||
yellow "#f9e2af"
|
||||
cyan "#89dceb"
|
||||
fg "#cdd6f4"
|
||||
green "#a6e3a1"
|
||||
magenta "#f5c2e7"
|
||||
orange "#fab387"
|
||||
cyan "#89dceb"
|
||||
black "#181825"
|
||||
red "#f38ba8"
|
||||
white "#cdd6f4"
|
||||
}
|
||||
rose-pine {
|
||||
bg "#191724"
|
||||
fg "#e0def4"
|
||||
red "#eb6f92"
|
||||
green "#31748f"
|
||||
blue "#9ccfd8"
|
||||
yellow "#f6c177"
|
||||
magenta "#c4a7e7"
|
||||
orange "#fe640b"
|
||||
cyan "#ebbcba"
|
||||
black "#26233a"
|
||||
white "#e0def4"
|
||||
yellow "#f9e2af"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Choose the theme that is specified in the themes section.
|
||||
// Default: default
|
||||
//
|
||||
theme "catppuccin-mocha"
|
||||
|
||||
// The name of the default layout to load on startup
|
||||
// Default: "default"
|
||||
//
|
||||
default_layout "default"
|
||||
|
||||
// Choose the mode that zellij uses when starting up.
|
||||
// Default: normal
|
||||
//
|
||||
// default_mode "locked"
|
||||
|
||||
// Toggle enabling the mouse mode.
|
||||
// On certain configurations, or terminals this could
|
||||
// potentially interfere with copying text.
|
||||
// Options:
|
||||
// - true (default)
|
||||
// - false
|
||||
//
|
||||
// mouse_mode false
|
||||
|
||||
// Configure the scroll back buffer size
|
||||
// This is the number of lines zellij stores for each pane in the scroll back
|
||||
// buffer. Excess number of lines are discarded in a FIFO fashion.
|
||||
// Valid values: positive integers
|
||||
// Default value: 10000
|
||||
//
|
||||
// scroll_buffer_size 10000
|
||||
|
||||
// Provide a command to execute when copying text. The text will be piped to
|
||||
// the stdin of the program to perform the copy. This can be used with
|
||||
// terminal emulators which do not support the OSC 52 ANSI control sequence
|
||||
// that will be used by default if this option is not set.
|
||||
// Examples:
|
||||
//
|
||||
//copy_command "xclip -selection clipboard" // x11
|
||||
copy_command "wl-copy" // wayland
|
||||
// copy_command "pbcopy" // osx
|
||||
|
||||
// Choose the destination for copied text
|
||||
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
|
||||
// Does not apply when using copy_command.
|
||||
// Options:
|
||||
// - system (default)
|
||||
// - primary
|
||||
//
|
||||
copy_clipboard "system"
|
||||
|
||||
// Enable or disable automatic copy (and clear) of selection when releasing mouse
|
||||
// Default: true
|
||||
//
|
||||
copy_on_select true
|
||||
|
||||
// Path to the default editor to use to edit pane scrollbuffer
|
||||
// Default: $EDITOR or $VISUAL
|
||||
//
|
||||
scrollback_editor "/bin/emacs -nw"
|
||||
|
||||
// When attaching to an existing session with other users,
|
||||
// should the session be mirrored (true)
|
||||
// or should each user have their own cursor (false)
|
||||
// Default: false
|
||||
//
|
||||
// mirror_session true
|
||||
|
||||
// The folder in which Zellij will look for layouts
|
||||
//
|
||||
layout_dir "/home/jas/.config/zellij/layouts"
|
||||
|
||||
// The folder in which Zellij will look for themes
|
||||
//
|
||||
// theme_dir "/path/to/my/theme_dir"
|
||||
|
296
doom/.doom.d/config.el
Normal file
296
doom/.doom.d/config.el
Normal file
@ -0,0 +1,296 @@
|
||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;; Misc settings
|
||||
|
||||
;; start Emacs as a server process
|
||||
(server-start)
|
||||
|
||||
(setq doom-user-dir "~/.doom.d/")
|
||||
|
||||
;; package-archives
|
||||
(setq package-archives
|
||||
'(("gnu" . "https://elpa.gnu.org/packages/")
|
||||
("melpa" . "https://melpa.org/packages/")))
|
||||
|
||||
(after! projectile
|
||||
(setq projectile-project-root-files-bottom-up
|
||||
(remove ".git" projectile-project-root-files-bottom-up)))
|
||||
|
||||
;; Set fonts
|
||||
(setq fontsize 18)
|
||||
(setq monofontfam "JetBrainsMono Nerd Font Mono")
|
||||
(setq doom-font (font-spec :family monofontfam :size fontsize)
|
||||
doom-variable-pitch-font (font-spec :family monofontfam :size fontsize)
|
||||
doom-symbol-font (font-spec :family monofontfam :size fontsize)
|
||||
doom-big-font (font-spec :family monofontfam :size fontsize))
|
||||
|
||||
;; Use catppuccin-mocha theme
|
||||
(setq doom-theme 'catppuccin)
|
||||
(setq catppuccin-flavor 'mocha)
|
||||
|
||||
;; History
|
||||
(setq savehist-file "~/.local/share/emacs/savehist")
|
||||
(savehist-mode 1)
|
||||
(setq history-length t)
|
||||
(setq history-delete-duplicates t)
|
||||
(setq savehist-save-minibuffer-history 1)
|
||||
(setq savehist-additional-variables
|
||||
'(kill-ring
|
||||
search-ring
|
||||
regexp-search-ring))
|
||||
|
||||
;; Display time in the modeline
|
||||
(display-time-mode 1)
|
||||
|
||||
;; Enable blink cursor
|
||||
(blink-cursor-mode 1)
|
||||
|
||||
;; Sentences end with a single space because it's right and proper
|
||||
(setq sentence-end-double-space nil)
|
||||
|
||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||
(setq display-line-numbers-type 'relative)
|
||||
|
||||
;; Keybinding to kill-whole-line
|
||||
(global-set-key (kbd "M-9") 'kill-whole-line)
|
||||
|
||||
;; trim newline from string output
|
||||
(defun string-trim-final-newline (string)
|
||||
"Trim the last newline character from string.
|
||||
Used with `shell-command-to-string'.
|
||||
Source: https://emacs.stackexchange.com/a/21906"
|
||||
(let ((len (length string)))
|
||||
(cond
|
||||
((and (> len 0) (eql (aref string (- len 1)) ?\n))
|
||||
(substring string 0 (- len 1)))
|
||||
(t string))))
|
||||
|
||||
;; wrapper around `shell-command-to-string' to remove newline
|
||||
(defun shell-command-output-string (command)
|
||||
(string-trim-final-newline (shell-command-to-string command)))
|
||||
|
||||
;; Copy all or text selection
|
||||
(defun xah-copy-all-or-region ()
|
||||
"Put the whole buffer content to `kill-ring', or text selection if there's one.
|
||||
Respects `narrow-to-region'.
|
||||
URL `https://ergomacs.org/emacs/emacs_copy_cut_all_or_region.html'
|
||||
Version 2015-08-22"
|
||||
(interactive)
|
||||
(if (use-region-p)
|
||||
(progn
|
||||
(kill-new (buffer-substring (region-beginning) (region-end)))
|
||||
(message "Text selection copied."))
|
||||
(progn
|
||||
(kill-new (buffer-string))
|
||||
(message "Buffer content copied."))))
|
||||
|
||||
;; Cut all or text selection
|
||||
(defun xah-cut-all-or-region ()
|
||||
"Cut the whole buffer content to `kill-ring', or text selection if there's one.
|
||||
Respects `narrow-to-region'.
|
||||
URL `https://ergomacs.org/emacs/emacs_copy_cut_all_or_region.html'
|
||||
Version 2015-08-22"
|
||||
(interactive)
|
||||
(if (use-region-p)
|
||||
(progn
|
||||
(kill-new (buffer-substring (region-beginning) (region-end)))
|
||||
(delete-region (region-beginning) (region-end)))
|
||||
(progn
|
||||
(kill-new (buffer-string))
|
||||
(delete-region (point-min) (point-max)))))
|
||||
|
||||
;; open URL in Firefox/LibreWolf
|
||||
(defun browse-host-web (url)
|
||||
"Browse URL with Firefox/LibreWolf/IceCat"
|
||||
(interactive "sURL: ")
|
||||
(shell-command (concat "librewolf" url)))
|
||||
|
||||
(setq browse-url-browser-function 'browse-host-web)
|
||||
|
||||
;; after copy Ctrl+c in Linux X11, you can paste by `yank' in emacs
|
||||
(setq select-enable-clipboard t)
|
||||
|
||||
;; after mouse selection copy in X11, you can paste by `yank' in emacs
|
||||
(setq select-enable-primary t)
|
||||
|
||||
;; set keybinding for paste
|
||||
(global-set-key (kbd "C-S-V") #'clipboard-yank)
|
||||
|
||||
;; Smart home key
|
||||
(defun smart-beginning-of-line ()
|
||||
"Move point to first non-whitespace character or beginning-of-line.
|
||||
|
||||
Move point to the first non-whitespace character on this line.
|
||||
If point was already at that position, move point to beginning of line."
|
||||
(interactive "^")
|
||||
(let ((oldpos (point)))
|
||||
(back-to-indentation)
|
||||
(and (= oldpos (point))
|
||||
(beginning-of-line))))
|
||||
|
||||
(global-set-key (kbd "<home>") 'smart-beginning-of-line)
|
||||
(global-set-key (kbd "<end>") 'end-of-line)
|
||||
|
||||
;; Autoformat on save
|
||||
(setq +format-on-save-enabled-modes
|
||||
'(emacs-lisp-mode))
|
||||
|
||||
;; UTF-8
|
||||
(prefer-coding-system 'utf-8)
|
||||
(when (display-graphic-p)
|
||||
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))
|
||||
|
||||
|
||||
;;;; undo-tree-mode - visualize undos and branches
|
||||
|
||||
(global-undo-tree-mode)
|
||||
(setq undo-tree-visualizer-timestamps t)
|
||||
(setq undo-tree-visualizer-diff t)
|
||||
(setq undo-tree-history-directory-alist '(("." . "~/.local/share/emacs/backups/undo-tree")))
|
||||
|
||||
|
||||
;;;; evil-nerd-commenter
|
||||
|
||||
(global-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines)
|
||||
(global-set-key (kbd "C-c l") 'evilnc-quick-comment-or-uncomment-to-the-line)
|
||||
(global-set-key (kbd "C-c c") 'evilnc-copy-and-comment-lines)
|
||||
(global-set-key (kbd "C-c p") 'evilnc-comment-or-uncomment-paragraphs)
|
||||
|
||||
|
||||
;;;; org-mode
|
||||
|
||||
(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))
|
||||
(require 'org-protocol)
|
||||
|
||||
(setq org-modules '(org-agenda
|
||||
org-choose
|
||||
org-collector
|
||||
))
|
||||
(eval-after-load 'org
|
||||
'(org-load-modules-maybe t))
|
||||
|
||||
(setq org-directory "~/org/")
|
||||
(setq org-default-notes-file "~/org/inbox.org")
|
||||
(setq org-agenda-files '("~/org/inbox.org"))
|
||||
|
||||
;; support selecting lines by using shift
|
||||
(setq org-support-shift-select t)
|
||||
|
||||
;; org-mode tags
|
||||
;; I hardly use these but whatever
|
||||
(setq org-tag-alist (quote (("@archiving" .?a)
|
||||
("@blog" .?b)
|
||||
("@homelab" . ?l)
|
||||
("@hyperreal.coffee" .?h)
|
||||
("@nirn.quest" .?n)
|
||||
("@reading" . ?r)
|
||||
("@selfcare" . ?s))))
|
||||
|
||||
;; org-mode keybindings
|
||||
(with-eval-after-load 'org
|
||||
(bind-key "C-c $" 'org-archive-subtree)
|
||||
(bind-key "C-c r" 'org-capture)
|
||||
(bind-key "C-c R" 'org-roam-capture)
|
||||
(bind-key "C-c a" 'org-agenda)
|
||||
(bind-key "C-c l" 'org-store-link)
|
||||
(bind-key "C-c L" 'org-insert-link-global)
|
||||
(bind-key "C-c O" 'org-open-at-point-global))
|
||||
|
||||
(setq org-use-effective-time t)
|
||||
|
||||
;; org-refile
|
||||
(setq org-reverse-note-order nil) ; new notes prepended
|
||||
(setq org-refile-use-outline-path 'full-file-path)
|
||||
(setq org-outline-path-complete-in-steps nil)
|
||||
(setq org-refile-allow-creating-parent-nodes nil)
|
||||
(setq org-refile-use-cache nil)
|
||||
(setq org-blank-before-new-entry '((heading . t) (plain-list-item . t)))
|
||||
|
||||
(setq org-refile-targets
|
||||
`((("~/org/inbox.org"
|
||||
"~/org/computing.org"
|
||||
"~/org/todos.org")
|
||||
. (:maxlevel . 5))))
|
||||
|
||||
;; org-todo-keywords
|
||||
(with-eval-after-load 'org
|
||||
(setq org-todo-keywords
|
||||
'((sequence
|
||||
"STARTED(s)"
|
||||
"TODO(t)"
|
||||
"WAITING(w@/!)"
|
||||
"IDEA(i)"
|
||||
"SOMEDAY(.)"
|
||||
"BLOCKED(k@/!)"
|
||||
"|"
|
||||
"DONE(x!)"
|
||||
"CANCELLED(c)")
|
||||
(sequence "PROJECT" "|" "DONE(x)")
|
||||
(sequence "MAYBE(,0)" "CHOSEN(c,+)" "|" "REJECTED")))
|
||||
|
||||
;; catppuccin palette
|
||||
(setq org-todo-keyword-faces
|
||||
'(("STARTED" . (:foreground "#a6d189" :weight bold))
|
||||
("TODO" . (:foreground "#a6e3a1" :weight bold))
|
||||
("WAITING" . (:foreground "#f9e2af" :weight bold))
|
||||
("IDEA" . (:foreground "#74c7ec" :weight bold))
|
||||
("SOMEDAY" . (:foreground "#f2cdcd" :weight bold))
|
||||
("BLOCKED" . (:foreground "#c6d0f5" :weight bold))
|
||||
("DONE" . (:foreground "#f38ba8" :weight bold))
|
||||
("CANCELLED" . (:foreground "#e78284" :weight bold))
|
||||
("MAYBE" . (:foreground "#c6d0f5" :weight bold))
|
||||
("CHOSEN" . (:foreground "#89b4fa" :weight bold))
|
||||
("REJECTED" . (:foreground "#d20f39" :weight bold)))))
|
||||
|
||||
(setq org-log-done 'time)
|
||||
|
||||
;; ox-hugo
|
||||
(with-eval-after-load 'ox
|
||||
(require 'ox-hugo))
|
||||
|
||||
;; colorize compilation buffer
|
||||
;; from https://sachachua.com/dotemacs/index.html#orga33bac5
|
||||
(require 'ansi-color)
|
||||
(defun colorize-compilation-buffer ()
|
||||
(when (eq major-mode 'compilation-mode)
|
||||
(let ((inhibit-read-only t))
|
||||
(ansi-color-apply-on-region compilation-filter-start (point-max)))))
|
||||
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
|
||||
|
||||
|
||||
;;;; helpful
|
||||
|
||||
(global-set-key (kbd "C-h f") #'helpful-callable)
|
||||
(global-set-key (kbd "C-h v") #'helpful-variable)
|
||||
(global-set-key (kbd "C-h k") #'helpful-key)
|
||||
(global-set-key (kbd "C-h x") #'helpful-command)
|
||||
(global-set-key (kbd "C-c C-d") #'helpful-at-point)
|
||||
|
||||
|
||||
;;;; dictionary
|
||||
|
||||
(global-set-key (kbd "C-c l") #'dictionary-lookup-definition)
|
||||
(setq dictionary-server "dict.org")
|
||||
|
||||
|
||||
;;;; dired
|
||||
|
||||
(map! :after dired
|
||||
:map dired-mode-map
|
||||
"C-o" #'casual-dired-tmenu)
|
||||
|
||||
|
||||
;;;; elpher
|
||||
|
||||
(setq elpher-default-url-type "gemini")
|
||||
|
||||
|
||||
;;;; vterm
|
||||
|
||||
(setq vterm-kill-buffer-on-exit t)
|
||||
(setq vterm-always-compile-module t)
|
||||
(setq vterm-other-window t)
|
||||
(setq vterm-buffer-name-string "vterm %s")
|
||||
(setq vterm-copy-exclude-prompt t)
|
||||
(setq vterm-ignore-blink-cursor nil)
|
191
doom/.doom.d/init.el
Normal file
191
doom/.doom.d/init.el
Normal file
@ -0,0 +1,191 @@
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This file controls what Doom modules are enabled and what order they load
|
||||
;; in. Remember to run 'doom sync' after modifying it!
|
||||
|
||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||
;; documentation. There you'll find a link to Doom's Module Index where all
|
||||
;; of our modules are listed, including what flags they support.
|
||||
|
||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||
;; flags as well (those symbols that start with a plus).
|
||||
;;
|
||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;; (corfu +orderless) ; complete with cap(f), cape and a flying feather!
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;indent-guides ; highlighted indent columns
|
||||
ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink cursor line after big motions
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
;;treemacs ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
;;(evil +everywhere); come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
ibuffer ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
;;eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;; (spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;; grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
;;collab ; buffers with friends
|
||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||
direnv
|
||||
;;docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;;ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
;; lookup ; navigate your code and its documentation
|
||||
lsp ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
;; pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
tree-sitter ; syntax and parsing, sitting in a tree...
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
|
||||
;;tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
;;(cc +lsp) ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
data ; config/data formats
|
||||
;;(dart +flutter) ; paint ui and not much else
|
||||
;;dhall
|
||||
;;elixir ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
;;ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
(go +lsp) ; the hipster dialect
|
||||
;;(graphql +lsp) ; Give queries a REST
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
json ; At least it ain't XML
|
||||
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
;;latex ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
org ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
(python +lsp +pyright) ; beautiful is better than ugly
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
;;racket ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
;;rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;; sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
web ; the tubes
|
||||
yaml ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
;;calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
|
||||
:config
|
||||
;;literate
|
||||
(default +bindings +smartparens))
|
27
doom/.doom.d/packages.el
Normal file
27
doom/.doom.d/packages.el
Normal file
@ -0,0 +1,27 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; $DOOMDIR/packages.el
|
||||
|
||||
;; To install a package with Doom you must declare them here and run 'doom sync'
|
||||
;; on the command line, then restart Emacs for the changes to take effect -- or
|
||||
;; use 'M-x doom/reload'.
|
||||
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;(package! some-package)
|
||||
(package! apheleia)
|
||||
(package! autothemer)
|
||||
(package! casual-dired)
|
||||
(package! catppuccin-theme)
|
||||
(package! dockerfile-mode)
|
||||
(package! elpher)
|
||||
(package! evil-nerd-commenter)
|
||||
(package! gemini :recipe
|
||||
(:host nil :repo "https://git.carcosa.net/jmcbray/gemini.el"))
|
||||
(package! helpful)
|
||||
(package! just-mode)
|
||||
(package! license-templates)
|
||||
(package! org-superstar)
|
||||
(package! ox-hugo)
|
||||
(package! pdf-tools)
|
||||
(package! shell-pop)
|
||||
(package! systemd)
|
||||
(package! undo-tree)
|
@ -1,39 +1,47 @@
|
||||
# justfile for common household tasks
|
||||
|
||||
set shell := ["zsh", "-cu"]
|
||||
|
||||
go-tools:
|
||||
go install golang.org/x/tools/gpls@latest
|
||||
go install github.com/fatih/gomodifytags@latest
|
||||
go install github.com/cweill/gotests/...@latest
|
||||
go install github.com/x-motemen/gore/cmd/gore@latest
|
||||
go install golang.org/x/tools/cmd/guru@latest
|
||||
|
||||
python-tools:
|
||||
pipx install --include-deps ansible
|
||||
pipx install black
|
||||
pipx install nose
|
||||
pipx install pytest
|
||||
pipx install hyfetch
|
||||
pip install --user pyright
|
||||
|
||||
webdev-tools:
|
||||
sudo npm install -g @catppuccin/inkcat
|
||||
sudo npm install -g prettier
|
||||
sudo npm install -g js-beautify
|
||||
sudo npm install -g stylelint
|
||||
sudo dnf install -y tidy
|
||||
|
||||
rust-tools:
|
||||
source "${HOME}/.cargo/env"
|
||||
cargo install cargo-binstall
|
||||
cargo_pkgs=(arp-scan bandwhich bat diskonaut du-dust fblog fd hyperfine procs ripgrep skim vivid wthrr)
|
||||
for pkg in "${cargo_pkgs[@]}"; do cargo-binstall -y "$pkg"; done
|
||||
dotfiles_repo := "/home/jas/repos/codeberg.org/hyperreal/dotfiles"
|
||||
homedir := "/home/jas/"
|
||||
configdir := "/home/jas/.config/"
|
||||
|
||||
refresh-doom-emacs:
|
||||
rm -rf "${HOME}/.config/emacs"
|
||||
git clone --depth 1 https://github.com/doomemacs/doomemacs "${HOME}/.config/emacs"
|
||||
"${HOME}/.config/emacs/bin/doom" install --force --verbose
|
||||
rm -rf {{configdir}}/emacs
|
||||
git clone --depth 1 https://github.com/doomemacs/doomemacs {{configdir}}/emacs
|
||||
{{configdir}}/emacs/bin/doom install --force --verbose
|
||||
|
||||
rustup:
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
deploy-dotfiles:
|
||||
cp -rfv {{dotfiles_repo}}/just/.justfile {{homedir}}
|
||||
cp -rfv {{dotfiles_repo}}/doom/.doom.d {{homedir}}
|
||||
cp -fv {{dotfiles_repo}}/zsh/.zshrc {{homedir}}
|
||||
cp -rfv {{dotfiles_repo}}/zsh/.zshrc.d {{homedir}}
|
||||
cp -fv {{dotfiles_repo}}/zsh/.zshenv {{homedir}}
|
||||
cp -rfv {{dotfiles_repo}}/config/.config/bat {{configdir}}
|
||||
cp -rfv {{dotfiles_repo}}/config/.config/git {{configdir}}
|
||||
cp -fv {{dotfiles_repo}}/config/.config/starship.toml {{configdir}}
|
||||
cp -rfv {{dotfiles_repo}}/config/.config/zellij {{configdir}}
|
||||
cp -rfv {{dotfiles_repo}}/config/.config/systemd {{configdir}}
|
||||
|
||||
save-dotfiles:
|
||||
cp -fv {{homedir}}/.justfile {{dotfiles_repo}}/just/
|
||||
cp -rfv {{homedir}}/.doom.d {{dotfiles_repo}}/doom/
|
||||
cp -fv {{homedir}}/.zshrc {{dotfiles_repo}}/zsh/
|
||||
cp -rfv {{homedir}}/.zshrc.d {{dotfiles_repo}}/zsh/
|
||||
cp -fv {{homedir}}/.zshenv {{dotfiles_repo}}/zsh/
|
||||
cp -rfv {{configdir}}/bat {{dotfiles_repo}}/config/.config/
|
||||
cp -rfv {{configdir}}/git {{dotfiles_repo}}/config/.config/
|
||||
cp -fv {{configdir}}/starship.toml {{dotfiles_repo}}/config/.config/
|
||||
cp -rfv {{configdir}}/zellij {{dotfiles_repo}}/config/.config/
|
||||
cp -rfv {{configdir}}/systemd {{dotfiles_repo}}/config/.config/
|
||||
|
||||
clean-dotfiles:
|
||||
rm -fv {{homedir}}/.justfile
|
||||
rm -rfv {{homedir}}/.doom.d
|
||||
rm -fv {{homedir}}/.zshrc
|
||||
rm -rfv {{homedir}}/.zshrc.d
|
||||
rm -fv {{homedir}}/.zshenv
|
||||
rm -rfv {{configdir}}/bat
|
||||
rm -rfv {{configdir}}/git
|
||||
rm -fv {{configdir}}/starship.toml
|
||||
rm -rfv {{configdir}}/zellij
|
||||
rm -rfv {{configdir}}/systemd
|
||||
|
24
zsh/.zshenv
24
zsh/.zshenv
@ -1,23 +1 @@
|
||||
#
|
||||
# Generic .zshenv file for zsh
|
||||
#
|
||||
# .zshenv is sourced on ALL invocations of the shell, unless the -f option is
|
||||
# set. It should NOT normally contain commands to set the command search path,
|
||||
# or other common environment variables unless you really know what you're
|
||||
# doing. E.g. running "PATH=/custom/path gdb program" sources this file (when
|
||||
# gdb runs the program via $SHELL), so you want to be sure not to override a
|
||||
# custom environment in such cases. Note also that .zshenv should not contain
|
||||
# commands that produce output or assume the shell is attached to a tty.
|
||||
#
|
||||
|
||||
# Some people insist on setting their PATH here to affect things like ssh.
|
||||
# Those that do should probably use $SHLVL to ensure that this only happens
|
||||
# the first time the shell is started (to avoid overriding a customized
|
||||
# environment). Also, the various profile/rc/login files all get sourced
|
||||
# *after* this file, so they will override this value. One solution is to
|
||||
# put your path-setting code into a file named .zpath, and source it from
|
||||
# both here (if we're not a login shell) and from the .zprofile file (which
|
||||
# is only sourced if we are a login shell).
|
||||
if [[ $SHLVL == 1 ]]; then
|
||||
source ~/.zpath
|
||||
fi
|
||||
eval "$(starship init zsh)"
|
||||
|
103
zsh/.zshrc
103
zsh/.zshrc
@ -5,51 +5,14 @@
|
||||
#
|
||||
# Zsh Manual - https://zsh-manual.netlify.app
|
||||
# Zsh Guide - https://zsh-guide.netlify.app
|
||||
#
|
||||
# ,----[ man -k zsh ]
|
||||
# |
|
||||
# | zsh (1) - the Z shell
|
||||
# | zshall (1) - the Z shell meta-man page
|
||||
# | zshbuiltins (1) - zsh builtin commands
|
||||
# | zshcalsys (1) - zsh calendar system
|
||||
# | zshcompctl (1) - zsh programmable completion
|
||||
# | zshcompsys (1) - zsh completion system
|
||||
# | zshcompwid (1) - zsh completion widgets
|
||||
# | zshcontrib (1) - user contributions to zsh
|
||||
# | zshexpn (1) - zsh expansion and substitution
|
||||
# | zshmisc (1) - everything and then some
|
||||
# | zshmodules (1) - zsh loadable modules
|
||||
# | zshoptions (1) - zsh options
|
||||
# | zshparam (1) - zsh parameters
|
||||
# | zshroadmap (1) - informal introduction to the zsh manual
|
||||
# | zshtcpsys (1) - zsh tcp system
|
||||
# | zshzftpsys (1) - zftp function front-end
|
||||
# | zshzle (1) - zsh command line editor
|
||||
# `----
|
||||
#
|
||||
# Zsh startup sequence
|
||||
# 1) /etc/zshenv -> Always run for every zsh. (login + interactive + other)
|
||||
# 2) ~/.zshenv -> Usually run for every zsh. (login + interactive + other)
|
||||
# 3) /etc/zprofile -> Run for login shells. (login)
|
||||
# 4) ~/.zprofile -> Run for login shells. (login)
|
||||
# 5) /etc/zshrc -> Run for interactive shells. (login + interactive)
|
||||
# 6) ~/.zshrc -> Run for interactive shells. (login + interactive)
|
||||
# 7) /etc/zlogin -> Run for login shells. (login)
|
||||
# 8) ~/.zlogin -> Run for login shells. (login)
|
||||
#
|
||||
# This file is based on Christian Schneider's zsh configuration
|
||||
# https://www.strcat.de/dotfiles
|
||||
|
||||
# Load Homebrew
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
||||
# Plugins
|
||||
if ! test -f ~/.zplug/init.zsh; then
|
||||
export ZPLUG_HOME=~/.zplug
|
||||
if ! test -f "${HOME}/.zplug/init.zsh"; then
|
||||
export ZPLUG_HOME="${HOME}/.zplug"
|
||||
git clone https://github.com/zplug/zplug $ZPLUG_HOME
|
||||
fi
|
||||
|
||||
source ~/.zplug/init.zsh
|
||||
source "${HOME}/.zplug/init.zsh"
|
||||
|
||||
# Use autosuggestions when typing commands
|
||||
zplug "zsh-users/zsh-autosuggestions"
|
||||
@ -70,7 +33,7 @@ zplug "plugins/extract", from:oh-my-zsh
|
||||
zplug "plugins/systemd", from:oh-my-zsh
|
||||
|
||||
# Load file from ~/.zshrc.d
|
||||
zplug "~/.zshrc.d", from:local, use:'*'
|
||||
zplug "${HOME}/.zshrc.d", from:local, use:'*'
|
||||
|
||||
if ! zplug check; then
|
||||
zplug install;
|
||||
@ -82,18 +45,18 @@ zplug load
|
||||
# -----------------------------------------------------------------------------
|
||||
# ENVIRONMENT VARS
|
||||
# -----------------------------------------------------------------------------
|
||||
export SHELL=/usr/bin/zsh
|
||||
export DOOMDIR="${HOME}/nextcloud/doom"
|
||||
export LS_COLORS=$(vivid generate catppuccin-mocha)
|
||||
export PAGER="less -X"
|
||||
export PATH="${HOME}/.config/emacs/bin:${PATH}"
|
||||
export PAGER="less -FRX"
|
||||
export MANWIDTH="88"
|
||||
export MANROFFOPT="-c"
|
||||
export MANPAGER="less -X"
|
||||
export MANPAGER="less -FRX"
|
||||
export BAT_PAGER="less -FRX"
|
||||
export BAT_STYLE="plain"
|
||||
|
||||
if test -x "$(command -v emacs)"; then
|
||||
EDITOR="emacs"
|
||||
EDITOR="emacsclient"
|
||||
else
|
||||
EDITOR="nvim"
|
||||
EDITOR="vim"
|
||||
fi
|
||||
export EDITOR
|
||||
|
||||
@ -108,23 +71,6 @@ export LESS_TERMCAP_se=$'\e[0m' # reset reverse video
|
||||
export LESS_TERMCAP_ue=$'\e[0m' # reset underline
|
||||
export GROFF_NO_SGR=1 # for konsole and gnome-terminal
|
||||
|
||||
# Format of process time reports with 'time'
|
||||
# %% A '%'
|
||||
# %U CPU seconds spent in user mode
|
||||
# %S CPU seconds spent in kernel mode
|
||||
# %E Elapsed time in seconds
|
||||
# %P CPU percentage, computed as (%U+%S)/%E
|
||||
# %J The name of this job
|
||||
# Default is:
|
||||
# %E real %U user %S system %P %J
|
||||
TIMEFMT="\
|
||||
|
||||
The name of this job : %J
|
||||
CPU seconds spent in user mode : %U
|
||||
CPU seconds spent in kernel mode : %S
|
||||
Elapsed time in seconds : %E
|
||||
CPU percentage : %P"
|
||||
|
||||
# HISTSIZE is the number of lines of history that is kept within any given
|
||||
# running zsh instance. SAVEHIST is the number of lines of history that is
|
||||
# written out to the HISTFILE when that event occurs. If you use the
|
||||
@ -135,12 +81,7 @@ HISTSIZE=100000
|
||||
SAVEHIST=65536
|
||||
|
||||
# Name of the file used to store command history
|
||||
HISTFILE=~/.zsh_history
|
||||
|
||||
# If nonnegative, commands whose combined user and system execution times
|
||||
# (measured in seconds) are greater than this value have timing stats printed
|
||||
# for them.
|
||||
REPORTTIME=10
|
||||
HISTFILE="${HOME}/.zsh_history"
|
||||
|
||||
# Language
|
||||
export LANG="en_US.UTF-8"
|
||||
@ -148,12 +89,11 @@ export LANG="en_US.UTF-8"
|
||||
# Manpages
|
||||
export MANPATH="${MANPATH:-/usr/share/man:/usr/local/share/man}"
|
||||
|
||||
if [ -d "${HOME}/.fzf/man" ]; then
|
||||
export MANPATH="${MANPATH}:${HOME}/.fzf/man"
|
||||
fi
|
||||
# Add ~/.local/bin to PATH
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
|
||||
# Bat theme
|
||||
export BAT_THEME="Catppuccin Mocha"
|
||||
# Add ~/bin to PATH
|
||||
export PATH="${HOME}/bin:${PATH}"
|
||||
|
||||
# Automatically remove duplicates from these arrays
|
||||
typeset -gU path cdpath manpath fpath
|
||||
@ -162,5 +102,12 @@ typeset -gU path cdpath manpath fpath
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook -Uz chpwd() { print -Pn "\e]2;%m:%2~\a" }
|
||||
|
||||
# starship.rs
|
||||
eval "$(starship init zsh)"
|
||||
# direnv
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
# Ensure always loading the latest version of the emacs-vterm-zsh.sh file
|
||||
if [[ "$INSIDE_EMACS" = 'vterm' ]] \
|
||||
&& [[ -n ${EMACS_VTERM_PATH} ]] \
|
||||
&& [[ -f ${EMACS_VTERM_PATH}/etc/emacs-vterm-zsh.sh ]]; then
|
||||
source ${EMACS_VTERM_PATH}/etc/emacs-vterm-zsh.sh
|
||||
fi
|
||||
|
@ -1,9 +1,3 @@
|
||||
# Get top 10 shell commands
|
||||
alias top10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
|
||||
|
||||
# history mechanism
|
||||
alias h='history'
|
||||
|
||||
# Aliases for APT
|
||||
if [ -e "/etc/debian_version" ]; then
|
||||
alias acs="sudo apt-cache search"
|
||||
@ -36,32 +30,21 @@ if [ -e "/etc/redhat-release" ]; then
|
||||
alias dnfu='sudo dnf update'
|
||||
fi
|
||||
|
||||
# Convert UPPER to lower (or back)
|
||||
alias UP2low='for i in *(.); mv $i ${i:l}'
|
||||
alias low2UP='for i in *(.); mv $i ${i:u}'
|
||||
|
||||
# The ls family
|
||||
if test -x "$(command -v lsd)"; then
|
||||
alias ls='lsd'
|
||||
alias la='lsd -a'
|
||||
alias ll='lsd -l'
|
||||
alias lal='lsd -al'
|
||||
else
|
||||
alias ls='ls --color=auto'
|
||||
alias la='ls -a'
|
||||
alias ll='ls -l'
|
||||
alias lal='ls -al'
|
||||
fi
|
||||
|
||||
alias l='ls -lFhg'
|
||||
alias la='ls -a'
|
||||
alias ll='ls -l'
|
||||
alias lal='ls -al'
|
||||
alias ldot='ls -gld .*'
|
||||
alias lse='ls -lZ'
|
||||
|
||||
# greps
|
||||
# grep
|
||||
alias grep='grep --color'
|
||||
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}'
|
||||
|
||||
# Copy SSH public key to clipboard (requires xclip or xsel)
|
||||
if test -x "$(command -v xclip)"; then
|
||||
alias pubkey='printf "$(cat ~/.ssh/id_ed25519.pub)" | xclip -selection clipboard | echo "SSH public key copied"'
|
||||
fi
|
||||
|
||||
# Prompt user before overwriting files
|
||||
alias cp='cp -i'
|
||||
@ -76,10 +59,10 @@ alias zfun='functions | bat -l zsh'
|
||||
alias -g H='| head'
|
||||
alias -g T='| tail'
|
||||
alias -g G='| grep'
|
||||
alias -g L='| less -X'
|
||||
alias -g L='| less -FRX'
|
||||
alias -g B='| bat'
|
||||
alias -g J='| jq'
|
||||
alias -g CC='| xclip -selection clipboard'
|
||||
alias -g CC='| wl-copy'
|
||||
alias -g C='| wc -l'
|
||||
|
||||
# Get public IP address
|
||||
@ -110,10 +93,6 @@ alias lsocku='sudo lsof -nP | grep UDP'
|
||||
# List TCP sockets in use
|
||||
alias lsockt='sudo lsof -nP | grep TCP'
|
||||
|
||||
# Reboot / Poweroff
|
||||
alias rbt='sudo systemctl reboot'
|
||||
alias shut='sudo systemctl poweroff'
|
||||
|
||||
# firewalld
|
||||
if test -x "$(command -v firewall-cmd)"; then
|
||||
alias fw='sudo firewall-cmd'
|
||||
@ -134,12 +113,3 @@ alias grbi='git rebase -i'
|
||||
alias grm='git rm'
|
||||
alias grv='git remote -v'
|
||||
alias gst='git status'
|
||||
|
||||
# doom emacs
|
||||
alias doomdoc="~/.config/emacs/bin/doom doctor"
|
||||
alias dsync="~/.config/emacs/bin/doom sync"
|
||||
alias dclean="~/.config/emacs/bin/doom clean"
|
||||
alias dcomp="~/.config/emacs/bin/doom compile"
|
||||
alias dpurge="~/.config/emacs/bin/doom purge"
|
||||
alias denv="~/.config/emacs/bin/doom env"
|
||||
alias dupgrade="~/.config/emacs/bin/doom upgrade"
|
||||
|
@ -27,9 +27,9 @@ if test -x "$(command -v gumssh)"; then
|
||||
bindkey -s '^[s' 'gumssh^M'
|
||||
fi
|
||||
|
||||
## ranger
|
||||
if test -x "$(command -v ranger)"; then
|
||||
bindkey -s '^[f' 'ranger^M'
|
||||
## yazi
|
||||
if test -x "$(command -v yazi)"; then
|
||||
bindkey -s '^[f' 'yazi^M'
|
||||
fi
|
||||
|
||||
## history substring search
|
||||
|
@ -58,12 +58,18 @@ function rmknownhosts() {
|
||||
}
|
||||
|
||||
# Empty trash
|
||||
function rubbish() {
|
||||
function trsh() {
|
||||
if check_cmd trash-empty; then
|
||||
trash-empty -f -v
|
||||
trash-empty -f
|
||||
fi
|
||||
}
|
||||
|
||||
# Copy SSH public key to clipboard (requires wl-copy)
|
||||
function pubkey() {
|
||||
cat "${HOME}/.ssh/id_ed25519.pub" | tr -d '\n' | wl-copy
|
||||
echo "--> SSH public key copied to clipboard"
|
||||
}
|
||||
|
||||
# Compatibility with emacs-libvterm
|
||||
function vterm_printf() {
|
||||
if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ]); then
|
||||
@ -77,12 +83,12 @@ function vterm_printf() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Remove all .jpeg .jpg .png .svg files from downloads
|
||||
# Remove all .jpeg .jpg .png .svg .webp files from downloads
|
||||
function rmpics() {
|
||||
find "${HOME}/downloads" \
|
||||
-maxdepth 1 \
|
||||
-type f \
|
||||
\( -name "*.jpg" -o -name "*.jpg_original" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.png" \) \
|
||||
\( -name "*.jpg" -o -name "*.jpg_original" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.png" -o -name "*.webp" \) \
|
||||
-delete
|
||||
}
|
||||
|
||||
@ -117,6 +123,8 @@ function mark() {
|
||||
"${mark_to_add} added to shellmarks file"
|
||||
fi
|
||||
|
||||
cat "${HOME}/.shellmarks" | sort | tee "${HOME}/.shellmarks" >/dev/null
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -177,13 +185,13 @@ function dstack() {
|
||||
# Print timestamp as %Y-%m-%d %H:%M:%S.
|
||||
function tstamp() {
|
||||
emulate -L zsh
|
||||
date '+%Y-%m-%d %H:%M:%S'
|
||||
date '+%Y-%m-%d %H:%M:%S' | tr -d '\n'
|
||||
}
|
||||
|
||||
# Print timestamp as %Y-%m-%dT%H:%M:%S%:z
|
||||
function tstampz() {
|
||||
emulate -L zsh
|
||||
date '+%Y-%m-%dT%H:%M:%S%:z'
|
||||
date '+%Y-%m-%dT%H:%M:%S%:z' | tr -d '\n'
|
||||
}
|
||||
|
||||
# Create a /overview/ of all available function()'s; the description for
|
||||
@ -231,3 +239,30 @@ function restart() { exec $SHELL $SHELL_ARGS "$@"; }
|
||||
|
||||
# cd to ~, clear screen, and restart zsh.
|
||||
function rsrc() { cd && clear && restart; }
|
||||
|
||||
# Set hostname:pwd for vterm buffer title
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook -Uz chpwd() { print -Pn "\e]2;%m:%2~\a" }
|
||||
|
||||
# For directory tracking and prompt tracking in Emacs Vterm
|
||||
function vterm_prompt_end() {
|
||||
vterm_printf "51;A$(whoami)@$(hostname):$(pwd)"
|
||||
}
|
||||
setopt PROMPT_SUBST
|
||||
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
|
||||
|
||||
# To read and execute Emacs commands in Vterm
|
||||
function vterm_cmd() {
|
||||
local vterm_elisp
|
||||
vterm_elisp=""
|
||||
while [ $# -gt 0 ]; do
|
||||
vterm_elisp="$vterm_elisp""$(printf '"%s" ' "$(printf "%s" "$1" | sed -e 's|\\|\\\\|g' -e 's|"|\\"|g')")"
|
||||
shift
|
||||
done
|
||||
vterm_printf "51;E$vterm_elisp"
|
||||
}
|
||||
|
||||
# find-file in Emacs
|
||||
function find_file() {
|
||||
vterm_cmd find-file "$(realpath "${@:-.}")"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user