Various updates and new templating by hostname

This commit is contained in:
Andrew Scott 2022-12-28 14:56:33 -05:00
parent 5c0faf09e1
commit c185c81f2b
Signed by: a
GPG key ID: 7CD5A5977E4931C1
11 changed files with 232 additions and 10 deletions

3
.chezmoiignore Normal file
View file

@ -0,0 +1,3 @@
LICENSE
README.md
Packages.txt

78
Packages.txt Normal file
View file

@ -0,0 +1,78 @@
# List of basic packages I typically install. You may not need all of them.
# Adjust as necessary.
# Arch repos
bind
bspwm
sxhkd
pulseaudio
pulseaudio-bluetooth
pavucontrol
neofetch
dunst
emacs
galculator
git
gsimplecal
htop
dex
feh
emacs
gnome-keyring
logrotate
ncdu
neovim
nextcloud-client
noto-fonts-cjk
noto-fonts-emoji
kitty
ranger
redshift
rofi
rxvt-unicode
papirus-icon-theme
snapper # btrfs only
ttf-dejavu
ttf-fira-code
ttf-font-awesome
ttf-hack
ttf-ibm-plex
ttf-liberation
xsecurelock
xss-lock
polkit-gnome
xorg-xserver
xorg-xinit
xorg-xsetroot
xorg-xrandr
xorg-xset
xclip
maim
xdotool
dbus-pyton
# AUR
arkenfox-user.js
birdtray
btrfs-du # more accurate du for btrfs
pa-notify
polybar
pulseaudio-control
needrestart
neovim-plug-git
gruvbox-dark-gtk
sbkeys
sbupdate-git
spotify
spotify-adblock-git
polybar-spotify
rofi-power-menu
st
vimix-gtk-themes-git
xidlehook
# Laptop/Thinkpads (for xbacklight etc., your needs may vary)
acpi_call
acpi_call-lts # only if LTS kernel installed, see 'acpi_call-dkms' for other variants
acpilight # or 'light' is sometimes needed for older thinkpads
rtw89-dkms-git # wifi for thinkpad t14 gen2 amd, not needed for kernel 5.16 or later

View file

@ -4,9 +4,10 @@
! https://github.com/jef/forest-night-xresources ! https://github.com/jef/forest-night-xresources
! https://github.com/jnurmine/Zenburn ! https://github.com/jnurmine/Zenburn
! ----------------------------------------------------------------------------- ! -----------------------------------------------------------------------------
{{if eq .chezmoi.hostname "helix" }}
! Laptop screen DPI ! Laptop screen DPI
Xft.dpi: 216 Xft.dpi: 216
{{- end}}
Xft.autohint: 0 Xft.autohint: 0
Xft.lcdfilter: lcddefault Xft.lcdfilter: lcddefault

View file

@ -8,5 +8,3 @@
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec startx exec startx
fi fi
export EDITOR=emacs

View file

@ -8,6 +8,8 @@
alias ls='ls --color=auto' alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ ' PS1='[\u@\h \W]\$ '
export EDITOR=emacs
alias nv=nvim alias nv=nvim
alias r="urxvt -name Ranger -e ranger & disown" alias r="urxvt -name Ranger -e ranger & disown"
alias kssh="/usr/bin/kitty +kitten ssh" alias kssh="/usr/bin/kitty +kitten ssh"

View file

