Browse Source

Move to Manjaro

master
Markus Becker 2 years ago
parent
commit
f7c418ee6d
  1. 338
      bash/bashrc
  2. 10
      bash/profile
  3. 6
      git/gitconfig
  4. 4
      git/gitconfig-ibr
  5. 5
      git/gitconfig-tubs
  6. 431
      i3/i3config
  7. 120
      i3/i3status
  8. 67
      nvim/clang_init.vim
  9. 121
      nvim/init.vim
  10. 71
      nvim/rust_init.vim
  11. 78
      rofi/vim_projects.py
  12. 1
      sage/init.sage
  13. 0
      scripts/gb.patch
  14. 1
      scripts/m.py
  15. 0
      scripts/us.patch

338
bash/bashrc

@ -1,203 +1,153 @@
#!/bin/bash
if [ "$EDITOR" = "" ]; then
export EDITOR="vim"
fi
if [ "$GOPATH" = "" ]; then
export GOPATH="$HOME/.go"
PATH="$GOPATH/bin:$PATH"
fi
if [ "$JAVA_HOME" = "" ]; then
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
fi
if [ "$NOTABLE_DIR" = "" ]; then
export NOTABLE_DIR="$HOME/.notable";
fi
export GITDIR="$HOME/Git"
export RUST_SRC="$GITDIR/github/rust"
export DOTFILES="$GITDIR/cfbrk/dotfiles"
export DEVKITPRO="/opt/devkitpro"
export DEVKITA64="$DEVKITPRO/devkitA64"
PATH="$PATH:$DEVKITA64/bin:$DEVKITPRO/pacman/bin:$DEVKITPRO/tools/bin"
alias bslatex='pdflatex --shell-escape'
alias bslog='git log --pretty=format:"%Cblue%an:%Creset %ai" -n 9'
alias cdba='cd $HOME/Git/ibr/ba-rdma-reptor'
alias cddisni='cd $HOME/Git/ibr/disni-hybster'
alias cdgithub='cd $HOME/Git/github'
alias cdibr='cd $HOME/Git/ibr'
alias cdtrace='cd $HOME/Git/ibr/location-trace'
alias cdpodcast='cd $GOPATH/src/cfbrk.de/mb/podcast'
alias cdreptor='cd $HOME/Git/ibr/rdma-hybster/reptor'
alias cdtubs='cd $HOME/Git/tubs'
alias cdbeagle='cd $HOME/.beaglemount'
alias frankerz='beagle 1'
alias getclip='kitty +kitten clipboard --get-clipboard'
alias icat='kitty +kitten icat'
alias kdiff='kitty +kitten diff'
alias putclip='kitty +kitten clipboard'
alias sshrdma='ssh -p 42200 127.0.0.1'
alias terminal='gnome-terminal'
alias testrss='curl http://localhost:9970/feed.rss'
alias vim='nvim'
alias vimc='nvim $HOME/.config/nvim/init.vim'
alias rvim='nvim -u $HOME/.config/nvim/rust_init.vim'
alias rvimc='rvim $HOME/.config/nvim/rust_init.vim'
alias cvim='nvim -u $HOME/.config/nvim/clang_init.vim'
alias cvimc='cvim $HOME/.config/nvim/clang_init.vim'
alias vimshellrc='nvim $HOME/Documents/Configurations/shellrc'
alias xo='xdg-open'
alias make='make -j $(let x=$(nproc)-1; echo $x)'
alias apt-get='apt-fast'
alias youtube-dl='youtube-dl --external-downloader aria2c'
alias sl='ls'
alias m='$DOTFILES/scripts/m.py'
function seq_team() {
for d in $(seq $1 $2); do printf "team_%03d\n" $d; done
}
function thesismk() {
pdflatex thesis.tex && \
bibtex thesis && \
pdflatex thesis.tex && \
pdflatex thesis.tex && \
xo thesis.pdf;
}
function gifgource() {
if [ $# -ne 1 ]; then
echo "Usage: gifgource <output>"
return
fi
gource -240x240 --stop-at-end --hide date,progress,dirnames,filenames,usernames --seconds-per-day 5 -a 1 -o - \
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - \
-vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "$1"
}
export ACCESSIBLE_BEAGLE="1 2 3 4 5"
function beagle() {
env TERM=xterm ssh -C "mabecker@beagle${1}"
}
complete -W "$ACCESSIBLE_BEAGLE" beagle
function beagledir() {
dir="$HOME/.beaglemount/beagle-other";
if [[ $# -eq 1 ]]; then
dir="$HOME/.beaglemount/beagle-${1}"
fi
echo $dir
}
complete -W "$ACCESSIBLE_BEAGLE" beagledir
function beaglemount() {
if [[ $# -eq 1 ]]; then
dir=$(beagledir "$1")
if [[ -d "$dir" ]]; then
beagleumount "$1"
else
mkdir -p "$dir"
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
# foreground colors
for fgc in {30..37}; do
# background colors
for bgc in {40..47}; do
fgc=${fgc#37} # white
bgc=${bgc#40} # black
vals="${fgc:+$fgc;}${bgc}"
vals=${vals%%;}
seq0="${vals:+\e[${vals}m}"
printf " %-9s" "${seq0:-(default)}"
printf " ${seq0}TEXT\e[m"
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
done
echo; echo
done
}
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
;;
esac
use_color=true
# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS. Try to use the external file
# first to take advantage of user additions. Use internal bash
# globbing instead of external grep binary.
safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
match_lhs=""
[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
[[ -z ${match_lhs} ]] \
&& type -P dircolors >/dev/null \
&& match_lhs=$(dircolors --print-database)
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
if ${use_color} ; then
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
if type -P dircolors >/dev/null ; then
if [[ -f ~/.dir_colors ]] ; then
eval $(dircolors -b ~/.dir_colors)
elif [[ -f /etc/DIR_COLORS ]] ; then
eval $(dircolors -b /etc/DIR_COLORS)
fi
sshfs "mabecker@beagle${1}:/home/mabecker" "$dir"
xo "$dir"
else
echo "Expected exactly 1 argument"
fi
}
complete -W "$ACCESSIBLE_BEAGLE" beaglemount
function beagleumount() {
dir=$(beagledir "$1")
if grep -o "$dir" "/etc/mtab"; then
fusermount -u "$(beagledir $1)"
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
else
echo "$dir: not mounted"
return 1
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
fi
}
complete -W "$ACCESSIBLE_BEAGLE" beagleumount
function ccup() {
cat $1 | curl -s -F content="<-" "https://sh.cfbrk.de/put/$2"
}
function ccdown() {
curl -s "https://sh.cfbrk.de/get/$1"
}
function getpubkeys() {
curl -s "https://cfbrk.de/api/v1/user/keys?access_token=8ba434b5ff1b78eb1f4beb0350512a2c89628f76" | json_pp
}
function hl() {
highlight -O ansi $@
}
function cdwms() {
cd "$GOPATH/src/cfbrk.de/jufo/wms"
}
function cdgocard() {
cd "$GOPATH/src/cfbrk.de/mb/gocard"
}
function bsgitgpg() {
git config user.email "mabecker@ibr.cs.tu-bs.de"
git config user.signingkey "2AE88153F1F7C403774E6FA221DFCB1A101BF596"
}
function notabledoc() {
pandoc -f markdown+tex_math_double_backslash --pdf-engine=xelatex --toc "$1" -V geometry:margin=1in -s -o "$2"
}
function notablebackup() {
(cd $NOTABLE_DIR; git add -A; git commit -m "$(date)"; git push;);
}
function notablewc() {
echo -n "words in notable documents: "
(
cd $NOTABLE_DIR;
find . -name '*.md' -type f | \
xargs -P1 -I '{}' cat '{}' | \
wc -w;
)
}
function br() {
exec bash
}
function pushover() {
if [ $# -lt 2 ]; then
echo "Usage: pushover <title> <message>";
alias ls='ls --color=auto'
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
PS1='\u@\h \W \$ '
else
curl -s \
--form-string "token=$PUSHOVER_API" \
--form-string "user=$PUSHOVER_USER" \
--form-string "message=$2" \
--form-string "title=$1" \
https://api.pushover.net/1/messages.json > /dev/null 2>&1;
PS1='\u@\h \w \$ '
fi
}
function ws1819() {
firefox https://gitlab.ibr.cs.tu-bs.de/ws1819-bs-studs/team_$(printf "%03d" $1)/tree/abgabe_09R_IPC_threads_client > /dev/null 2>&1 &
}
fi
function dpsetup() {
E_HEIGHT=1080
E_WIDTH=1920
I_HEIGHT=1080
I_WIDTH=1920
xrandr --output eDP-1 --mode ${I_WIDTH}x${I_HEIGHT} --pos $((E_WIDTH/2))x$E_HEIGHT \
--output DP-1 --mode ${E_WIDTH}x${E_HEIGHT} --pos 0x0 \
--output DP-2 --mode ${E_WIDTH}x${E_HEIGHT} --pos ${E_WIDTH}x0
}
unset use_color safe_term match_lhs sh
alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias np='nano -w PKGBUILD'
alias more=less
xhost +local:root > /dev/null 2>&1
complete -cf sudo
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control. #65623
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
shopt -s expand_aliases
# export QT_SELECT=4
# Enable history appending instead of overwriting. #139609
shopt -s histappend
#
# # ex - archive extractor
# # usage: ex <file>
ex ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
[ -s "/usr/share/fzf/key-bindings.bash" ] && \. "/usr/share/fzf/key-bindings.bash"
[ -s "/usr/share/fzf/completion.bash" ] && \. "/usr/share/fzf/completion.bash"
alias m='python3 $HOME/Git/mtib.dev/dotfiles/scripts/m.py'
alias s='sage -q'
alias x='xdg-open'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

10
bash/profile

@ -0,0 +1,10 @@
export QT_QPA_PLATFORMTHEME="qt5ct"
export EDITOR=/usr/bin/code
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
# fix "xdg-open fork-bomb" export your preferred browser from here
export BROWSER=/usr/bin/google-chrome-stable
export DOTFILES="/home/mtib/Git/mtib.dev/dotfiles"
export GOPATH="$HOME/.go"
export PATH="$GOPATH/bin:$HOME/.cargo/bin:$HOME/.local/bin:/usr/bin:/usr/local/go/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
source "$HOME/Configurations/keys"

6
git/gitconfig

@ -1,12 +1,16 @@
[user]
name = Markus Becker
email = mtib.becker@gmail.com
signingkey = 5877FF3AF67B73F1B5ADA0B62370494BA4B11FB7
[includeIf "gitdir:~/Git/ibr/"]
path = ~/.gitconfig-ibr
[includeIf "gitdir:~/Git/tubs/"]
path = ~/.gitconfig-tubs
[alias]
ls = ls-files
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
timelog = log --color --pretty=format:'%Cred%h%Creset - %ci %C(bold blue)<%an>%Creset'
[diff]
renameLimit = 3000
[core]
excludesfile = /home/mtib/.gitignore
autocrlf = input

4
git/gitconfig-ibr

@ -1,3 +1,3 @@
[user]
email = mabecker@ibr.cs.tu-bs.de
signingkey = 2AE88153F1F7C403774E6FA221DFCB1A101BF596
email = mabecker@ibr.cs.tu-bs.de

5
git/gitconfig-tubs

@ -1,3 +1,4 @@
[user]
email = markus.becker@tu-bs.de
signingkey = DC8C1E490868CF8F0418D93676E5E615D5573F12
email = markus.becker@tu-braunschweig.de
[core]
sshCommand = "ssh -i ~/.ssh/tubs"

431
i3/i3config

@ -1,69 +1,104 @@
# 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!
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>
# Configure border style <normal|1pixel|pixel xx|none|pixel>
default_border pixel 1
default_floating_border normal
# Hide borders
hide_edge_borders none
# change borders
bindsym $mod+u border none
bindsym $mod+y border pixel 1
bindsym $mod+n border normal
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:FontAwesome, Terminus 8
exec_always feh --bg-scale /home/mtib/.bg
exec_always setxkbmap us euro
# 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
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
font xft:URWGothic-Book 11
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec "rofi -theme 'solarized_alternate' -show combi"
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# start program launcher
bindsym $mod+d exec --no-startup-id dmenu_recency
# launch categorized menu
bindsym $mod+z exec --no-startup-id morc_menu
################################################################################################
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
################################################################################################
#exec --no-startup-id volumeicon
#bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id pa-applet
bindsym $mod+Ctrl+m exec pavucontrol
################################################################################################
# Screen brightness controls
# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'"
# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'"
# Start Applications
bindsym $mod+Ctrl+b exec terminal -e 'bmenu'
bindsym $mod+F2 exec google-chrome-stable
bindsym $mod+F3 exec pcmanfm
# bindsym $mod+F3 exec ranger
bindsym $mod+Shift+F3 exec pcmanfm_pkexec
bindsym $mod+F5 exec terminal -e 'mocp'
bindsym $mod+t exec --no-startup-id pkill compton
bindsym $mod+Ctrl+t exec --no-startup-id compton -b
bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'"
bindsym Print exec --no-startup-id i3-scrot
bindsym $mod+Print --release exec --no-startup-id i3-scrot -w
bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
# focus_follows_mouse no
# 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
# 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
bindsym $mod+Ctrl+Left move workspace to output left
bindsym $mod+Ctrl+Down move workspace to output down
bindsym $mod+Ctrl+Up move workspace to output up
bindsym $mod+Ctrl+Right move workspace to output right
# split in vertical orientation
bindsym $mod+v split v
# split orientation
bindsym $mod+h split h;exec notify-send 'tile horizontally'
bindsym $mod+v split v;exec notify-send 'tile vertically'
bindsym $mod+q split toggle
# enter fullscreen mode for the focused container
bindsym $mod+Shift+f fullscreen toggle
# toggle 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
@ -73,39 +108,24 @@ bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# toggle sticky
bindsym $mod+Shift+s sticky toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# 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"
# Workspace names
# to display names or symbols instead of plain workspace numbers you can use
# something like: set $ws1 1:mail
# set $ws2 2:
set $ws1 1
set $ws2 2
set $ws3 3
set $ws4 4
set $ws5 5
set $ws6 6
set $ws7 7
set $ws8 8
# switch to workspace
bindsym $mod+1 workspace $ws1
@ -116,36 +136,109 @@ bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+Shift+slash exec "python3 ~/Git/cfbrk/dotfiles/rofi/vim_projects.py --no-vim"
bindsym $mod+slash exec "python3 ~/Git/cfbrk/dotfiles/rofi/vim_projects.py"
bindsym $mod+f exec "firefox --browser"
bindsym $mod+n exec "nautilus -w"
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
bindsym $mod+Ctrl+7 move container to workspace $ws7
bindsym $mod+Ctrl+8 move container to workspace $ws8
# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
# Open applications on specific workspaces
# assign [class="Thunderbird"] $ws1
# assign [class="Pale moon"] $ws2
# assign [class="Pcmanfm"] $ws3
# assign [class="Skype"] $ws5
assign [class="Thunderbird"] $ws7
assign [class="Mattermost"] $ws8
assign [class="discord"] $ws8
# Open specific applications in floating mode
for_window [title="alsamixer"] floating enable border pixel 1
for_window [class="calamares"] floating enable border normal
for_window [class="Clipgrab"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [class="fpakman"] floating enable
for_window [class="Galculator"] floating enable border pixel 1
for_window [class="GParted"] floating enable border normal
for_window [title="i3_help"] floating enable sticky enable border normal
for_window [class="Lightdm-settings"] floating enable
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Manjaro-hello"] floating enable
for_window [class="Manjaro Settings Manager"] floating enable border normal
for_window [title="MuseScore: Play Panel"] floating enable
for_window [class="Nitrogen"] floating enable sticky enable border normal
for_window [class="Oblogout"] fullscreen enable
for_window [class="octopi"] floating enable
for_window [title="About Pale Moon"] floating enable
for_window [class="Pamac-manager"] floating enable
for_window [class="Pavucontrol"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="Simple-scan"] floating enable border normal
for_window [class="(?i)System-config-printer.py"] floating enable border normal
for_window [class="Skype"] floating enable border normal
for_window [class="Timeset-gui"] floating enable border normal
for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="Xfburn"] floating enable
for_window [class="Bitwarden"] floating enable
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# 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 -f 'pango:FontAwesome, Terminus 8' -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'"
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'"
# Set shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# resize window (you can also use the mouse for that)
# Resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
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 5 px or 5 ppt
bindsym k resize grow height 5 px or 5 ppt
bindsym l resize shrink height 5 px or 5 ppt
bindsym semicolon resize grow width 5 px or 5 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
@ -153,17 +246,159 @@ mode "resize" {
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
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
# Lock screen
bindsym $mod+9 exec --no-startup-id blurlock
# Autostart applications
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nitrogen --restore; sleep 1; compton -b
#exec --no-startup-id manjaro-hello
exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
exec --no-startup-id clipit
exec --no-startup-id optimus-manager-qt
# exec --no-startup-id blueman-applet
# exec_always --no-startup-id sbxkb
exec --no-startup-id start_conky_maia
# exec --no-startup-id start_conky_green
exec --no-startup-id xautolock -time 60 -locker blurlock
exec --no-startup-id cbatticon
exec_always --no-startup-id ff-theme-util
exec_always --no-startup-id fix_xcursor
# Color palette used for the terminal ( ~/.Xresources file )
# Colors are gathered based on the documentation:
# https://i3wm.org/docs/userguide.html#xresources
# Change the variable name at the place you want to match the color
# of your terminal like this:
# [example]
# If you want your bar to have the same background color as your
# terminal background change the line 362 from:
# background #14191D
# to:
# background $term_background
# Same logic applied to everything else.
set_from_resource $term_background background
set_from_resource $term_foreground foreground
set_from_resource $term_color0 color0
set_from_resource $term_color1 color1
set_from_resource $term_color2 color2
set_from_resource $term_color3 color3
set_from_resource $term_color4 color4
set_from_resource $term_color5 color5
set_from_resource $term_color6 color6
set_from_resource $term_color7 color7
set_from_resource $term_color8 color8
set_from_resource $term_color9 color9
set_from_resource $term_color10 color10
set_from_resource $term_color11 color11
set_from_resource $term_color12 color12
set_from_resource $term_color13 color13
set_from_resource $term_color14 color14
set_from_resource $term_color15 color15
# Start i3bar to display a workspace bar (plus the system information i3status if available)
bar {
mode hide
status_command py3status
i3bar_command i3bar
status_command i3status
position bottom
mode hide
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
# tray_output primary
# tray_output eDP1
bindsym button4 nop
bindsym button5 nop
# font xft:URWGothic-Book 11
strip_workspace_numbers yes
colors {
background #222D31
statusline #F9FAF9
separator #454947
# border backgr. text
focused_workspace #F9FAF9 #16a085 #292F34
active_workspace #595B5B #353836 #FDF6E3
inactive_workspace #595B5B #222D31 #EEE8D5
binding_mode #16a085 #2C2C2C #F9FAF9
urgent_workspace #16a085 #FDF6E3 #E5201D
}
}
# hide/unhide i3status bar
bindsym $mod+m bar mode toggle
# Theme colors
# class border backgr. text indic. child_border
client.focused #556064 #556064 #80FFF9 #FDF6E3
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
client.placeholder #000000 #0c0c0c #ffffff #000000
client.background #2B2C2B
#############################
### settings for i3-gaps: ###
#############################
# Set inner/outer gaps
gaps inner 14
gaps outer -2
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
# gaps inner|outer current|all set|plus|minus <px>
# gaps inner all set 10
# gaps outer all plus 5
# Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}

120
i3/i3status

@ -1,56 +1,76 @@
# 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
nagbar_font = 'pango:FontAwesome, Terminus 8'
interval = 5
color_good = "#2AA198"
color_bad = "#586E75"
color_degraded = "#DC322F"
}
# order += "ipv6"
order += "cpu_usage"
order += "disk /"
# order += "disk /home"
order += "wireless _first_"
order += "ethernet _first_"
order += "battery all"
# order += "load"
order += "memory"
order += "tztime local"
cpu_usage {
format = " cpu %usage "
}
load {
format = " load %1min "
# max_threshold = 0.3
}
disk "/" {
# format = " hdd %avail "
format = " ⛁ %avail "
}
ethernet _first_ {
# if you use %speed, i3status requires root privileges
format_up = " lan: %ip %speed "
format_down = " no lan "
}
battery all {
# format = "%status %percentage %remaining %emptytime"
format = " %status %percentage"
format_down = "No battery"
last_full_capacity = true
integer_battery_capacity = true
# status_chr = ""
status_chr = "⚡"
# status_bat = "bat"
# status_bat = "☉"
status_bat = ""
# status_unk = "?"
status_unk = ""
# status_full = ""
status_full = "☻"
low_threshold = 15
threshold_type = time
}
memory {
format = "%used | %available"
threshold_degraded = "1G"
format_degraded = "MEMORY < %available"
}
order += "whoami"
order += "xrandr"
order += "spotify"
order += "pomodoro"
order += "keyboard_locks"
order += "frame connectivity"
order += "backlight"
order += "volume_status"
order += "battery_level"
order += "clock"
order += "static_string i3lock"
clock {
format_time = "%Y-%m-%d %H:%M:%S"
}
keyboard_locks {
format = '[\?if=caps_lock&color=good CAPS|\?color=bad CAPS]'
}
backlight {
format = ' {level}%'
}
frame connectivity {
format_separator = ' '
bluetooth {
format = '[ [{format_device}]]'
}
online_status {
icon_off = ''
icon_on = ''
cache_timeout = 10
timeout = 20
}
}
pomodoro {
format = "{bar}"
format_active = "{format}"
format_stopped = "{format}"
}
keyboard_layout {
cache_timeout = 1
format = "{layout}"
color = "#FFFFFF"
}
spotify {
format_down = ""
}
static_string i3lock {
format = ''
on_click 1 = "exec --no-startup-id i3lock -d -I 5 -i ~/.bg"
tztime local {
# format = "%Y-%m-%d %H:%M:%S"
format = " %d.%m. %H:%M "
}

67
nvim/clang_init.vim

@ -1,67 +0,0 @@
call plug#begin('~/.local/share/nvim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'xuyuanp/nerdtree-git-plugin'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
"Plug 'tweekmonster/deoplete-clang2'
Plug 'zchee/deoplete-clang'
Plug 'yggdroot/indentline'
Plug 'majutsushi/tagbar'
Plug 'neomake/neomake'
Plug 'milkypostman/vim-togglelist'
Plug 'tomtom/tcomment_vim'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'junegunn/gv.vim'
call plug#end()
let mapleader = ","
set linebreak
set showmatch
set hlsearch
set smartcase
set ignorecase
set autoindent
set shiftwidth=4
set smartindent
set smarttab
set softtabstop=4
set tabstop=4
set undolevels=500
set backspace=indent,eol,start
set autoread
set mouse=a
set title
set hidden
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#clang#clang_complete_database = '.'
let g:deoplete#sources#clang#libclang_path = '/usr/lib/llvm-8/lib/libclang.so'
let g:deoplete#sources#clang#clang_header = '/usr/lib/llvm-8/lib/clang'
"call neomake#configure#automake('w')
noremap <F1> :Neomake<CR>
noremap <F2> :make
noremap <F3> :terminal<CR>i
noremap <F7> :GFiles --cached<CR>
noremap <F8> :NERDTreeToggle<CR>
noremap <F9> :TagbarToggle<CR>
nnoremap <Left> <<
vnoremap <Left> <gv
nnoremap <Right> >>
vnoremap <Right> >gv
nnoremap <Up> [e
vnoremap <Up> [egv
nnoremap <Down> ]e
vnoremap <Down> [egv
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
noremap // :nohlsearch<CR>:pclose<CR>
abbr widht width
abbr heigth height

121
nvim/init.vim

@ -1,121 +0,0 @@
call plug#begin('~/.local/share/nvim/plugged')
" Text/Formatting
Plug 'godlygeek/tabular'
Plug 'junegunn/vim-easy-align'
" Language Support
Plug 'mattn/emmet-vim'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'rust-lang/rust.vim'
Plug 'artur-shaik/vim-javacomplete2'
Plug 'davidhalter/jedi-vim'
" Autocompletion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'sebastianmarkow/deoplete-rust'
" File/Folders/Search
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'scrooloose/nerdtree'
Plug 'majutsushi/tagbar'
" Visual
Plug 'yggdroot/indentline'
Plug 'itchyny/lightline.vim'
" Git
Plug 'tpope/vim-fugitive'
Plug 'junegunn/gv.vim'
Plug 'xuyuanp/nerdtree-git-plugin'
Plug 'milkypostman/vim-togglelist'
Plug 'tomtom/tcomment_vim'
Plug 'airblade/vim-gitgutter'
call plug#end()
set hidden
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#clang#libclang_path = "/usr/lib/llvm-8/lib/libclang.so""
let g:deoplete#sources#clang#clang_header = "/usr/include/clang/8/include/"
let g:racer_experimental_completer = 1
let g:racer_insert_paren = 1
let g:deoplete#sources#rust#racer_binary='/home/mtib/.cargo/bin/racer'
let g:deoplete#sources#rust#rust_source_path='/home/mtib/Git/github/rust/src'
let g:rustfmt_autosave = 1
let g:go_fmt_command = "goimports"
let g:go_version_warning = 0
autocmd FileType java setlocal omnifunc=javacomplete#Complete
set linebreak
set showmatch
set hlsearch
set smartcase
set ignorecase
set autoindent
set shiftwidth=4
set smartindent
set smarttab
set softtabstop=4
set tabstop=4
set undolevels=500
set backspace=indent,eol,start
set autoread
set mouse=a
set laststatus=2
set title
augroup Markdown
autocmd!
au Filetype markdown let g:indentLine_setConceal=0
au FileType markdown let g:indentLine_enabled=0
augroup end
augroup GoHTML
autocmd!
au BufReadPre,FileReadPre *.gohtml set ft=html
augroup end
augroup GoRSS
autocmd!
au BufReadPre,FileReadPre *.gorss set ft=rss
augroup end
augroup HTML
autocmd!
au Filetype html set sw=2
augroup end
augroup YAML
autocmd!
au Filetype yaml set sw=2
augroup end
noremap <F7> :FZF<CR>
noremap <F8> :NERDTreeToggle<CR>
noremap <F9> :TagbarToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
noremap // :nohlsearch<CR>:pclose<CR>
abbr widht width
abbr heigth height
nnoremap <Left> <<
vnoremap <Left> <gv
nnoremap <Right> >>
vnoremap <Right> >gv
nnoremap <Up> [e
vnoremap <Up> [egv
nnoremap <Down> ]e
vnoremap <Down> [egv
set conceallevel=0

71
nvim/rust_init.vim

@ -1,71 +0,0 @@
call plug#begin('~/.local/share/nvim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'xuyuanp/nerdtree-git-plugin'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'rust-lang/rust.vim'
"Plug 'racer-rust/vim-racer'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'sebastianmarkow/deoplete-rust'
Plug 'yggdroot/indentline'
Plug 'majutsushi/tagbar'
Plug 'neomake/neomake'
Plug 'milkypostman/vim-togglelist'
Plug 'tomtom/tcomment_vim'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'junegunn/gv.vim'
call plug#end()
let mapleader = ","
set linebreak
set showmatch
set hlsearch
set smartcase
set ignorecase
set autoindent
set shiftwidth=4
set smartindent
set smarttab
set softtabstop=4
set tabstop=4
set undolevels=500
set backspace=indent,eol,start
set autoread
set mouse=a
set title
set hidden
let g:deoplete#enable_at_startup = 1
let g:racer_experimental_completer = 1
let g:racer_insert_paren = 1
let g:deoplete#sources#rust#racer_binary='/home/mtib/.cargo/bin/racer'
let g:deoplete#sources#rust#rust_source_path='/home/mtib/Git/github/rust/src'
let g:rustfmt_autosave = 1
call neomake#configure#automake('w')
noremap <F1> :Cargo check<CR>
noremap <F2> :Cargo test<CR>
noremap <F3> :Cargo run<CR>
noremap <F4> :terminal<CR>i
noremap <F7> :GFiles --cached<CR>
noremap <F8> :NERDTreeToggle<CR>
noremap <F9> :TagbarToggle<CR>
nnoremap <Left> <<
vnoremap <Left> <gv
nnoremap <Right> >>
vnoremap <Right> >gv
nnoremap <Up> [e
vnoremap <Up> [egv
nnoremap <Down> ]e
vnoremap <Down> [egv
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
noremap // :nohlsearch<CR>:pclose<CR>
abbr widht width
abbr heigth height

78
rofi/vim_projects.py

@ -1,78 +0,0 @@
#!/usr/bin/env python3
import os
import shlex
import subprocess
root = f"{os.getenv('HOME')}/Git"
gosrc = f"{os.getenv('HOME')}/.go/src"
workspace_folders = [
f"{root}/ibr",
f"{root}/cfbrk",
f"{root}/github",
f"{root}/tubs",
f"{gosrc}/cfbrk.de/jufo",
f"{gosrc}/cfbrk.de/mb",
f"{gosrc}/cfbrk.de/mtib",
]
def dmenu(options, prompt):
cmd = os.popen(f"echo \"{'|'.join(options)}\" | rofi -theme 'solarized_alternate' -sep '|' -dmenu -p {prompt}")
sel = cmd.read().strip()
return sel if sel in options else None
def get_vim_config(cfg="init.vim"):
return os.path.join(os.getenv('HOME'), '.config/nvim', cfg)
def vim(dpath, exe="nvim", cfg=get_vim_config(), term="/usr/bin/gnome-terminal"):
cmd = shlex.split(f"{term} --working-directory={dpath} -- {exe} -u {cfg}")
subprocess.Popen(cmd)
def terminal(dpath, exe="/usr/bin/gnome-terminal"):
cmd = shlex.split(f"{exe} --working-directory={dpath} -- bash --login")
subprocess.Popen(cmd)
def get_projects(workspace_folders):
projects = []
for ws in workspace_folders:
try:
for d in os.scandir(ws):
if d.is_dir():
projects.append(d.path)
except:
pass # dir doesn't exist
return projects
def is_rust(dpath):
return "Cargo.toml" in os.listdir(dpath)
def is_c(dpath):
ld = os.listdir(dpath)
marker_files = ["Makefile", "CMakeLists.txt"]
for m in marker_files:
if m in ld:
return True
return False
def main():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--no-vim', action='store_true', dest='novim')
args = parser.parse_args()
projects = get_projects(workspace_folders)
select = dmenu(projects, prompt="bash" if args.novim else "vim")
if select:
if args.novim:
terminal(select)
elif is_rust(select):
vim(select, cfg=get_vim_config('rust_init.vim'))
elif is_c(select):
vim(select, cfg=get_vim_config('clang_init.vim'))
else:
vim(select)
if __name__ == '__main__':
main()

1
sage/init.sage

@ -0,0 +1 @@
%colors linux

0
scripts/gb.patch

1
scripts/m.py

@ -5,6 +5,7 @@ import rlcompleter
# Directly import all the math functions
from math import *
import numpy as np
print("Interactive Python 3 with 'from math import *'")

0
scripts/us.patch

Loading…
Cancel
Save