Commit 1e9bdd42 authored by Benedikt Vollmerhaus's avatar Benedikt Vollmerhaus

Update dotfiles and refactor post-install scripts

parent 1664b7a8
[submodule "dotbot"]
path = dotbot
url = https://github.com/anishathalye/dotbot
ignore = dirty
[submodule "scripts"]
path = scripts
url = https://gitlab.com/BVollmerhaus/scripts.git
This diff is collapsed.
......@@ -3,7 +3,7 @@
# / _` | || | ' \(_-< _| '_/ _|
# \__,_|\_,_|_||_/__/\__|_| \__|
#
# Author: Benedikt Vollmerhaus
# Author: Benedikt Vollmerhaus <[email protected]>
# License: MIT
#
# https://github.com/dunst-project/dunst/blob/master/dunstrc
......@@ -15,31 +15,17 @@
# |__/|_)|_)|_(_|\/
# | /
# Monitor to display notifications on
monitor = 0
# Display notifications on focused monitor:
# * mouse: follow mouse pointer
# * keyboard: follow window with keyboard focus
# * none: don't follow and display on set monitor
follow = keyboard
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
#
# The height is measured in number of notifications, everything
# else in pixels. If the width is omitted but a height is given,
# the message window expands over the whole screen. If the width
# is 0, the window expands to the longest message displayed.
#
# A positive x is measured from the left, a negative from the right
# of the screen. y is measured from the top and bottom respectively.
# Size and position of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
#
# The width can be negative. In this case the actual width is the
# screen width minus the width defined within the geometry option.
# The height is measured in no. of notifications, everything else
# in pixels. If the width is omitted but the height is given, the
# message window expands over the whole screen. If the width is 0,
# it expands to the longest message displayed.
geometry = "320x5-30+58"
# Show how many messages are currently hidden (because of geometry)
indicate_hidden = yes
......@@ -48,7 +34,7 @@ indicate_hidden = yes
# /--\|_)|_)(/_(_|| (_|| |(_(/_
# | |
# Vertical padding (between text and separator)
# Vertical padding between text and separator
padding = 10
horizontal_padding = 14
......@@ -56,14 +42,7 @@ horizontal_padding = 14
frame_width = 2
frame_color = "#141414"
# Height of the separating line between notifications
separator_height = 2
# Color of the separating line:
# * auto: try to find a color fitting to the background
# * foreground: use the same color as the foreground
# * frame: use the same color as the frame
# * anything else will be interpreted as an X color
separator_color = frame
......@@ -72,12 +51,12 @@ separator_color = frame
# \__(_)| | | (/_| | |
#
font = mplus Nerd Font 11
font = M+ 1m 11
markup = full
format = "<b>%s</b>\n%b"
# Split text into multiple lines if it doesn't fit into the geometry
# Split text into multiple lines if it doesn't fit the window width
word_wrap = yes
......@@ -86,7 +65,7 @@ word_wrap = yes
# |__)(/_| |(_|\/|(_)|
#
# Sort messages by urgency
# Sort notifications by urgency
sort = yes
# Seconds with no mouse or keyboard input after which to consider the
......@@ -96,15 +75,12 @@ idle_threshold = 90
# Seconds after which to display a notification's age (-1 to disable)
show_age_threshold = 60
# Merge multiple notifications with the same content
stack_duplicates = true
# Hide the count of merged notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A)
show_indicators = yes
stack_duplicates = true
hide_duplicate_count = false
#
# | _ _ _ _
......@@ -112,14 +88,7 @@ show_indicators = yes
#
icon_path = /usr/share/icons/Papirus-Dark/22x22/status/:/usr/share/icons/Papirus-Dark/22x22/devices/:/usr/share/icons/Papirus-Dark/22x22/panel/
# Alignment of icons:
# * left
# * right
# * off
icon_position = right
# Size to scale larger icons down to (0 to disable)
max_icon_size = 22
......@@ -128,29 +97,14 @@ max_icon_size = 22
# | ||_) | (_)| \/
# /
# Whether notifications retrieved from history should
# be sticky or time out as if they would normally do
# Whether notifications recalled from history should be sticky
# (persist until closed) or time out as they would normally do
sticky_history = false
# Maximum amount of notifications kept in history
# Maximum number of notifications kept in history
history_length = 10
#
# /\ _| _ _ _ _ _|
# /--\(_|\/(_|| |(_(/_(_|
#
# Program for displaying the context menu
dmenu = /usr/bin/rofi -dmenu -p dunst
# Browser for opening URLs in the context menu
browser = /usr/bin/firefox -new-tab
# Display a notification on startup
startup_notification = true
#
# | | _ _ _ _ _
# |_|| (_|(/_| |(_\/
......@@ -174,25 +128,40 @@ timeout = 0
icon = dialog-error
#
# /\ _| _ _ _ _ _|
# /--\(_|\/(_|| |(_(/_(_|
#
startup_notification = true
# Program for displaying the context menu
dmenu = /usr/bin/rofi -dmenu -p dunst
# Browser for opening URLs in the context menu
browser = /usr/bin/firefox -new-tab
# __
# |_/ _ |__). _ _|. _ _ _
# | \(/_\/ |__)|| |(_||| |(_|_)
# / _|
#
# Shortcuts are specified as [modifier+][modifier+]...+key
# Available modifiers are:
# * ctrl
# * mod1 (alt)
# * mod2
# * mod3
# * mod4 (super)
# Shortcuts are specified as [modifier+][modifier+]...key
#
# Available modifiers:
# * ctrl
# * mod1 (alt)
# * mod2
# * mod3
# * mod4 (super)
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
# Redisplay last message(s)
history = ctrl+dead_circumflex
# Redisplay the last notification in history
history = ctrl+grave
# Context menu for selecting URLs and actions
context = ctrl+shift+period
......
# Abbreviations for working with Git.
#
# Author: Benedikt Vollmerhaus
# Author: Benedikt Vollmerhaus <[email protected]>
# License: MIT
if status --is-interactive
......
function docker_bash -d "Open a Bash in the given Docker container (by ID)"
docker exec -t -i $argv /bin/bash
end
# Author: Benedikt Vollmerhaus
# ___ _ _
# | __(_)__| |_
# | _|| (_-< ' \
# |_| |_/__/_||_|
#
# Author: Benedikt Vollmerhaus <[email protected]>
# License: MIT
# Add local pip package directory to path
set -gx PATH ~/.local/bin $PATH
# Add local Ruby gems directory to path
set -gx PATH ~/.gem/ruby/2.6.0/bin $PATH
# Add local package directories to PATH
set -gx PATH ~/.local/bin $PATH # pip
set -gx PATH ~/.gem/ruby/2.7.0/bin $PATH # RubyGems
bind \ec 'commandline -f repaint'
function fish_right_prompt
if functions -q _fish_some_chars_prompt
_fish_some_chars_prompt
end
end
function bootstrap_fisher
if not ping -c 1 -W 1 github.com >/dev/null 2>&1
printf "%sNo connectivity%s - skipping Fisher installation.\n" \
(set_color -o yellow) (set_color normal)
return 1
end
if not functions -q fisher
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
if not functions -q fisher
bootstrap_fisher
end
~/dotfiles/config/fish-custom
gitlab.com/BVollmerhaus/fish-extras
gitlab.com/BVollmerhaus/fish-some-chars
laughedelic/pisces
......@@ -3,12 +3,11 @@
# | ||_ \ |_ _| \__ \ V V / _` | || |
# |_|___/ |_| |___/\_/\_/\__,_|\_, |
# |__/
# Author: Benedikt Vollmerhaus
#
# Author: Benedikt Vollmerhaus <[email protected]>
# License: MIT
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# i3 config file (v4)
set $mod Mod4
......@@ -18,12 +17,10 @@ set $up_key Up
set $right_key Right
set $window_border 2
set $scratchpad_border 4
set $scratchpad_size 960 540
# No. of pixels to grow/shrink the gaps with each keypress
# No. of pixels by which to resize the gaps per keypress
set $gaps_resize 4
# Percentage to raise/lower the volume with each keypress
# Percent by which to raise/lower the volume per keypress
set $volume_change 5
......@@ -34,45 +31,18 @@ set $volume_change 5
set $browser firefox
set $launcher rofi -show drun
set $locker i3lock-next
set $locker --no-startup-id betterlockscreen -l dimblur
set $screenshot xfce4-screenshooter
# Changing the terminal emulator may also require adjusting the exec commands
# in the "Scratchpads" section near the end of this config, as the scratchpad
# terminals have to be launched with specific instance names. With URxvt this
# is done using '-name', but other terminals may require a different argument.
set $term urxvt
# __
# |__ _ _|_ _
# |(_)| | | _)
#
font pango:mplus Nerd Font Medium 11
# Add a space in front of the window title
for_window [class="^.*"] title_format " %title"
set $term kitty
# __
# / _ _ _ _
# \__)(_||_)_)
# |
# ___
# | |_ _ _ _ . _ _
# | | |(/_| | ||| |(_|
# _|
gaps inner 15
gaps outer 5
smart_gaps on
smart_borders on
for_window [class="^.*"] border pixel $window_border
# __
# / _ | _ _ _
# \__(_)|_(_)| _)
#
font pango:M+ 1m Medium 11
for_window [class=".*"] title_format " %title"
set_from_resource $bg color0 #0a0a0a
set_from_resource $fg color7 #c8c8c8
......@@ -90,6 +60,18 @@ client.placeholder $bg $bg $fg $color4 $bg
client.background $bg
# __
# / _ _ _ _
# \__)(_||_)_)
# |
gaps inner 12
smart_gaps on
smart_borders on
for_window [class="^.*"] border pixel $window_border
#
# \ / _ _| _ _ _ _ _ _
# \/\/ (_)| |<_)|_)(_|(_(/__)
......@@ -98,8 +80,8 @@ client.background $bg
set $ws_web 1:一
set $ws_term 2:二
set $ws_dev 3:三
set $ws_tex 4:四
set $ws_chat 5:五
set $ws_chat 4:四
set $ws_tex 5:五
set $ws_games 6:六
set $ws7 7:七
set $ws8 8:八
......@@ -110,16 +92,23 @@ set $ws_music 10:〇
for_window [workspace=$ws_dev] layout tabbed
for_window [workspace=$ws_chat] layout tabbed
# IDEs
# Firefox
for_window [class="(?i)firefox" window_role="^(?!About$)" window_type="normal"] \
move to workspace $ws_web, focus
for_window [class="(?i)firefox" window_role="About"] floating enable
# Hide border on Firefox popups (e.g. "Extension has been added")
for_window [class="(?i)firefox" window_role="Popup"] border none
# JetBrains IDEs
assign [class="jetbrains-(?!toolbox).+" window_type="normal"] $ws_dev
assign [class="jetbrains-(?!toolbox).+" title="^ $"] $ws_dev
assign [class="NetBeans"] $ws_dev
# JetBrains Toolbox
for_window [class="jetbrains-toolbox"] floating enable, border pixel 1
# JetBrains Splash/Customize Screens
for_window [class="jetbrains-.+" title="^(win0|Customize .+)$"] \
move to workspace $ws_dev, floating enable, border pixel 1
# Communication
assign [class="Evolution|Riot|Wire"] $ws_chat
for_window [class="Firefox" window_type="normal"] move to workspace $ws_web; workspace $ws_web
for_window [class="TeXstudio" window_type="normal"] move to workspace $ws_tex; workspace $ws_tex
assign [class="Evolution|Thunderbird|Riot|TelegramDesktop"] $ws_chat
# __
......@@ -130,7 +119,7 @@ for_window [class="TeXstudio" window_type="normal"] move to workspace $ws_tex; w
focus_follows_mouse no
# Reload the configuration file
bindsym $mod+Shift+c reload
bindsym $mod+Shift+c reload; exec notify-send "Reloaded i3 config."
# Restart i3 in-place (preserves layout/session)
bindsym $mod+Shift+r restart
......@@ -144,10 +133,10 @@ bindsym $mod+Return exec $term
### Window Actions ###
# Toggle fullscreen mode for focused window
# Toggle fullscreen mode for focused container
bindsym $mod+f fullscreen toggle
# Kill focused window (except if it's a scratchpad application)
bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!term|math).*$"] kill
# Kill focused window
bindsym $mod+Shift+q kill
### Containers ###
......@@ -184,11 +173,11 @@ bindsym $mod+c focus child
### Floating Windows ###
# Key to hold when dragging floating windows
# Key to hold for dragging floating containers
floating_modifier $mod
# Toggle focus between tiling/floating windows
# Toggle focus between tiling/floating containers
bindsym $mod+space focus mode_toggle
# Toggle tiling/floating mode for focused window
# Toggle tiling/floating mode for focused container
bindsym $mod+Shift+space floating toggle
### Workspaces ###
......@@ -199,8 +188,8 @@ bindsym $mod+Tab workspace back_and_forth
bindsym $mod+1 workspace $ws_web
bindsym $mod+2 workspace $ws_term
bindsym $mod+3 workspace $ws_dev
bindsym $mod+4 workspace $ws_tex
bindsym $mod+5 workspace $ws_chat
bindsym $mod+4 workspace $ws_chat
bindsym $mod+5 workspace $ws_tex
bindsym $mod+6 workspace $ws_games
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
......@@ -208,16 +197,16 @@ bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws_music
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws_web
bindsym $mod+Shift+2 move container to workspace $ws_term
bindsym $mod+Shift+3 move container to workspace $ws_dev
bindsym $mod+Shift+4 move container to workspace $ws_tex
bindsym $mod+Shift+5 move container to workspace $ws_chat
bindsym $mod+Shift+6 move container to workspace $ws_games
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 $ws_music
bindsym $mod+Shift+1 move to workspace $ws_web
bindsym $mod+Shift+2 move to workspace $ws_term
bindsym $mod+Shift+3 move to workspace $ws_dev
bindsym $mod+Shift+4 move to workspace $ws_chat
bindsym $mod+Shift+5 move to workspace $ws_tex
bindsym $mod+Shift+6 move to workspace $ws_games
bindsym $mod+Shift+7 move to workspace $ws7
bindsym $mod+Shift+8 move to workspace $ws8
bindsym $mod+Shift+9 move to workspace $ws9
bindsym $mod+Shift+0 move to workspace $ws_music
# Move workspace between outputs
bindsym $mod+Ctrl+$left_key move workspace to output left
......@@ -233,13 +222,13 @@ bindsym $mod+Ctrl+$right_key move workspace to output right
# Volume
set $sink $(pacmd list-sinks | awk '/\* index:/ { print $3 }')
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume $sink +$volume_change%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume $sink -$volume_change%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute $sink toggle
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $sink +$volume_change%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $sink -$volume_change%
bindsym XF86AudioMute exec pactl set-sink-mute $sink toggle
# Microphone
set $source $(pacmd list-sources | awk '/\* index:/ { print $3 }')
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute $source toggle
bindsym XF86AudioMicMute exec pactl set-source-mute $source toggle
# MPRIS Player Controls
bindsym XF86AudioPlay exec playerctl play-pause
......@@ -261,10 +250,10 @@ bindsym XF86ScreenSaver exec $locker
set $mode_resize " Resize"
mode $mode_resize {
bindsym $left_key resize shrink width 5 px or 5 ppt
bindsym $down_key resize grow height 5 px or 5 ppt
bindsym $up_key resize shrink height 5 px or 5 ppt
bindsym $right_key resize grow width 5 px or 5 ppt
bindsym $left_key resize shrink width 5 px or 2 ppt
bindsym $down_key resize grow height 5 px or 2 ppt
bindsym $up_key resize shrink height 5 px or 2 ppt
bindsym $right_key resize grow width 5 px or 2 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
......@@ -300,37 +289,20 @@ bindsym $mod+g mode $mode_gaps
bindsym $mod+Shift+x mode $mode_power
# __
# (_ _ _ _ _|_ _|_ _ _ _| _
# __)(_| (_| | (_| ||_)(_|(_|_)
# |
bindsym $mod+t [instance="^term$"] scratchpad show; [instance="^term$"] move position center
bindsym $mod+m [instance="^math$"] scratchpad show; [instance="^math$"] move position center
for_window [instance="^term$|^math$"] floating enable
for_window [instance="^term$|^math$"] resize set $scratchpad_size
for_window [instance="^term$|^math$"] border pixel $scratchpad_border
for_window [instance="^term$|^math$"] move scratchpad
exec --no-startup-id $term -name term
exec --no-startup-id $term -name math -e R -q
#
# /\ _|_ _ __|_ _ __|_
# /--\|_| | (_)_) | (_|| |
#
exec_always --no-startup-id compton --config ~/.config/compton/compton.conf -b
exec_always --no-startup-id picom -b
# Launch Polybar after Pywal has finished restoring the color scheme
# Launch Polybar after Pywal has restored the color scheme
exec_always --no-startup-id wal -R -o $HOME/.config/polybar/launch_polybar
# Custom Scripts
exec --no-startup-id $HOME/.config/i3/auto_clear_urgency.py -s 10
exec --no-startup-id $HOME/.config/i3/battery_notifier.py
exec --no-startup-id $HOME/.config/i3/brightness_notifier.py
# Custom Scripts (https://gitlab.com/BVollmerhaus/scripts)
exec --no-startup-id $HOME/.config/i3/battery_notify.py
exec --no-startup-id $HOME/.config/i3/brightness_notify.py
exec --no-startup-id $HOME/.config/i3/urgency_timeout.py
# Tray Applets
exec --no-startup-id nm-applet
......
......@@ -3,7 +3,7 @@
# | / / _` | / / '_/ _|
# |_\_\__,_|_\_\_| \__|
#
# Author: Benedikt Vollmerhaus
# Author: Benedikt Vollmerhaus <[email protected]>
# License: MIT
# Display line numbers
......@@ -12,7 +12,7 @@ add-highlighter global/ number-lines -separator ' '
add-highlighter global/ show-matching
hook global BufCreate .* %{
# Parse Vim-style modelines (e.g. "vim:filetype=ini")
# Parse Vim-style modelines (e.g. "vim:filetype=dosini")
modeline-parse
# Enable EditorConfig support (https://editorconfig.org/)
editorconfig-load
......
# ___ _
# / __|___ _ __ _ __| |_ ___ _ _
# | (__/ _ \ ' \| '_ \ _/ _ \ ' \
# \___\___/_|_|_| .__/\__\___/_||_|
# |_|
# _
# _ __(_)__ ___ _ __
# | '_ \ / _/ _ \ ' \
# | .__/_\__\___/_|_|_|
# |_|
#
# (to be used with yshui's maintenance fork)
#
# Author: Benedikt Vollmerhaus
# Author: Benedikt Vollmerhaus <[email protected]>
# License: MIT
#
# https://github.com/yshui/compton
# https://github.com/chjj/compton/wiki/perf-guide
# yshui's compton fork: https://github.com/yshui/picom
# __
# / _ | \_/
......@@ -20,15 +17,11 @@
backend = "glx";
vsync = true;
# Avoid using stencil buffer, usually increases performance
# Avoid using stencil buffer, may increase performance
glx-no-stencil = true;
# Avoid rebinding pixmap on window damage, probably improves
# performance on windows with rapidly changing content
glx-no-rebind-pixmap = true;
# Unredirect all windows if an opaque fullscreen window is opened,
# maximizes performance for fullscreen applications such as games
# Unredirect all windows if an opaque fullscreen window is opened
# to maximize performance for fullscreen applications (e.g. games)
unredir-if-possible = true;
......@@ -37,22 +30,18 @@ unredir-if-possible = true;
# __)| |(_|(_|(_)\|/_)
#
# Enable client-side shadows on windows
shadow = true;
shadow-opacity = 0.6;
# Blur radius for shadows, in pixels
# Blur radius for shadows in pixels
shadow-radius = 5;
# Left offset for shadows, in pixels
# Left offset for shadows in pixels
shadow-offset-x = -5;
# Top offset for shadows, in pixels
# Top offset for shadows in pixels
shadow-offset-y = -5;
shadow-exclude = [
# Disable shadows on unnamed windows, such as i3's title bars
"! name ~= ''",
"name = 'Dunst'",
# Disable broken shadows on Firefox dropdowns
"class_g = 'Firefox' && argb"
];
......@@ -67,8 +56,6 @@ shadow-exclude = [
# Opacity of unfocused windows
inactive-opacity = 0.96;
# Let inactive opacity override a window's _NET_WM_OPACITY value
inactive-opacity-override = false;
# __
......@@ -96,12 +83,12 @@ blur-background-exclude = [
fading = true;
# Time between steps in a fade animation, in milliseconds
# Time between transition steps in milliseconds
fade-delta = 4;
# Opacity change per step while fading in
fade-in-step = 0.03;
fade-in-step = 0.05;
# Opacity change per step while fading out
fade-out-step = 0.03;
fade-out-step = 0.05;
fade-exclude = [ ];
......@@ -114,7 +101,7 @@ fade-exclude = [ ];
# Try to detect WM windows and mark them as focused
mark-wmwin-focused = true;
# Mark non-WM, override-redirect windows as focused (e.g. menus)
# Mark windows that have no WM frame as focused
mark-ovredir-focused = true;
# Use EWMH _NET_ACTIVE_WINDOW to determine which window is
......@@ -132,14 +119,16 @@ detect-client-opacity = true;
# Window type-specific settings
wintypes:
{
dock = {
# Don't draw shadows on dock/panel windows
shadow = false;
};
dnd = {
# Don't draw shadows on drag-and-drop windows
shadow = false;
};
# Don't draw shadows on dock (i.e. Polybar)
dock = { shadow = false; }