Merge branch 'master' of github.com:meatballhat/dotfiles
This commit is contained in:
commit
4670eceb95
8
Makefile
8
Makefile
@ -1,21 +1,27 @@
|
|||||||
TOP_SOURCES := $(shell git ls-files | grep -vE 'README|Makefile|^config|^\.git|^\.travis' | grep -v /)
|
TOP_SOURCES := $(shell git ls-files | grep -vE 'README|Makefile|^config|^\.git|^\.travis' | grep -v /)
|
||||||
CONFIG_SOURCES := $(shell git ls-files config)
|
CONFIG_SOURCES := $(shell git ls-files config)
|
||||||
|
LOCAL_BIN_SOURCES := $(shell git ls-files local/bin)
|
||||||
TARGETS := \
|
TARGETS := \
|
||||||
$(patsubst %,$(HOME)/.%,$(TOP_SOURCES)) \
|
$(patsubst %,$(HOME)/.%,$(TOP_SOURCES)) \
|
||||||
$(patsubst %,$(HOME)/.%,$(CONFIG_SOURCES)) \
|
$(patsubst %,$(HOME)/.%,$(CONFIG_SOURCES)) \
|
||||||
|
$(patsubst %,$(HOME)/.%,$(LOCAL_BIN_SOURCES)) \
|
||||||
$(HOME)/.config/i3/config
|
$(HOME)/.config/i3/config
|
||||||
|
|
||||||
$(HOME)/.%: %
|
$(HOME)/.%: %
|
||||||
$(RM) '$@' && mkdir -p $(dir $@) && ln -svf '$(PWD)/$^' '$@'
|
$(RM) '$@' && mkdir -p $(dir $@) && ln -svf '$(PWD)/$^' '$@'
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: $(HOME)/.config $(TARGETS)
|
all: $(HOME)/.config $(HOME)/.local/bin $(TARGETS)
|
||||||
|
|
||||||
$(HOME)/.config:
|
$(HOME)/.config:
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
|
$(HOME)/.local/bin:
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
.PHONY: echo
|
.PHONY: echo
|
||||||
echo:
|
echo:
|
||||||
@echo TOP_SOURCES=$(TOP_SOURCES)
|
@echo TOP_SOURCES=$(TOP_SOURCES)
|
||||||
@echo CONFIG_SOURCES=$(CONFIG_SOURCES)
|
@echo CONFIG_SOURCES=$(CONFIG_SOURCES)
|
||||||
|
@echo LOCAL_BIN_SOURCES=$(LOCAL_BIN_SOURCES)
|
||||||
@echo TARGETS=$(TARGETS)
|
@echo TARGETS=$(TARGETS)
|
||||||
|
@ -7,6 +7,8 @@ window:
|
|||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
dynamic_padding: false
|
dynamic_padding: false
|
||||||
|
decorations: none
|
||||||
|
startup_mode: Maximized
|
||||||
scrolling:
|
scrolling:
|
||||||
history: 10000
|
history: 10000
|
||||||
multiplier: 3
|
multiplier: 3
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
|
|
||||||
font pango:DejaVu Sans Mono 12
|
font pango:Comic Code Bold 13
|
||||||
|
|
||||||
exec "setxkbmap -layout dvorak"
|
exec "setxkbmap -layout dvorak"
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ exec "setxkbmap -layout dvorak"
|
|||||||
floating_modifier $mod
|
floating_modifier $mod
|
||||||
|
|
||||||
# start a terminal
|
# start a terminal
|
||||||
bindsym $mod+Return exec xfce4-terminal
|
bindsym $mod+Return exec alacritty
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+Shift+q kill
|
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 XF86AudioRaiseVolume exec pactl set-sink-volume 0 +1000
|
||||||
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
|
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
|
||||||
|
|
||||||
bindsym XF86MonBrightnessDown exec ~/.i3status-update-do xbacklight -5
|
bindsym XF86MonBrightnessDown exec ~/.local/bin/i3status-update-do xbacklight -5
|
||||||
bindsym XF86MonBrightnessUp exec ~/.i3status-update-do xbacklight +5
|
bindsym XF86MonBrightnessUp exec ~/.local/bin/i3status-update-do xbacklight +5
|
||||||
|
|
||||||
bindsym XF86Tools exec i3lock -c ed1c24
|
bindsym XF86Tools exec i3lock -c ed1c24
|
||||||
bindsym XF86Calculator exec xcalc
|
bindsym XF86Calculator exec xcalc
|
||||||
bindsym XF86Display exec ~/.i3-screenlayout-toggle
|
bindsym XF86Display exec ~/.local/bin/i3-screenlayout-toggle
|
||||||
bindsym Print exec xfce4-screenshooter
|
bindsym Print exec xfce4-screenshooter
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that)
|
# 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
|
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||||
# finds out, if available)
|
# finds out, if available)
|
||||||
bar {
|
bar {
|
||||||
status_command "i3status | python ~/.i3wrapper.py"
|
status_command "i3status | python ~/.local/bin/i3wrapper.py"
|
||||||
}
|
}
|
||||||
|
32
config/kitty/kitty.conf
Normal file
32
config/kitty/kitty.conf
Normal file
@ -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
|
@ -4,3 +4,5 @@ temp-night=3000
|
|||||||
transition=1
|
transition=1
|
||||||
brightness-day=1.0
|
brightness-day=1.0
|
||||||
brightness-night=0.8
|
brightness-night=0.8
|
||||||
|
|
||||||
|
# vim:filetype=cfg
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
: "${BRIGHTNESS_DAY:=100}"
|
: "${BRIGHTNESS_DAY:=100}"
|
@ -1,5 +1,5 @@
|
|||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/home/me/.redshift-gtk-wrapper
|
ExecStart=/home/me/.local/bin/redshift-gtk-wrapper
|
||||||
SyslogIdentifier=
|
SyslogIdentifier=
|
||||||
SyslogIdentifier=redshift-gtk
|
SyslogIdentifier=redshift-gtk
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/home/me/.redshift-wrapper
|
ExecStart=/home/me/.local/bin/redshift-wrapper
|
||||||
SyslogIdentifier=
|
SyslogIdentifier=
|
||||||
SyslogIdentifier=redshift
|
SyslogIdentifier=redshift
|
||||||
|
@ -1,24 +1,28 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
exec "${REDSHIFT_EXE:-redshift}" -l "$(__get_lat_lon)" -v
|
if [[ "${DEBUG}" ]]; then
|
||||||
|
set -o xtrace
|
||||||
|
fi
|
||||||
|
_get_lat_lon
|
||||||
}
|
}
|
||||||
|
|
||||||
__get_lat_lon() {
|
_get_lat_lon() {
|
||||||
: "${IP_LOOKUP_URL:=https://eeloo.humans.rip/ip}"
|
: "${IP_LOOKUP_URL:=https://ifconfig.co/ip}"
|
||||||
: "${GEOIP_LOOKUP_HOST:=http://api.geoiplookup.net}"
|
: "${GEOIP_LOOKUP_HOST:=http://api.geoiplookup.net}"
|
||||||
|
|
||||||
local ipaddr
|
local ipaddr
|
||||||
ipaddr="$(curl -sSL "${IP_LOOKUP_URL}")"
|
ipaddr="$(curl -fsSL "${IP_LOOKUP_URL}")"
|
||||||
|
|
||||||
local geoip_xml
|
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 <<EOPYTHON
|
python <<EOPYTHON
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import sys
|
import sys
|
@ -3,7 +3,7 @@ set -o errexit
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
export REDSHIFT_EXE=redshift-gtk
|
export REDSHIFT_EXE=redshift-gtk
|
||||||
exec ~/.redshift-wrapper "${@}"
|
exec ~/.local/bin/redshift-wrapper "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
main "${@}"
|
main "${@}"
|
12
local/bin/redshift-wrapper
Executable file
12
local/bin/redshift-wrapper
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
main() {
|
||||||
|
: "${FALLBACK_COORDS:=40.4325:-79.863}"
|
||||||
|
local coords
|
||||||
|
coords="$(~/.local/bin/latlon 2>/dev/null || echo "${FALLBACK_COORDS}")"
|
||||||
|
exec "${REDSHIFT_EXE:-redshift}" -l "${coords}" -v
|
||||||
|
}
|
||||||
|
|
||||||
|
main "${@}"
|
@ -20,6 +20,9 @@ main() {
|
|||||||
printf '# THINKFAN_STEP=%s\n\n' "${THINKFAN_STEP}"
|
printf '# THINKFAN_STEP=%s\n\n' "${THINKFAN_STEP}"
|
||||||
|
|
||||||
find /sys -type f -name 'temp*_input' | while read -r line; do
|
find /sys -type f -name 'temp*_input' | while read -r line; do
|
||||||
|
if [[ "${line}" =~ thinkpad_hwmon ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
printf 'hwmon %s\n' "${line}"
|
printf 'hwmon %s\n' "${line}"
|
||||||
done
|
done
|
||||||
|
|
9
vimrc
9
vimrc
@ -29,6 +29,8 @@ endif
|
|||||||
|
|
||||||
au BufRead,BufNewFile Pipfile setfiletype toml
|
au BufRead,BufNewFile Pipfile setfiletype toml
|
||||||
au BufRead,BufNewFile *.gcfg setfiletype gitconfig
|
au BufRead,BufNewFile *.gcfg setfiletype gitconfig
|
||||||
|
au BufRead,BufNewFile Pipfile setfiletype toml
|
||||||
|
au BufWritePre *.py execute ':Black'
|
||||||
au QuickFixCmdPost *grep* cwindow
|
au QuickFixCmdPost *grep* cwindow
|
||||||
au BufWritePre *.py execute ':Black'
|
au BufWritePre *.py execute ':Black'
|
||||||
|
|
||||||
@ -40,6 +42,13 @@ let g:airline_powerline_fonts = 1
|
|||||||
let g:go_fmt_command = "goimports"
|
let g:go_fmt_command = "goimports"
|
||||||
let g:python_highlight_all = 1
|
let g:python_highlight_all = 1
|
||||||
let g:rustfmt_autosave = 1
|
let g:rustfmt_autosave = 1
|
||||||
|
let g:shfmt_extra_args = '-i 2'
|
||||||
|
let g:shfmt_fmt_on_save = 1
|
||||||
|
let g:syntastic_always_populate_loc_list = 1
|
||||||
|
let g:syntastic_auto_loc_list = 1
|
||||||
|
let g:syntastic_check_on_open = 1
|
||||||
|
let g:syntastic_check_on_wq = 0
|
||||||
|
let g:syntastic_python_checkers = ['flake8']
|
||||||
let g:terraform_align = 1
|
let g:terraform_align = 1
|
||||||
let g:terraform_fmt_on_save = 1
|
let g:terraform_fmt_on_save = 1
|
||||||
let g:vim_markdown_folding_disabled = 1
|
let g:vim_markdown_folding_disabled = 1
|
||||||
|
11
zshrc
11
zshrc
@ -83,6 +83,7 @@ plugins=(
|
|||||||
ruby
|
ruby
|
||||||
tmux
|
tmux
|
||||||
vagrant
|
vagrant
|
||||||
|
vault
|
||||||
vi-mode
|
vi-mode
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -150,6 +151,10 @@ function start-ssh-agent() {
|
|||||||
ssh-agent >~/.ssh/agent.out
|
ssh-agent >~/.ssh/agent.out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setup-ssh-agent() {
|
||||||
|
start-ssh-agent && load-ssh-agent
|
||||||
|
}
|
||||||
|
|
||||||
function __maybesource() {
|
function __maybesource() {
|
||||||
if [[ -f "${1}" ]]; then
|
if [[ -f "${1}" ]]; then
|
||||||
if [[ "${2}" == silent ]]; then
|
if [[ "${2}" == silent ]]; then
|
||||||
@ -208,4 +213,10 @@ if nvm &>/dev/null; then
|
|||||||
nvm use --delete-prefix lts/erbium --silent
|
nvm use --delete-prefix lts/erbium --silent
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if kitty --version &>/dev/null; then
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
kitty + complete setup zsh | source /dev/stdin
|
||||||
|
fi
|
||||||
|
|
||||||
true
|
true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user