diff options
-rw-r--r-- | .bash_profile | 118 | ||||
-rw-r--r-- | .config/dmenu/dmenu_omitlist | 1 | ||||
-rw-r--r-- | .config/i3/config | 175 | ||||
-rw-r--r-- | .config/i3status/config | 80 | ||||
-rw-r--r-- | .config/oversteer/profiles/f1.ini | 11 | ||||
-rw-r--r-- | .emacs | 51 | ||||
-rw-r--r-- | .gitconfig | 33 | ||||
-rw-r--r-- | .gitignore | 11 | ||||
-rw-r--r-- | .stowrc | 6 | ||||
-rw-r--r-- | .vimrc | 62 | ||||
-rw-r--r-- | LICENSE | 12 | ||||
-rw-r--r-- | README.org | 59 |
12 files changed, 619 insertions, 0 deletions
diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..3469494 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,118 @@ +#export LC_ALL=en_US.UTF-8 +#export LANG=en_US.UTF-8 +#export LANGUAGE=en_US.UTF-8 +export TERM='xterm-256color' +export TERMINAL=st +export EDITOR='vim' +export VISUAL='vim' + +export DESKTOP_SESSION=KDE +export XDG_CURRENT_DESKTOP=KDE +export SFML_DIR=/home/senders/Downloads/SFML-2.5.1 + +#Prompt Command Function CWD +function cwd { + pwd | awk '{ n=split($0,a,"/"); print a[n-1]"/"a[n] }' +} + +function vim { + if [ -f $PWD/.vimrc ]; then + /usr/bin/vim -u $PWD/.vimrc $@ + else + /usr/bin/vim $@ + fi +} + +## +# Exports +## +export PROMPT_COMMAND='echo -ne "\033]0;`cwd`\007"' +export PS1="\[$(tput setaf 12)\][\[$(tput bold)\]\[$(tput setaf 2)\]\u\[$(tput sgr0)\]\[$(tput setaf 12)\]]\[$(tput setaf 13)\]\\$ \[$(tput sgr0)\]" +export PRJ_HOME=$HOME/projects +export APP_HOME=$HOME/applications +export CONF_HOME=$HOME/configs +export JAVA_HOME=/usr/lib/jvm/default-runtime +export IDEA_JDK=$JAVA_HOME +#export IDEA_JDK=/usr/lib/jvm/jdk-jetbrains +export PLAYGROUND_HOME=$HOME/playground +export SCALA_HOME=$APP_HOME/scala-latest +export GO_HOME=/usr/local/go +export GOPATH=$PLAYGROUND_HOME/go +export ARDOUR_HOME=/opt/Ardour-5.12.0/bin +export MPV_HOME=~/.config/ +export PATH=$PATH:/home/senders/.bin:$ARDOUR_HOME:$SCALA_HOME/bin:$HOME/.cargo/bin:/snap/bin:$GO_HOME/bin:/usr/local/include:$GOPATH:/usr/include + +## +# Alias +## +alias ccopy='xclip -selection clipboard' +alias cpaste='xclip -selection clipboard -o' +alias tgz='tar czvf' +alias utgz='tar xzvf' +alias volmute='amixer sset Master toggle' +alias bgrand='fn_bg_rand' +alias bgset='xsetroot -solid ' +alias resource='source ~/.bash_profile' +alias whoisport='lsof -t tcp:' +alias checksum='openssl dgst -sha256' +alias mmoff='xrandr --output eDP-1 --off' +alias mmon='xrandr --output eDP-1 --auto' +alias exon='xrandr --output DP-1 --auto && mmoff' +alias exoff='mmon; xrandr --output DP-1 --off' +alias ssh-evict='ssh-keygen -f "/home/senders/.ssh/known_hosts" -R' +alias add-ssh='ssh-add ~/.ssh/id_rsa' +alias tlmgr='/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode' + +# Private Bash Profile for things I don't want in git +if [ -f ~/.pc_local_bash_profile ]; then + . ~/.pc_local_bash_profile +fi + +# Setup SSH to work with ST +# if [ "$TERM" == "st-256color"]; then +# alias ssh='TERM="xterm-256color"; ssh' +# fi + + +## +# Functions +## +function prj { + cd $PRJ_HOME/$1 +} + +function config { + cd $CONF_HOME/$1 +} + +function play { + cd $PLAYGROUND_HOME/$1 +} + +function clip { + cat $1 | ccopy +} + +function print_clip { + cpaste +} +function fn_bg_set { + xsetroot -solid "#$1" +} +function fn_bg_rand { + __CLR=$(openssl rand -hex 3) + fn_bg_set $__CLR + echo "#"$__CLR + unset __CLR +} +function mvnversion { + mvn versions:set -DnewVersion=$1 -DgenerateBackupPoms=false +} + +export PATH="$HOME/.cargo/bin:$PATH" + +GIT_AUTOCOMPLETE=/usr/share/git/completion/git-completion.bash + +if [ -f $GIT_AUTOCOMPLETE ]; then + source $GIT_AUTOCOMPLETE +fi diff --git a/.config/dmenu/dmenu_omitlist b/.config/dmenu/dmenu_omitlist new file mode 100644 index 0000000..961611b --- /dev/null +++ b/.config/dmenu/dmenu_omitlist @@ -0,0 +1 @@ +disco diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..5f9ec45 --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,175 @@ +exec --no-startup-id xsetroot -solid "#$(openssl rand -hex 3)" +exec --no-startup-id unclutter -idle 1 +# 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 somewhen, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! +set $mod Mod4 + +# font for window titles. ISO 10646 = Unicode +font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +font xft:Liberation Mono 8 + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec st + +# kill focused window +bindsym $mod+Shift+Q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec dmenu_run + +# 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+colon 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 + +# change container layout (stacked, tabbed, default) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout default + +# 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 + +# mouse focus +focus_follows_mouse no + +# focus the child container +#bindcode $mod+d focus child + +# switch to workspace +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 + +# move focused container to workspace +bindsym $mod+Shift+exclam move container to workspace 1 +bindsym $mod+Shift+at move container to workspace 2 +bindsym $mod+Shift+numbersign move container to workspace 3 +bindsym $mod+Shift+dollar move container to workspace 4 +bindsym $mod+Shift+percent move container to workspace 5 +bindsym $mod+Shift+asciicircum move container to workspace 6 +bindsym $mod+Shift+ampersand move container to workspace 7 +bindsym $mod+Shift+asterisk move container to workspace 8 +bindsym $mod+Shift+parenleft move container to workspace 9 +bindsym $mod+Shift+parenright move container to workspace 10 + +# 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 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 113 resize shrink width 10 px or 10 ppt + bindsym 116 resize grow height 10 px or 10 ppt + bindsym 111 resize shrink height 10 px or 10 ppt + bindsym 114 resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +## +# +# Custom Commands +# +## + +bindsym $mod+ctrl+L exec i3lock + +## +# +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status + colors { + background #060606 + statusline #81b7ff + focused_workspace #81b7ff #16181A #81b7ff + active_workspace #16181A #16181A #81b7ff + inactive_workspace #16181A #16181A #b0c8cd + + } + font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 + font xft:Liberation Mono 9 +} + +client.focused #16181A #81b7ff #16181A +client.focused_inactive #81b7ff #16181A #81b7ff +client.unfocused #81b7ff #16181A #81b7ff +client.urgent #e93d3d #e93d3d #e93d3d + +for_window [class="Godot"] floating enable +for_window [title=".*Godot Engine*."] floating disable +for_window [class=".*"] border pixel 1 +for_window [floating] border normal diff --git a/.config/i3status/config b/.config/i3status/config new file mode 100644 index 0000000..8e22514 --- /dev/null +++ b/.config/i3status/config @@ -0,0 +1,80 @@ +# 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 + color_good = '#67ff79' + color_degraded = '#f1f156' + color_bad = '#e93d3d' +} + +order += "disk /" +order += "ethernet enp5s0" +order += "volume master" +order += "load" +order += "tztime utc" +order += "tztime local" + +wireless wlp4s0 { + format_up = "%quality %essid %ip" + format_down = " " +} + +ethernet enp5s0 { + # if you use %speed, i3status requires root privileges + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +battery 1 { + format = "%status %percentage %remaining" + format_down = "" + last_full_capacity = false + integer_battery_capacity = true + low_threshold = 30 + threshold_type = time + hide_seconds = true + status_chr = " " + status_bat = " " + status_full = " " +} + +run_watch DHCP { + pidfile = "/var/run/dhclient*.pid" +} + +tztime local { + format = "%a %d %H:%M:%S" +} + +tztime utc { + timezone = UTC + format = "%Y-%m-%d %H:%M:%S UTC" +} + +tztime sto { + timezone = "Europe/Stockholm" + format = "%a %d %H:%M:%S" +} + +load { + format = "%1min" +} + +disk "/" { + format = "%avail" +} + +volume master { + format = "♪: %volume" + format_muted = "♪: muted (%volume)" + device = "default" + mixer = "Master" + mixer_idx = 0 +} diff --git a/.config/oversteer/profiles/f1.ini b/.config/oversteer/profiles/f1.ini new file mode 100644 index 0000000..615a836 --- /dev/null +++ b/.config/oversteer/profiles/f1.ini @@ -0,0 +1,11 @@ +[DEFAULT] +mode = G29 +range = 360 +ff_gain = 100 +autocenter = 0 +combine_pedals = 0 +range_overlay = never +use_buttons = 1 +center_wheel = 1 +start_app_manually = 0 + @@ -0,0 +1,51 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(custom-safe-themes + '("58c996beb973f7e988ee4fd21c367b7a5bbdb0622ddfbbd112672a7b4e3d3b81" default)) + '(package-selected-packages '(elpher moe-theme org visual-fill-column)) + '(custom-enabled-themes '(moe-dark)) + '(initial-buffer-choice t)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) + +;; Setup modes +;;; remember layout +;;(desktop-save-mode 1) +;;; disable menu bar +;;(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) +;;; disable emacs splash screen +(setq inhibit-startup-screen t) +;; Mode hooks +;;; show line numbers +;;; (global-display-line-numbers) ; we can set this if we find we want it for all buffers +(add-hook 'prog-mode-hook (lambda () (display-line-numbers-mode) + (visual-line-mode) + (visual-fill-column-mode))) +(add-hook 'text-mode-hook (lambda () (display-line-numbers-mode) + (visual-line-mode) + (visual-fill-column-mode))) + +;; Idiomdrottning and bad-emacs-defaults fixes +(global-set-key [(control h)] 'delete-backward-char) +(keyboard-translate ?\C-h ?\C-?) +(make-directory "~/.emacs.d/backups/" t) +(make-directory "~/.emacs.d/autosave/" t) +(setq auto-save-file-name-transforms '((".*" "~/.emacs.d/autosave/" t))) +(setq backup-directory-alist '(("." . "~/.emacs.d/backups/"))) +(setq sentence-end-double-space nil) + +;; Custom mode prefixes +;;; set gemini to markdown mode for now +(add-to-list 'auto-mode-alist '("\\.gmi\\'" . markdown-mode)) + +(when (file-exists-p "~/.emacs.d/pc_local_init.el") + (load "~/.emacs.d/pc_local_init.el")) diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..bdb531c --- /dev/null +++ b/.gitconfig @@ -0,0 +1,33 @@ +[alias] +st = status -sb +lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all +sum = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --summary +blg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative +co = checkout +df = diff +cp = cherry-pick +br = branch + +[core] + excludesfile = $HOME/.gitignore + autocrlf = input + +[user] + name = Steph Enders + email = "steph@senders.io" + +[color] + diff = auto + status = auto + grep = auto + interactive = auto + branch = auto + +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true + +[init] + defaultBranch=main
\ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..756b4c9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# vim +*.sw* + +# intellij +.idea +out + +# C +*.out + + @@ -0,0 +1,6 @@ +--dir=~/configs/dotfiles/ +--target=~/ +--ignore=.git +--ignore=README.org +--ignore=LICENSE +--verbose @@ -0,0 +1,62 @@ +set nocompatible " be iMproved, required +filetype off " required +filetype plugin indent on " required + +syntax on + +set number +set tabstop=2 shiftwidth=2 expandtab +set guifont=Monospace:h20 + +au InsertEnter * hi statusline guifg=black guibg=#d7afff ctermfg=black ctermbg=magenta +au InsertLeave * hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan +hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan + +" Status line +" default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%) + +" Status Line Custom +let g:currentmode={ + \ 'n' : 'Normal', + \ 'no' : 'Normal·Operator Pending', + \ 'v' : 'Visual', + \ 'V' : 'V·Line', + \ '^V' : 'V·Block', + \ 's' : 'Select', + \ 'S' : 'S·Line', + \ '^S' : 'S·Block', + \ 'i' : 'Insert', + \ 'R' : 'Replace', + \ 'Rv' : 'V·Replace', + \ 'c' : 'Command', + \ 'cv' : 'Vim Ex', + \ 'ce' : 'Ex', + \ 'r' : 'Prompt', + \ 'rm' : 'More', + \ 'r?' : 'Confirm', + \ '!' : 'Shell', + \ 't' : 'Terminal' + \} + +set laststatus=2 +set noshowmode +set statusline= +set statusline+=%0*\ %n\ " Buffer number +set statusline+=%0*\ %{toupper(g:currentmode[mode()])}\ " The current mode +set statusline+=%3*│ " Separator +set statusline+=%2*\ col:\ %02v\ " Colomn number +set statusline+=%3*│ " Separator +set statusline+=%1*\ ln:\ %02l/%L\ (%3p%%)\ " Line number / total lines, percentage of document +set statusline+=%= " Right Side +set statusline+=%1*\ %<%F%m%r%h%w\ " File path, modified, readonly, helpfile, preview +set statusline+=%3*│ " Separator +set statusline+=%2*\ %Y\ " FileType +set statusline+=%3*│ " Separator + +hi User1 ctermfg=007 ctermbg=239 guibg=#4e4e4e guifg=#adadad +hi User2 ctermfg=007 ctermbg=236 guibg=#303030 guifg=#adadad +hi User3 ctermfg=236 ctermbg=236 guibg=#303030 guifg=#303030 +hi User4 ctermfg=239 ctermbg=239 guibg=#4e4e4e guifg=#4e4e4e + +highlight colorcolumn ctermbg=7 +set scrolloff=999 @@ -0,0 +1,12 @@ +BSD Zero Clause License + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE.
\ No newline at end of file diff --git a/README.org b/README.org new file mode 100644 index 0000000..bf6dafe --- /dev/null +++ b/README.org @@ -0,0 +1,59 @@ +* README + +I have setup these dotfiles to make use of GNU Stow to be installed on any of my machines. + +The .stowrc expects this repository to exist in =~/configs/dotfiles/= if it is not - please ammend as necessary. + +** Installing your dotfiles + +After you clone the repository simply run: + + #+begin_src shell + $ stow . + #+end_src + +This will generate an output of all of the config files as needed! + +*** Removing installations + +If you need to revert anything just use + +#+begin_src shell + $ stow -D . +#+end_src + + +*** .file vs dot-file + +Ideally, I would use dot-file instead, since it makes visibility much easier depending on the editing program. HOWEVER, .config is busted with the =--dotfiles= configuration in =.stowrc= so for now I am using the standard 1:1 syntax. + +We can track that bug on the [[https://github.com/aspiers/stow/issues/33][aspiers/stow github]] page. + +** Local PC Changes + +Ideally, ALL of these dotfiles are suitable per PC. But there are always some PC local changes that are needed. + +Any configuration that REQUIRES PC Local configurations should be extended where possible to contain them - i.e: + +#+begin_src shell + # .bash_profile + if [ -f ~/.pc_local_bash_profile ]; then + source ~/.pc_local_bash_profile + fi +#+end_src + +I don't have a good solution for how to version control these local changes - but ideally anything specific could be moved either into an environment variable, or should be SPECIFIC things that don't really need preservation. + +** Ignore Files + +To ignore files simply amend the =.stowrc= file with an =--ignore=<regex>= . + +** LICENSE + +I threw the 0BSD on here since you could PROBABLY classify some of this as code, and frankly, I don't give a crap about anything that's in here. Use it! This is all cool stuff, and I don't need any attribution, most of this is evolved from interenet examples anyway! + +View [[https://opensource.org/license/0bsd/][Zero Clause BSD License]] site. + + + + |