~carloabelli/dotfiles

e1ce818d30eb33588f74baf1e1d4c0efe51ef177 — Carlo Abelli 1 year, 4 months ago
Initial commit
A  => .config/alacritty/alacritty.yml +29 -0
@@ 1,29 @@
colors:
  primary:
    background: '0x0c1118'
    foreground: '0xafaba2'
  normal:
    black:   '0x0c1118'
    red:     '0xf04339'
    green:   '0x7f8b00'
    yellow:  '0xbb8801'
    blue:    '0x008dd1'
    magenta: '0x6a7fd2'
    cyan:    '0x00948b'
    white:   '0xafaba2'
  bright:
    black:   '0x7b776e'
    red:     '0xdf5923'
    green:   '0x181c22'
    yellow:  '0x22262d'
    blue:    '0x949088'
    magenta: '0xcac6bd'
    cyan:    '0xe3488e'
    white:   '0x2c3138'
draw_bold_text_with_bright_colors: false
font:
  size: 12.0
window:
  padding:
    x: 10
    y: 10

A  => .config/firejail/firefox-common.local +2 -0
@@ 1,2 @@
ignore nodbus
whitelist ${DOCUMENTS}

A  => .config/firejail/gimp.local +1 -0
@@ 1,1 @@
seccomp !mbind

A  => .config/git/config +17 -0
@@ 1,17 @@
[user]
	name = Carlo Abelli
	email = carlo@abelli.me
[push]
	default = simple
[pull]
	rebase = true
[rerere]
	enabled = true
[diff]
	tool = nvim
[difftool "nvim"]
	cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
[merge]
	tool = nvim
[mergetool "nvim"]
	cmd = "nvim -d \"$LOCAL\" \"$BASE\" \"$REMOTE\""

A  => .config/gtk-3.0/settings.ini +2 -0
@@ 1,2 @@
[Settings]
gtk-application-prefer-dark-theme=true

A  => .config/i3status/config +43 -0
@@ 1,43 @@
general {
  interval       = 1
  colors         = true
  color_good     = '#7f8b00'
  color_degraded = '#bb8801'
  color_bad      = '#f04339'
}

order += "wireless _first_"
order += "ethernet _first_"
order += "volume master"
order += "battery all"
order += "tztime local"

wireless _first_ {
  format_up   = " %essid"
  format_down = ""
}

ethernet _first_ {
  format_up   = ""
  format_down = ""
}

volume master {
  device       = "default"
  format       = " %volume"
  format_muted = ""
}

battery all {
  format = "%status %percentage"
  status_chr = ""
  status_bat = ""
  status_unk = ""
  status_full = ""
  low_threshold = 10
  threshold_type = "percentage"
}

tztime local {
  format = " %Y-%m-%d %H:%M:%S"
}

A  => .config/mako/config +4 -0
@@ 1,4 @@
font=sans-serif 12
background-color=#0c1118
border-color=#7b776e
text-color=#afaba2

A  => .config/nvim/after/ftplugin/markdown.vim +4 -0
@@ 1,4 @@
setlocal spell

let g:vim_markdown_math=1
let g:vim_markdown_strikethrough=1

A  => .config/nvim/after/ftplugin/tex.vim +1 -0
@@ 1,1 @@
setlocal spell

A  => .config/nvim/after/ftplugin/text.vim +1 -0
@@ 1,1 @@
setlocal spell

A  => .config/nvim/after/plugin/fzf.vim +3 -0
@@ 1,3 @@
if exists(':FZF')
  nnoremap <c-p> :FZF<cr>
endif

A  => .config/nvim/init.vim +98 -0
@@ 1,98 @@
"
" General
"

set belloff=all
set lazyredraw
set mouse=a

colorscheme base16-default-dark

set cursorline
set list
set number

set hlsearch
set ignorecase
set smartcase

set tabstop=4
set shiftwidth=4
set expandtab

set wrap

set scrolloff=5

set splitbelow
set splitright

set modelines=0
set nomodeline

nnoremap Y y$
nnoremap Q <nop>

inoremap <expr> <tab>   pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <expr> <s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
inoremap <expr> <cr>    pumvisible() ? "\<c-y>" : "\<cr>"

