diff --git a/Makefile b/Makefile index 9f5e81a..2a14c7d 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,27 @@ TOP_SOURCES := $(shell git ls-files | grep -vE 'README|Makefile|^config|^\.git|^\.travis' | grep -v /) CONFIG_SOURCES := $(shell git ls-files config) +LOCAL_BIN_SOURCES := $(shell git ls-files local/bin) TARGETS := \ $(patsubst %,$(HOME)/.%,$(TOP_SOURCES)) \ $(patsubst %,$(HOME)/.%,$(CONFIG_SOURCES)) \ + $(patsubst %,$(HOME)/.%,$(LOCAL_BIN_SOURCES)) \ $(HOME)/.config/i3/config $(HOME)/.%: % $(RM) '$@' && mkdir -p $(dir $@) && ln -svf '$(PWD)/$^' '$@' .PHONY: all -all: $(HOME)/.config $(TARGETS) +all: $(HOME)/.config $(HOME)/.local/bin $(TARGETS) $(HOME)/.config: mkdir -p $@ +$(HOME)/.local/bin: + mkdir -p $@ + .PHONY: echo echo: @echo TOP_SOURCES=$(TOP_SOURCES) @echo CONFIG_SOURCES=$(CONFIG_SOURCES) + @echo LOCAL_BIN_SOURCES=$(LOCAL_BIN_SOURCES) @echo TARGETS=$(TARGETS) diff --git a/config/alacritty/alacritty.yml b/config/alacritty/alacritty.yml index 99286d6..ad086c5 100644 --- a/config/alacritty/alacritty.yml +++ b/config/alacritty/alacritty.yml @@ -7,6 +7,8 @@ window: x: 0 y: 0 dynamic_padding: false + decorations: none + startup_mode: Maximized scrolling: history: 10000 multiplier: 3 diff --git a/config/i3/config b/config/i3/config index b724a09..c5b0688 100644 --- a/config/i3/config +++ b/config/i3/config @@ -1,6 +1,6 @@ set $mod Mod4 -font pango:DejaVu Sans Mono 12 +font pango:Comic Code Bold 13 exec "setxkbmap -layout dvorak" @@ -8,7 +8,7 @@ exec "setxkbmap -layout dvorak" floating_modifier $mod # start a terminal -bindsym $mod+Return exec xfce4-terminal +bindsym $mod+Return exec alacritty # kill focused window bindsym $mod+Shift+q kill @@ -102,12 +102,12 @@ bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -1000 bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +1000 bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle -bindsym XF86MonBrightnessDown exec ~/.i3status-update-do xbacklight -5 -bindsym XF86MonBrightnessUp exec ~/.i3status-update-do xbacklight +5 +bindsym XF86MonBrightnessDown exec ~/.local/bin/i3status-update-do xbacklight -5 +bindsym XF86MonBrightnessUp exec ~/.local/bin/i3status-update-do xbacklight +5 bindsym XF86Tools exec i3lock -c ed1c24 bindsym XF86Calculator exec xcalc -bindsym XF86Display exec ~/.i3-screenlayout-toggle +bindsym XF86Display exec ~/.local/bin/i3-screenlayout-toggle bindsym Print exec xfce4-screenshooter # resize window (you can also use the mouse for that) @@ -139,5 +139,5 @@ bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { - status_command "i3status | python ~/.i3wrapper.py" + status_command "i3status | python ~/.local/bin/i3wrapper.py" } diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf new file mode 100644 index 0000000..d3ca4cd --- /dev/null +++ b/config/kitty/kitty.conf @@ -0,0 +1,32 @@ +font_family Comic Code +bold_font_family Comic Code Bold +italic_font Comic Code Italic +bold_italic_font Comic Code Bold Italic + +font_size 11.0 + +color0 #000000 +color8 #575b70 + +color1 #ff5555 +color9 #ff6e67 + +color2 #50fa7b +color10 #5af78e + +color3 #f1fa8c +color11 #f4f99d + +color4 #caa9fa +color12 #cab9fb + +color5 #ff79c6 +color13 #ff92d0 + +color6 #8be9fd +color14 #9aedfe + +color7 #bfbfbf +color15 #e6e6e6 + +hide_window_decorations yes diff --git a/config/redshift.conf b/config/redshift.conf index d4f0229..8965c6c 100644 --- a/config/redshift.conf +++ b/config/redshift.conf @@ -4,3 +4,5 @@ temp-night=3000 transition=1 brightness-day=1.0 brightness-night=0.8 + +# vim:filetype=cfg diff --git a/config/redshift/hooks/brightness.sh b/config/redshift/hooks/brightness.bash similarity index 95% rename from config/redshift/hooks/brightness.sh rename to config/redshift/hooks/brightness.bash index 431b75f..d17936c 100755 --- a/config/redshift/hooks/brightness.sh +++ b/config/redshift/hooks/brightness.bash @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash main() { : "${BRIGHTNESS_DAY:=100}" diff --git a/config/systemd/user/redshift-gtk.service.d/override.conf b/config/systemd/user/redshift-gtk.service.d/override.conf index 06ebab8..dcca617 100644 --- a/config/systemd/user/redshift-gtk.service.d/override.conf +++ b/config/systemd/user/redshift-gtk.service.d/override.conf @@ -1,5 +1,5 @@ [Service] ExecStart= -ExecStart=/home/me/.redshift-gtk-wrapper +ExecStart=/home/me/.local/bin/redshift-gtk-wrapper SyslogIdentifier= SyslogIdentifier=redshift-gtk diff --git a/config/systemd/user/redshift.service.d/override.conf b/config/systemd/user/redshift.service.d/override.conf index f00a373..6353af5 100644 --- a/config/systemd/user/redshift.service.d/override.conf +++ b/config/systemd/user/redshift.service.d/override.conf @@ -1,5 +1,5 @@ [Service] ExecStart= -ExecStart=/home/me/.redshift-wrapper +ExecStart=/home/me/.local/bin/redshift-wrapper SyslogIdentifier= SyslogIdentifier=redshift diff --git a/i3-screenlayout-toggle b/local/bin/i3-screenlayout-toggle similarity index 100% rename from i3-screenlayout-toggle rename to local/bin/i3-screenlayout-toggle diff --git a/i3status-update-do b/local/bin/i3status-update-do similarity index 100% rename from i3status-update-do rename to local/bin/i3status-update-do diff --git a/i3wrapper.py b/local/bin/i3wrapper.py similarity index 100% rename from i3wrapper.py rename to local/bin/i3wrapper.py diff --git a/redshift-wrapper b/local/bin/latlon similarity index 60% rename from redshift-wrapper rename to local/bin/latlon index afc5d19..42e69e1 100755 --- a/redshift-wrapper +++ b/local/bin/latlon @@ -1,24 +1,28 @@ #!/usr/bin/env bash set -o errexit +set -o pipefail main() { - exec "${REDSHIFT_EXE:-redshift}" -l "$(__get_lat_lon)" -v + if [[ "${DEBUG}" ]]; then + set -o xtrace + fi + _get_lat_lon } -__get_lat_lon() { - : "${IP_LOOKUP_URL:=https://eeloo.humans.rip/ip}" +_get_lat_lon() { + : "${IP_LOOKUP_URL:=https://ifconfig.co/ip}" : "${GEOIP_LOOKUP_HOST:=http://api.geoiplookup.net}" local ipaddr - ipaddr="$(curl -sSL "${IP_LOOKUP_URL}")" + ipaddr="$(curl -fsSL "${IP_LOOKUP_URL}")" local geoip_xml - geoip_xml="$(curl -sSL "${GEOIP_LOOKUP_HOST}?query=${ipaddr}")" + geoip_xml="$(curl -fsSL "${GEOIP_LOOKUP_HOST}?query=${ipaddr}")" - __extract_lat_long "${geoip_xml}" + _extract_lat_long "${geoip_xml}" } -__extract_lat_long() { +_extract_lat_long() { python <~/.ssh/agent.out } +function setup-ssh-agent() { + start-ssh-agent && load-ssh-agent +} + function __maybesource() { if [[ -f "${1}" ]]; then if [[ "${2}" == silent ]]; then @@ -208,4 +213,10 @@ if nvm &>/dev/null; then nvm use --delete-prefix lts/erbium --silent fi +if kitty --version &>/dev/null; then + autoload -Uz compinit + compinit + kitty + complete setup zsh | source /dev/stdin +fi + true