From 2a4e6c15f35d4fd68317d02466c8310c915f6e76 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Wed, 15 Jul 2020 15:50:56 +0200 Subject: [PATCH] too much to remember --- .bashrc | 7 +- .config/alacritty/sticky-note.yml | 35 ++++++ .config/aliasrc | 3 +- .config/bspwm/bspwmrc | 5 +- .config/environment | 11 ++ .config/git/config | 42 +++---- .config/git/ignore | 3 + .config/picom.conf | 183 ++++++++++++++++++++++++++++++ .config/polybar/bars.ini | 3 +- .config/sxhkd/sxhkdrc | 6 +- .config/vim/vimrc | 4 +- .config/zsh/.zshrc | 6 +- .local/bin/start_jack | 11 +- .local/bin/sticky-note | 4 +- .lynxrc | 1 + .profile | 27 +---- .xprofile | 42 +++++-- 17 files changed, 311 insertions(+), 82 deletions(-) create mode 100644 .config/alacritty/sticky-note.yml create mode 100644 .config/environment create mode 100644 .config/picom.conf create mode 100644 .lynxrc diff --git a/.bashrc b/.bashrc index 0815fc4..f4cfd16 100644 --- a/.bashrc +++ b/.bashrc @@ -1,5 +1,7 @@ # ~/.bashrc: executed by bash(1) for non-login shells. +source $HOME/.config/environment + # If not running interactively, don't do anything [ -z "$PS1" ] && return @@ -18,15 +20,10 @@ shopt -s checkwinsize PS1="$PURPLE\u$nc@$BLUE\H$nc:$GREEN\w$YELLOW"'$(__git_ps1)'"$nc\\n$GREEN\$$nc " -export PATH=/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin - if [ -f /usr/share/git/completion/git-prompt.sh ]; then source /usr/share/git/completion/git-prompt.sh else function __git_ps1() { echo ""; }; fi -# set PATH so it includes user's private bin if it exists -[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH" - [ -f "$HOME/.config/aliasrc" ] && source $HOME/.config/aliasrc diff --git a/.config/alacritty/sticky-note.yml b/.config/alacritty/sticky-note.yml new file mode 100644 index 0000000..00f937f --- /dev/null +++ b/.config/alacritty/sticky-note.yml @@ -0,0 +1,35 @@ +env: + STICKY_NOTE: yes +window: + dimensions: + columns: 15 + lines: 5 + padding: + x: 20 + y: 20 + class: + instance: sticky-note + general: sticky-note + +shell: + program: /bin/zsh + +scrolling: + history: 0 + +font: + normal: + family: Permanent Marker + size: 32 + +colors: + primary: + background: '#ffff88' + foreground: '#222222' + cursor: + text: '#ffff88' + cursor: '#ffff88' + selection: + text: '#ffff88' + background: '#ffff88' + diff --git a/.config/aliasrc b/.config/aliasrc index 3f22170..2c848c0 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -23,8 +23,7 @@ alias ls='ls -Flh --color=never' alias lsblk='lsblk -o +PARTLABEL -o +FSTYPE' -alias magit='vim -c MagitOnly' -alias make='make --no-print-directory' +alias make='make -j5' alias md5='ms5' alias md5sum-dir='function _md5sum-dir(){ find $1 -type f -exec md5sum {} \; | md5sum; }; _md5sum-dir' diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 52730ea..a2c90cd 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -33,8 +33,9 @@ bspc config external_rules_command "$HOME/.config/bspwm/external_rules" bspc rule -a 'firefox' desktop='web' bspc rule -a 'firefox:Toolkit' follow='true' desktop='side-view' state='fullscreen' +bspc rule -a 'MPlayer' follow='true' desktop='side-view' state='fullscreen' bspc rule -a 'TeamSpeak 3' desktop='voip' locked='true' -bspc rule -a 'Alacritty:mail' desktop='voip' locked='true' split_ratio='0.47' +bspc rule -a 'Alacritty:mail' desktop='voip' locked='true' split_ratio='0.40' bspc rule -a 'Riot' desktop='voip' locked='true' bspc rule -a 'discord' desktop='voip' bspc rule -a 'Evolution' desktop='messenger' @@ -42,7 +43,7 @@ bspc rule -a 'Signal' desktop='messenger' locked='true' #bspc rule -a 'Steam' desktop='game' bspc rule -a 'Zathura' state='tiled' bspc rule -a 'Guitarix:guitarix' desktop='messenger' -bspc rule -a 'Alacritty:sticky-note' state=floating sticky=on border=off +bspc rule -a 'sticky-note:sticky-note' state=floating sticky=on border=off $HOME/.config/polybar/launch.sh & $HOME/.config/bspwm/swallow.py & diff --git a/.config/environment b/.config/environment new file mode 100644 index 0000000..e1c256f --- /dev/null +++ b/.config/environment @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +export EDITOR='/usr/bin/vim' +export NOTMUCH_CONFIG="$HOME/.config/notmuch/config" +export MAKEFLAGS="-j$(grep -c ^processor /proc/cpuinfo)" +export MAILCAPS="$HOME/.config/mailcap/mailcaprc" +export PASSWORD_STORE_GENERATED_LENGTH='64' +export VIMINIT="source $HOME/.config/vim/vimrc" +export ZDOTDIR="$HOME/.config/zsh" + +export PATH=/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:$HOME/.local/bin diff --git a/.config/git/config b/.config/git/config index c6e3b70..39d5a53 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,20 +1,20 @@ [user] - email = tobias@msrg.cc - name = Tobias Reisinger - signingkey = 723B78C0BF8D8C721D2C4EEF41E544A54E2533B2 + email = tobias@msrg.cc + name = Tobias Reisinger + signingkey = 723B78C0BF8D8C721D2C4EEF41E544A54E2533B2 [core] - excludesfile = ~/.config/git/ignore - editor = vim - pager = less - autocrlf = input + excludesfile = ~/.config/git/ignore + editor = vim + pager = less + autocrlf = input [help] - autocorrect = 10 + autocorrect = 10 [diff] - tool = vimdiff + tool = vimdiff [difftool] - prompt = false + prompt = false [alias] - dt = difftool + dt = difftool d = diff b = branch -vv logg = log --graph @@ -27,17 +27,17 @@ [mergetool "vim_mergetool"] cmd = vim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE" trustExitCode = true - [credential] - helper = /usr/bin/pass-git-helper -[format] - signOff = yes + helper = /usr/bin/pass-git-helper [sendemail] - smtpserver = mail.serguzim.me - smtpuser = tobias@msrg.cc - smtpencryption = tls - smtpserverport = 587 + smtpserver = mail.serguzim.me + smtpuser = tobias@msrg.cc + smtpencryption = tls + smtpserverport = 587 + annotate = yes [advice] - addIgnoredFile = false + addIgnoredFile = false [pull] - ff = only + ff = only +[push] + followTags = true diff --git a/.config/git/ignore b/.config/git/ignore index a93f6a8..831da8a 100644 --- a/.config/git/ignore +++ b/.config/git/ignore @@ -1,6 +1,9 @@ venv/ +*.pyc .DS_Store *.swp *.swo + +.syntastic_*_config diff --git a/.config/picom.conf b/.config/picom.conf new file mode 100644 index 0000000..3d15cd3 --- /dev/null +++ b/.config/picom.conf @@ -0,0 +1,183 @@ +################################# +# +# Backend +# +################################# + +# Backend to use: "xrender" or "glx". +# GLX backend is typically much faster but depends on a sane driver. +backend = "glx"; + +################################# +# +# Shadows +# +################################# + +# Enabled client-side shadows on windows. +shadow = true; +# The blur radius for shadows. (default 12) +shadow-radius = 5; +# The left offset for shadows. (default -15) +shadow-offset-x = -5; +# The top offset for shadows. (default -15) +shadow-offset-y = -5; +# The translucency for shadows. (default .75) +shadow-opacity = 0.5; + +# Set if you want different colour shadows +# shadow-red = 0.0; +# shadow-green = 0.0; +# shadow-blue = 0.0; + +# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches +# (most applications are fine, only apps that do weird things with xshapes or argb are affected). +# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher. +shadow-exclude = [ + "! name~=''", + "name = 'Notification'", + "name = 'Plank'", + "name = 'Docky'", + "name = 'Kupfer'", + "name = 'xfce4-notifyd'", + "name = 'cpt_frame_window'", + "name *= 'VLC'", + "name *= 'compton'", + "name *= 'picom'", + "name *= 'Chromium'", + "name *= 'Chrome'", + "class_g = 'Firefox' && argb", + "class_g = 'Conky'", + "class_g = 'Kupfer'", + "class_g = 'Synapse'", + "class_g ?= 'Notify-osd'", + "class_g ?= 'Cairo-dock'", + "class_g ?= 'Xfce4-notifyd'", + "class_g ?= 'Xfce4-power-manager'", + "_GTK_FRAME_EXTENTS@:c", + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" +]; +# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners) +shadow-ignore-shaped = false; + +################################# +# +# Opacity +# +################################# + +inactive-opacity = 1; +active-opacity = 1; +frame-opacity = 1; +inactive-opacity-override = false; + +#inactive-dim = 0.2; +#inactive-dim-fixed = true; +blur-background = true; +blur-kern = "7x7box"; +blur-background-fixed = true; +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + +################################# +# +# Fading +# +################################# + +# Fade windows during opacity changes. +fading = true; +# The time between steps in a fade in milliseconds. (default 10). +fade-delta = 3; +# Opacity change between steps while fading in. (default 0.028). +fade-in-step = 0.03; +# Opacity change between steps while fading out. (default 0.03). +fade-out-step = 0.03; +# Fade windows in/out when opening/closing +# no-fading-openclose = true; + +# Specify a list of conditions of windows that should not be faded. +fade-exclude = [ ]; + +################################# +# +# Other +# +################################# + +# Try to detect WM windows and mark them as active. +mark-wmwin-focused = true; +# Mark all non-WM but override-redirect windows active (e.g. menus). +mark-ovredir-focused = true; +# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events. +# Usually more reliable but depends on a EWMH-compliant WM. +use-ewmh-active-win = true; +# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on. +detect-rounded-corners = true; + +# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows. +# This prevents opacity being ignored for some apps. +# For example without this enabled my xfce4-notifyd is 100% opacity no matter what. +detect-client-opacity = true; + +# Specify refresh rate of the screen. +# If not specified or 0, picom will try detecting this with X RandR extension. +refresh-rate = 0; + +# Vertical synchronization: match the refresh rate of the monitor +vsync = true; + +# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. +# Reported to have no effect, though. +dbe = false; + +# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance. +# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +#sw-opti = true; + +# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games. +# Known to cause flickering when redirecting/unredirecting windows. +unredir-if-possible = false; + +# Specify a list of conditions of windows that should always be considered focused. +focus-exclude = [ ]; + +# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time. +detect-transient = true; +# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time. +# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too. +detect-client-leader = true; + +################################# +# +# Window type settings +# +################################# + +wintypes: +{ + tooltip = + { + # fade: Fade the particular type of windows. + fade = true; + # shadow: Give those windows shadow + shadow = false; + # opacity: Default opacity for the type of windows. + opacity = 0.85; + # focus: Whether to always consider windows of this type focused. + focus = true; + }; +}; + +###################### +# +# XSync +# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d +# +###################### + +# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users. +xrender-sync-fence = true; diff --git a/.config/polybar/bars.ini b/.config/polybar/bars.ini index 50fafa5..d683312 100644 --- a/.config/polybar/bars.ini +++ b/.config/polybar/bars.ini @@ -27,7 +27,8 @@ font-2 = Font Awesome 5 Pro Light:size=12 font-3 = Font Awesome 5 Pro Solid:size=12 font-4 = Font Awesome 5 Brands:size=12 - font-5 = PowerlineSymbols:size=12 + font-5 = Font Awesome 5 Duotone Solid:size=12 + font-6 = PowerlineSymbols:size=12 monitor = diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 029cedc..4d8146c 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -18,8 +18,8 @@ super + p super + Escape pkill -USR1 -x sxhkd -super + Print - import /tmp/screenshot.png && xclip -t image/png /tmp/screenshot.png -selection clipboard +super + {_, ctrl +, shift + } Print + suas {sel, win, } super + Pause $HOME/.local/bin/rofi-shutdown @@ -81,7 +81,7 @@ super + {t,shift + t,s,f} bspc node -t {tiled,pseudo_tiled,floating,fullscreen} # set the node flags -super + ctrl + {m,l,period,p} +super + ctrl + {m,comma,period,p} bspc node -g {marked,locked,sticky,private} # diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 6680677..998cab7 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -23,6 +23,8 @@ set encoding=utf-8 set nowrap +autocmd FileType yaml setlocal ai ts=2 sw=2 et cuc nu + runtime ftplugin/man.vim set keywordprg=:Man @@ -47,7 +49,7 @@ call plug#begin('~/.config/vim/plugged') Plug 'sersorrel/vim-lilypond' Plug 'vim-scripts/DoxygenToolkit.vim' Plug 'drmikehenry/vim-headerguard' - Plug 'jreybert/vimagit' + Plug 'cespare/vim-toml' call plug#end() map m :Magit diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 050d93c..8e7b642 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,5 +1,5 @@ [ -f "$HOME/.config/user-dirs.dirs" ] && source $HOME/.config/user-dirs.dirs -source $HOME/.config/enviroment +source $HOME/.config/environment # Enable colors and change prompt: autoload -U colors && colors @@ -15,8 +15,8 @@ PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magent $%b " # History in cache directory: -HISTSIZE=10000 -SAVEHIST=10000 +HISTSIZE=1000000 +SAVEHIST=1000000 HISTFILE=$HOME/.cache/zsh_history # Basic auto/tab complete: diff --git a/.local/bin/start_jack b/.local/bin/start_jack index 0aeefb8..990e959 100755 --- a/.local/bin/start_jack +++ b/.local/bin/start_jack @@ -1,7 +1,8 @@ #!/bin/bash sleep 8 -pulseaudio -k +systemctl --user stop pulseaudio.service +systemctl --user stop pulseaudio.socket sleep 1 jack_control ds alsa @@ -12,13 +13,7 @@ jack_control dps period 128 jack_control start sleep 1 -pulseaudio -D - -sleep 1 -pulseaudio -k - -sleep 1 -pulseaudio -D +systemctl --user start pulseaudio sleep 1 a2jmidid -e & diff --git a/.local/bin/sticky-note b/.local/bin/sticky-note index d0fcb6a..30872f2 100755 --- a/.local/bin/sticky-note +++ b/.local/bin/sticky-note @@ -1,6 +1,6 @@ -#!/bin/bash +#!/usr/bin/sh -CONFIG_FILE="$HOME/.config/alacritty/sticky-notes.yml" +CONFIG_FILE="$HOME/.config/alacritty/sticky-note.yml" STICKY_NOTE_FILE="/tmp/sticky-note" echo "$@" > "$STICKY_NOTE_FILE" diff --git a/.lynxrc b/.lynxrc new file mode 100644 index 0000000..798f04f --- /dev/null +++ b/.lynxrc @@ -0,0 +1 @@ +character_set=UNICODE (UTF-8) diff --git a/.profile b/.profile index 4dbf8fb..56fac91 100644 --- a/.profile +++ b/.profile @@ -1,26 +1 @@ -[ -f "$HOME/.config/user-dirs.dirs" ] && source $HOME/.config/user-dirs.dirs - -export EDITOR='/usr/bin/vim' -export VIMINIT="source $HOME/.config/vim/vimrc" -export NOTMUCH_CONFIG="$HOME/.config/notmuch/config" -export MAILCAPS="$HOME/.config/mailcap/mailcaprc" -export PASSWORD_STORE_GENERATED_LENGTH='64' - -if [ -x "$(command -v gpgconf)" ] -then - export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) - gpgconf --launch gpg-agent -fi - -[ -x "$(command -v jack_control)" ] && ($HOME/.local/bin/start_jack >/tmp/jack.log 2>&1 &) - -if [ -x "$(command -v mopidy)" ] -then - sh -c "sleep 12 && mopidy" & # mopidy needs internet (wait some secs) for spotify -else - [ -x "$(command -v mpd)" ] && (mpd &) -fi - -[ -x "$(command -v ympd)" ] && (ympd --webport 54594 &) - -[ $SHELL = "/bin/bash" ] && source $HOME/.bashrc +source $HOME/.config/environment diff --git a/.xprofile b/.xprofile index 0d0dd98..21871e1 100644 --- a/.xprofile +++ b/.xprofile @@ -1,29 +1,55 @@ [ -f "$HOME/.config/user-dirs.dirs" ] && source $HOME/.config/user-dirs.dirs +source $HOME/.config/enviroment -xcompmgr -c -r0 & - -export ZDOTDIR="$HOME/.config/zsh" +#xcompmgr -c -r0 & +picom & +numlockx on setxkbmap de setxkbmap -option caps:none + +if [ -x "$(command -v gpgconf)" ] +then + export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + gpgconf --launch gpg-agent +fi + _autostart_on_launch() { + dunst & ckb-next -b & - steam-runtime -silent -tcp & - transmission-gtk -m & + parcellite & conky --daemonize --config="$HOME/.config/conky/clock.conf" conky --daemonize --config="$HOME/.config/conky/cpu_ram_storage.conf" feh --bg-fill $XDG_PICTURES_DIR/wallpaper/active_wallpaper sleep 8 + + syncthing -no-browser & + + actkbd -g -c ~/.config/actkbd/actkbd.conf -d /dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd & + + /usr/lib/kdeconnectd & + transmission-gtk -m & + steam-runtime -silent -tcp & env GTK_THEME=Adwaita:light firefox & + + start_jack >/tmp/jack.log 2>&1 + #launch_jack + sleep 1 teamspeak3 & - #evolution & - alacritty --class "mail" -e sh -c "notmuch new && neomutt" & - signal-desktop & + sleep 2 + alacritty --class "mail" -e sh -c "neomutt" & + sleep 1 riot-desktop & + sleep 1 + bspc node "@voip:/first" -f + dg-open "steam://open/friends/" + + mopidy & + ympd --webport 54594 & } _autostart_on_launch &