augroup misc
  autocmd!
  autocmd CompleteDone * pclose
  autocmd FileType help wincmd L
augroup end

if executable('rg')
  set grepprg=rg\ --vimgrep
endif

"
" Plugins
"

packadd minpac

call minpac#init()

call minpac#add('k-takata/minpac', {'type': 'opt'})

call minpac#add('carloabelli/base16-vim')
call minpac#add('godlygeek/tabular')
call minpac#add('mattn/vim-lsp-settings')
call minpac#add('prabirshrestha/async.vim')
call minpac#add('prabirshrestha/asyncomplete-lsp.vim')
call minpac#add('prabirshrestha/asyncomplete.vim')
call minpac#add('prabirshrestha/vim-lsp')
call minpac#add('romainl/vim-cool')
call minpac#add('sheerun/vim-polyglot')
call minpac#add('tpope/vim-abolish')
call minpac#add('tpope/vim-apathy')
call minpac#add('tpope/vim-characterize')
call minpac#add('tpope/vim-commentary')
call minpac#add('tpope/vim-fugitive')
call minpac#add('tpope/vim-ragtag')
call minpac#add('tpope/vim-repeat')
call minpac#add('tpope/vim-sensible')
call minpac#add('tpope/vim-sleuth')
call minpac#add('tpope/vim-speeddating')
call minpac#add('tpope/vim-surround')
call minpac#add('tpope/vim-unimpaired')
call minpac#add('tpope/vim-vinegar')

"
" Plugin Settings
"

function! s:base16_customize()
  " https://github.com/chriskempson/base16-vim/issues/182
  let l:none = { 'gui': 'NONE', 'cterm': 'NONE' }
  call Base16hi('SpellBad',   '', l:none, 'undercurl', g:base08)
  call Base16hi('SpellCap',   '', l:none, 'undercurl', g:base0D)
  call Base16hi('SpellLocal', '', l:none, 'undercurl', g:base0C)
  call Base16hi('SpellRare',  '', l:none, 'undercurl', g:base0E)
endfunction
augroup on_change_colorschema
  autocmd!
  autocmd ColorScheme * call s:base16_customize()
augroup END

A  => .config/qt5ct/qt5ct.conf +3 -0
@@ 1,3 @@
[Appearance]
icon_theme=Adwaita
style=Adwaita-Dark

A  => .config/sway/config +204 -0
@@ 1,204 @@
#
# General
#

set $mod Mod4

set $left h
set $down j
set $up k
set $right l

set $term alacritty

set $menu j4-dmenu-desktop --dmenu='bemenu -i -p "" --fn "sans-serif 12" --fb "#0c1118" --ff "#afaba2" --nb "#0c1118" --nf "#7b776e" --hb "#22262d" --hf "#afaba2"' --term='alacritty'

focus_follows_mouse no

floating_modifier $mod normal

#
# Input
#

input "1739:30383:DELL08AF:00_06CB:76AF_Touchpad" {
  dwt enabled
  tap enabled
}

input "1:1:AT_Translated_Set_2_keyboard" {
  xkb_options caps:escape
}

#
# Output
#

output * background ~/pictures/backgrounds/3477533f-d1cd-4aae-8691-dd893e5df047.jpg fill

output "Unknown 0x282B 0x00000000" {
  scale 2
}

#
# Key Bindings
#

bindsym $mod+Return exec $term
bindsym $mod+d exec $menu
bindsym Ctrl+Mod1+Delete exec swaylock
bindsym $mod+Shift+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exit

bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right

bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right

bindsym $mod+Mod1+$left focus output left
bindsym $mod+Mod1+$down focus output down
bindsym $mod+Mod1+$up focus output up
bindsym $mod+Mod1+$right focus output right

bindsym $mod+Mod1+Shift+$left move workspace to output left
bindsym $mod+Mod1+Shift+$down move workspace to output down
bindsym $mod+Mod1+Shift+$up move workspace to output up
bindsym $mod+Mod1+Shift+$right move workspace to output right

bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10

bindsym $mod+minus scratchpad show
bindsym $mod+Shift+minus move scratchpad

