feat: added config files

for bash, foot, git, i3status, neovim, readline and sway configuration files
also added font preferences, list of preferred applications and user
directory configurations
This commit is contained in:
Vitor Gonçalves 2023-12-04 03:23:58 -03:00
parent 64b1a8fe0f
commit 4398b24294
Signed by: vitorg
GPG Key ID: B90BF113DF56EB41
14 changed files with 668 additions and 0 deletions

20
.config/bash/aliases Normal file
View File

@ -0,0 +1,20 @@
# vim: ft=sh
alias ls="eza -laH --group-directories-first"
alias la="eza -aH --group-directories-first"
alias l="eza -H --group-directories-first"
alias c="chezmoi"
alias ce="chezmoi edit"
alias ca="chezmoi apply"
alias ccd="cd ~/.local/share/chezmoi"
# git aliases
alias g="git"
alias gs="git status"
alias gc="git commit"
alias gd="git diff"
alias cfg="git --git-dir=$HOME/.local/share/dotfiles-repo/ --work-tree=$HOME"
alias monerod="monerod --data-dir "$XDG_DATA_HOME"/bitmonero"

13
.config/bash/functions Normal file
View File

@ -0,0 +1,13 @@
# vim: ft=sh
wbp() {
blogdir="$HOME/docs/src/web/blog"
read -rp "What is your title? " title
path="$blogdir/content/$(date '+%Y-%m-%d')-${title,,}.md"
path=${path// /-}
"$EDITOR" "$path"
printf "Your blogpost is saved at %s\n" "$path"
}

4
.config/bash/profile Normal file
View File

@ -0,0 +1,4 @@
# .bash_profile
# Get the aliases and functions
[ -f $HOME/.bashrc ] && . $HOME/.bashrc

51
.config/bash/prompt Normal file
View File

@ -0,0 +1,51 @@
# vim: ft=sh
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "- [${BRANCH}${STAT}] "
else
echo ""
fi
}
# get current status of git repo
function parse_git_dirty {
status=`git status 2>&1 | tee`
dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"`
untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"`
ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"`
newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"`
renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"`
deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"`
bits=''
if [ "${renamed}" == "0" ]; then
bits=">${bits}"
fi
if [ "${ahead}" == "0" ]; then
bits="*${bits}"
fi
if [ "${newfile}" == "0" ]; then
bits="+${bits}"
fi
if [ "${untracked}" == "0" ]; then
bits="?${bits}"
fi
if [ "${deleted}" == "0" ]; then
bits="x${bits}"
fi
if [ "${dirty}" == "0" ]; then
bits="!${bits}"
fi
if [ ! "${bits}" == "" ]; then
echo " ${bits}"
else
echo ""
fi
}
export PS1="\[\e[34m\]\u\[\e[m\]\[\e[34m\]@\[\e[m\]\[\e[34m\]\h\[\e[m\] \[\e[31m\]\w\[\e[m\] \[\e[35m\]\`parse_git_branch\`\[\e[m\]\[\e[32m\]\\$\[\e[m\] "

15
.config/bash/rc Normal file
View File

@ -0,0 +1,15 @@
# vim: ft=sh
shopt -s autocd
shopt -s histappend
export XDG_CONFIG_HOME="$HOME/.config" XDG_CACHE_HOME="$HOME/.cache" XDG_DATA_HOME="$HOME/.local/share" XDG_STATE_HOME="$HOME/.local/state"
export EDITOR="nvim" VISUAL="nvim"
export GNUPGHOME="$XDG_DATA_HOME/gnupg" PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" HISTFILE="$XDG_STATE_HOME/bash/history" INPUTRC="$XDG_CONFIG_HOME/readline/inputrc"
export GPG_TTY=$(tty)
source "$HOME/.config/bash/aliases"
source "$HOME/.config/bash/functions"
source "$HOME/.config/bash/prompt"

View File

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Vollkorn</family>
<family>Twitter Color Emoji</family>
</prefer>
</alias>
<alias>
<family>sans</family>
<prefer>
<family>Source Sans Pro</family>
<family>Twitter Color Emoji</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Source Sans Pro</family>
<family>Twitter Color Emoji</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>envypn</family>
<family>Twitter Color Emoji</family>
</prefer>
</alias>
</fontconfig>

221
.config/foot/foot.ini Normal file
View File