@ -1,7 +1,11 @@
#!/bin/bash #!/bin/bash
{{ if eq .chezmoi.hostname "helix" }}
bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9 10 bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9 10
{{ end }}
{{ if eq .chezmoi.hostname "hydrus"}}
bspc monitor DP-0 -d 1 2 3 4 5
bspc monitor DVI-I-1 -d 6 7 8 9 10
{{ end }}
bspc config border_width 2 bspc config border_width 2
bspc config window_gap 10 bspc config window_gap 10
bspc config top_padding 70 bspc config top_padding 70
@ -50,16 +54,25 @@ bspc desktop -f 1
grep -x sxhkd > /dev/null || sxhkd & grep -x sxhkd > /dev/null || sxhkd &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
xidlehook --not-when-audio --not-when-fullscreen --timer 120 "killall -q redshift && xrandr --output eDP-1 --brightness .1" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" --timer 480 "xset s activate" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" &
xsettingsd & xsettingsd &
sh ~/.fehbg & sh ~/.fehbg &
pa-notify -t 3 & pa-notify -t 3 &
#$HOME/.local/bin/single-polybar-launcher &
$HOME/.local/bin/tint2-launcher &
redshift -r & redshift -r &
picom & picom &
dunst & dunst &
dex -a & dex -a &
cbatticon -u 20 -i standard -c "systemctl hibernate" &
birdtray & birdtray &
{{- if eq .chezmoi.hostname "helix" }}
xidlehook --not-when-audio --not-when-fullscreen --timer 120 "killall -q redshift && xrandr --output eDP-1 --brightness .1" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" --timer 480 "xset s activate" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" &
cbatticon -u 20 -i standard -c "systemctl hibernate" &
$HOME/.local/bin/tint2-launcher &
{{- end }}
{{- if eq .chezmoi.hostname "hydrus"}}
xidlehook --not-when-audio --not-when-fullscreen --timer 360 "xset s activate" "" &
$HOME/.local/bin/dual-polybar-launcher &
{{- end }}
{{- if eq .chezmoi.hostname "triangulum"}}
xidlehook --not-when-audio --not-when-fullscreen --timer 360 "xset s activate" "" &
$HOME/.local/bin/single-polybar-launcher &
{{- end }}
sleep 10 && nextcloud --background & sleep 10 && nextcloud --background &

113
dot_config/nvim/init.vim Normal file
View file

@ -0,0 +1,113 @@
" set leader key
let g:mapleader = "\<Space>"
" vim hardcodes background color erase even if the terminfo file does
" not contain bce (not to mention that libvte based terminals
" incorrectly contain bce in their terminfo files). This causes
" incorrect background rendering when using a color theme with a
" background color.
let &t_ut=''
syntax enable " Enables syntax highlighing
set hidden " Required to keep multiple buffers open
set nowrap " Display long lines as just one line
set encoding=utf-8 " The encoding displayed
set pumheight=10 " Makes popup menu smaller
set fileencoding=utf-8 " The encoding written to file
set ruler " Show the cursor position all the time
set cmdheight=2 " More space for displaying messages
set iskeyword+=- " treat dash separated words as a word text object"
"set mouse=a " Enable your mouse
set splitbelow " Horizontal splits will automatically be below
set splitright " Vertical splits will automatically be to the right
set t_Co=256 " Support 256 colors
set conceallevel=0 " So that I can see `` in markdown files
set tabstop=4 " Insert 4 spaces for a tab
set shiftwidth=4 " Change the number of space characters inserted for indentation
set smarttab " Makes tabbing smarter will realize you have 2 vs 4
set expandtab " Converts tabs to spaces
set smartindent " Makes indenting smart
set autoindent " Good auto indent
set laststatus=0 " Always display the status line
"set number " Line numbers
"set cursorline " Enable highlighting of the current line
set background=dark " tell vim what the background color looks like
set showtabline=4 " Always show tabs
"set noshowmode " We don't need to see things like -- INSERT -- anymore
set nobackup " This is recommended by coc
set nowritebackup " This is recommended by coc
set updatetime=300 " Faster completion
set timeoutlen=500 " By default timeoutlen is 1000 ms
set formatoptions-=cro " Stop newline continution of comments
"set clipboard=unnamedplus " Copy paste between vim and everything else
set autochdir " Your working directory will always be the same as your working directory
au! BufWritePost $MYVIMRC source % " auto source when writing to init.vim alternatively you can run :source $MYVIMRC
" You can't stop me
cmap w!! w !sudo tee %
"" Plugins
" Install neovim-plug-git from AUR
call plug#begin()
" A fuzzy file finder
Plug 'kien/ctrlp.vim'
" Comment/Uncomment tool
Plug 'scrooloose/nerdcommenter'
" Switch to the begining and the end of a block by pressing %
Plug 'tmhedberg/matchit'
" A Tree-like side bar for better navigation
Plug 'scrooloose/nerdtree'
" A cool status bar
Plug 'vim-airline/vim-airline'
" Airline themes
Plug 'vim-airline/vim-airline-themes'
" Better syntax-highlighting for filetypes in vim
Plug 'sheerun/vim-polyglot'
" Intellisense engine
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Git integration
Plug 'tpope/vim-fugitive'
" Auto-close braces and scopes
Plug 'jiangmiao/auto-pairs'
""Themes
" Everforest theme
Plug 'sainnhe/everforest'
" Nord
"Plug 'arcticicestudio/nord-vim'
call plug#end()
" Important!!
if has('termguicolors')
set termguicolors
endif
" Set contrast.
" This configuration option should be placed before `colorscheme everforest`.
" Available values: 'hard', 'medium'(default), 'soft'
let g:everforest_background = 'soft'
" For better performance
let g:everforest_better_performance = 1
colorscheme everforest
" plug-in autostart
"augroup nerdtree_open
" autocmd!
" autocmd VimEnter * NERDTree | wincmd p
"augroup END
" NERDTree Toggle
nmap <silent> <Leader>k :NERDTreeToggle<CR>
" CoC completion
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ CheckBackspace() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction

