summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2021-12-07 00:53:04 -0600
committerTimmy Keller <tjk@tjkeller.xyz>2021-12-07 00:53:04 -0600
commit9599578a86346c91035314306093caaaeba928ec (patch)
tree609ea918fc5d2cbb7101fc594c41f4487e866bd9
parent41e14071197d271ace370332dbcec9bf50239f92 (diff)
downloaddotconfig-9599578a86346c91035314306093caaaeba928ec.tar.xz
dotconfig-9599578a86346c91035314306093caaaeba928ec.zip
fix vim title changing issue, xinitrc so you can do 'sudo [guiapp]', cargo bin in path
-rw-r--r--htop/htoprc2
-rw-r--r--nvim/autoload/plug.vim5
-rwxr-xr-xnvim/init.vim18
-rwxr-xr-xx11/rc2
-rw-r--r--zsh/zprofile.base22
5 files changed, 34 insertions, 15 deletions
diff --git a/htop/htoprc b/htop/htoprc
index 0eb61a0..dab6cdf 100644
--- a/htop/htoprc
+++ b/htop/htoprc
@@ -19,7 +19,7 @@ highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
-tree_view=0
+tree_view=1
tree_view_always_by_pid=0
all_branches_collapsed=0
header_margin=1
diff --git a/nvim/autoload/plug.vim b/nvim/autoload/plug.vim
index 6a958cb..ad95041 100644
--- a/nvim/autoload/plug.vim
+++ b/nvim/autoload/plug.vim
@@ -405,7 +405,7 @@ function! plug#end()
for [map, names] in items(lod.map)
for [mode, map_prefix, key_prefix] in
- \ [['i', '<C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
+ \ [['i', '<C-\><C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
execute printf(
\ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>',
\ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix)
@@ -1208,7 +1208,8 @@ function! s:update_impl(pull, force, args) abort
normal! 2G
silent! redraw
- let s:clone_opt = []
+ " Set remote name, overriding a possible user git config's clone.defaultRemoteName
+ let s:clone_opt = ['--origin', 'origin']
if get(g:, 'plug_shallow', 1)
call extend(s:clone_opt, ['--depth', '1'])
if s:git_version_requirement(1, 7, 10)
diff --git a/nvim/init.vim b/nvim/init.vim
index f540d63..d3f556c 100755
--- a/nvim/init.vim
+++ b/nvim/init.vim
@@ -82,15 +82,29 @@ else
endif
" Behaviors exclusive to either the tty or a terminal emulator in a graphical environment
+function GetTermPID(temu)
+ let pinfo = ['', getpid(), '']
+ while !(pinfo[2] =~ a:temu)
+ let pinfo = split(system('ps h -o pid,ppid,command= -p' . pinfo[1]))
+ endwhile
+ return pinfo[0]
+endfunction
+
+function SetTermClassName(termpid, name)
+ silent exec "!settitle " . a:termpid . " " . a:name
+endfunction
+
if empty($DISPLAY)
" Clear the tty screen after exiting vim
"autocmd QuitPre * :!clear
else
set cursorline " Highlight current line
" Change the terminal emulator's window title and class name to vim
+ let temu = "st"
+ let temupid = GetTermPID(temu)
autocmd BufEnter * :set title
- autocmd VimEnter * :silent exec "!settitle Vim"
- autocmd VimLeave * :silent exec "!settitle st"
+ autocmd VimEnter * call SetTermClassName(temupid, "Vim")
+ autocmd VimLeave * call SetTermClassName(temupid, "st")
"let &titleold="st"
endif
diff --git a/x11/rc b/x11/rc
index ac86f9e..6b13296 100755
--- a/x11/rc
+++ b/x11/rc
@@ -6,3 +6,5 @@ seasonalwallpaper &
capsmap &
unclutter -noevents &
xset r rate 250 50 &
+# Allow starting graphical applications as root
+doas xauth -f /root/.Xauthority add $(xauth list $DISPLAY) &
diff --git a/zsh/zprofile.base b/zsh/zprofile.base
index 688f8c4..ec1b362 100644
--- a/zsh/zprofile.base
+++ b/zsh/zprofile.base
@@ -1,14 +1,5 @@
#!/usr/bin/env zsh
-# Path
-scriptspath="/home/timmy/.local/bin"
-export PATH="$scriptspath/launch:$PATH"
-export PATH="$scriptspath/x11:$PATH"
-export PATH="$scriptspath/misc:$PATH"
-#export PATH="$scriptspath/keyboard:$PATH"
-export PATH="$scriptspath/sync:$PATH"
-export PATH="$scriptspath/programs:$PATH"
-
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
@@ -33,8 +24,19 @@ export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
export LESSHISTFILE="-"
+# Path
+scriptspath="/home/timmy/.local/bin"
+export PATH="$scriptspath/launch:$PATH"
+export PATH="$scriptspath/x11:$PATH"
+export PATH="$scriptspath/misc:$PATH"
+#export PATH="$scriptspath/keyboard:$PATH"
+export PATH="$scriptspath/sync:$PATH"
+export PATH="$scriptspath/programs:$PATH"
+export PATH="$CARGO_HOME:$PATH"
+
# Theming
-export QT_QPA_PLATFORMTHEME="qt5ct"
+#export QT_QPA_PLATFORMTHEME="qt5ct"
+export QT_QPA_PLATFORMTHEME="gtk2"
# Autostart X after login
if [[ -z $DISPLAY ]] && [[ "$(id -u)" != 0 ]] && ( [[ $(tty) = /dev/tty1 ]] || [[ $(tty) = /dev/ttyC0 ]] ); then startx $XDG_CONFIG_HOME/x11/xinitrc; fi