Initial commit

This commit is contained in:
M1dgard 2018-04-03 15:55:41 +02:00
commit 417daecfe7
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4
17 changed files with 2140 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
nvim/plug
nvim/**/.*

37
README.md Normal file
View file

@ -0,0 +1,37 @@
# Midgard's dotfiles
Configuration based on elegant pure black.
## Screenshots
![Empty desktop](./desktop.png)
![Open Rofi launcher](./rofi.png)
Background image shown:
* original by [Charlesjsharp](https://commons.wikimedia.org/wiki/User:Charlesjsharp): [Red-billed streamertail (Trochilus polytmus) female in flight 2](https://commons.wikimedia.org/wiki/File:Red-billed_streamertail_(Trochilus_polytmus)_female_in_flight_2.JPG). Licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en)
* modified by Midgard: darkened and made more green. Licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/) (which means you only have to credit Charlesjsharp and mention that it was modified, you don't have to attribute it to me)
## Requirements
The Arch Linux package to install is between parentheses.
* i3-gaps ([community/i3-gaps](https://www.archlinux.org/packages/community/x86_64/i3-gaps/))
* Rofi ([community/rofi](https://www.archlinux.org/packages/community/x86_64/rofi/))
* Polybar ([aur/polybar](https://aur.archlinux.org/packages/polybar))
* python-notify2 ([aur/python-notify2](https://aur.archlinux.org/packages/python-notify2/<Paste>))
* Mozilla's Fira fonts ([community/otf-fira-mono](https://www.archlinux.org/packages/community/x86_64/otf-fira-mono/) and [community/otf-fira-sans](https://www.archlinux.org/packages/community/x86_64/otf-fira-sans/)). I might change this soon if I play with some patched Fira derivates
* xfce4-terminal ([extra/xfce4-terminal](https://www.archlinux.org/packages/extra/x86_64/xfce4-terminal/), but you can choose your own terminal of course if you want)
* NeoVim ([community/neovim](https://www.archlinux.org/packages/community/x86_64/neovim/))
* acpilight ([aur/acpilight](https://aur.archlinux.org/packages/acpilight/), an xbacklight replacement that directly uses the kernel's API, works without X)
* unclutter ([community/unclutter](https://www.archlinux.org/packages/community/x86_64/unclutter/), hide the mouse when it hasn't moved for some time)
* driver for your video card that supports GLX
## Installation
You are encouraged to copy stuff you like to your own configuration files. If you want to copy my setup, you can use the script `install.sh` (that script is normally mostly for myself though).
## TODO
* Document more about how to get NeoVim and the plugins up and running.
* Expand and test the install script.
* Add my improved battery monitor script.

BIN
desktop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

327
dunstrc.ini Normal file
View file

@ -0,0 +1,327 @@
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
#follow = mouse
follow = keyboard
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "400x5-20+47"
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = no
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 5
# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised
# to the font height and padding.
notification_height = 10
# Padding between text and separator.
padding = 10
# Horizontal padding.
horizontal_padding = 10
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 0
# Defines color of the frame around the notification window.
frame_color = "#aaaaaa"
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 0
# Define a color for the separator.
# possible values are:
# * auto: dunst tries 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 a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# Transient notifications ignore this setting.
idle_threshold = 30s
### Text ###
font = Fira Sans 12
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = <span size="small" letter_spacing="2048" alpha="75%%" font_features="c2sc, smcp, zero">%a %p</span><span size="1500">\n\n</span><span font_features="zero" weight="bold">%s</span>\n<span font_features="zero">%b</span>
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 10
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes
# When word_wrap is set to no, specify where to ellipsize long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# 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
### Icons ###
# Align icons left/right/off
icon_position = right
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 32
# Paths to default icons.
icon_path = /usr/share/icons/breeze-dark/32x32/status/:/usr/share/icons/breeze-dark/32x32/devices/:/usr/share/icons/Adwaita/32x32/status/:/usr/share/icons/Adwaita/32x32/devices/:/usr/share/icons/gnome/32x32/status/:/usr/share/icons/gnome/32x32/devices/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 100
### Misc/Advanced ###
# dmenu path.
dmenu = /usr/bin/rofi -dmenu -p dunst
# Browser for opening urls in context menu.
browser = /usr/bin/firefox -new-tab
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Dunst
# Define the class of the windows spawned by dunst
class = Dunst
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
close = mod4+n
# Close all notifications.
close_all = mod4+shift+n
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1". Make sure this key actually exists on your keyboard layout,
# e.g. check output of 'xmodmap -pke'
history = mod4+Tab
# Context menu.
context = mod4+shift+Tab
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#222222"
foreground = "#888888"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#icon = /path/to/icon
[urgency_normal]
background = "#285577"
foreground = "#ffffff"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#icon = /path/to/icon
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#icon = /path/to/icon
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
# vim: ft=cfg

155
gitignore Normal file
View file

@ -0,0 +1,155 @@
## Backup files
# Author: Midgard
*.bak
*~
## Things you just don't want in a Git repo
# Author: Midgard
*.tar.xz
*.tar.gz
*.tar.bz2
*.zip
*.7z
*.rar
id_rsa
id_dsa
id_ecdsa
id_ed25519
## GPG files
# Source: https://github.com/github/gitignore/blob/master/Global/GPG.gitignore
# License: CC-0
secring.*
## KDevelop4 files
# Source: https://github.com/github/gitignore/blob/master/Global/KDevelop4.gitignore
# License: CC-0
*.kdev4
.kdev4/
## LibreOffice files
# Source: https://github.com/github/gitignore/blob/master/Global/LibreOffice.gitignore
# License: CC-0
# LibreOffice locks
.~lock.*#
## VirtualEnv files
# Source: https://github.com/github/gitignore/blob/master/Global/VirtualEnv.gitignore
# Which has source: http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
# License: CC-0
.Python
[Bb]in
#[Ii]nclude
#[Ll]ib
[Ll]ib64
#[Ll]ocal
#[Ss]cripts
pyvenv.cfg
.venv
pip-selfcheck.json
## Vim files
# Source: https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
# License: CC-0
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# Session
Session.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
## Eclipse and Aptana files
# Cut from: https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore
# License: CC0
#.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
## Kate files
# Source: https://github.com/github/gitignore/blob/master/Global/Kate.gitignore
# License: CC-0
# Swap Files
.*.kate-swp
.swp.*
## Linux files
# Source: https://github.com/github/gitignore/blob/master/Global/Linux.gitignore
# License: CC-0
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

24
i3/backlight.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/bash
# Don't start a new transition if the previous one isn't done yet
pgrep -u $UID -x xbacklight >/dev/null && exit
# Calculate new target brightness
current_brightness=$(xbacklight -get)
case $1 in
up)
target=$((current_brightness * 15 / 10))
[ $target -ne $current_brightness ] || target=$((target + 1))
;;
down)
target=$((current_brightness * 10 / 15))
[ $target -ne $current_brightness ] || target=$((target - 1))
;;
esac
# Boundaries: can't go higher than 100% or lower than 1%
[ $target -le 1 ] && target=1
[ $target -ge 100 ] && target=100
# Smoothly set the new brightness
xbacklight -time 100 -fps 42 -set $target

38
i3/battery.sh Executable file
View file

@ -0,0 +1,38 @@
#!/bin/bash
level_critical=5
level_low=10
level_low_max_backlight=8
notif(){
notify-send -a "Battery" "$@"
}
lower_backlight() {
[ $(xbacklight -get) -le $level_low_max_backlight ] || xbacklight -set $(level_low_max_backlight)
}
while true; do
now=$(cat /sys/class/power_supply/BAT0/energy_now 2>/dev/null)
full=$(cat /sys/class/power_supply/BAT0/energy_full 2>/dev/null)
if [ ! -z $now ] && [ ! -z $full ]; then
percentage=$(( 100 * now / full ))
echo "Current level: $percentage"
if [[ "$(cat /sys/class/power_supply/BAT0/status 2>/dev/null)" != "Charging" ]]; then
if [ $percentage -lt $level_critical ]; then
notif -u "critical" "Power level critical" "Less than $percentage% remaining."
lower_backlight
elif [ $percentage -lt $level_low ]; then
notif -t 59000 -u "critical" "Power supplies running low" "Less than $percentage% remaining."
lower_backlight
fi
else
if [ $percentage -ge 98 ]; then
notif -t 10000 -u low "Fully charged" "Unplug charger."
fi
fi
fi
sleep '1m'
done

256
i3/config Normal file
View file

@ -0,0 +1,256 @@
# i3 config file (v4)
# See http://i3wm.org/docs/userguide.html for a complete reference
set $term $HOME/.config/i3/terminal.sh
set $barlaunchcmd $HOME/.config/polybar/launch.sh
########################
# i3 basic preferences # {{{1
########################
# font for window titles
font pango:Fira Sans 9
# modifier key: Super (swapped below, so effective key is Alt)
set $mod Mod4
# use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# resize window
mode "resize" {
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
bindsym Shift+h resize shrink width 30 px or 30 ppt
bindsym Shift+j resize grow height 30 px or 30 ppt
bindsym Shift+k resize shrink height 30 px or 30 ppt
bindsym Shift+l resize grow width 30 px or 30 ppt
# back to normal: Enter, Escape or mod+r
bindsym Return mode "default"
bindsym KP_Enter mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# mouse following breaks keyboard window switching between terminals when the terminal tries to hide the mouse when you start typing, or something
# also, it's annoying to lose focus on your window when you move the mouse slightly
focus_follows_mouse no
# gaps when more than one window is open on a workspace
for_window [class="^.*"] border pixel 0
gaps inner 10
smart_gaps on
############
# Keyboard # {{{1
############
# Belgian layout, swap Alt and Super, set caps lock as compose key ♥
exec_always --no-startup-id setxkbmap \
-layout be \
-option altwin:swap_lalt_lwin \
-option compose:caps
# enable NumLock
exec_always --no-startup-id numlockx on
################
# Applications # {{{1
################
# program launcher
set $launcher rofi -show combi -display-combi $USER@$(cat /etc/hostname)
bindsym $mod+space exec --no-startup-id "$launcher"
#bindsym $mod+Shift+space exec --no-startup-id rofi -show window
# open launcher when launching i3
exec --no-startup-id $launcher
# lock the screen
bindsym Mod1+l exec --no-startup-id i3lock --image="$HOME/Pictures/background/Red-billed_streamertail_Trochilus_polytmus_female_in_flight_2_lock.png"
# start a terminal
bindsym $mod+Return exec $term
bindsym $mod+KP_Enter exec $term
# start web browser
set $browser TZ=UTC firefox
bindsym XF86HomePage exec $browser
# open file manager
set $filemanager thunar
bindsym XF86MyComputer exec $filemanager
# change display layout
bindsym XF86Display exec arandr
#############################
# Keyboard function buttons # {{{1
#############################
set $volumeStep 5
bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d $volumeStep
bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i $volumeStep
bindsym XF86AudioMute exec --no-startup-id pamixer -t
bindsym XF86AudioMicMute exec --no-startup-id pamixer --source alsa_input.pci-0000_00_1b.0.analog-stereo -t
bindsym XF86MonBrightnessDown exec --no-startup-id $HOME/.config/i3/backlight.sh down
bindsym XF86MonBrightnessUp exec --no-startup-id $HOME/.config/i3/backlight.sh up
bindsym XF86PowerOff exec sudo shutdown -h now
bindsym XF86Sleep exec sudo zzz
bindsym $mod+Print exec --no-startup-id scrot
bindsym $mod+Shift+Print exec --no-startup-id scrot -s
# Window stuff {{{2
# kill focused window
bindsym $mod+Shift+q kill
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l 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+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l 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+m split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout
#bindsym $mod+s layout stacking
bindsym $mod+z layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+d floating toggle
# change focus between tiling / floating windows
bindsym $mod+d focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# More window manager stuff {{{2
# reload the configuration file and restart the bar
bindsym $mod+Shift+c reload, exec $barlaunchcmd
# restart i3 inplace (preserves layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Quit i3?' -b 'Yes' 'i3-msg exit'"
#bindsym $mod+Shift+e exec "i3-msg exit"
bindsym $mod+p exec "sleep 8; notify-send -u critical -a Tasks \\"Urgent reminder\\" \\"You've got to leave now!\\""
# Workspace stuff {{{2
# 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
bindsym $mod+parenright workspace 11
# this goes up to eleven!
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
bindsym $mod+Shift+degree move container to workspace 11
# Monitor stuff {{{2
bindsym $mod+x move workspace to output right
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
#status_command python /usr/lib/python3.6/site-packages/powerline/bindings/i3/powerline-i3.py
#font pango:PowerlineFont 12
##status_command i3status
#position top
#}
# launch Polybar, a nicer bar
exec_always --no-startup-id $barlaunchcmd
exec --no-startup-id nm-applet
# hide the mouse after some time
exec --no-startup-id unclutter -idle 2
# battery monitor script
exec --no-startup-id $HOME/Programs/own/battery/monitor.py
# set background
exec_always --no-startup-id feh --bg-fill $HOME/Pictures/background/Red-billed_streamertail_Trochilus_polytmus_female_in_flight_2_modified_colours.jpg
exec_always --no-startup-id notify-send -t 1500 -a 'i3' "i3 started"
##################
# Specific rules # {{{1
##################
for_window [class="Tor Browser"] floating enable
for_window [class="org-openstreetmap-josm-gui-MainApplication" instance="sun-awt-X11-XDialogPeer"] floating disable
# vim: set ft=i3 noet foldmethod=marker :

22
i3/terminal.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
# If a window with a path in its title is focused, open a terminal with that location as working directory.
# Like this, terminals are opened in the same directory as the currently focused one, if no command is running.
# This is very hackish, but it works.
if [[ $(xtitle) =~ (^| )(~?)(/.*) ]]; then
path="${BASH_REMATCH[3]}"
[[ ${BASH_REMATCH[2]} == "~" ]] && path="$HOME$path"
while [[ $path != / && -n $path && ! -d $path ]]; do
path="$(dirname "$path")"
done
fi
# Open terminal at specified path
cmd=i3-sensible-terminal
if [[ -n $path ]]; then
exec $cmd --default-working-directory="$path"
else
exec $cmd
fi

23
install.sh Normal file
View file

@ -0,0 +1,23 @@
#!/bin/bash
GUI=true
[[ $1 == --no-x ]] && GUI=false
# shorthand for the default $XDG_CONFIG_HOME directory
DOT_CONF=$HOME/.config
mkdir -p $DOT_CONF
# stuff that we only want when we're setting up a graphical environment
[[ $GUI == true ]] && {
ln -s $PWD/xinitrc $HOME/.xinitrc
mkdir -p $DOT_CONF/dunst
ln -s $PWD/i3/ $DOT_CONF/i3/
ln -s $PWD/dunstrc.ini $DOT_CONF/dunst/dunstrc
ln -s $PWD/rofi/ $DOT_CONF/rofi/
ln -s $PWD/polybar/ $DOT_CONF/polybar/
}
ln -s $PWD/gitignore $DOT_CONF/.gitignore
mkdir -p $DOT_CONF/nvim/plug/
ln -s $PWD/nvim-init.vim $DOT_CONF/nvim/init.vim

449
nvim-init.vim Normal file
View file

@ -0,0 +1,449 @@
" General Options {{{1
" ====================
set nocompatible " ignored in NeoVim, tells Vim to break compatibility with vi
let mapleader=';' " set <leader>
syntax enable
set mouse=a " enable mouse selection
set number " line numbers on the left side
set relativenumber " number+relativenumber = relative numbers for all but current line
set showcmd " show the commands while typing
set splitright " open new splits on the right
set splitbelow " open new splits below
set autoread " autoreload file on change
set scrolloff=4 " keep the cursor 4 lines away from the top/bottom
set ruler " show the lines/% bottomright
set encoding=utf-8 " set default encoding
set laststatus=2 " always show the status line
set conceallevel=0 " don't use conceals, seriously
let g:tex_conceal='' " I said no conceals
" toggle hybrid relative numbers when entering/leaving insert mode
":augroup numbertoggle
": autocmd!
": autocmd InsertLeave * set relativenumber
": autocmd InsertEnter * set norelativenumber
":augroup END
" change cursor shape according to mode
:let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
set shell=/bin/zsh " use zsh instead of bash
" wrap lines at 72 characters
"set formatprg=par\ -w72
"set formatoptions=tcrqnlmj
"set textwidth=72
set ignorecase smartcase " don't match case if typing in all-lowercase
" ignore motion for < >
nnoremap < <<
nnoremap > >>
" make < > shifts keep selection
vnoremap < <gv
vnoremap > >gv
inoremap  <esc>dbxa
" Switching buffers {{{2
nnoremap <silent> <F14> :bprev<cr> " s-F2
nnoremap <silent> <F15> :bnext<cr> " s-F3
nnoremap <silent> <F16> :bwipeout<cr> " s-F4
" Indentation {{{2
set tabstop=2 " tab is 2 wide
set shiftwidth=2 " for use with > and <
set noexpandtab " tab key puts tabs
"set list listchars=tab:‧\ ,trail:· " display tabs with a leading \cdot. Alternatives: \mapsto ↦, U+16EB runic single punctuation ᛫
" trailing whitespace looks like \cdot
set list listchars=tab:¦\ ,trail" show indentation lines for tabs, trailing whitespace looks like \cdot
" Misc {{{2
set foldlevelstart=3 " Not too much folding
" Escape from NeoVim terminals
tnoremap <Esc> <C-\><C-n>
" Just hit the [à0] button on an AZERTY, no need to do shift+à to for 0
nnoremap à 0
inoremap jj <Esc>
" Clear highlighting after a search
nnoremap <silent> <leader>n :noh<CR>
" Open a file in the current directory
nmap <leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
" sudo save
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
" Navigate to bookmark, AZERTY has no backtick key
noremap <leader>m `
" Consistent aliases to jump to first non-whitespace character and last character
noremap <a-h> ^
noremap <a-l> $
inoremap <a-h> <esc>^i
inoremap <a-l> <esc>$a
noremap <home> ^
inoremap <home> <esc>^i
" System clipboard {{{2
" Copy to clipboard " Paste from clipboard
vnoremap <leader>y "+y | nnoremap <leader>p "+p
nnoremap <leader>Y "+yg_ | nnoremap <leader>P "+P
nnoremap <leader>y "+y | vnoremap <leader>p "+p
nnoremap <leader>yy "+yy | vnoremap <leader>P "+P
" Opening windows {{{2
nnoremap <C-j> <C-w>n
nmap <C-k> <C-w>N
nnoremap <C-l> <C-w>v
nmap <C-h> <C-w>V
imap <C-w> <esc><C-w>
vmap <C-w> <esc><C-w>
nnoremap <silent> <C-w>v :vnew<CR>
nnoremap <silent> <C-w>V :let spr=&spr<BAR>set nospr<BAR>vnew<BAR>let &spr=spr<CR>
nnoremap <silent> <C-w>N :let spr=&spr<BAR>set nospr<BAR>new<BAR>let &spr=spr<CR>
" Cool arrows {{{2
inoremap <leader>arse
inoremap <leader>arsw
inoremap <leader>arne
inoremap <leader>arnw
" Default visual block {{{2
nnoremap v <C-v>
nnoremap <C-v> v
" Color settings {{{2
" Decent color schemes: ron, delek, peachpuff, slate, murphy, elflord, desert
source /usr/share/nvim/runtime/colors/ron.vim
highlight LineNr ctermfg=08 ctermbg=None
highlight link Whitespace Conceal
" Adding modeline {{{2
" Append modeline after last line in buffer.
" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX
" files.
function! AppendModeline()
let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d %set :",
\ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no')
let l:modeline = substitute(&commentstring, "%s", l:modeline, "")
call append(line("$"), l:modeline)
endfunction
nnoremap <silent> <leader>ml :call AppendModeline()<CR>
" Plugins {{{1
" ============
" Plug {{{2
" ------------
call plug#begin('~/.config/nvim/plug')
" Colors
"Plug 'chriskempson/base16-vim'
" Language support
Plug 'sheerun/vim-polyglot' " color, indentation support for 100+ languages
Plug 'chrisbra/csv.vim', { 'for': 'csv' } " CSV files
"Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' } " included in vim-polyglot
"Plug 'LaTeX-Box-Team/LaTeX-Box', { 'for': 'tex' } " included in vim-polyglot
"Plug 'rust-lang/rust.vim', { 'for': 'rust' } " included in vim-polyglot
" C/C++
"Plug 'vim-scripts/c.vim', { 'for': ['c', 'cpp', 'objc'] } " various IDE-like C features
Plug 'vim-scripts/DoxygenToolkit.vim', { 'for': ['c', 'cpp', 'python'] } " simplify Doxygen documentation in C, C++, Python
"Plug 'derekwyatt/vim-fswitch', { 'for': ['c', 'cpp', 'objc'] } " switch between companion source files (e.g. .h and .cpp)
Plug 'derekwyatt/vim-fswitch', { 'on': 'FSRight' } " switch between companion source files (e.g. .h and .cpp)
"Plug 'derekwyatt/vim-protodef', { 'for': ['c', 'cpp', 'objc'] } " pull in C++ function prototypes into implementation files
Plug 'vim-scripts/Conque-GDB', { 'for': ['c', 'cpp', 'objc'] } " GDB command line interface and terminal emulator
"Plug 'Shougo/vimproc.vim', { 'do': 'make' } " dependency of vim-vebugger, asynchronous execution library
"Plug 'idanarye/vim-vebugger', { 'for': ['c', 'cpp', 'objc', 'java', 'python', 'ruby'] } " debugger frontend for GDB, LDB, PDB, RDebug e.a.
" Edit
"Plug 'jiangmiao/auto-pairs' " insert or delete [], (), '' etc. in pairs
Plug 'sjl/gundo.vim' " visualise your undo tree
Plug 'scrooloose/nerdcommenter' " intensely orgasmic commenting
Plug 'SirVer/ultisnips' " ultimate snippet solution
Plug 'fadein/vim-FIGlet', { 'on': 'FIGlet' } " ASCII art
Plug 'honza/vim-snippets' " snippets for ultisnips
Plug 'junegunn/vim-easy-align' " easily align text in Alexander Approved™ ways
Plug 'matze/vim-move' " move lines and selections up and down
Plug 'kana/vim-operator-user' " define your own operator easily
"Plug 'junegunn/vim-peekaboo' " preview registers when pressing \" or @
Plug 'gcmt/wildfire.vim' " smart selection of the closest text object
Plug 'Valloric/YouCompleteMe', { 'do': 'git submodule update --init --recursive && ./install.py' } " code-completion engine
" Navigation
"Plug 'ctrlpvim/ctrlp.vim' " fuzzy file, buffer, mru, tag, etc. finder
Plug 'dyng/ctrlsf.vim' " search for code and edit it in-place
Plug 'Yggdroot/indentLine' " display the indention levels with thin vertical lines
Plug 'scrooloose/nerdtree' " filesystem tree explorer
Plug 'majutsushi/tagbar' " display tags in a window, ordered by scope
Plug 'easymotion/vim-easymotion' " quickly jump to any location on the screen
Plug 'airblade/vim-gitgutter' " show a Git diff in the gutter, stage/undo hunks
Plug 'mhinz/vim-grepper', { 'on': 'Grepper' } " asynchronous git grep search
"Plug 'ludovicchabant/vim-gutentags' " unobtrusively manage tag files
Plug 'tpope/vim-obsession' " continuously updated session files
" Powerline
Plug 'vim-airline/vim-airline' " statusline plugin in pure Vimscript
Plug 'vim-airline/vim-airline-themes' " themes for airline
" Analysis
Plug 'w0rp/ale' " asynchronous linting engine
"Plug 'dbmrq/vim-ditto' " highlight overused words
" Misc
Plug 'kassio/neoterm', { 'on': 'T' } " wrapper of some neovim's :terminal functions
"Plug 'tpope/vim-fugitive' " a Git wrapper
Plug 'vim-scripts/TeTrIs.vim' " Tetris clone
call plug#end()"
" Haskell {{{2
" ------------
let g:haskell_enable_quantification=1
let g:haskell_enable_recursivedo=1
let g:haskell_enable_arrowsyntax=1
let g:haskell_enable_pattern_synonyms=1
let g:haskell_enable_typeroles=1
let g:haskell_enable_static_pointers=1
" Markdown {{{2
" -------------
let g:vim_markdown_conceal = 0
" CSV.vim {{{2
" ------------
" Doxygen {{{2
" ------------
nnoremap <leader>df :Dox<CR>
nnoremap <leader>dl :DoxLic<CR>
nnoremap <leader>da :DoxAuthor<CR>
let g:DoxygenToolkit_authorName="Midgard"
" FSwitch {{{2
" ------------
let b:fswitchdst = ''
au! BufEnter *.cpp let b:fswitchdst = 'hpp,h' | let b:fswitchlocs = '.'
au! BufEnter *.hpp let b:fswitchdst = 'cpp' | let b:fswitchlocs = '.'
au! BufEnter *.c let b:fswitchdst = 'h' | let b:fswitchlocs = '.'
au! BufEnter *.h let b:fswitchdst = 'c,cpp' | let b:fswitchlocs = '.'
nmap <silent> <F2> :FSRight<cr>
" Protodef {{{2
" -------------
nnoremap ;def :call protodef#ReturnSkeletonsFromPrototypesForCurrentBuffer({})<cr>
" ConqueGDB {{{2
" --------------
let g:ConqueGdb_Leader = ','
" Commented entries are the defaults
"let g:ConqueGdb_Run = g:ConqueGdb_Leader . 'r'
"let g:ConqueGdb_Continue = g:ConqueGdb_Leader . 'c'
let g:ConqueGdb_Next = g:ConqueGdb_Leader . 'o' " step over
let g:ConqueGdb_Step = g:ConqueGdb_Leader . 'i' " step in
"let g:ConqueGdb_Print = g:ConqueGdb_Leader . 'p'
"let g:ConqueGdb_ToggleBreak = g:ConqueGdb_Leader . 'b'
let g:ConqueGdb_Finish = g:ConqueGdb_Leader . 'O' " step out
"let g:ConqueGdb_Backtrace = g:ConqueGdb_Leader . 't'
nnoremap <F12> :ConqueGdb --args build/tests --debug
" Vebugger {{{2
" -------------
"let g:vebugger_leader='<leader>v'
"
"nnoremap <F5> :VBGstepOver<cr>
"nnoremap <F6> :VBGstepIn<cr>
"nnoremap <F7> :VBGstepOut<cr>
"nnoremap <F8> :VBGcontinue<cr>
"nnoremap <F12> :VBGstartGDB ./huffman
" Auto-pairs {{{2
" ---------------
" Gundo {{{2
" ----------
nnoremap <F3> :GundoToggle<CR>
" NERDCommenter {{{2
" ------------------
nmap & <leader>c<space>
vmap & <leader>c<space>
" UltiSnips {{{2
" ---------------
let g:UltiSnipsExpandTrigger='²'
" EasyAlign {{{2
" --------------
xmap <leader>a <Plug>(EasyAlign)
nmap <leader>a <Plug>(EasyAlign)
" Move (lines) {{{2
" -----------------
" Operator user {{{2
" ------------------
" Peekaboo {{{2
" -------------
" Wildfire {{{2
" -------------
" YouCompleteMe {{{2
" ------------------
noremap <leader>g :YcmCompleter GoToImprecise<CR>
let g:ycm_error_symbol='!>'
let g:ycm_warning_symbol='-'
let g:ycm_enable_diagnostic_highlighting=0
let g:ycm_complete_in_comments=1
let g:ycm_seed_identifiers_with_syntax=1
let g:ycm_collect_identifiers_from_tags_files=1
let g:ycm_add_preview_to_completeopt=1
let g:ycm_autoclose_preview_window_after_insertion=1
let g:ycm_server_python_interpreter='/usr/bin/python3'
let g:ycm_global_ycm_extra_conf='~/.config/nvim/ycm_extra_conf.py'
let g:ycm_extra_conf_globlist = ['~/Nextcloud/*', '~/Documents/*','~/development/*','~/unief/*'] " ,'!~/*'
"let g:ycm_rust_src_path='/data/programming/rustc-1.7.0/src'
set completeopt=menu
" CtrlP {{{2
" ----------
let g:ctrlp_map='<leader>l'
let g:ctrlp_user_command=['.git/', 'git --git-dir=%s/.git ls-files . -co --exclude-standard']
nnoremap <leader>s :CtrlPTag<CR>"
" Ctrl-S-F {{{2
" -------------
" IndentLine {{{2
" ---------------
" NERDTree {{{2
" -------------
nnoremap <silent> <leader>t :NERDTreeToggle<CR><CR>
let NERDTreeIgnore=[
\ ".*\\.class$",
\ ".*\\.o$",
\ ".*\\.hi$",
\ ".*\\.pyc$",
\ ".*\\.bak$",
\ ".*\\~$"
\ ]
" automatically open NERDTree when opening vi
"autocmd StdinReadPre * let s:std_in=1
"autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" Tagbar {{{2
" -----------
nnoremap <leader>o :Tagbar<CR>
let g:tagbar_autoclose=1
let g:tagbar_autofocus=1
let g:tagbar_sort=0
let g:tagbar_compact=1
let g:tagbar_iconchars=['▸', '▾']
let g:tagbar_type_make={
\ 'kinds': ['m:macros', 't:targets']
\ }
let g:tagbar_type_rust={
\ 'ctagstype': 'rust',
\ 'kinds': [
\ 'n:modules',
\ 's:structs',
\ 'i:interfaces',
\ 'c:implementations',
\ 'f:functions',
\ 'g:enums',
\ 't:typedefs',
\ 'v:variables',
\ 'M:macros',
\ 'm:fields',
\ 'e:enumerators',
\ 'F:methods',
\ ]
\ }
" EasyMotion {{{2
" ---------------
let g:EasyMotion_do_mapping=0
let g:EasyMotion_startofline=0
map <leader>f <Plug>(easymotion-s)
map <leader>j <Plug>(easymotion-j)
map <leader>k <Plug>(easymotion-k)
map <leader>w <Plug>(easymotion-bd-w)
nmap <leader>w <Plug>(easymotion-overwin-w)
" GitGutter {{{2
" --------------
" Grepper {{{2
" ------------
nnoremap <leader>G :Grepper<CR>
let g:grepper={
\ 'tools': ['rg', 'git', 'grep'],
\ 'open': 1,
\ 'jump': 0,
\ }
" Gutentags {{{2
" --------------
let g:gutentags_cache_dir = '~/.cache/gutentag'
" Obsession {{{2
" --------------
" Powerline {{{2
" --------------
" Airline {{{2
" ------------
let g:airline_powerline_fonts=1
let g:airline_theme='bubblegum'
let g:airline#extensions#ycm#enabled=1
let g:airline#extensions#tabline#enabled=1
let g:airline#extensions#ale#enabled=1
let g:ale_linters = {
\ 'c': [],
\ 'cpp': [],
\}
" Ale {{{2
" --------
let g:ale_lint_on_text_change='normal'
let g:ale_lint_on_insert_leave=1
let g:ale_completion_delay=''
let g:ale_lint_delay=500
" Ditto {{{2
" ----------
" Neoterm {{{2
" ------------
" Fugitive {{{2
" -------------
" TeTrIs {{{2
" -----------
" vim: set foldmethod=marker foldlevel=1 et ts=2 sw=2 ft=vim nowrap :

400
polybar/config.ini Normal file
View file

@ -0,0 +1,400 @@
;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
;background = ${xrdb:color0:#222}
background = #000
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/midbard]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
;radius = 6.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
;line-size = 3
;line-color = #f00
;border-size = 4
;border-color = #00000000
padding-left = 0
padding-right = 0
module-margin-left = 3
module-margin-right = 3
font-0 = "Fira Sans:size=10;1"
font-1 = "Font Awesome 5 Free:size=10;1"
font-2 = fixed:pixelsize=10;1
font-3 = "Material Icons:pixelsize=14;3"
font-4 = "Fira Sans:size=12;1"
font-5 = "Fira Mono:size=10;1"
;font-3 = unifont:fontformat=truetype:size=8:antialias=false;0
;font-4 = siji:pixelsize=10;1
;font-0 = "Tamsyn:pixelsize=12;0"
;font-1 = "Roboto:size=11:weight=bold;2"
;font-2 = "Noto Sans:size=11;1"
modules-left = bspwm i3 xwindow
modules-center = date
modules-right = mpd volume battery temperature eth wlan
tray-position = right
tray-padding = 2
;tray-transparent = true
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = " %title:0:50:…%"
label-foreground = #777
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = " %index% "
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
[module/mpd]
type = internal/mpd
format-online = <toggle> <icon-prev> <label-song> <icon-next>
;icon-prev = 
;icon-stop = 
;icon-play = 
;icon-pause = 
;icon-next = 
icon-prev =
icon-stop =
icon-play =
icon-pause =
icon-next =
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill =
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty =
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = wlp5s0
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = enp4s0
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date =
date-alt =
time = %A %{T5}%H:%M%{T-} %e %b
time-alt = %a %Y-%M-%d %H:%M:%S
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %time%
[module/volume]
type = internal/volume
format-volume = <label-volume> <bar-volume>
;label-volume = VOL
label-volume =
label-volume-foreground = ${root.foreground}
; " "
;format-muted-prefix = ""
;format-muted-foreground = ${colors.foreground-alt}
; "sound muted"
label-muted =
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill =
bar-volume-fill-font = 2
bar-volume-empty =
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
; FIXME
;format-charging = <animation-charging> <label-charging>
format-charging = <label-charging>
format-charging-underline = #ffb52a
;format-discharging = <ramp-capacity> <label-discharging>
format-discharging = <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
;format-full-prefix = " "
format-full-prefix = ""
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 80
;format = <ramp> <label>
format = %{T6}<label>%{T-}
format-underline = #f50a4d
;format-warn = <label-warn>
format-warn = "%{T4} %{T6}<label-warn>%{T-}"
format-warn-underline = ${self.format-underline}
label = %temperature%
label-warn = %temperature%
label-warn-foreground = ${colors.secondary}
ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
; 
label-open = ""
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

13
polybar/launch.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
echo "Launching polybar"
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
polybar --config="$HOME/.config/polybar/config.ini" midbard &
echo "Polybar launched."

BIN
rofi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

274
rofi/config Normal file
View file

@ -0,0 +1,274 @@
! "Enabled modi" Set from: Commandline
rofi.modi: combi
! "Window width" Set from: Default
! rofi.width: 50
! "Number of lines" Set from: Default
! rofi.lines: 15
! "Number of columns" Set from: Default
! rofi.columns: 1
! "Font to use" Set from: Default
! rofi.font: mono 12
! "Border width" Set from: Default
! rofi.bw: 1
! "Location on screen" Set from: Commandline
rofi.location: 2
! "Padding" Set from: Default
! rofi.padding: 5
! "Y-offset relative to location" Set from: Commandline
rofi.yoffset: 27
! "X-offset relative to location" Set from: Default
! rofi.xoffset: 0
! "Always show number of lines" Set from: Default
! rofi.fixed-num-lines: true
! "Whether to load and show icons" Set from: Commandline
rofi.show-icons: true
! "Terminal to use" Set from: Commandline
rofi.terminal: i3-sensible-terminal
! "Ssh client to use" Set from: Default
! rofi.ssh-client: ssh
! "Ssh command to execute" Set from: Default
! rofi.ssh-command: {terminal} -e {ssh-client} {host}
! "Run command to execute" Set from: Default
! rofi.run-command: {cmd}
! "Command to get extra run targets" Set from: Default
! rofi.run-list-command:
! "Run command to execute that runs in shell" Set from: Default
! rofi.run-shell-command: {terminal} -e {cmd}
! "Command executed on accep-entry-custom for window modus" Set from: Default
! rofi.window-command: xkill -id {window}
! "Window fields to match in window mode" Set from: Default
! rofi.window-match-fields: all
! "Theme to use to look for icons" Set from: Default
! rofi.drun-icon-theme:
! "Desktop entry fields to match in drun" Set from: Default
! rofi.drun-match-fields: name,generic,exec,categories
! "Disable history in run/ssh" Set from: Default
! rofi.disable-history: false
! "Use sorting" Set from: Default
! rofi.sort: false
! "Use levenshtein sorting also for fuzzy matching" Set from: Commandline
rofi.levenshtein-sort: true
! "Set case-sensitivity" Set from: Default
! rofi.case-sensitive: false
! "Cycle through the results list" Set from: Default
! rofi.cycle: true
! "Enable sidebar-mode" Set from: Default
! rofi.sidebar-mode: false
! "Row height (in chars)" Set from: Default
! rofi.eh: 1
! "Enable auto select mode" Set from: Default
! rofi.auto-select: false
! "Parse hosts file for ssh mode" Set from: Default
! rofi.parse-hosts: false
! "Parse known_hosts file for ssh mode" Set from: Default
! rofi.parse-known-hosts: true
! "Set the modi to combine in combi mode" Set from: Commandline
rofi.combi-modi: window,drun,ssh,run
! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Commandline
rofi.matching: fuzzy
! "Tokenize input string" Set from: Default
! rofi.tokenize: true
! "Monitor id to show on" Set from: Default
! rofi.m: -5
! "Margin between rows *DEPRECATED*" Set from: Default
! rofi.line-margin: 2
! "Padding within rows *DEPRECATED*" Set from: Default
! rofi.line-padding: 1
! "Pre-set filter" Set from: Default
! rofi.filter:
! "Separator style (none, dash, solid) *DEPRECATED*" Set from: Default
! rofi.separator-style: dash
! "Hide scroll-bar *DEPRECATED*" Set from: Default
! rofi.hide-scrollbar: false
! "Fullscreen" Set from: Default
! rofi.fullscreen: false
! "Fake transparency *DEPRECATED*" Set from: Default
! rofi.fake-transparency: false
! "DPI" Set from: Default
! rofi.dpi: -1
! "Threads to use for string matching" Set from: Default
! rofi.threads: 0
! "Scrollbar width *DEPRECATED*" Set from: Default
! rofi.scrollbar-width: 8
! "Scrolling method. (0: Page, 1: Centered)" Set from: Default
! rofi.scroll-method: 0
! "Background to use for fake transparency. (background or screenshot)" Set from: Default
! rofi.fake-background: screenshot
! "Window Format. w (desktop name), t (title), n (name), r (role), c (class) *DEPRECATED*" Set from: Commandline
rofi.window-format: @ {w} {c} {t}
! "Click outside the window to exit" Set from: Default
! rofi.click-to-exit: true
! "Indicate how it match by underlining it." Set from: Default
! rofi.show-match: true
! "New style theme file" Set from: Commandline
rofi.theme: ~/.config/rofi/midgard.rasi
! "Color scheme for normal row" Set from: Default
! rofi.color-normal:
! "Color scheme for urgent row" Set from: Default
! rofi.color-urgent:
! "Color scheme for active row" Set from: Default
! rofi.color-active:
! "Color scheme window" Set from: Default
! rofi.color-window:
! "Max history size (WARNING: can cause slowdowns when set to high)." Set from: Default
! rofi.max-history-size: 25
! "Hide the prefix mode prefix on the combi view." Set from: Default
! rofi.combi-hide-mode-prefix: false
! "Pidfile location" Set from: Default
! rofi.pid: /run/user/1000/rofi.pid
! "The display name of this browser" Set from: Default
! rofi.display-window:
! "The display name of this browser" Set from: Default
! rofi.display-windowcd:
! "The display name of this browser" Set from: Default
! rofi.display-run:
! "The display name of this browser" Set from: Default
! rofi.display-ssh:
! "The display name of this browser" Set from: Default
! rofi.display-drun:
! "The display name of this browser" Set from: Commandline
! rofi.display-combi: $USER@$HOST
! "The display name of this browser" Set from: Default
! rofi.display-keys:
! "Paste primary selection" Set from: Default
! rofi.kb-primary-paste: Control+V,Shift+Insert
! "Paste clipboard" Set from: Default
! rofi.kb-secondary-paste: Control+v,Insert
! "Clear input line" Set from: Default
! rofi.kb-clear-line: Control+w
! "Beginning of line" Set from: Default
! rofi.kb-move-front: Control+a
! "End of line" Set from: Default
! rofi.kb-move-end: Control+e
! "Move back one word" Set from: Default
! rofi.kb-move-word-back: Alt+b
! "Move forward one word" Set from: Default
! rofi.kb-move-word-forward: Alt+f
! "Move back one char" Set from: Default
! rofi.kb-move-char-back: Left,Control+b
! "Move forward one char" Set from: Default
! rofi.kb-move-char-forward: Right,Control+f
! "Delete previous word" Set from: Default
! rofi.kb-remove-word-back: Control+Alt+h,Control+BackSpace
! "Delete next word" Set from: Default
! rofi.kb-remove-word-forward: Control+Alt+d
! "Delete next char" Set from: Default
! rofi.kb-remove-char-forward: Delete,Control+d
! "Delete previous char" Set from: Default
! rofi.kb-remove-char-back: BackSpace,Control+h
! "Delete till the end of line" Set from: Default
! rofi.kb-remove-to-eol: Control+k
! "Delete till the start of line" Set from: Default
! rofi.kb-remove-to-sol: Control+u
! "Accept entry" Set from: Default
! rofi.kb-accept-entry: Control+j,Control+m,Return,KP_Enter
! "Use entered text as command (in ssh/run modi)" Set from: Default
! rofi.kb-accept-custom: Control+Return
! "Use alternate accept command." Set from: Default
! rofi.kb-accept-alt: Shift+Return
! "Delete entry from history" Set from: Default
! rofi.kb-delete-entry: Shift+Delete
! "Switch to the next mode." Set from: Default
! rofi.kb-mode-next: Shift+Right,Control+Tab
! "Switch to the previous mode." Set from: Default
! rofi.kb-mode-previous: Shift+Left,Control+ISO_Left_Tab
! "Go to the previous column" Set from: Default
! rofi.kb-row-left: Control+Page_Up
! "Go to the next column" Set from: Default
! rofi.kb-row-right: Control+Page_Down
! "Select previous entry" Set from: Default
! rofi.kb-row-up: Up,Control+p,ISO_Left_Tab
! "Select next entry" Set from: Default
! rofi.kb-row-down: Down,Control+n
! "Go to next row, if one left, accept it, if no left next mode." Set from: Default
! rofi.kb-row-tab: Tab
! "Go to the previous page" Set from: Default
! rofi.kb-page-prev: Page_Up
! "Go to the next page" Set from: Default
! rofi.kb-page-next: Page_Down
! "Go to the first entry" Set from: Default
! rofi.kb-row-first: Home,KP_Home
! "Go to the last entry" Set from: Default
! rofi.kb-row-last: End,KP_End
! "Set selected item as input text" Set from: Default
! rofi.kb-row-select: Control+space
! "Take a screenshot of the rofi window" Set from: Default
! rofi.kb-screenshot: Alt+S
! "Toggle case sensitivity" Set from: Default
! rofi.kb-toggle-case-sensitivity: grave,dead_grave
! "Toggle sort" Set from: Default
! rofi.kb-toggle-sort: Alt+grave
! "Quit rofi" Set from: Default
! rofi.kb-cancel: Escape,Control+g,Control+bracketleft
! "Custom keybinding 1" Set from: Default
! rofi.kb-custom-1: Alt+1
! "Custom keybinding 2" Set from: Default
! rofi.kb-custom-2: Alt+2
! "Custom keybinding 3" Set from: Default
! rofi.kb-custom-3: Alt+3
! "Custom keybinding 4" Set from: Default
! rofi.kb-custom-4: Alt+4
! "Custom Keybinding 5" Set from: Default
! rofi.kb-custom-5: Alt+5
! "Custom keybinding 6" Set from: Default
! rofi.kb-custom-6: Alt+6
! "Custom Keybinding 7" Set from: Default
! rofi.kb-custom-7: Alt+7
! "Custom keybinding 8" Set from: Default
! rofi.kb-custom-8: Alt+8
! "Custom keybinding 9" Set from: Default
! rofi.kb-custom-9: Alt+9
! "Custom keybinding 10" Set from: Default
! rofi.kb-custom-10: Alt+0
! "Custom keybinding 11" Set from: Default
! rofi.kb-custom-11: Alt+exclam
! "Custom keybinding 12" Set from: Default
! rofi.kb-custom-12: Alt+at
! "Csutom keybinding 13" Set from: Default
! rofi.kb-custom-13: Alt+numbersign
! "Custom keybinding 14" Set from: Default
! rofi.kb-custom-14: Alt+dollar
! "Custom keybinding 15" Set from: Default
! rofi.kb-custom-15: Alt+percent
! "Custom keybinding 16" Set from: Default
! rofi.kb-custom-16: Alt+dead_circumflex
! "Custom keybinding 17" Set from: Default
! rofi.kb-custom-17: Alt+ampersand
! "Custom keybinding 18" Set from: Default
! rofi.kb-custom-18: Alt+asterisk
! "Custom Keybinding 19" Set from: Default
! rofi.kb-custom-19: Alt+parenleft
! "Select row 1" Set from: Default
! rofi.kb-select-1: Super+1
! "Select row 2" Set from: Default
! rofi.kb-select-2: Super+2
! "Select row 3" Set from: Default
! rofi.kb-select-3: Super+3
! "Select row 4" Set from: Default
! rofi.kb-select-4: Super+4
! "Select row 5" Set from: Default
! rofi.kb-select-5: Super+5
! "Select row 6" Set from: Default
! rofi.kb-select-6: Super+6
! "Select row 7" Set from: Default
! rofi.kb-select-7: Super+7
! "Select row 8" Set from: Default
! rofi.kb-select-8: Super+8
! "Select row 9" Set from: Default
! rofi.kb-select-9: Super+9
! "Select row 10" Set from: Default
! rofi.kb-select-10: Super+0
! "Go to the previous column" Set from: Default
! rofi.ml-row-left: ScrollLeft
! "Go to the next column" Set from: Default
! rofi.ml-row-right: ScrollRight
! "Select previous entry" Set from: Default
! rofi.ml-row-up: ScrollUp
! "Select next entry" Set from: Default
! rofi.ml-row-down: ScrollDown
! "Select hovered row" Set from: Default
! rofi.me-select-entry: MousePrimary
! "Accept hovered row" Set from: Default
! rofi.me-accept-entry: MouseDPrimary
! "Accept hovered row with custom action" Set from: Default
! rofi.me-accept-custom: Control+MouseDPrimary

82
rofi/midgard.rasi Normal file
View file

@ -0,0 +1,82 @@
/* ==========================================================================
Rofi color theme
File: midgard.rasi
Desc: Dark color theme for Rofi
Author: midgard
Modified: Mon Apr 3 2018
========================================================================== */
* {
/* Theme settings */
scrollbar: true;
background-color: transparent;
foreground: rgba(193, 193, 193, 100%);
alt-foreground: rgba(193, 193, 193, 50%);
highlighted-background: rgba( 53, 81, 33, 50%);
scrollbar-background: transparent;
scrollbar-handle: @alt-foreground;
text-color: @foreground;
}
#window {
border: none;
width: 100%;
height: 100%;
location: north;
anchor: north;
children: [mainbox, dummy];
background-color: rgba(0,0,0,0.5);
font: "Noto Mono 14";
}
#dummy {
expand: true;
}
#mainbox {
expand: false;
padding: 0px 0px 6px;
margin: 0 25%;
background-color: #000;
}
#element {
padding: 4px 10px;
font: "Noto Mono 12";
}
#element.selected {
background-color: @highlighted-background;
}
#inputbar {
padding: 10px 2px;
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#prompt {
text-color: @alt-foreground;
font: "Fira Sans Light 14";
}
#textbox-prompt-colon {
expand: false;
margin: 0px 0.4em 0em 0em ;
}
#scrollbar {
width: 0px;
border: 0;
handle-width: 2px;
handle-color: @scrollbar-handle;
background-color: @scrollbar-background;
padding: 0;
}
/* vim: set ft=scss noet :*/

38
xinitrc Normal file
View file

@ -0,0 +1,38 @@
#!/bin/bash
# merge in defaults and keymaps
sysresources=/etc/X11/xinit/.Xresources ; [ -f "$sysresources" ] && xrdb -merge "$sysresources"
sysmodmap=/etc/X11/xinit/.Xmodmap ; [ -f "$sysmodmap" ] && xmodmap "$sysmodmap"
userresources="$HOME/.Xresources" ; [ -f "$userresources" ] && xrdb -merge "$userresources"
usermodmap="$HOME/.config/Xmodmap" ; [ -f "$usermodmap" ] && xmodmap "$usermodmap"
xset b off # don't beep! that's annoying as hell
xset r rate 170 40 # wait 170 before repeating, 40 chars/second
# fav terminal. it's lightweight (always starts instantly) and isn't as peculiar to configure as urxvt (doesn't look as ugly as xterm by default)
export TERMINAL=xfce4-terminal
# default desktop environment to start
[[ -z $DE_CHOICE ]] && DE_CHOICE=i3
# allow to very easily choose a desktop environment without changing this file: do e.g. `DE_CHOICE=kde startx` to choose KDE
case "$DE_CHOICE" in
awesome) exec awesome; ;;
xfce) exec startxfce4; ;;
kde) exec startkde; ;;
i3)
XDG_CONFIG_HOME=$HOME/.config
compton --config $XDG_CONFIG_HOME/compton/config & # compositor
dunst -config $XDG_CONFIG_HOME/dunst/dunstrc & # notification daemon
exec i3
;;
# We're not able to print messages to the screen here, so do an exec with the error message and X will complain about it for us
*) exec " DE_CHOICE not recognized: $DE_CHOICE"; ;;
esac
# vim: set noet :