work on polybar, remove old linker scripts, fix bug in a provisioning script

This commit is contained in:
Daniel Flanagan 2017-02-08 13:08:47 -06:00
parent adc70176b6
commit 76a963b119
6 changed files with 12 additions and 105 deletions

View file

@ -18,7 +18,7 @@ primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/example]
[bar/lytedev]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 27

View file

@ -1,35 +0,0 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../.." && pwd)
source "$DIR/variables.bash"
MODULE_PATH="$DOTFILES_PATH/env/x"
mkdir -p "$HOME/.config/gtk-3.0"
rm -f "$HOME/.xinitrc"
rm -f "$HOME/.Xresources"
rm -f "$HOME/.gtkrc-2.0"
rm -f "$HOME/.config/gtk-3.0/settings.ini"
rm -f "$HOME/.config/compton.conf"
rm -f "$HOME/.xprofile"
ln -s "$MODULE_PATH/xinitrc" "$HOME/.xinitrc"
ln -s "$MODULE_PATH/xresources" "$HOME/.Xresources"
ln -s "$MODULE_PATH/gtk3settings.ini" "$HOME/.config/gtk-3.0/settings.ini"
ln -s "$MODULE_PATH/gtk2rc" "$HOME/.gtkrc-2.0"
ln -s "$MODULE_PATH/compton.conf" "$HOME/.config/compton.conf"
ln -s "$MODULE_PATH/xprofile" "$HOME/.xprofile"
sudo mkdir -p /root/.gtk-3.0/
sudo mkdir -p /root/.config/gtk-3.0/
sudo rm -f "/root/.gtkrc-2.0"
sudo rm -f "/root/.gtk-3.0/settings.ini"
sudo rm -f "/root/.config/gtk-3.0/settings.ini"
sudo ln -s "$MODULE_PATH/gtk2rc" "/root/.gtkrc-2.0"
sudo ln -s "$MODULE_PATH/gtk3settings.ini" "/root/.gtk-3.0/settings.ini"
sudo ln -s "$MODULE_PATH/gtk3settings.ini" "/root/.config/gtk-3.0/settings.ini"
sudo rm -f "/etc/udev/rules.d/90-usb-device-plugin.rules"
sudo ln -s "$MODULE_PATH/udev_rules/90-usb-device-plugin.rules" "/etc/udev/rules.d/90-usb-device-plugin.rules"
source "$MODULE_PATH/xloadresources"

View file

@ -12,7 +12,7 @@ pacaur -S \
avr-libc avr-gcc dfu-programmer dfu-util \
xorg-xbacklight \
gimp \
audacity
audacity \
reptyr \
cmake python2 python2-pip \
lightdm \

2
setup
View file

@ -39,7 +39,7 @@ links=(
"$dfp/common/colors/xresources" "$HOME/.Xresources.colors"
# bar files
"$dfp/de/bar/polybar-config" "$XDG_CONFIG_HOME/polybar/example"
"$dfp/de/bar/polybar-config" "$XDG_CONFIG_HOME/polybar/config"
# shell files
"$dfp/shell/bashrc" "$HOME/.bashrc"

View file

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# TODO: all symlinks in one place?
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../.." && pwd)
source $DIR/variables.bash
mkdir -p "$HOME/.tmux/layouts"
MODULE_PATH="$DOTFILES_PATH/env/sh"
rm -f "$HOME/.bashrc"
rm -f "$HOME/.bash_profile"
rm -f "$HOME/.tmux.conf"
rm -f "$HOME/.tmux/layouts/dev.tmux"
# rm -f "$HOME/.inputrc" # now loaded separately
ln -s "$MODULE_PATH/bashrc" "$HOME/.bashrc"
ln -s "$MODULE_PATH/bash_profile" "$HOME/.bash_profile"
ln -s "$MODULE_PATH/tmux.conf" "$HOME/.tmux.conf"
ln -s "$MODULE_PATH/tmux-layouts/" "$HOME/.tmux/layouts/"
# ln -s "$MODULE_PATH/inputrc" "$HOME/.inputrc" # now loaded by bashrc
# separately
sed -i "/export DOTFILES_PATH/c export DOTFILES_PATH=\"$DIR\"" "$HOME/.bashrc"
echo "You should re-source ~/.bashrc ;)"

View file

@ -7,43 +7,11 @@ calc() {
export -f calc
stopbar() {
if [[ -f "$BAR_PID_FILE" ]]; then
kill -SIGTERM $(cat "$BAR_PID_FILE")
kill -SIGTERM $(cat "$BAR_PID_FILE"*.pid)
kill -SIGTERM $(cat "$BAR_PATH"/modules/*.pid)
rm -f "$BAR_PID_FILE"
rm "$BAR_PID_FILE"*.pid
rm "$BAR_PATH"/modules/*.pid
else
echo "Bar is not running."
fi
}
export -f stopbar
# wm aliases
startbar() {
if [[ -f "$BAR_PID_FILE" ]]; then
stopbar
fi
"$BAR_PATH/start.bash" &
BAR_PID=$!
echo "$BAR_PID" > "$BAR_PID_FILE"
kill -CONT "$BAR_PID"
# bg
# disown
# lower the bar's layer so fullscreen windows cover it
wid=$(xdo id -a "$BAR_WID")
tries=20
while [ -z "$wid" -a "$tries" -gt 0 ]; do
sleep 0.1
wid=$(xdo id -a "$BAR_WID")
tries=$((tries - 1))
echo "WID $wid"
done
[ -n "$wid" ] && xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" "$wid"
fg
}
export -f startbar