@ -0,0 +1,221 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
# title=foot
# locked-title=no
font=monospace:size=11
# font-size-adjustment=0.5
line-height=12
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# underline-thickness=<font underline thickness>
# box-drawings-uses-font-glyphs=no
# dpi-aware=no
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
# pad=0x0 # optionally append 'center'
# resize-delay-ms=100
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
# bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is libutempter (Linux)
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ulog (FreeBSD)
[environment]
# name=value
[bell]
# urgent=no
# notify=no
visual=yes
# command=
# command-focused=no
[scrollback]
# lines=1000
# multiplier=3.0
# indicator-position=relative
# indicator-format=""
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
[cursor]
# style=block
# color=<inverse foreground/background>
# blink=no
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
# hide-when-typing=no
# alternate-scroll-mode=yes
[touch]
# long-press-delay=400
[colors]
alpha=0.9
background=2d2a2e
foreground=e3e1e4
flash=848089
flash-alpha=0.3
## Normal/regular colors (color palette 0-7)
regular0=1a181a # black
regular1=f85e84 # red
regular2=9ecd6f # green
regular3=e5c463 # yellow
regular4=7accd7 # blue
regular5=ab9df2 # magenta
regular6=78dce8 # cyan
regular7=e3e1e4 # white
## Bright colors (color palette 8-15)
bright0=848089 # bright black
bright1=ff6188 # bright red
bright2=a9dc76 # bright green
bright3=e5c463 # bright yellow
bright4=78dce8 # bright blue
bright5=ab9df2 # bright magenta
bright6=78dce8 # bright cyan
bright7=edebee # bright white
## dimmed colors (see foot.ini(5) man page)
# dim0=<not set>
# ...
# dim7=<not-set>
## The remaining 256-color palette
# 16 = <256-color palette #16>
# ...
# 255 = <256-color palette #255>
## Misc colors
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3>
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# hide-when-maximized=no
# double-click-to-maximize=yes
# border-width=0
# border-color=<csd.color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
# clipboard-copy=Control+Shift+c XF86Copy
# clipboard-paste=Control+Shift+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# show-urls-launch=Control+Shift+o
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
# unicode-input=Control+Shift+u
# noop=none
[search-bindings]
# cancel=Control+g Control+c Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-char=Shift+Right
# extend-to-word-boundary=Control+w Control+Shift+Right
# extend-to-next-whitespace=Control+Shift+w
# extend-line-down=Shift+Down
# extend-backward-char=Shift+Left
# extend-backward-to-word-boundary=Control+Shift+Left
# extend-backward-to-next-whitespace=none
# extend-line-up=Shift+Up
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
# primary-paste=Shift+Insert
# unicode-input=none
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[text-bindings]
# \x03=Mod4+c # Map Super+c -> Ctrl+c
[mouse-bindings]
# scrollback-up-mouse=BTN_BACK
# scrollback-down-mouse=BTN_FORWARD
# selection-override-modifiers=Shift
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-quote = BTN_LEFT-3
# select-row=BTN_LEFT-4
# vim: ft=dosini

15
.config/git/config Normal file
View File

@ -0,0 +1,15 @@
[user]
email = vitorg@tilde.team
name = Vitor Gonçalves
signingKey = 65DA8300A1A5E18AE6EB0DEBB90BF113DF56EB41
[init]
defaultBranch = master
[core]
sshCommand = ssh -i ~/.ssh/id_psspsps
[commit]
gpgsign = true
[push]
autoSetupRemote = true
[pull]
rebase = false

53
.config/i3status/config Normal file
View File

@ -0,0 +1,53 @@
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
interval = 5
}
#order += "ipv6"
order += "wireless _first_"
#order += "ethernet _first_"
#order += "battery all"
order += "disk /"
#order += "load"
order += "memory"
order += "tztime local"
wireless _first_ {
format_up = "%quality @ %ip"
format_down = "W: down"
}
ethernet _first_ {
format_up = "E: %ip (%speed)"
format_down = "E: down"
}
battery all {
format = "%status %percentage %remaining"
}
disk "/" {
format = "%avail"
}
load {
format = "%1min"
}
memory {
format = "%used used of %total"
threshold_degraded = "1G"
format_degraded = "MEMORY < %available"
}
tztime local {
format = "%Y-%m-%d %H:%M:%S"
}

4
.config/mimeapps.list Normal file
View File

@ -0,0 +1,4 @@
[Default Applications]
image/jpg=swayimg.desktop
image/png=swayimg.desktop
image/gif=swayimg.desktop

65
.config/nvim/init.vim Normal file
View File

