update hostnames

This commit is contained in:
Ray Elliott 2020-10-11 12:01:07 +01:00
parent 9a8a6c0960
commit 27a304f586
4 changed files with 116 additions and 105 deletions

View File

@ -21,7 +21,7 @@ if [ "$_hostname" = MachineOne ] ; then
bspc monitor DVI-I-1-1 -d F9 F10 F11 F12 bspc monitor DVI-I-1-1 -d F9 F10 F11 F12
sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.patricia & sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.patricia &
elif [ "$_hostname" = Pamela -o "$_hostname" = MachineTwo ] ; then elif [ "$_hostname" = MachineTwo ] ; then
bspc monitor eDP-1-1 -d one two three four five six seven eight nine zero bspc monitor eDP-1-1 -d one two three four five six seven eight nine zero
# bspc config -m eDP-1-1 border_width 0 # bspc config -m eDP-1-1 border_width 0
sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.pamela & sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.pamela &

View File

@ -1,52 +0,0 @@
#! /bin/sh
if pgrep sxhkd ; then pkill sxhkd; fi
_hostname="$(hostname)"
if [ "$_hostname" = Patricia ] ; then
# create virtual monitors
bspc wm --add-monitor FULLV 1920x2160+1920+0
bspc wm --add-monitor FULLH 3840x1080+1920+1080
# virtual monitors
bspc monitor FULLV -d F1 F2 F3 F4
bspc config -m FULLV border_width 0
bspc monitor FULLH -d F5 F6 F7 F8
bspc config -m FULLH border_width 0
# aoc 1
bspc monitor VGA-1 -d one two three four five six seven eight nine zero
# samsung
bspc monitor DVI-I-1-1 -d F9 F10 F11 F12
sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.patricia &
elif [ "$_hostname" = Pamela ] ; then
bspc monitor eDP-1-1 -d one two three four five six seven eight nine zero
# bspc config -m eDP-1-1 border_width 0
sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.pamela &
fi
bspc config border_width 1
bspc config window_gap 0
bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_follows_pointer true
bspc config external_rules_command ~/.config/bspwm/external.sh
bspc rule -a mpv state=floating follow=on
bspc rule -a Zathura state=fullscreen follow=on
# bspc rule -a Gimp desktop='^8' state=floating follow=on
# bspc rule -a Chromium desktop='^2'
# bspc rule -a mplayer2 state=floating
# bspc rule -a Kupfer.py focus=on
# bspc rule -a Screenkey manage=off
xsetroot -cursor_name left_ptr
bspc config normal_border_color '#222222'
bspc config focused_border_color '#ff0000'
bspc config active_border_color '#222222'

View File

@ -1,52 +0,0 @@
#! /bin/sh
if pgrep sxhkd ; then pkill sxhkd; fi
_hostname="$(hostname)"
if [ "$_hostname" = Patricia ] ; then
# create virtual monitors
bspc wm --add-monitor FULLV 1920x2160+1920+0
bspc wm --add-monitor FULLH 3840x1080+1920+1080
# virtual monitors
bspc monitor FULLV -d F1 F2 F3 F4
bspc config -m FULLV border_width 0
bspc monitor FULLH -d F5 F6 F7 F8
bspc config -m FULLH border_width 0
# aoc 1
bspc monitor VGA-1 -d one two three four five six seven eight nine zero
# samsung
bspc monitor DVI-I-1-1 -d F9 F10 F11 F12
sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.patricia &
elif [ "$_hostname" = Pamela ] ; then
bspc monitor eDP-1-1 -d one two three four five six seven eight nine zero
# bspc config -m eDP-1-1 border_width 0
sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.pamela &
fi
bspc config border_width 1
bspc config window_gap 0
bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_follows_pointer true
bspc config external_rules_command ~/.config/bspwm/external.sh
bspc rule -a mpv state=floating follow=on
bspc rule -a Zathura state=fullscreen follow=on
# bspc rule -a Gimp desktop='^8' state=floating follow=on
# bspc rule -a Chromium desktop='^2'
# bspc rule -a mplayer2 state=floating
# bspc rule -a Kupfer.py focus=on
# bspc rule -a Screenkey manage=off
xsetroot -cursor_name left_ptr
bspc config normal_border_color '#222222'
bspc config focused_border_color '#ff0000'
bspc config active_border_color '#222222'

115
checkupdates Executable file
View File

@ -0,0 +1,115 @@
#!/usr/bin/bash
#
# checkupdates: Safely print a list of pending updates.
#
# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
declare -r myname='checkupdates'
declare -r myver='1.4.0'
LIBRARY=${LIBRARY:-'/usr/share/makepkg'}
DOWNLOAD_CACHE=0
USE_COLOR=0
# Import libmakepkg
source "$LIBRARY"/util/message.sh
source "$LIBRARY"/util/parseopts.sh
usage() {
cat << __EOF__
${myname} v${myver}
Safely print a list of pending updates
Usage: ${myname} [options]
Options:
-d, --download download pending updates to the pacman cache.
-h, --help display this help message and exit.
Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.
__EOF__
}
OPT_SHORT='dh'
OPT_LONG=('download' 'help' 'nocolor')
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
exit 1
fi
set -- "${OPTRET[@]}"
unset OPT_SHORT OPT_LONG OPTRET
while :; do
case $1 in
-d|--download)
DOWNLOAD_CACHE=1 ;;
-h|--help)
usage
exit 0 ;;
--nocolor)
USE_COLOR='n';;
--)
shift
break ;;
esac
shift
done
# check if messages are to be printed using color
if [[ -t 2 && $USE_COLOR != "n" ]]; then
colorize
else
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
fi
if ! type -P fakeroot >/dev/null; then
error 'Cannot find the fakeroot binary.'
exit 1
fi
if [[ -z $CHECKUPDATES_DB ]]; then
CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${UID}/"
fi
trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
DBPath="$(pacman-conf DBPath)"
if [[ -z "$DBPath" ]] || [[ ! -d "$DBPath" ]]; then
DBPath="/var/lib/pacman/"
fi
mkdir -p "$CHECKUPDATES_DB"
ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null
if ! fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null; then
error 'Cannot fetch updates'
exit 1
fi
mapfile -t updates < <(pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]')
if (( ${#updates[@]} )); then
printf '%s\n' "${updates[@]}"
if (( DOWNLOAD_CACHE )); then
sudo pacman -Sw --noconfirm "${updates[@]%% *}" --dbpath "$CHECKUPDATES_DB" --logfile /dev/null
fi
else
exit 2
fi
# vim: set noet: