From 052e3509c809698749ace5cbeaefc04d3293f6e3 Mon Sep 17 00:00:00 2001 From: adamstuck Date: Mon, 1 Nov 2021 01:25:20 +0100 Subject: Cleaned up home dir, cvim alias, exa, cleaned xinit --- .bash_profile | 16 +++++++- .bashrc | 8 ++-- .config/X11/xinitrc | 35 ++++++++++++++++++ .config/alacritty/alacritty.yml | 2 +- .config/i3/config | 4 +- .config/i3/custom/screenshot | 4 -- .config/i3/extra/screenshot | 4 ++ .config/polybar/launch | 11 ++++++ .config/polybar/launch.sh | 11 ------ .config/readline/inputrc | 1 + .gitignore | 1 - .inputrc | 1 - .vim/vimrc | 81 +++++++++++++++++++++++++++++++++++++++++ .vimrc | 64 -------------------------------- .xinitrc | 47 ------------------------ 15 files changed, 154 insertions(+), 136 deletions(-) create mode 100644 .config/X11/xinitrc delete mode 100755 .config/i3/custom/screenshot create mode 100755 .config/i3/extra/screenshot create mode 100755 .config/polybar/launch delete mode 100755 .config/polybar/launch.sh create mode 100644 .config/readline/inputrc delete mode 100644 .gitignore delete mode 100644 .inputrc create mode 100644 .vim/vimrc delete mode 100644 .vimrc delete mode 100644 .xinitrc diff --git a/.bash_profile b/.bash_profile index b82ed01..40853ae 100644 --- a/.bash_profile +++ b/.bash_profile @@ -4,4 +4,18 @@ [[ -f ~/.bashrc ]] && . ~/.bashrc -[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1 +export XDG_CONFIG_HOME=$HOME/.config +export XDG_CACHE_HOME=$HOME/.cache +export XDG_DATA_HOME=$HOME/.local/share +export XDG_STATE_HOME=$HOME/.local/state +export XDG_DATA_DIRS="/usr/local/share:/usr/share" +export XDG_CONFIG_DIRS="/etc/xdg" + +export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority +export HISTFILE="$XDG_STATE_HOME"/bash/history +export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc +export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass +export GTK_RC_FILES="$XDG_CONFIG_HOME"/gtk-1.0/gtkrc +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc + +[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx "$XDG_CONFIG_HOME/X11/xinitrc" -- vt1 diff --git a/.bashrc b/.bashrc index c897e36..1318559 100644 --- a/.bashrc +++ b/.bashrc @@ -75,7 +75,6 @@ esac # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' @@ -88,9 +87,9 @@ fi #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # some more ls aliases -alias ll='ls -AlF' -alias la='ls -A' -alias l='ls -CF' +alias ls='exa -F' +alias ll='exa -laF' +alias lh='exa -ldF .*' # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert @@ -121,6 +120,7 @@ export VISUAL=vim export PS1='\[\033[35m\]\u@\h\[\033[37m\]:\[\033[0;34m\]\w\[\033[37m\]$ ' # Shell prompt export PAGER=most +alias cvim='GIT_DIR=$HOME/.cfg GIT_WORK_TREE=$HOME vim' alias mv='mv -i' alias rm='rm -i' alias gs='git status' diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc new file mode 100644 index 0000000..852b3f5 --- /dev/null +++ b/.config/X11/xinitrc @@ -0,0 +1,35 @@ +#!/bin/sh + +userresources=$XDG_CONFIG_HOME/X11/.Xresources +usermodmap=$XDG_CONFIG_HOME/X11/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +source $HOME/.config/i3/init diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index e2f57bf..76e389e 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -132,7 +132,7 @@ font: style: Bold Italic # Point size - size: 7 + size: 7.5 # Offset is the extra space around each character. `offset.y` can be thought # of as modifying the line spacing, and `offset.x` as modifying the letter # spacing. diff --git a/.config/i3/config b/.config/i3/config index 898da29..9d538ec 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -14,7 +14,7 @@ bindsym $mod+b exec --no-startup-id firefox bindsym $mod+e exec --no-startup-id pcmanfm bindsym $mod+f fullscreen toggle bindsym $mod+c exec gnome-control-center --class=floating_window -bindsym $mod+Shift+s exec --no-startup-id ~/.config/i3/custom/screenshot +bindsym $mod+Shift+s exec --no-startup-id ~/.config/i3/extra/screenshot # Rofi bindsym $mod+d exec --no-startup-id rofi -show drun -show-icons -drun-display-format {name} @@ -165,6 +165,6 @@ for_window [title="^Steam Keyboard$"] floating enable ##### Exec exec_always --no-startup-id /usr/bin/unclutter -b -exec_always --no-startup-id $HOME/.config/polybar/launch.sh +exec_always --no-startup-id $HOME/.config/polybar/launch exec_always --no-startup-id picom --experimental-backends --config ~/.config/picom/picom.conf -b exec_always --no-startup-id setxkbmap -option grp:win_space_toggle us,dk diff --git a/.config/i3/custom/screenshot b/.config/i3/custom/screenshot deleted file mode 100755 index 9a443b1..0000000 --- a/.config/i3/custom/screenshot +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -sleep 0.2 -scrot -sfe 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/' diff --git a/.config/i3/extra/screenshot b/.config/i3/extra/screenshot new file mode 100755 index 0000000..9a443b1 --- /dev/null +++ b/.config/i3/extra/screenshot @@ -0,0 +1,4 @@ +#!/bin/sh + +sleep 0.2 +scrot -sfe 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/' diff --git a/.config/polybar/launch b/.config/polybar/launch new file mode 100755 index 0000000..68d5cf2 --- /dev/null +++ b/.config/polybar/launch @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +killall -q polybar +# If all your bars have ipc enabled, you can also use +# polybar-msg cmd quit + +# Launch bar1 +echo "---" | tee -a /tmp/polybar1.log +polybar bar1 2>&1 | tee -a /tmp/polybar1.log & disown +echo "Bar launched..." diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh deleted file mode 100755 index 68d5cf2..0000000 --- a/.config/polybar/launch.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -# Terminate already running bar instances -killall -q polybar -# If all your bars have ipc enabled, you can also use -# polybar-msg cmd quit - -# Launch bar1 -echo "---" | tee -a /tmp/polybar1.log -polybar bar1 2>&1 | tee -a /tmp/polybar1.log & disown -echo "Bar launched..." diff --git a/.config/readline/inputrc b/.config/readline/inputrc new file mode 100644 index 0000000..236bfdd --- /dev/null +++ b/.config/readline/inputrc @@ -0,0 +1 @@ +set completion-ignore-case on diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e71a4f0..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.cfg diff --git a/.inputrc b/.inputrc deleted file mode 100644 index 236bfdd..0000000 --- a/.inputrc +++ /dev/null @@ -1 +0,0 @@ -set completion-ignore-case on diff --git a/.vim/vimrc b/.vim/vimrc new file mode 100644 index 0000000..f4215e2 --- /dev/null +++ b/.vim/vimrc @@ -0,0 +1,81 @@ +call plug#begin('~/.vim/plugged') + Plug 'romgrk/doom-one.vim' + Plug 'tpope/vim-fugitive' + Plug 'tpope/vim-surround' + Plug 'tpope/vim-repeat' + Plug 'tpope/vim-commentary' +call plug#end() + +filetype indent plugin on +syntax enable +set mouse=a +set termguicolors +set nocompatible +set hidden +set wildmenu +set wildignorecase +set fileignorecase +set showcmd +set hlsearch +set incsearch +set ignorecase +set smartcase +set backspace=indent,eol,start +set autoindent +set ruler +set confirm +set visualbell +set number relativenumber +set notimeout ttimeout ttimeoutlen=200 +set pastetoggle= +set shiftwidth=4 +set softtabstop=4 +set expandtab +set noswapfile +set nowrap +set background=dark +set cursorline + +map Y y$ +nnoremap :nohl +nnoremap n nzzzv +nnoremap N Nzzzv +inoremap kj +tnoremap kj + +inoremap , ,u +inoremap . .u +inoremap [ [u +inoremap ! !u +inoremap ? ?u + +vnoremap J :m '>+1gv=gv +vnoremap K :m '<-2gv=gv + +let mapleader=" " +nnoremap h :wincmd h +nnoremap j :wincmd j +nnoremap k :wincmd k +nnoremap l :wincmd l + +let &t_8f = "\[38:2:%lu:%lu:%lum" +let &t_8b = "\[48:2:%lu:%lu:%lum" +colorscheme doom-one +highlight CursorLineNr cterm=bold ctermbg=Black ctermfg=Blue + +set runtimepath^=$XDG_CONFIG_HOME/vim +set runtimepath+=$XDG_DATA_HOME/vim +set runtimepath+=$XDG_CONFIG_HOME/vim/after + +set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim +set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after + +let g:netrw_home = $XDG_DATA_HOME."/vim" +call mkdir($XDG_DATA_HOME."/vim/spell", 'p') +set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p') + +set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p') +set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p') +set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p') + +if !has('nvim') | set viminfofile=$XDG_CACHE_HOME/vim/viminfo | endif diff --git a/.vimrc b/.vimrc deleted file mode 100644 index d543deb..0000000 --- a/.vimrc +++ /dev/null @@ -1,64 +0,0 @@ -call plug#begin('~/.vim/plugged') - Plug 'romgrk/doom-one.vim' - Plug 'tpope/vim-fugitive' - Plug 'tpope/vim-surround' - Plug 'tpope/vim-repeat' - Plug 'tpope/vim-commentary' -call plug#end() - -filetype indent plugin on -syntax enable -set mouse=a -set termguicolors -set nocompatible -set hidden -set wildmenu -set wildignorecase -set fileignorecase -set showcmd -set hlsearch -set incsearch -set ignorecase -set smartcase -set backspace=indent,eol,start -set autoindent -set ruler -set confirm -set visualbell -set number relativenumber -set notimeout ttimeout ttimeoutlen=200 -set pastetoggle= -set shiftwidth=4 -set softtabstop=4 -set expandtab -set noswapfile -set nowrap -set background=dark -set cursorline - -map Y y$ -nnoremap :nohl -nnoremap n nzzzv -nnoremap N Nzzzv -inoremap kj -tnoremap kj - -inoremap , ,u -inoremap . .u -inoremap [ [u -inoremap ! !u -inoremap ? ?u - -vnoremap J :m '>+1gv=gv -vnoremap K :m '<-2gv=gv - -let mapleader=" " -nnoremap h :wincmd h -nnoremap j :wincmd j -nnoremap k :wincmd k -nnoremap l :wincmd l - -let &t_8f = "\[38:2:%lu:%lu:%lum" -let &t_8b = "\[48:2:%lu:%lu:%lum" -colorscheme doom-one -highlight CursorLineNr cterm=bold ctermbg=Black ctermfg=Blue diff --git a/.xinitrc b/.xinitrc deleted file mode 100644 index 43f2cff..0000000 --- a/.xinitrc +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -userresources=$HOME/.Xresources -usermodmap=$HOME/.Xmodmap -sysresources=/etc/X11/xinit/.Xresources -sysmodmap=/etc/X11/xinit/.Xmodmap - -# merge in defaults and keymaps - -if [ -f $sysresources ]; then - xrdb -merge $sysresources -fi - -if [ -f $sysmodmap ]; then - xmodmap $sysmodmap -fi - -if [ -f "$userresources" ]; then - xrdb -merge "$userresources" -fi - -if [ -f "$usermodmap" ]; then - xmodmap "$usermodmap" -fi - -# start some nice programs - -if [ -d /etc/X11/xinit/xinitrc.d ] ; then - for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do - [ -x "$f" ] && . "$f" - done - unset f -fi - - -greenclip daemon & -playerctld daemon & -nitrogen --restore & -redshift -l 56:10 & -pcmanfm -d & -nm-applet & -exec i3 & wmpid=$! - -sleep 5 -$HOME/.autostart & - -wait $wmpid -- cgit v1.2.3-70-g09d2