From d1c8cdd72cfd52b9ab57bdcc61cc6e78d579f40d Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 25 Oct 2024 10:52:43 +0200 Subject: Moved to GNU Stow --- .config/i3/config | 217 ++++++++++++++++++++++++++++++++++++++++++++++++ .config/i3status/config | 63 ++++++++++++++ .gitconfig | 17 ++++ .newsboat/urls | 50 +++++++++++ .shenanigans.sh | 198 +++++++++++++++++++++++++++++++++++++++++++ .tmux.conf | 23 +++++ .vimrc | 36 ++++++++ README.md | 6 +- gitconfig | 17 ---- i3config | 217 ------------------------------------------------ i3status | 63 -------------- rssfeeds | 49 ----------- shenanigans.sh | 198 ------------------------------------------- symlink.sh | 16 ---- tmux.conf | 23 ----- vimrc | 36 -------- 16 files changed, 607 insertions(+), 622 deletions(-) create mode 100644 .config/i3/config create mode 100644 .config/i3status/config create mode 100644 .gitconfig create mode 100755 .newsboat/urls create mode 100755 .shenanigans.sh create mode 100644 .tmux.conf create mode 100644 .vimrc delete mode 100644 gitconfig delete mode 100644 i3config delete mode 100644 i3status delete mode 100755 rssfeeds delete mode 100755 shenanigans.sh delete mode 100644 symlink.sh delete mode 100644 tmux.conf delete mode 100644 vimrc diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..71dc436 --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,217 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# Start XDG autostart .desktop files using dex. See also +# https://wiki.archlinux.org/index.php/XDG_Autostart +exec --no-startup-id dex-autostart --autostart --environment i3 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +# bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec st + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec --no-startup-id "dmenu_run -nf '#BBBBBB' -nb '#222222' -sb '#005577' -sf '#EEEEEE' -fn 'BerkeleyMono-10'" +# A more modern dmenu replacement is rofi: +# bindcode $mod+40 exec "rofi -modi drun,run -show drun" +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# class border bground text indicator child_border +client.focused #333333 #333333 #FFFFFF #333333 #333333 +client.focused_inactive #111111 #111111 #FFFFFF #111111 #111111 +client.unfocused #111111 #111111 #FFFFFF #111111 #111111 +client.urgent #900000 #900000 #FFFFFF #900000 #900000 +client.placeholder #111111 #111111 #FFFFFF #111111 #111111 + +client.background #FFFFFF + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + position top + colors { + background #000000 + statusline #FFFFFF + separator #000000 + + focused_workspace #CCCCCC #CCCCCC #000000 + active_workspace #222222 #222222 #FFFFFF + inactive_workspace #222222 #222222 #888888 + urgent_workspace #900000 #900000 #FFFFFF + binding_mode #900000 #900000 #FFFFFF + } + status_command i3status +} + +font pango:BerkeleyMono Bold 9 +focus_follows_mouse no +hide_edge_borders both +exec --no-startup-id feh --bg-fill black ~/.black.png +exec --no-startup-id picom --backend glx --vsync -b +bindsym --release $mod+z exec scrot -s - | xclip -selection clipboard -target image/png +bindsym --release $mod+p exec --no-startup-id bash -c 'source ~/.shenanigans.sh && togglesink' + diff --git a/.config/i3status/config b/.config/i3status/config new file mode 100644 index 0000000..9858e6a --- /dev/null +++ b/.config/i3status/config @@ -0,0 +1,63 @@ +general { + colors = true + interval = 5 +} + +order += "cpu_temperature 0" +order += "load" +order += "memory" +order += "disk /" +order += "ethernet enp5s0" +order += "volume master" +order += "tztime brisbane" +order += "tztime ny" +order += "tztime local" + +load { + format = "CPU: %5min" +} + +memory { + format = "RAM: %free" +} + +disk "/" { + format = "DISK: %free" +} + +ethernet enp5s0 { + format_up = "NET: %ip (%speed)" + format_down = "E: down" +} + +cpu_temperature 0 { + format = "TEMP: %degrees°C" + path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp1_input" +} + +volume master { + format = "VOL: %volume" + format_muted = "VOL: muted (%volume)" + device = "default" + mixer = "Master" + mixer_idx = 0 +} + +tztime local { + format = "%Y-%m-%d %H:%M:%S" +} + +tztime brisbane { + format = "Brisbane: %H:%M" + timezone = "Australia/Brisbane" +} + +tztime ny { + format = "NY: %H:%M" + timezone = "America/New_York" +} + +tztime local { + format = "Local: %Y-%m-%d %H:%M:%S" +} + diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..4d3819b --- /dev/null +++ b/.gitconfig @@ -0,0 +1,17 @@ +[user] + name = Mitja Felicijan + email = mitja.felicijan@gmail.com + signingkey = mitja.felicijan@gmail.com +[core] + editor = vim +[commit] + gpgsign = true +[tag] + gpgsign = true +[alias] + pushall = !sh -c \"git remote | xargs -L1 git push --all\" + tree = log --oneline --graph +[init] + defaultBranch = master +[pull] + rebase = true diff --git a/.newsboat/urls b/.newsboat/urls new file mode 100755 index 0000000..ecb2975 --- /dev/null +++ b/.newsboat/urls @@ -0,0 +1,50 @@ +https://theorangeduck.com/feeds/pages +https://lwn.net/headlines/rss +https://kristoff.it/index.xml +https://www.computerenhance.com/feed +https://tratt.net/laurie/news.rss +https://willhbr.net/feed.xml +https://andrewkelley.me/rss.xml +https://beyondloom.com/blog/rss.xml +https://thomashunter.name/feed.rss +https://decuser.github.io/feed.xml +https://simonwillison.net/atom/entries/ +https://til.simonwillison.net/tils/feed.atom +https://www.andreinc.net/feed.xml +https://voussoir.net/writing/writing.atom +https://blog.regehr.org/feed +https://richiejp.com/atom.xml +https://szymonkaliski.com/feed.xml +https://world.hey.com/dhh/feed.atom +https://mitchellh.com/feed.xml +https://matt-rickard.com/rss +https://neil.computer/rss/ +https://matduggan.com/rss/ +https://michael.stapelberg.ch/feed.xml +https://journal.valeriansaliou.name/rss/ +https://www.duskborn.com/index.xml +https://mirzapandzo.com/rss.xml +https://mitjafelicijan.com/feed.xml +https://crawl.develz.org/wordpress/feed +https://go.dev/blog/feed.atom +https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw +https://www.youtube.com/feeds/videos.xml?channel_id=UCUSck1dOH7VKmG4lRW7tZXg +https://www.youtube.com/feeds/videos.xml?channel_id=UCkK9UDm_ZNrq_rIXCz3xCGA +https://www.youtube.com/feeds/videos.xml?channel_id=UCwgKmJM4ZJQRJ-U5NjvR2dg +https://www.youtube.com/feeds/videos.xml?channel_id=UC8DntJ-sBtgC-jA0yEjxqjw +https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg +https://www.youtube.com/feeds/videos.xml?channel_id=UCUzQJ3JBuQ9w-po4TXRJHiA +https://www.youtube.com/feeds/videos.xml?channel_id=UCUyeluBRhGPCW4rPe_UvBZQ +https://www.youtube.com/feeds/videos.xml?channel_id=UCS0N5baNlQWJCUrhCEo8WlA +https://www.youtube.com/feeds/videos.xml?channel_id=UCsBjURrPoezykLs9EqgamOA +https://www.youtube.com/feeds/videos.xml?channel_id=UCaTznQhurW5AaiYPbhEA-KA +https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA +https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw +https://www.youtube.com/feeds/videos.xml?channel_id=UCVk4b-svNJoeytrrlOixebQ +https://www.youtube.com/feeds/videos.xml?channel_id=UCNzszbnvQeFzObW0ghk0Ckw +https://www.youtube.com/feeds/videos.xml?channel_id=UCAMu6Dso0ENoNm3sKpQsy0g +https://www.youtube.com/feeds/videos.xml?channel_id=UC2DjFE7Xf11URZqWBigcVOQ +https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg +https://www.youtube.com/feeds/videos.xml?channel_id=UCTAfm-YD2M9xzvbYvRc5ttA +https://www.youtube.com/feeds/videos.xml?channel_id=UC5--wS0Ljbin1TjWQX6eafA +https://www.youtube.com/feeds/videos.xml?channel_id=UCmtyQOKKmrMVaKuRXz02jbQ diff --git a/.shenanigans.sh b/.shenanigans.sh new file mode 100755 index 0000000..c1b34d7 --- /dev/null +++ b/.shenanigans.sh @@ -0,0 +1,198 @@ +# Magical environment variables. +NIX_SHELL_PRESERVE_PROMPT=1 +TERM=xterm-256color +VISUAL=vim +EDITOR=vim + +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' +} + +is_inside_nix_shell() { + nix_shell_name="$(basename "$IN_NIX_SHELL" 2>/dev/null)" + if [[ -n "$nix_shell_name" ]]; then + echo " \e[0;36m(nix-shell)\e[0m" + fi +} + +# Better prompt. +export PS1="[\033[38;5;166m\]\u@\h\[$(tput sgr0)\]]$(is_inside_nix_shell)\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[$(tput sgr0)\] \n$ " + +# General aliases. +alias ls='ls --color=none' +alias l='ls -lh --color=none' +alias ll='ls -lha --color=none' +alias t='tree -L 2' +alias ..='cd ..' +alias grep='grep --color=always' +alias less='less -R' +alias tmux='tmux -u' +alias vi='vim' +alias server='python3 -m http.server 6969' + +# Custom folder jump commands. +alias p='cd ~/Vault/projects' +alias j='cd ~/Junk/current' +alias d='cd ~/Downloads' + +# Additional path settings. +export PATH=$HOME/Applications:$PATH +export PATH=$HOME/go/bin:$PATH +export PATH=/usr/local/go/bin:$PATH + +# History and search. Stolen from J. +HISTCONTROL=ignoreboth +shopt -s histappend +export HISTSIZE= +export HISTFILESIZE= +export HISTFILE=~/.bash_history_infinite +PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}" +bind '"\e[A": history-search-backward' +bind '"\e[B": history-search-forward' +export HSTR_CONFIG=hicolor +if [[ $- =~ .i. ]]; then bind '"\C-h": "\C-a hstr -- \C-j"'; fi + +# Machine provision script for essential software. +# This is meant to be used on Debian 11+. +provision() { + doas apt install \ + build-essential git gcc make busybox cifs-utils tree hstr s3cmd \ + xmlstarlet htop nvtop tmux picom scrot xclip mc ripgrep jq \ + rsync doas newsboat entr clang clang-tidy clang-tools \ + libx11-dev libxinerama-dev libxft-dev x11-xserver-utils \ + stow podman podman-compose +} + +# Backup to NAS function. Much wow! +backup() { + CWD=$(pwd) + VHOME=/home/$USER/Vault + ME=$(whoami)@$(hostname) + + mkdir -p $VHOME/dotfiles + cd $VHOME/dotfiles + + # Make a copy of certain files. + rsync -azhv /home/$USER/.bash_history_infinite bash_history_infinite + rsync -azhv /home/$USER/.ssh/ ssh + rsync -azhv /home/$USER/.aws/ aws + rsync -azhv /home/$USER/.gnupg/ gnupg/ + + # Sync with NAS. + rsync -azhvpog \ + --exclude '.venv/' \ + --exclude '.git/' \ + --exclude '.import/' \ + --exclude '.godot/' \ + --exclude '.zig-cache/' \ + --exclude 'node_modules/' \ + --exclude 'digg-v5/' \ + --delete \ + $VHOME/ /media/Void/Backup/$ME/ + + # Add to log file. + echo `date +"%D %T"` >> ~/.vault.log + notify-send "Backup finished successfully." + + # Return back to original directory + cd $CWD +} + +# Simple ticket system based on https://github.com/mitjafelicijan/ticket. +export TICKETS=~/Vault/tickets +tt() { + if [ "$(uname -s)" != "Linux" ]; then + printf "Currently only Linux is supported.\n" + return 1 + fi + + if [ -z "$TICKETS" ]; then + TICKETS="$HOME/tickets" + fi + + mkdir -p $TICKETS + + # Display open tickets if no argument provided. + if [ -z "$1" ]; then + echo "`tt -o`" + return 0 + fi + + case $1 in + -n|-new) + # ticket_id=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 10 | head -n 1) + ticket_id=$(echo -n "$(date)" | md5sum | cut -c 9-20) + ticket_file=$TICKETS/$ticket_id + printf "id: %s\n" $ticket_id > $ticket_file + printf "responsible: %s\n" `whoami`@`hostname` >> $ticket_file + printf "created: %s\n" "`date`" >> $ticket_file + printf "status: open\n" >> $ticket_file + printf "title: ?\n" >> $ticket_file + printf "====\n" >> $ticket_file + printf "Description...\n" >> $ticket_file + $EDITOR $ticket_file + ;; + -o|-open) + printf "%-14s %-21s %s\n" "Ticket ID" "Created at" "Title" + printf "%0.s-" {1..100} + printf "\n" + grep --color=never -l 'status: open' $TICKETS/* | while read file; do + id=$(head -n 1 "$file" | tail -n 1 | awk '{ print $2 }') + title=$(head -n 5 "$file" | tail -n 1 | awk '{$1=""; print $0}') + cdate=$(head -n 3 "$file" | tail -n 1 | awk '{$1=""; print $0}') + cdate_fmt=$(date -d "$cdate" "+%Y-%m-%d %H:%M:%S") + printf "%-14s %-20s %.66s\n" "$id" "$cdate_fmt" "$title" + done + ;; + -c|-closed) + printf "%-14s %-21s %s\n" "Ticket ID" "Created at" "Title" + printf "%0.s-" {1..100} + printf "\n" + grep --color=never -l 'status: closed' $TICKETS/* | while read file; do + id=$(head -n 1 "$file" | tail -n 1 | awk '{ print $2 }') + title=$(head -n 5 "$file" | tail -n 1 | awk '{$1=""; print $0}') + cdate=$(head -n 3 "$file" | tail -n 1 | awk '{$1=""; print $0}') + cdate_fmt=$(date -d "$cdate" "+%Y-%m-%d %H:%M:%S") + printf "%-14s %-20s %.66s\n" "$id" "$cdate_fmt" "$title" + done + ;; + -h|-help) + printf "Usage: ticket [option]\n" + printf " -n, -new creates a new ticket\n" + printf " -o, -open lists open tickets\n" + printf " -c, -closed lists closed tickets\n" + printf " -h, -help shows this help\n" + ;; + *) + if [ -e "$TICKETS/$1" ] && [ -f "$TICKETS/$1" ]; then + $EDITOR "$TICKETS/$1" + else + printf "Ticket not found: $TICKETS/$1\n" + fi + ;; + esac +} + +# Toggles between pulseaudio sinks in round-robin. +togglesink() { + sinks=($(pactl list short sinks | awk '{print $2}')) + current_sink=$(pactl get-default-sink) + current_index=-1 + + for i in "${!sinks[@]}"; do + if [[ "${sinks[$i]}" == "$current_sink" ]]; then + current_index=$i + break + fi + done + + if [[ $current_index -eq -1 ]]; then + next_index=0 + else + next_index=$(( (current_index + 1) % ${#sinks[@]} )) + fi + + pactl set-default-sink "${sinks[$next_index]}" + notify-send "Switched to sink: ${sinks[$next_index]}" +} + diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..f71afa0 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,23 @@ +set -g default-terminal "screen-256color" +set-window-option -g automatic-rename on +set-window-option -g mode-keys vi +set-option -g set-titles on +set-option -sg escape-time 10 +set-option -g mouse off + +set -g prefix M-x +bind M-x send-prefix + +set -g base-index 1 +set-window-option -g pane-base-index 1 +set -g renumber-windows on + +set -g status-bg '#222222' +set -g status-fg '#ffffff' +set -g window-status-current-format "#[fg=#ffffff]#[bg=#000000]#[fg=#ffffff]#[bg=#000000] #I:#W #[fg=#ffffff]#[bg=#000000]" + +bind-key Up select-pane -U +bind-key Down select-pane -D +bind-key Left select-pane -L +bind-key Right select-pane -R + diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..990b1dd --- /dev/null +++ b/.vimrc @@ -0,0 +1,36 @@ +call plug#begin() + Plug 'tpope/vim-sensible' + Plug 'tpope/vim-commentary' + Plug 'tpope/vim-fugitive' + Plug 'airblade/vim-gitgutter' + Plug 'ctrlpvim/ctrlp.vim' + Plug 'dense-analysis/ale' + Plug 'mitjafelicijan/sherbet' +call plug#end() + +colorscheme sherbet +set number relativenumber autoindent signcolumn=yes cursorline +set hidden nowrap nobackup noswapfile autoread updatetime=300 +set encoding=utf8 spelllang=en_us +set backspace=2 scrolloff=4 +set shiftwidth=4 tabstop=4 + +nnoremap :bnext +nnoremap :bprevious +nnoremap :copen +nnoremap :CtrlPBuffer +nnoremap :ALEHover +nnoremap :ALEDetail + +nmap gr :ALEFindReferences +nmap gd :ALEGoToDefinition +nmap re :ALERename + +let g:ale_hover_to_floating_preview = 1 +let g:ale_detail_to_floating_preview = 1 +let g:ale_floating_window_border = 0 +let g:ale_virtualtext_cursor = 0 +let g:ale_set_quickfix = 1 +let g:ctrlp_use_caching = 0 +let g:ctrlp_user_command = 'rg %s --files --color=never --glob ""' + diff --git a/README.md b/README.md index f1697ec..6db701b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ ![Unga Bunga](https://github.com/mitjafelicijan/dotfiles/assets/296714/2ea7852a-8297-40c4-a9b1-0f6cba6c701f) +Relies on [GNU Stow](https://www.gnu.org/software/stow/). + ```sh git clone git@github.com:mitjafelicijan/dotfiles.git ~/.dotfiles - -# Create symbolic links to actual config files. -sh symlink.sh +cd .dotfiles && stow ``` diff --git a/gitconfig b/gitconfig deleted file mode 100644 index 4d3819b..0000000 --- a/gitconfig +++ /dev/null @@ -1,17 +0,0 @@ -[user] - name = Mitja Felicijan - email = mitja.felicijan@gmail.com - signingkey = mitja.felicijan@gmail.com -[core] - editor = vim -[commit] - gpgsign = true -[tag] - gpgsign = true -[alias] - pushall = !sh -c \"git remote | xargs -L1 git push --all\" - tree = log --oneline --graph -[init] - defaultBranch = master -[pull] - rebase = true diff --git a/i3config b/i3config deleted file mode 100644 index 71dc436..0000000 --- a/i3config +++ /dev/null @@ -1,217 +0,0 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# i3 config file (v4) -# -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod4 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font pango:monospace 8 - -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -#font pango:DejaVu Sans Mono 8 - -# Start XDG autostart .desktop files using dex. See also -# https://wiki.archlinux.org/index.php/XDG_Autostart -exec --no-startup-id dex-autostart --autostart --environment i3 - -# The combination of xss-lock, nm-applet and pactl is a popular choice, so -# they are included here as an example. Modify as you see fit. - -# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the -# screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork - -# NetworkManager is the most popular way to manage wireless networks on Linux, -# and nm-applet is a desktop environment-independent system tray GUI for it. -exec --no-startup-id nm-applet - -# Use pactl to adjust volume in PulseAudio. -set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal -# bindsym $mod+Return exec i3-sensible-terminal -bindsym $mod+Return exec st - -# kill focused window -bindsym $mod+Shift+q kill - -# start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id "dmenu_run -nf '#BBBBBB' -nb '#222222' -sb '#005577' -sf '#EEEEEE' -fn 'BerkeleyMono-10'" -# A more modern dmenu replacement is rofi: -# bindcode $mod+40 exec "rofi -modi drun,run -show drun" -# There also is i3-dmenu-desktop which only displays applications shipping a -# .desktop file. It is a wrapper around dmenu, so you need that installed. -# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym $mod+j focus left -bindsym $mod+k focus down -bindsym $mod+l focus up -bindsym $mod+semicolon focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+semicolon move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+h split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -#bindsym $mod+d focus child - -# Define names for default workspaces for which we configure key bindings later on. -# We use variables to avoid repeating the names in multiple places. -set $ws1 "1" -set $ws2 "2" -set $ws3 "3" -set $ws4 "4" -set $ws5 "5" -set $ws6 "6" -set $ws7 "7" -set $ws8 "8" -set $ws9 "9" -set $ws10 "10" - -# switch to workspace -bindsym $mod+1 workspace number $ws1 -bindsym $mod+2 workspace number $ws2 -bindsym $mod+3 workspace number $ws3 -bindsym $mod+4 workspace number $ws4 -bindsym $mod+5 workspace number $ws5 -bindsym $mod+6 workspace number $ws6 -bindsym $mod+7 workspace number $ws7 -bindsym $mod+8 workspace number $ws8 -bindsym $mod+9 workspace number $ws9 -bindsym $mod+0 workspace number $ws10 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace number $ws1 -bindsym $mod+Shift+2 move container to workspace number $ws2 -bindsym $mod+Shift+3 move container to workspace number $ws3 -bindsym $mod+Shift+4 move container to workspace number $ws4 -bindsym $mod+Shift+5 move container to workspace number $ws5 -bindsym $mod+Shift+6 move container to workspace number $ws6 -bindsym $mod+Shift+7 move container to workspace number $ws7 -bindsym $mod+Shift+8 move container to workspace number $ws8 -bindsym $mod+Shift+9 move container to workspace number $ws9 -bindsym $mod+Shift+0 move container to workspace number $ws10 - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - -bindsym $mod+r mode "resize" - -# class border bground text indicator child_border -client.focused #333333 #333333 #FFFFFF #333333 #333333 -client.focused_inactive #111111 #111111 #FFFFFF #111111 #111111 -client.unfocused #111111 #111111 #FFFFFF #111111 #111111 -client.urgent #900000 #900000 #FFFFFF #900000 #900000 -client.placeholder #111111 #111111 #FFFFFF #111111 #111111 - -client.background #FFFFFF - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - position top - colors { - background #000000 - statusline #FFFFFF - separator #000000 - - focused_workspace #CCCCCC #CCCCCC #000000 - active_workspace #222222 #222222 #FFFFFF - inactive_workspace #222222 #222222 #888888 - urgent_workspace #900000 #900000 #FFFFFF - binding_mode #900000 #900000 #FFFFFF - } - status_command i3status -} - -font pango:BerkeleyMono Bold 9 -focus_follows_mouse no -hide_edge_borders both -exec --no-startup-id feh --bg-fill black ~/.black.png -exec --no-startup-id picom --backend glx --vsync -b -bindsym --release $mod+z exec scrot -s - | xclip -selection clipboard -target image/png -bindsym --release $mod+p exec --no-startup-id bash -c 'source ~/.shenanigans.sh && togglesink' - diff --git a/i3status b/i3status deleted file mode 100644 index 9858e6a..0000000 --- a/i3status +++ /dev/null @@ -1,63 +0,0 @@ -general { - colors = true - interval = 5 -} - -order += "cpu_temperature 0" -order += "load" -order += "memory" -order += "disk /" -order += "ethernet enp5s0" -order += "volume master" -order += "tztime brisbane" -order += "tztime ny" -order += "tztime local" - -load { - format = "CPU: %5min" -} - -memory { - format = "RAM: %free" -} - -disk "/" { - format = "DISK: %free" -} - -ethernet enp5s0 { - format_up = "NET: %ip (%speed)" - format_down = "E: down" -} - -cpu_temperature 0 { - format = "TEMP: %degrees°C" - path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp1_input" -} - -volume master { - format = "VOL: %volume" - format_muted = "VOL: muted (%volume)" - device = "default" - mixer = "Master" - mixer_idx = 0 -} - -tztime local { - format = "%Y-%m-%d %H:%M:%S" -} - -tztime brisbane { - format = "Brisbane: %H:%M" - timezone = "Australia/Brisbane" -} - -tztime ny { - format = "NY: %H:%M" - timezone = "America/New_York" -} - -tztime local { - format = "Local: %Y-%m-%d %H:%M:%S" -} - diff --git a/rssfeeds b/rssfeeds deleted file mode 100755 index 503daaa..0000000 --- a/rssfeeds +++ /dev/null @@ -1,49 +0,0 @@ -https://theorangeduck.com/feeds/pages -https://lwn.net/headlines/rss -https://kristoff.it/index.xml -https://www.computerenhance.com/feed -https://tratt.net/laurie/news.rss -https://willhbr.net/feed.xml -https://andrewkelley.me/rss.xml -https://beyondloom.com/blog/rss.xml -https://thomashunter.name/feed.rss -https://decuser.github.io/feed.xml -https://simonwillison.net/atom/entries/ -https://til.simonwillison.net/tils/feed.atom -https://www.andreinc.net/feed.xml -https://voussoir.net/writing/writing.atom -https://blog.regehr.org/feed -https://richiejp.com/atom.xml -https://szymonkaliski.com/feed.xml -https://world.hey.com/dhh/feed.atom -https://mitchellh.com/feed.xml -https://matt-rickard.com/rss -https://neil.computer/rss/ -https://matduggan.com/rss/ -https://michael.stapelberg.ch/feed.xml -https://journal.valeriansaliou.name/rss/ -https://www.duskborn.com/index.xml -https://mirzapandzo.com/rss.xml -https://mitjafelicijan.com/feed.xml -https://crawl.develz.org/wordpress/feed -https://go.dev/blog/feed.atom -https://www.youtube.com/feeds/videos.xml?channel_id=UCUSck1dOH7VKmG4lRW7tZXg -https://www.youtube.com/feeds/videos.xml?channel_id=UCkK9UDm_ZNrq_rIXCz3xCGA -https://www.youtube.com/feeds/videos.xml?channel_id=UCwgKmJM4ZJQRJ-U5NjvR2dg -https://www.youtube.com/feeds/videos.xml?channel_id=UC8DntJ-sBtgC-jA0yEjxqjw -https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg -https://www.youtube.com/feeds/videos.xml?channel_id=UCUzQJ3JBuQ9w-po4TXRJHiA -https://www.youtube.com/feeds/videos.xml?channel_id=UCUyeluBRhGPCW4rPe_UvBZQ -https://www.youtube.com/feeds/videos.xml?channel_id=UCS0N5baNlQWJCUrhCEo8WlA -https://www.youtube.com/feeds/videos.xml?channel_id=UCsBjURrPoezykLs9EqgamOA -https://www.youtube.com/feeds/videos.xml?channel_id=UCaTznQhurW5AaiYPbhEA-KA -https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA -https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw -https://www.youtube.com/feeds/videos.xml?channel_id=UCVk4b-svNJoeytrrlOixebQ -https://www.youtube.com/feeds/videos.xml?channel_id=UCNzszbnvQeFzObW0ghk0Ckw -https://www.youtube.com/feeds/videos.xml?channel_id=UCAMu6Dso0ENoNm3sKpQsy0g -https://www.youtube.com/feeds/videos.xml?channel_id=UC2DjFE7Xf11URZqWBigcVOQ -https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg -https://www.youtube.com/feeds/videos.xml?channel_id=UCTAfm-YD2M9xzvbYvRc5ttA -https://www.youtube.com/feeds/videos.xml?channel_id=UC5--wS0Ljbin1TjWQX6eafA -https://www.youtube.com/feeds/videos.xml?channel_id=UCmtyQOKKmrMVaKuRXz02jbQ diff --git a/shenanigans.sh b/shenanigans.sh deleted file mode 100755 index 5af5fdf..0000000 --- a/shenanigans.sh +++ /dev/null @@ -1,198 +0,0 @@ -# Magical environment variables. -NIX_SHELL_PRESERVE_PROMPT=1 -TERM=xterm-256color -VISUAL=vim -EDITOR=vim - -parse_git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' -} - -is_inside_nix_shell() { - nix_shell_name="$(basename "$IN_NIX_SHELL" 2>/dev/null)" - if [[ -n "$nix_shell_name" ]]; then - echo " \e[0;36m(nix-shell)\e[0m" - fi -} - -# Better prompt. -export PS1="[\033[38;5;166m\]\u@\h\[$(tput sgr0)\]]$(is_inside_nix_shell)\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[$(tput sgr0)\] \n$ " - -# General aliases. -alias ls='ls --color=none' -alias l='ls -lh --color=none' -alias ll='ls -lha --color=none' -alias t='tree -L 2' -alias ..='cd ..' -alias grep='grep --color=always' -alias less='less -R' -alias tmux='tmux -u' -alias vi='vim' -alias server='python3 -m http.server 6969' - -# Custom folder jump commands. -alias p='cd ~/Vault/projects' -alias j='cd ~/Junk/current' -alias d='cd ~/Downloads' - -# Additional path settings. -export PATH=$HOME/Applications:$PATH -export PATH=$HOME/go/bin:$PATH -export PATH=/usr/local/go/bin:$PATH - -# History and search. Stolen from J. -HISTCONTROL=ignoreboth -shopt -s histappend -export HISTSIZE= -export HISTFILESIZE= -export HISTFILE=~/.bash_history_infinite -PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}" -bind '"\e[A": history-search-backward' -bind '"\e[B": history-search-forward' -export HSTR_CONFIG=hicolor -if [[ $- =~ .i. ]]; then bind '"\C-h": "\C-a hstr -- \C-j"'; fi - -# Machine provision script for essential software. -# This is meant to be used on Debian 11+. -provision() { - doas apt install \ - build-essential git gcc make busybox cifs-utils tree hstr s3cmd \ - xmlstarlet htop nvtop tmux picom scrot xclip mc ripgrep jq \ - rsync doas newsboat entr clang clang-tidy clang-tools \ - libx11-dev libxinerama-dev libxft-dev x11-xserver-utils \ - podman podman-compose -} - -# Backup to NAS function. Much wow! -backup() { - CWD=$(pwd) - VHOME=/home/$USER/Vault - ME=$(whoami)@$(hostname) - - mkdir -p $VHOME/dotfiles - cd $VHOME/dotfiles - - # Make a copy of certain files. - rsync -azhv /home/$USER/.bash_history_infinite bash_history_infinite - rsync -azhv /home/$USER/.ssh/ ssh - rsync -azhv /home/$USER/.aws/ aws - rsync -azhv /home/$USER/.gnupg/ gnupg/ - - # Sync with NAS. - rsync -azhvpog \ - --exclude '.venv/' \ - --exclude '.git/' \ - --exclude '.import/' \ - --exclude '.godot/' \ - --exclude '.zig-cache/' \ - --exclude 'node_modules/' \ - --exclude 'digg-v5/' \ - --delete \ - $VHOME/ /media/Void/Backup/$ME/ - - # Add to log file. - echo `date +"%D %T"` >> ~/.vault.log - notify-send "Backup finished successfully." - - # Return back to original directory - cd $CWD -} - -# Simple ticket system based on https://github.com/mitjafelicijan/ticket. -export TICKETS=~/Vault/tickets -tt() { - if [ "$(uname -s)" != "Linux" ]; then - printf "Currently only Linux is supported.\n" - return 1 - fi - - if [ -z "$TICKETS" ]; then - TICKETS="$HOME/tickets" - fi - - mkdir -p $TICKETS - - # Display open tickets if no argument provided. - if [ -z "$1" ]; then - echo "`tt -o`" - return 0 - fi - - case $1 in - -n|-new) - # ticket_id=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 10 | head -n 1) - ticket_id=$(echo -n "$(date)" | md5sum | cut -c 9-20) - ticket_file=$TICKETS/$ticket_id - printf "id: %s\n" $ticket_id > $ticket_file - printf "responsible: %s\n" `whoami`@`hostname` >> $ticket_file - printf "created: %s\n" "`date`" >> $ticket_file - printf "status: open\n" >> $ticket_file - printf "title: ?\n" >> $ticket_file - printf "====\n" >> $ticket_file - printf "Description...\n" >> $ticket_file - $EDITOR $ticket_file - ;; - -o|-open) - printf "%-14s %-21s %s\n" "Ticket ID" "Created at" "Title" - printf "%0.s-" {1..100} - printf "\n" - grep --color=never -l 'status: open' $TICKETS/* | while read file; do - id=$(head -n 1 "$file" | tail -n 1 | awk '{ print $2 }') - title=$(head -n 5 "$file" | tail -n 1 | awk '{$1=""; print $0}') - cdate=$(head -n 3 "$file" | tail -n 1 | awk '{$1=""; print $0}') - cdate_fmt=$(date -d "$cdate" "+%Y-%m-%d %H:%M:%S") - printf "%-14s %-20s %.66s\n" "$id" "$cdate_fmt" "$title" - done - ;; - -c|-closed) - printf "%-14s %-21s %s\n" "Ticket ID" "Created at" "Title" - printf "%0.s-" {1..100} - printf "\n" - grep --color=never -l 'status: closed' $TICKETS/* | while read file; do - id=$(head -n 1 "$file" | tail -n 1 | awk '{ print $2 }') - title=$(head -n 5 "$file" | tail -n 1 | awk '{$1=""; print $0}') - cdate=$(head -n 3 "$file" | tail -n 1 | awk '{$1=""; print $0}') - cdate_fmt=$(date -d "$cdate" "+%Y-%m-%d %H:%M:%S") - printf "%-14s %-20s %.66s\n" "$id" "$cdate_fmt" "$title" - done - ;; - -h|-help) - printf "Usage: ticket [option]\n" - printf " -n, -new creates a new ticket\n" - printf " -o, -open lists open tickets\n" - printf " -c, -closed lists closed tickets\n" - printf " -h, -help shows this help\n" - ;; - *) - if [ -e "$TICKETS/$1" ] && [ -f "$TICKETS/$1" ]; then - $EDITOR "$TICKETS/$1" - else - printf "Ticket not found: $TICKETS/$1\n" - fi - ;; - esac -} - -# Toggles between pulseaudio sinks in round-robin. -togglesink() { - sinks=($(pactl list short sinks | awk '{print $2}')) - current_sink=$(pactl get-default-sink) - current_index=-1 - - for i in "${!sinks[@]}"; do - if [[ "${sinks[$i]}" == "$current_sink" ]]; then - current_index=$i - break - fi - done - - if [[ $current_index -eq -1 ]]; then - next_index=0 - else - next_index=$(( (current_index + 1) % ${#sinks[@]} )) - fi - - pactl set-default-sink "${sinks[$next_index]}" - notify-send "Switched to sink: ${sinks[$next_index]}" -} - diff --git a/symlink.sh b/symlink.sh deleted file mode 100644 index d31d7cd..0000000 --- a/symlink.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh - -set -x - -mkdir -p ~/.config/i3 -mkdir -p ~/.config/i3status/ -mkdir -p ~/.newsboat - -ln -s ~/.dotfiles/shenanigans.sh ~/.shenanigans.sh -ln -s ~/.dotfiles/tmux.conf ~/.tmux.conf -ln -s ~/.dotfiles/vimrc ~/.vimrc -ln -s ~/.dotfiles/gitconfig ~/.gitconfig -ln -s ~/.dotfiles/i3config ~/.config/i3/config -ln -s ~/.dotfiles/i3status ~/.config/i3status/config -ln -s ~/.dotfiles/rssfeeds ~/.newsboat/urls - diff --git a/tmux.conf b/tmux.conf deleted file mode 100644 index f71afa0..0000000 --- a/tmux.conf +++ /dev/null @@ -1,23 +0,0 @@ -set -g default-terminal "screen-256color" -set-window-option -g automatic-rename on -set-window-option -g mode-keys vi -set-option -g set-titles on -set-option -sg escape-time 10 -set-option -g mouse off - -set -g prefix M-x -bind M-x send-prefix - -set -g base-index 1 -set-window-option -g pane-base-index 1 -set -g renumber-windows on - -set -g status-bg '#222222' -set -g status-fg '#ffffff' -set -g window-status-current-format "#[fg=#ffffff]#[bg=#000000]#[fg=#ffffff]#[bg=#000000] #I:#W #[fg=#ffffff]#[bg=#000000]" - -bind-key Up select-pane -U -bind-key Down select-pane -D -bind-key Left select-pane -L -bind-key Right select-pane -R - diff --git a/vimrc b/vimrc deleted file mode 100644 index 990b1dd..0000000 --- a/vimrc +++ /dev/null @@ -1,36 +0,0 @@ -call plug#begin() - Plug 'tpope/vim-sensible' - Plug 'tpope/vim-commentary' - Plug 'tpope/vim-fugitive' - Plug 'airblade/vim-gitgutter' - Plug 'ctrlpvim/ctrlp.vim' - Plug 'dense-analysis/ale' - Plug 'mitjafelicijan/sherbet' -call plug#end() - -colorscheme sherbet -set number relativenumber autoindent signcolumn=yes cursorline -set hidden nowrap nobackup noswapfile autoread updatetime=300 -set encoding=utf8 spelllang=en_us -set backspace=2 scrolloff=4 -set shiftwidth=4 tabstop=4 - -nnoremap :bnext -nnoremap :bprevious -nnoremap :copen -nnoremap :CtrlPBuffer -nnoremap :ALEHover -nnoremap :ALEDetail - -nmap gr :ALEFindReferences -nmap gd :ALEGoToDefinition -nmap re :ALERename - -let g:ale_hover_to_floating_preview = 1 -let g:ale_detail_to_floating_preview = 1 -let g:ale_floating_window_border = 0 -let g:ale_virtualtext_cursor = 0 -let g:ale_set_quickfix = 1 -let g:ctrlp_use_caching = 0 -let g:ctrlp_user_command = 'rg %s --files --color=never --glob ""' - -- cgit v1.2.3