tangled
alpha
login
or
join now
ponder.ooo
/
dots
0
fork
atom
. . .
0
fork
atom
overview
issues
pulls
pipelines
neovide launcher
autumn
1 month ago
504a4fb2
1706e62f
+77
-34
9 changed files
expand all
collapse all
unified
split
.bashrc
alacritty.toml
autumn.lua
collect.sh
config
deploy.sh
init.vim
neovide-launcher
neovide-launcher.desktop
+2
-26
.bashrc
···
4
4
5
5
[[ $- != *i* ]] && return
6
6
7
7
-
colors() {
8
8
-
local fgc bgc vals seq0
9
9
-
10
10
-
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
11
11
-
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
12
12
-
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
13
13
-
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
14
14
-
15
15
-
# foreground colors
16
16
-
for fgc in {30..37}; do
17
17
-
# background colors
18
18
-
for bgc in {40..47}; do
19
19
-
fgc=${fgc#37} # white
20
20
-
bgc=${bgc#40} # black
21
21
-
22
22
-
vals="${fgc:+$fgc;}${bgc}"
23
23
-
vals=${vals%%;}
24
24
-
25
25
-
seq0="${vals:+\e[${vals}m}"
26
26
-
printf " %-9s" "${seq0:-(default)}"
27
27
-
printf " ${seq0}TEXT\e[m"
28
28
-
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
29
29
-
done
30
30
-
echo; echo
31
31
-
done
32
32
-
}
7
7
+
export EDITOR=~/ponder/neovide_launcher
8
8
+
export VISUAL=~/ponder/neovide_launcher
33
9
34
10
case ${TERM} in
35
11
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*|alacritty)
+4
alacritty.toml
···
1
1
+
[window.padding]
2
2
+
x = 0
3
3
+
y = 0
4
4
+
1
5
[colors.bright]
2
6
black = "0x0F4039"
3
7
blue = "0xCCFFCC"
+6
-1
autumn.lua
···
1
1
2
2
3
3
+
vim.defer_fn(function()
4
4
+
local pid = vim.fn.getpid()
5
5
+
local socket = '/tmp/nvim-' .. pid .. '.socket'
6
6
+
vim.fn.serverstart(socket)
7
7
+
end, 0)
3
8
4
9
local function fix_menu()
5
10
local choices = {"spaces", "quotes", "both"}
···
36
41
37
42
<C-x><C-o> for completion
38
43
39
39
-
]]--
40
44
41
45
vim.api.nvim_create_autocmd({"BufEnter"},
42
46
{
···
58
62
vim.diagnostic.config({
59
63
virtual_text = false,
60
64
})
65
65
+
]]--
61
66
+4
collect.sh
···
1
1
+
1
2
cp ~/.Xmodmap .
2
3
cp ~/.bashrc .
3
4
cp ~/.config/alacritty/alacritty.toml .
···
13
14
cp ~/.pixel-lock .
14
15
cp ~/.bashalias .
15
16
cp ~/.i3/config .
17
17
+
cp ~/.local/share/applications/neovide-launcher.desktop .
18
18
+
cp ~/ponder/neovide-launcher .
19
19
+
+2
-2
config
···
78
78
bindsym $mod+Shift+v exec --no-startup-id urxvt -e vim
79
79
80
80
# browser
81
81
-
bindsym $mod+Tab exec --no-startup-id firefox-nightly --private-window
82
82
-
bindsym $mod+Shift+Tab exec --no-startup-id firefox-nightly
81
81
+
bindsym $mod+Tab exec --no-startup-id firefox --private-window
82
82
+
bindsym $mod+Shift+Tab exec --no-startup-id firefox
83
83
#bindsym $mod+Tab exec --no-startup-id google-chrome-stable --incognito --disable-background-networking --dns-prefetch-disabled
84
84
#bindsym $mod+Shift+Tab exec --no-startup-id google-chrome-stable --disable-background-networking --dns-prefetch-disabled
85
85
+4
deploy.sh
···
1
1
+
1
2
cp .Xmodmap ~/.Xmodmap
2
3
cp .bashrc ~/.bashrc
3
4
cp alacritty.toml ~/.config/alacritty/alacritty.toml
···
13
14
cp .pixel-lock ~/.pixel-lock
14
15
cp .bashalias ~/.bashalias
15
16
cp config ~/.i3/config
17
17
+
cp neovide-launcher.desktop ~/.local/share/applications/neovide-launcher.desktop
18
18
+
cp neovide-launcher ~/ponder/neovide-launcher
19
19
+
+19
-5
init.vim
···
88
88
set termguicolors
89
89
set number
90
90
set cursorline
91
91
+
set colorcolumn=95
92
92
+
" set textwidth=95 annoying automatic line break bullshit
91
93
set signcolumn=yes
92
94
93
95
" tabbing
···
122
124
set wildmode=list:longest
123
125
set foldmethod=indent
124
126
set foldlevel=99
127
127
+
set formatoptions-=ro
125
128
126
129
" Highlighting
127
130
128
128
-
" highlight spaces at end of line (when not in insert mode)
129
129
-
:highlight ExtraWhitespace ctermbg=red guibg=red
130
130
-
:match ExtraWhitespace /\s\+\%#\@<!$/
131
131
-
:au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
132
132
-
:au InsertLeave * match ExtraWhitespace /\s\+$/
131
131
+
highlight ExtraWhitespace ctermbg=red guibg=red
132
132
+
highlight OverLength ctermbg=darkred guibg=red
133
133
+
134
134
+
augroup Whitespace
135
135
+
autocmd!
136
136
+
autocmd VimEnter,WinEnter * call matchadd('ExtraWhitespace', '\s\+$')
137
137
+
autocmd VimEnter,WinEnter * call matchadd('OverLength', '\%95v.\+')
138
138
+
139
139
+
autocmd InsertEnter * call clearmatches()
140
140
+
autocmd InsertEnter * call matchadd('ExtraWhitespace', '\s\+\%#\@<!$')
141
141
+
autocmd InsertEnter * call matchadd('OverLength', '\%95v.\+')
142
142
+
143
143
+
autocmd InsertLeave * call clearmatches()
144
144
+
autocmd InsertLeave * call matchadd('ExtraWhitespace', '\s\+$')
145
145
+
autocmd InsertLeave * call matchadd('OverLength', '\%95v.\+')
146
146
+
augroup END
133
147
134
148
:highlight DiagnosticVirtualTextError guifg=red
135
149
:highlight DiagnosticVirtualTextWarn guifg=yellow
+29
neovide-launcher
···
1
1
+
2
2
+
#!/bin/bash
3
3
+
4
4
+
target="$1"
5
5
+
best_socket=""
6
6
+
best_depth=-1
7
7
+
8
8
+
target="$(realpath "$target")"
9
9
+
10
10
+
for pid in $(pgrep nvim); do
11
11
+
if cwd=$(readlink -f "/proc/$pid/cwd" 2>/dev/null); then
12
12
+
socket="/tmp/nvim-$pid.socket"
13
13
+
14
14
+
if [[ "$target" == "$cwd"* ]]; then
15
15
+
depth=$(awk -F/ '{print NF-1}' <<< "$cwd")
16
16
+
if (( depth > best_depth )); then
17
17
+
best_socket="$socket"
18
18
+
best_depth="$depth"
19
19
+
fi
20
20
+
fi
21
21
+
fi
22
22
+
done
23
23
+
24
24
+
if [[ -n "$best_socket" && -e "$best_socket" ]]; then
25
25
+
nvim --server "$best_socket" --remote-send "<Esc><S-h><S-h><S-h>:e $target<CR>"
26
26
+
else
27
27
+
cd $(dirname $(realpath $target)) && neovide "$target"
28
28
+
fi
29
29
+
+7
neovide-launcher.desktop
···
1
1
+
2
2
+
[Desktop Entry]
3
3
+
Type=Application
4
4
+
Name=Neovide
5
5
+
Exec=/home/ponder/ponder/neovide-launcher %F
6
6
+
MimeType=text/*;application/json;application/javascript;application/xml;application/x-yaml;
7
7
+