From a2cc7a788abbd2e7f9a57115e9050ec6eda7967a Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Thu, 26 Mar 2020 09:46:11 -0400 Subject: [PATCH] Move executables into local/bin and fix known bustedness --- Makefile | 8 +++++++- config/i3/config | 8 ++++---- config/systemd/user/redshift-gtk.service.d/override.conf | 2 +- config/systemd/user/redshift.service.d/override.conf | 2 +- .../bin/i3-screenlayout-toggle | 0 i3status-update-do => local/bin/i3status-update-do | 0 i3wrapper.py => local/bin/i3wrapper.py | 0 get-coords => local/bin/latlon | 0 redshift-gtk-wrapper => local/bin/redshift-gtk-wrapper | 2 +- redshift-wrapper => local/bin/redshift-wrapper | 2 +- thinkfan-confgen => local/bin/thinkfan-confgen | 0 11 files changed, 15 insertions(+), 9 deletions(-) rename i3-screenlayout-toggle => local/bin/i3-screenlayout-toggle (100%) rename i3status-update-do => local/bin/i3status-update-do (100%) rename i3wrapper.py => local/bin/i3wrapper.py (100%) rename get-coords => local/bin/latlon (100%) rename redshift-gtk-wrapper => local/bin/redshift-gtk-wrapper (68%) rename redshift-wrapper => local/bin/redshift-wrapper (71%) rename thinkfan-confgen => local/bin/thinkfan-confgen (100%) 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/i3/config b/config/i3/config index 8f8efc3..c5b0688 100644 --- a/config/i3/config +++ b/config/i3/config @@ -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/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/get-coords b/local/bin/latlon similarity index 100% rename from get-coords rename to local/bin/latlon diff --git a/redshift-gtk-wrapper b/local/bin/redshift-gtk-wrapper similarity index 68% rename from redshift-gtk-wrapper rename to local/bin/redshift-gtk-wrapper index 33de50f..080b031 100755 --- a/redshift-gtk-wrapper +++ b/local/bin/redshift-gtk-wrapper @@ -3,7 +3,7 @@ set -o errexit main() { export REDSHIFT_EXE=redshift-gtk - exec ~/.redshift-wrapper "${@}" + exec ~/.local/bin/redshift-wrapper "${@}" } main "${@}" diff --git a/redshift-wrapper b/local/bin/redshift-wrapper similarity index 71% rename from redshift-wrapper rename to local/bin/redshift-wrapper index f8b261e..efdffb5 100755 --- a/redshift-wrapper +++ b/local/bin/redshift-wrapper @@ -5,7 +5,7 @@ set -o pipefail main() { : "${FALLBACK_COORDS:=40.4325:-79.863}" local coords - coords="$(~/.get-coords 2>/dev/null || echo "${FALLBACK_COORDS}")" + coords="$(~/.local/bin/latlon 2>/dev/null || echo "${FALLBACK_COORDS}")" exec "${REDSHIFT_EXE:-redshift}" -l "${coords}" -v } diff --git a/thinkfan-confgen b/local/bin/thinkfan-confgen similarity index 100% rename from thinkfan-confgen rename to local/bin/thinkfan-confgen