summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfilip <“filip.rabiega@gmail.com”>2025-07-10 11:03:20 +0200
committerfilip <“filip.rabiega@gmail.com”>2025-07-10 11:03:20 +0200
commita91716202265bbc178ac00140e0fc8978b79c94c (patch)
tree25735dd207522d3638c50501f7d316dacd72c5ec
parent94d9b788ddd93ffe45153762bb0b224a98ed4027 (diff)
downloaddotfiles-a91716202265bbc178ac00140e0fc8978b79c94c.tar.gz
dotfiles-a91716202265bbc178ac00140e0fc8978b79c94c.tar.bz2
dotfiles-a91716202265bbc178ac00140e0fc8978b79c94c.zip
new dotfiles
-rw-r--r--.config/shell/.bashrc71
-rw-r--r--.config/shell/aliasrc76
-rw-r--r--.config/vim/.vimrc (renamed from .vimrc)8
-rw-r--r--.profile26
-rw-r--r--.zshrc95
5 files changed, 272 insertions, 4 deletions
diff --git a/.config/shell/.bashrc b/.config/shell/.bashrc
new file mode 100644
index 0000000..6474a3b
--- /dev/null
+++ b/.config/shell/.bashrc
@@ -0,0 +1,71 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+
+# If not running interactively, don't do anything
+case $- in
+ *i*) ;;
+ *) return;;
+esac
+
+# don't put duplicate lines or lines starting with space in the history.
+HISTCONTROL=ignoreboth
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=1000
+HISTFILESIZE=2000
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# set a fancy prompt
+case "$TERM" in
+ *-256color) color_prompt=yes;;
+esac
+
+# colored GCC warnings and errors
+export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
+
+# Alias definitions
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+# Set vi mode as the default mode
+set -o vi
+
+# Opam configuration
+test -r /home/filipek/.opam/opam-init/init.sh && . /home/filipek/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
+
+# Set options for some frequently used programs
+export LS_OPTIONS='-lha --color=auto'
+export TAR_EXTRACT='-xvzf'
+export TAR_ARCHIVE='-cvzf'
+export MKDIR_OPTIONS='-p'
+export RSYNC_OPTIONS='-rtvzP'
+export MANPAGER="vim -M +MANPAGER - "
+
+export SCRIPTS=$HOME/.scripts
+export PATH=$SCRIPTS:$HOME/.cargo/bin:$HOME/.local/bin:$PATH
+export EDITOR="vim"
+export BROWSER="librewolf"
+
+# GPG Config
+GPG_TTY=$(tty)
+export GPG_TTY
+
+# Prompt colors
+export PS1="\[$(tput setaf 2)\]\u\[$(tput setaf 35)\]@\[$(tput setaf 10)\]\h \[$(tput setaf 33)\]\w \[$(tput sgr0)\]$ "
+force_color_prompt=yes
+
+# Run these scripts at login
+remaps
+
+# After every command, switch to insert mode automatically
+bind -m vi-command 'RETURN':vi-insert-mode
+
+# Make it so that Ctrl+L works in vi mode
+bind -m vi-command '"\C-l": clear-screen'
+bind -m vi-insert '"\C-l": clear-screen'
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
new file mode 100644
index 0000000..435be0b
--- /dev/null
+++ b/.config/shell/aliasrc
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Use $XINITRC variable if file exists.
+[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
+
+[ -f "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC"
+
+# sudo not required for some system commands
+for command in mount umount sv apt apt-get aptitude dpkg su shutdown poweroff reboot ; do
+ alias $command="sudo $command"
+done; unset command
+
+# Stuff here is kinda messy (too bad)
+alias c="clear"
+
+# Verbosity and settings that you pretty much just always are going to want.
+alias \
+ cp="cp -iv" \
+ echo="echo -n" \
+ journalctl="journalctl -xe" \
+ mkd="mkdir -pv" \
+ mv="mv -iv" \
+ rm="logrm -vI" \
+ rmd="rmdir -vp" \
+ rsync="rsync -vrPlu" \
+
+# Colorize commands when possible.
+alias \
+ ccat="highlight --out-format=ansi" \
+ diff="diff --color=auto" \
+ dir="dir --color=auto" \
+ egrep="egrep --color=auto" \
+ fgrep="fgrep --color=auto" \
+ grep="grep --color=auto" \
+ ip="ip -color=auto" \
+ ls="ls_new" \
+ vdir="vdir --color=auto" \
+
+# Make stuff easy to customize and source automatically
+alias \
+ vrc='vim "$HOME/.config/vim/.vimrc"' \
+ zal='vim "$ZSHDIR/aliasrc" && source "$ZSHDIR/aliasrc"' \
+ zen='vim "$ZSHDIR/envvarrc" && source "$ZSHDIR/envvarrc"' \
+ zrc='vim "$HOME/.zshrc" && source "$HOME/.zshrc"' \
+
+# Aliases for connecting to server
+alias \
+ ctg="ssh git@rabiega.xyz" \
+ cts="ssh root@rabiega.xyz" \
+
+# Making stuff shorter
+alias \
+ ..="cd .." \
+ b="buku --suggest" \
+ bd="buku-dmenu" \
+ copy="xsel -ib" \
+ cs="chadsearch" \
+ lw="librewolf & exit -f" \
+ ms="mansplain &" \
+ nbadd='cat >> "$XDG_CONFIG_HOME"/newsboat/urls << EOF' \
+ obs="exec /usr/bin/obsidian" \
+ py="python3" \
+ sd="sudo shutdown -h now" \
+ tor="cd ~/Downloads/tor-browser/ && ./start-tor-browser.desktop && cd -" \
+ update="sudo apt update && apt upgrade" \
+ update_dwm="cd ~/repos/dwm && cp ~/repos/dwm/config.def.h ~/repos/dwm/config.h && sudo make clean install && cd -" \
+ wifi_connect="nmcli device wifi connect" \
+ wifi_list="nmcli device wifi list" \
+ wttr="curl wttr.in/Wroclaw" \
+
+# Git aliases
+alias \
+ dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" \
+ obsidian="/usr/bin/git --git-dir=$HOME/obsidian --work-tree=$HOME" \
+
+# Limbo
diff --git a/.vimrc b/.config/vim/.vimrc
index d4409e1..e8e9417 100644
--- a/.vimrc
+++ b/.config/vim/.vimrc
@@ -1,4 +1,6 @@
runtime ftplugin/man.vim
+set runtimepath^=$HOME/.config/vim/.vim
+set viminfo=
set number
set relativenumber
set title
@@ -31,10 +33,6 @@ syntax on
filetype plugin on
filetype plugin indent on
-" Automatically updates server after server files have been modified
-autocmd BufWritePost ~/website/*.html !bash ~/.local/bin/update_website
-autocmd BufWritePost ~/website/*.css !bash ~/.local/bin/update_website
-
" Automatically use black on a Python file
autocmd BufWritePost *.py !black --line-length=79 %
@@ -89,6 +87,8 @@ set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
+let g:pymode = 0
+
" Haskell
let g:haskell_enable_quantification = 1 " to enable highlighting of `forall`
let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec`
diff --git a/.profile b/.profile
new file mode 100644
index 0000000..60d4ba4
--- /dev/null
+++ b/.profile
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Filip's .profile
+
+# do wywalenia
+[ "$( pgrep -c slstatus )" -eq 0 ] && slstatus &
+. "$HOME/.cargo/env"
+
+### Environmental variables
+
+# Default programs
+export BROWSER="librewolf"
+export EDITOR="vim"
+export SHELL="zsh"
+export TERMINAL="st"
+
+export ZSHDIR="$HOME/.config/shell"
+export SCRIPTS="$HOME"/.scripts
+export ALIASRC="$ZSHDIR/aliasrc"
+export VIMINFO="$HOME/.config/vim/.viminfo"
+export VIMINIT="source $HOME/.config/vim/.vimrc"
+export LS_OPTIONS="-lha --color=auto"
+export MANPAGER="vim -M +MANPAGER -"
+export PATH="$SCRIPTS:$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
+export RSYNC_OPTIONS="-rtvzP"
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/.config"
diff --git a/.zshrc b/.zshrc
new file mode 100644
index 0000000..b2cd36a
--- /dev/null
+++ b/.zshrc
@@ -0,0 +1,95 @@
+# Luke's config for the Zoomer Shell
+
+# Enable colors and change prompt:
+autoload -U colors && colors # Load colors
+export PS1="%{$(tput setaf 34)%}%n%{$(tput setaf 40)%}@%{$(tput setaf 46)%}%m %{$(tput setaf 154)%}%1~ %{$(tput sgr0)%}$ "
+setopt autocd # Automatically cd into typed directory.
+stty stop undef # Disable ctrl-s to freeze terminal.
+setopt interactive_comments
+
+# History in cache directory:
+HISTSIZE=10000000
+SAVEHIST=10000000
+HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
+setopt inc_append_history
+
+# Load aliases and shortcuts if existent.
+[ -f "$HOME/.config/shell/envvarrc" ] && source "$HOME/.config/shell/envvarrc"
+[ -f "$HOME/.config/shell/aliasrc" ] && source "$HOME/.config/shell/aliasrc"
+[ -f "$HOME/.config/shell/funcrc" ] && source "$HOME/.config/shell/funcrc"
+
+# Basic auto/tab complete:
+autoload -U compinit
+zstyle ':completion:*' menu select
+zmodload zsh/complist
+compinit
+_comp_options+=(globdots) # Include hidden files.
+
+# vi mode
+# bindkey -v
+export KEYTIMEOUT=1
+
+# Use vim keys in tab complete menu:
+bindkey -M menuselect 'h' vi-backward-char
+bindkey -M menuselect 'k' vi-up-line-or-history
+bindkey -M menuselect 'l' vi-forward-char
+bindkey -M menuselect 'j' vi-down-line-or-history
+bindkey -v '^?' backward-delete-char
+
+## Change cursor shape for different vi modes.
+#function zle-keymap-select () {
+# case $KEYMAP in
+# vicmd) echo -ne '\e[1 q';; # block
+# viins|main) echo -ne '\e[5 q';; # beam
+# esac
+#}
+#zle -N zle-keymap-select
+#zle-line-init() {
+# zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
+# echo -ne "\e[5 q"
+#}
+#zle -N zle-line-init
+#echo -ne '\e[5 q' # Use beam shape cursor on startup.
+#preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
+
+# Edit line in vim with ctrl-e:
+autoload edit-command-line; zle -N edit-command-line
+bindkey '^e' edit-command-line
+bindkey -M vicmd '^[[P' vi-delete-char
+bindkey -M vicmd '^e' edit-command-line
+bindkey -M visual '^[[P' vi-delete
+
+# Use custom options remaps from the script
+remaps
+
+# Exit even of there are running jobs
+setopt NO_CHECK_JOBS
+
+### Added by Zinit's installer
+if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
+ print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
+ command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
+ command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
+ print -P "%F{33} %F{34}Installation successful.%f%b" || \
+ print -P "%F{160} The clone has failed.%f%b"
+fi
+
+source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
+autoload -Uz _zinit
+(( ${+_comps} )) && _comps[zinit]=_zinit
+
+# Load a few important annexes, without Turbo
+# (this is currently required for annexes)
+zinit light-mode for \
+ zdharma-continuum/zinit-annex-as-monitor \
+ zdharma-continuum/zinit-annex-bin-gem-node \
+ zdharma-continuum/zinit-annex-patch-dl \
+ zdharma-continuum/zinit-annex-rust
+
+### End of Zinit's installer chunk
+
+# Load plugins with zinit
+zinit ice depth=1
+zinit light jeffreytse/zsh-vi-mode
+ZVM_VI_INSERT_ESCAPE_BINDKEY=jk
+zinit light zsh-users/zsh-syntax-highlighting