View file

@ -38,6 +38,10 @@
(setq user-emacs-directory (expand-file-name "~/.cache/emacs/") (setq user-emacs-directory (expand-file-name "~/.cache/emacs/")
url-history-file (expand-file-name "url/history" user-emacs-directory)) url-history-file (expand-file-name "url/history" user-emacs-directory))
;; Store autosaves in cache dir instead of littering all over the filesystem
(setq auto-save-file-name-transforms
`((".*" "~/.cache/emacs/autosave/" t)))
;; No annoying Windows errors ;; No annoying Windows errors
(set-default-coding-systems 'utf-8) (set-default-coding-systems 'utf-8)
@ -61,6 +65,11 @@
(setq-default tab-width 4) (setq-default tab-width 4)
(setq indent-line-function 'insert-tab) (setq indent-line-function 'insert-tab)
;; Recent files
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(setq recentf-max-saved-items 25)
;; Line numbers ;; Line numbers
(setq column-number-mode t) (setq column-number-mode t)
(dolist (mode '(text-mode-hook (dolist (mode '(text-mode-hook
@ -221,6 +230,7 @@
("C-c m" . consult-mode-command) ("C-c m" . consult-mode-command)
("C-c k" . consult-kmacro) ("C-c k" . consult-kmacro)
;; C-x bindings (ctl-x-map) ;; C-x bindings (ctl-x-map)
("C-x C-r" . consult-recent-file)
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x b" . consult-buffer) ;; orig. switch-to-buffer ("C-x b" . consult-buffer) ;; orig. switch-to-buffer
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
@ -438,7 +448,7 @@
(zig-mode . lsp) (zig-mode . lsp)
(lsp-mode . lsp-enable-which-key-integration)) (lsp-mode . lsp-enable-which-key-integration))
:custom :custom
(lsp-eldoc-render-all t) (lsp-eldoc-render-all nil)
(lsp-idle-delay 0.6) (lsp-idle-delay 0.6)
;; (lsp-rust-analyzer-cargo-watch-command "clippy") ;; (lsp-rust-analyzer-cargo-watch-command "clippy")
;; (lsp-rust-analyzer-server-display-inlay-hints t) ;; (lsp-rust-analyzer-server-display-inlay-hints t)
@ -481,6 +491,7 @@
:config :config
(global-company-mode 1) (global-company-mode 1)
(setq company-global-modes '(not gud-mode)) (setq company-global-modes '(not gud-mode))
(setq company-global-modes '(not comint-mode))
:custom :custom
(company-idle-delay 0) (company-idle-delay 0)
(company-minimum-prefix-length 1) (company-minimum-prefix-length 1)

View file

@ -5,6 +5,7 @@ export GOPATH="$HOME/.local/opt/go"
export PATH="$HOME/.local/opt/go/bin:$PATH" export PATH="$HOME/.local/opt/go/bin:$PATH"
# add .local/bin to $PATH # add .local/bin to $PATH
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
{{- if eq .chezmoi.hostname "helix" }}
# make GTK apps scale correctly on hidpi # make GTK apps scale correctly on hidpi
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 thunar export GDK_SCALE=2 GDK_DPI_SCALE=0.50 thunar
export GDK_SCALE=2 GDK_DPI_SCALE="0.50 Simple-scan" export GDK_SCALE=2 GDK_DPI_SCALE="0.50 Simple-scan"
@ -14,3 +15,4 @@ export GDK_SCALE=2 GDK_DPI_SCALE=0.50 pinta
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 Gajim export GDK_SCALE=2 GDK_DPI_SCALE=0.50 Gajim
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 Ristretto export GDK_SCALE=2 GDK_DPI_SCALE=0.50 Ristretto
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 ghex export GDK_SCALE=2 GDK_DPI_SCALE=0.50 ghex
{{- end }}

1
dot_xinputrc Normal file
View file

@ -0,0 +1 @@
xinput set-prop 13 312 .8