From 76a963b119eb9ad8ff358786a41ed2b83d59d46a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 8 Feb 2017 13:08:47 -0600 Subject: [PATCH] work on polybar, remove old linker scripts, fix bug in a provisioning script --- de/bar/polybar-config | 6 ++-- de/link.bash | 35 ------------------- .../arch-linux/provisioning/3-extras.bash | 16 ++++----- setup | 2 +- shell/link.bash | 26 -------------- shell/shell_funcs | 32 ----------------- 6 files changed, 12 insertions(+), 105 deletions(-) delete mode 100755 de/link.bash delete mode 100755 shell/link.bash diff --git a/de/bar/polybar-config b/de/bar/polybar-config index 11d55db..16c9644 100644 --- a/de/bar/polybar-config +++ b/de/bar/polybar-config @@ -18,7 +18,7 @@ primary = #ffb52a secondary = #e60053 alert = #bd2c40 -[bar/example] +[bar/lytedev] ;monitor = ${env:MONITOR:HDMI-1} width = 100% height = 27 @@ -202,7 +202,7 @@ label = %percentage_used%% [module/wlan] type = internal/network -interface = +interface = interval = 3.0 format-connected = @@ -224,7 +224,7 @@ ramp-signal-foreground = ${colors.foreground-alt} [module/eth] type = internal/network -interface = +interface = interval = 3.0 format-connected-underline = #55aa55 diff --git a/de/link.bash b/de/link.bash deleted file mode 100755 index 24bb55e..0000000 --- a/de/link.bash +++ /dev/null @@ -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" - diff --git a/os-specific/arch-linux/provisioning/3-extras.bash b/os-specific/arch-linux/provisioning/3-extras.bash index cabfd09..0244240 100755 --- a/os-specific/arch-linux/provisioning/3-extras.bash +++ b/os-specific/arch-linux/provisioning/3-extras.bash @@ -3,18 +3,18 @@ pacaur -S \ gtk-theme-arc \ elementary-icon-theme \ - lemonbar-xft-git \ + lemonbar-xft-git \ thunar thunar-volman gvfs \ thunar-shares-plugin \ gvfs-smb \ - terminus-font ttf-monaco gohufont artwiz-fonts phallus-fonts-git \ - ttf-opensans ttf-dejavu \ + terminus-font ttf-monaco gohufont artwiz-fonts phallus-fonts-git \ + ttf-opensans ttf-dejavu \ avr-libc avr-gcc dfu-programmer dfu-util \ xorg-xbacklight \ gimp \ - audacity + audacity \ reptyr \ - cmake python2 python2-pip \ - lightdm \ - polybar-git \ - --noconfirm --noedit + cmake python2 python2-pip \ + lightdm \ + polybar-git \ + --noconfirm --noedit diff --git a/setup b/setup index b3b96d9..fa0a78a 100755 --- a/setup +++ b/setup @@ -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" diff --git a/shell/link.bash b/shell/link.bash deleted file mode 100755 index 3267920..0000000 --- a/shell/link.bash +++ /dev/null @@ -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 ;)" diff --git a/shell/shell_funcs b/shell/shell_funcs index f87b649..c8fee10 100644 --- a/shell/shell_funcs +++ b/shell/shell_funcs @@ -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