@ -0,0 +1,65 @@
set nocompatible
" plugins
execute 'set runtimepath+=' . '/home/vtrgnc/.local/share/dein/repos/github.com/Shougo/dein.vim'
call dein#begin('/home/vtrgnc/.local/share/dein')
call dein#add('Shougo/dein.vim')
call dein#add('sainnhe/sonokai')
call dein#add('sheerun/vim-polyglot')
call dein#add('mattn/emmet-vim')
call dein#end()
" inteligent indentation
filetype indent plugin on
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab smartindent
set showmatch ignorecase smartcase
set noswapfile
set clipboard=unnamedplus
set undofile " persist undo
syntax on
set termguicolors
set number relativenumber numberwidth=2 cursorline
set conceallevel=3
set background=dark
let g:sonokai_style = 'shusia'
let g:sonokai_better_performance = 1
let g:sonokai_transparent_background = 1
colo sonokai
"" bindings
" leader mapping
nnoremap <SPACE> <Nop>
let mapleader=" "
let localleader=" "
" easy splits
nnoremap <leader>h <C-w>h
nnoremap <leader>j <C-w>j
nnoremap <leader>k <C-w>k
nnoremap <leader>l <C-w>l
nnoremap <silent> <Esc><Esc> :nohlsearch<CR>
set splitright splitbelow
" easy write
nmap <leader>w :w!<CR>
nmap <leader>W :w!<CR>
nmap <leader>q :wq!<CR>
" emmet
let g:user_emmet_mode='n' " only on normal mode, thx
let g:user_emmet_install_global = 0
autocmd FileType html,css EmmetInstall
let g:user_emmet_leader_key=','
" checks if plugins are installed; if not, installs them
if dein#check_install()
call dein#install()
endif

6
.config/readline/inputrc Normal file
View File

@ -0,0 +1,6 @@
$include /etc/inputrc
set bell-style visible
set completion-ignore-case on
set show-mode-in-prompt on
set editing-mode vi
set expand-tilde on

154
.config/sway/config Normal file
View File

@ -0,0 +1,154 @@
#
# ~/.config/sway/config
#
# Variables
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term foot
set $web firefox
set $menu bemenu-run
# Wallpaper
output VGA-1 resolution 1360x768 position 0,0
output VGA-1 bg /home/vtrgnc/media/img/wallpaper.png fit
# Keyboard Layout
input "type:keyboard" {
xkb_layout "br"
xkb_options "caps:escape"
}
# exec
bindsym $mod+Return exec $term
bindsym $mod+b exec $web
bindsym $mod+r exec $menu
bindsym $mod+p exec grimshot copy screen
bindsym $mod+Shift+p exec grimshot copy area
bindsym $mod+Ctrl+p exec bash -c 'grimshot save screen - > "$HOME/media/img/ss/$(date +%Y-%m-%d-%H-%M-%S-%N).png"'
bindsym $mod+Shift+Ctrl+p exec bash -c 'grimshot save area - > "$HOME/media/img/ss/$(date +%Y-%m-%d-%H-%M-%S-%N).png"'
# kill window
bindsym $mod+w kill
floating_modifier $mod normal
# reload config
bindsym $mod+Shift+c reload
# kill sway
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
bindsym $mod+$left focus left
bindsym $mod+$down focus next
bindsym $mod+$up focus prev
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
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1:term
bindsym $mod+Shift+2 move container to workspace 2:web
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+v splitv
bindsym $mod+space layout toggle split tabbed
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Ctrl+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+Shift+space layout toggle split
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
# statusbar
bar {
font pango:envypn 10
status_command i3status
}
# window borders
gaps inner 2
default_border pixel
default_floating_border none
client.focused #f85e84cc #f85e84cc #f85e84cc #f85e84cc
client.focused_inactive #848089cc #848089cc #848089cc #848089cc
client.unfocused #848089cc #848089cc #848089cc #848089cc
font pango:envypn 10
exec wl-paste -t text --watch clipman store --no-persist
include /etc/sway/config.d/*

15
.config/user-dirs.dirs Normal file
View File

@ -0,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_DOWNLOAD_DIR="$HOME/dl"
XDG_DESKTOP_DIR="$HOME/docs"
XDG_TEMPLATES_DIR="$HOME/docs/scratch"
XDG_PUBLICSHARE_DIR="$HOME/docs/sync"
XDG_DOCUMENTS_DIR="$HOME/docs"
XDG_MUSIC_DIR="$HOME/media/audio/music"
XDG_PICTURES_DIR="$HOME/media/img"
XDG_VIDEOS_DIR="$HOME/media/video"