bindsym $mod+b splitv
bindsym $mod+v splith
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle

mode "resize" {
  bindsym $left resize shrink width 50 px
  bindsym $down resize grow height 50 px
  bindsym $up resize shrink height 50 px
  bindsym $right resize grow width 50 px

  bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"

bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set +5%
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
bindsym Print exec grim "$(xdg-user-dir PICTURES)/screenshot_$(date -Ins).png"
bindsym Shift+Print exec grim -g "$(slurp)" "$(xdg-user-dir PICTURES)/screenshot_$(date -Ins).png"

#
# Appearance
#

default_border pixel 1
smart_borders on

font sans-serif 12

set $base00 #0c1118
set $base01 #181c22
set $base02 #22262d
set $base03 #7b776e
set $base04 #949088
set $base05 #afaba2
set $base06 #cac6bd
set $base07 #2c3138
set $base08 #f04339
set $base09 #df5923
set $base0A #bb8801
set $base0B #7f8b00
set $base0C #00948b
set $base0D #008dd1
set $base0E #6a7fd2
set $base0F #e3488e

client.focused          $base02 $base02 $base05 $base03 $base02
client.focused_inactive $base01 $base01 $base03 $base01 $base01
client.unfocused        $base01 $base01 $base03 $base01 $base01
client.urgent           $base01 $base01 $base08 $base01 $base01

seat seat0 xcursor_theme Bibata_Classic

# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
set $gnome-schema org.gnome.desktop.interface
exec_always {
  gsettings set $gnome-schema gtk-theme 'Adwaita'
  gsettings set $gnome-schema icon-theme 'Adwaita'
  gsettings set $gnome-schema cursor-theme 'Bibata_Classic'
}

#
# Bar
#

bar {
  separator_symbol '	'
  colors {
    background $base00
    separator  $base01
    statusline $base05

    focused_workspace  $base00 $base02 $base05
    active_workspace   $base00 $base01 $base03
    inactive_workspace $base00 $base01 $base03
    urgent_workspace   $base00 $base01 $base08
    binding_mode       $base00 $base01 $base03
  }
  status_command i3status
}

#
# Misc
#

exec {
  mako
  swayidle -w\
    timeout 300 'systemctl suspend'\
    before-sleep 'swaylock -f'
  udiskie
  /usr/lib/xdg-desktop-portal -r
  xdg-desktop-portal-wlr
}

for_window [app_id="firefox"] inhibit_idle fullscreen
for_window [app_id="firefox" title="^Picture-in-Picture$"] floating enable, move position 1280 0, sticky enable, border none

A  => .config/swaylock/config +25 -0
@@ 1,25 @@
bs-hl-color=f04339
ignore-empty-password
image=~/pictures/backgrounds/8464f80f-fe38-4e31-a030-bfcf462dc8d5.jpg
inside-caps-lock-color=00000000
inside-clear-color=00000000
inside-color=00000000
inside-ver-color=00000000
inside-wrong-color=00000000
key-hl-color=afaba2
line-caps-lock-color=0c1118
line-clear-color=0c1118
line-color=0c1118
line-ver-color=0c1118
line-wrong-color=0c1118
ring-caps-lock-color=0c1118
ring-clear-color=0c1118
ring-color=0c1118
ring-ver-color=7b776e
ring-wrong-color=f04339
separator-color=0c1118
text-caps-lock-color=00000000
text-clear-color=00000000
text-color=00000000
text-ver-color=00000000
text-wrong-color=00000000

A  => .config/user-dirs.dirs +15 -0
@@ 1,15 @@
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME"
XDG_DOWNLOAD_DIR="$HOME/downloads"
XDG_TEMPLATES_DIR="$HOME"
XDG_PUBLICSHARE_DIR="$HOME"
XDG_DOCUMENTS_DIR="$HOME/documents"
XDG_MUSIC_DIR="$HOME"
XDG_PICTURES_DIR="$HOME/pictures"
XDG_VIDEOS_DIR="$HOME/pictures"

A  => .config/yay/config.json +41 -0
@@ 1,41 @@
{
	"aururl": "https://aur.archlinux.org",
	"buildDir": "$HOME/.cache/yay",
	"editor": "",
	"editorflags": "",
	"makepkgbin": "makepkg",
	"makepkgconf": "",
	"pacmanbin": "pacman",
	"pacmanconf": "/etc/pacman.conf",
	"tarbin": "bsdtar",
	"redownload": "no",
	"rebuild": "no",
	"batchinstall": false,
	"answerclean": "",
	"answerdiff": "",
	"answeredit": "",
	"answerupgrade": "",
	"gitbin": "git",
	"gpgbin": "gpg",
	"gpgflags": "",
	"mflags": "",
	"sortby": "votes",
	"gitflags": "",
	"removemake": "yes",
	"requestsplitn": 150,
	"sortmode": 0,
	"completionrefreshtime": 7,
	"sudoloop": false,
	"timeupdate": false,
	"devel": false,
	"cleanAfter": false,
	"gitclone": true,
	"provides": true,
	"pgpfetch": true,
	"upgrademenu": false,
	"cleanmenu": false,
	"diffmenu": false,
	"editmenu": false,
	"combinedupgrade": false,
	"useask": false
}
\ No newline at end of file

A  => .config/zathura/zathurarc +33 -0
@@ 1,33 @@
# general
set font "sans-serif 12"
set show-recent 0
set statusbar-basename true
set window-title-basename true

# colors
set completion-bg \#0c1118
set completion-fg \#7b776e
set completion-group-bg \#181c22
set completion-group-fg \#949088
set completion-highlight-bg \#22262d
set completion-highlight-fg \#afaba2
set default-bg \#0c1118
set default-fg \#afaba2
set index-active-bg \#22262d
set index-active-fg \#afaba2
set index-bg \#0c1118
set index-fg \#7b776e
set inputbar-bg \#0c1118
set inputbar-fg \#afaba2
set notification-bg \#0c1118
set notification-error-bg \#0c1118
set notification-error-fg \#f04339
set notification-fg \#afaba2
set notification-warning-bg \#0c1118
set notification-warning-fg \#bb8801
set recolor-darkcolor \#afaba2
set recolor-lightcolor \#0c1118
set render-loading-bg \#0c1118
set render-loading-fg \#7b776e
set statusbar-bg \#181c22
set statusbar-fg \#949088

A  => .zprofile +18 -0
@@ 1,18 @@
# environment
export EDITOR=nvim
export FZF_DEFAULT_COMMAND="rg --files"
export FZF_DEFAULT_OPTS="--color=fg:-1,bg:-1,hl:1,fg+:-1,bg+:-1,hl+:1,info:0,prompt:0,pointer:4,marker:0,spinner:3 --layout=reverse"
export LESSHISTFILE=/dev/null
export PATH="$HOME/bin:$PATH"
export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"

# sway
if [ "$(tty)" = "/dev/tty1" ]; then
  export CLUTTER_BACKEND=wayland
  export MOZ_ENABLE_WAYLAND=1
  export QT_QPA_PLATFORM=wayland-egl
  export QT_QPA_PLATFORMTHEME=qt5ct
  export SDL_VIDEODRIVER=wayland
  export XDG_CURRENT_DESKTOP=sway
  exec sway
fi

A  => .zshrc +33 -0
@@ 1,33 @@
# aliases
alias cp="cp -i"
alias diff="diff --color=auto"
alias dotfiles="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
alias ln="ln -i"
alias ls="ls -F --color=auto"
alias mv="mv -i"
alias pkgs="comm -23 <(pacman -Qqe | sort) <(pacman -Qqg base-devel | sort)"
alias rm="rm -I"

# completion
autoload -Uz compinit
compinit

# history
HISTFILE=~/.zhistory
HISTSIZE=1000
SAVEHIST=1000
setopt hist_ignore_all_dups
setopt inc_append_history

# key bindings
bindkey -v

# prompt
autoload -Uz vcs_info
zstyle ":vcs_info:*" formats " %s|%b"
zstyle ":vcs_info:*" actionformats " %s-%a|%b"
precmd() {
  vcs_info
}
setopt PROMPT_SUBST
PROMPT='%B%F{blue}%c%F{yellow}${vcs_info_msg_0_}%f%b '