More updates for fish migration
This commit is contained in:
parent
5b05be9fe7
commit
5f0fa76a67
2
Makefile
2
Makefile
|
@ -3,4 +3,4 @@ MAKEFILE_PATH ?= $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|||
default: install
|
||||
|
||||
install:
|
||||
${MAKEFILE_PATH}/setup
|
||||
${MAKEFILE_PATH}/setup.bash
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
BORDER_WIDTH=5 # change in bspwmrc
|
||||
export WINDOW_GAP=25
|
||||
DESKTOPS=$(seq 10)
|
||||
export WINDOW_GAP=0
|
||||
NUM_DESKTOPS=10
|
||||
DESKTOPS=$(seq "$NUM_DESKTOPS")
|
||||
|
||||
BSPWM_MONITORS=$(bspc query -M | tac)
|
||||
MONITOR_COUNT=$(<<< "${BSPWM_MONITORS}" wc -w | awk '{ printf $1 }')
|
||||
NUM_DESKTOPS=${#DESKTOPS[@]}
|
||||
MONITOR_COUNT=$(<<< "$BSPWM_MONITORS" wc -w | awk '{ printf $1 }')
|
||||
PER_MONITOR=$((NUM_DESKTOPS / MONITOR_COUNT))
|
||||
REVERSE_DESKTOP_ORDERING=0
|
||||
REVERSE_DESKTOP_ORDERING=${REVERSE_DESKTOP_ORDERING:-0}
|
||||
|
||||
. maybe_source_env_file bspwm
|
||||
|
||||
|
@ -28,21 +27,20 @@ bspc config window_gap "$WINDOW_GAP"
|
|||
bspc rule -a "*" split_dir=right
|
||||
|
||||
i=1
|
||||
for mon in ${BSPWM_MONITORS}; do
|
||||
for mon in $BSPWM_MONITORS; do
|
||||
max=$((i + PER_MONITOR - 1))
|
||||
screens=
|
||||
for j in $(seq $i $max); do
|
||||
ind=${DESKTOPS[$((j - 1))]}
|
||||
screens="${screens}${ind} "
|
||||
screens="${screens}${j} "
|
||||
done
|
||||
bspc monitor "$mon" -d $screens
|
||||
i=$((max + 1))
|
||||
done
|
||||
|
||||
if [[ $REVERSE_DESKTOP_ORDERING -eq 1 ]]; then
|
||||
if [ $REVERSE_DESKTOP_ORDERING -eq 1 ]; then
|
||||
prev_mon=
|
||||
for mon in ${BSPWM_MONITORS}; do
|
||||
if [[ ! -z $prev_mon ]]; then
|
||||
if [ ! -z $prev_mon ]; then
|
||||
bspc monitor "$mon" --swap "$prev_mon"
|
||||
fi
|
||||
prev_mon="$mon"
|
||||
|
|
|
@ -1,18 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
source "$HOME/.bashrc"
|
||||
|
||||
# NO_COMPTON=1
|
||||
BORDER_WIDTH=5 # change in bspwm_config, here for launcher
|
||||
NO_COMPTON=1
|
||||
START_BAR=1
|
||||
BAR_COMMAND="$DOTFILES_PATH/apps/de/polybar/run"
|
||||
|
||||
if [[ -z "$XDG_CONFIG_HOME" ]]; then
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
fi
|
||||
if [[ -z "$DOTFILES_PATH" ]]; then
|
||||
export DOTFILES_PATH="$XDG_CONFIG_HOME/dotfiles"
|
||||
fi
|
||||
BAR_COMMAND="startbar"
|
||||
|
||||
BSPWM_STATE_FILE="$HOME/.bspwm_state"
|
||||
|
||||
|
@ -21,15 +11,16 @@ if [ -e "$BSPWM_STATE" ] ; then
|
|||
rm "$BSPWM_STATE"
|
||||
fi
|
||||
|
||||
source "$DOTFILES_PATH/apps/de/bspwm/config"
|
||||
export BORDER_WIDTH=5
|
||||
. "$DOTFILES_PATH/apps/de/bspwm/config"
|
||||
|
||||
[ -f "$DOTFILES_PATH/apps/de/x/loadresources" ] && "$DOTFILES_PATH/apps/de/x/loadresources"
|
||||
[ -f "$HOME/.fehbg" ] && "$HOME/.fehbg" &
|
||||
[ "$NO_COMPTON" -ne 1 ] && has_command compton && compton &
|
||||
[ "$START_BAR" -eq 1 ] && has_command "${BAR_COMMAND}" && "${BAR_COMMAND}" &
|
||||
has_command urxvtd && urxvtd &
|
||||
has_command dunst && dunst &
|
||||
has_command sxhkd && sxhkd -m -1 &
|
||||
has_command unclutter && unclutter &
|
||||
[[ "$NO_COMPTON" -ne 1 ]] && has_command compton && compton &
|
||||
[[ $START_BAR -eq 1 ]] && ${BAR_COMMAND} &
|
||||
|
||||
bspc wm -o
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
export BAR_MONITOR="$(polybar --list-monitors | tail -n 1 | sed -n 's/^\s*\(.*\):.*$/\1/p')"
|
||||
# export BAR_MONITOR="$(polybar --list-monitors | tail -n 2 | head -n 1 | sed -n 's/^\s*\(.*\):.*$/\1/p')"
|
||||
export BAR_HEIGHT=40
|
||||
export BAR_ON_TOP=0
|
||||
export BAR_SIDE_MARGIN=200
|
||||
export BAR_SIDE_MARGIN=0
|
||||
|
||||
export BAR_FONT="${BAR_FONT:-$(xrdb -query | sed -ne 's/.*font:\s*xft:\([^:]*\)\:.*$/\1/p' | head -n 1)}"
|
||||
export BAR_FONT="${BAR_FONT:-$(xrdb -query | sed -ne 's/.*font:\s*xft:\([^:]*\)\:.*$/\1/p' | head -n 1)}"
|
||||
export BAR_ICON_FONT="${BAR_ICON_FONT:-"Font Awesome 5 Free"}"
|
||||
export BAR_FONT_SIZE="${BAR_FONT_SIZE:-$(xrdb -query | sed -ne 's/.*font:\s*xft:[^-,]*\=\([0-9]*\).*$/\1/p' | head -n 1)}"
|
||||
export BAR_ICON_FONT_SIZE="${BAR_ICON_FONT_SIZE:-$((BAR_FONT_SIZE))}"
|
||||
|
@ -41,12 +41,12 @@ fi
|
|||
|
||||
if [ "$BAR_ON_TOP" -eq 1 ]; then
|
||||
export BAR_BOTTOM="false"
|
||||
export POS_Y=$GAP
|
||||
export POS_Y="$GAP"
|
||||
bspc config -m "${BAR_MONITOR}" top_padding "$EHEIGHT"
|
||||
bspc config -m "${BAR_MONITOR}" bottom_padding "0"
|
||||
else
|
||||
export BAR_BOTTOM="true"
|
||||
export POS_Y=$GAP
|
||||
export POS_Y="$GAP"
|
||||
bspc config -m "${BAR_MONITOR}" top_padding "0"
|
||||
bspc config -m "${BAR_MONITOR}" bottom_padding "$EHEIGHT"
|
||||
fi
|
||||
|
|
|
@ -152,7 +152,7 @@ super + ctrl + b
|
|||
|
||||
# spawn a transparent node
|
||||
super + alt + t
|
||||
urxvtc && compton-trans -c -o 0
|
||||
"$TERMINAL" && compton-trans -c -o 0
|
||||
|
||||
# make current node transparent
|
||||
super + t
|
||||
|
@ -168,7 +168,7 @@ super + shift + t
|
|||
|
||||
# spawn a terminal
|
||||
super + Return
|
||||
urxvtc
|
||||
"$TERMINAL"
|
||||
|
||||
# spawn a rock-solid and reliable terminal for when I break things
|
||||
super + alt + Return
|
||||
|
@ -176,7 +176,7 @@ super + alt + Return
|
|||
|
||||
# spawn a floating terminal
|
||||
super + shift + Return
|
||||
bspc rule -a '*' -o state=floating && "urxvtc"
|
||||
bspc rule -a '*' -o state=floating && "$TERMINAL"
|
||||
|
||||
# spawn the app launcher
|
||||
super + space
|
||||
|
@ -256,7 +256,7 @@ super + d
|
|||
xdotool key super+4 && sleep 0.1 && xdotool key shift+4 && xdotool key shift+4 && xdotool key shift+4 && sleep 0.2 && xdotool key super+1 && xdotool key super+3
|
||||
|
||||
super + ctrl + c
|
||||
bspc rule -a '*' -o state=floating && urxvtc --geometry 64x9 -e sh -c "cal -n 3 && bash"
|
||||
bspc rule -a '*' -o state=floating && urxvt --geometry 64x9 -e sh -c "cal -n 3 && bash"
|
||||
|
||||
super + shift + v
|
||||
kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.pid")
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "xload init" > /tmp/xload
|
||||
echo "ep: $ENV_PATH" > /tmp/xload
|
||||
xqm() {
|
||||
f="$1"; shift; [ -f "$f" ] && xrdb -merge "$f" "$@" &>/dev/null && echo "xqm LOADING $f" >> /tmp/xload
|
||||
f="$1"; shift; [ -f "$f" ] && xrdb -merge "$f" "$@" &>/dev/null
|
||||
}
|
||||
|
||||
xqm "/etc/X11/xinit/.Xresources"
|
||||
|
|
|
@ -52,7 +52,8 @@ if has_command nvim; then
|
|||
fi
|
||||
|
||||
# load a per-device config last so anything can be overridden
|
||||
. maybe_source_env_file bash
|
||||
. maybe_source_env_file bashrc
|
||||
. maybe_source_env_file .hidden/bashrc
|
||||
|
||||
# create paths we kind of expect to exist in some scripts
|
||||
mkdir -p "${NOTES_PATH}"
|
||||
|
|
|
@ -131,7 +131,7 @@ alias btctl "bt"
|
|||
alias btctl "sudo bluetoothctl"
|
||||
alias pbcopy "clip"
|
||||
alias pt "htop -t" # experimental htop tree-view-by-default
|
||||
alias resrc "source $HOME/.bashrc"
|
||||
alias resrc "source $XDG_CONFIG_HOME/fish/config.fish"
|
||||
alias redshift "redshift -r -l 39.0997:-94.5786 -t 6500K:2500K"
|
||||
alias gpmdpe "electron --app=/usr/share/gpmdp/resources/app.asar"
|
||||
alias t "task"
|
||||
|
|
|
@ -5,6 +5,7 @@ set -U DOTFILES_PATH $XDG_CONFIG_HOME/dotfiles
|
|||
set -U ENV_PATH $HOME/.env
|
||||
|
||||
$DOTFILES_PATH/bin/lib/colors/shell
|
||||
$DOTFILES_PATH/bin/prelude
|
||||
|
||||
function source_if_exists
|
||||
test -f $ENV_PATH/$argv[1] && source $argv[1]
|
||||
|
@ -46,7 +47,7 @@ source $DOTFILES_PATH/apps/shell/fish/aliases.fish
|
|||
set -U _JAVA_AWT_WM_NONREPARENTING 1
|
||||
# set -U LS_COLORS 'ow=01;36;40'
|
||||
set -U LESS -x2 # less tab size of 2 spaces
|
||||
set -U TERMINAL urxvtc
|
||||
set -U TERMINAL kitty
|
||||
set -U BROWSER firefox-developer-edition
|
||||
set -U ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history
|
||||
|
||||
|
@ -58,7 +59,12 @@ if command -v nvim 2>&1 >/dev/null
|
|||
set -U EDITOR nvim
|
||||
end
|
||||
|
||||
_make_paths
|
||||
# load a per-device config last so anything can be overridden
|
||||
# TODO: this does not work quite right for fish?
|
||||
maybe_source_env_file config.fish
|
||||
maybe_source_env_file .hidden/config.fish
|
||||
|
||||
mkdir -p $NOTES_PATH
|
||||
|
||||
command -v fd 2>&1 >/dev/null && set -U FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git'
|
||||
|
||||
|
|
|
@ -8,5 +8,3 @@ command -v python 2>&1 >/dev/null && set -U fish_user_paths (python -m site --us
|
|||
command -v ruby 2>&1 >/dev/null && set -U fish_user_paths (ruby -e 'print Gem.user_dir')"/bin" $fish_user_paths
|
||||
|
||||
set -U NOTES_PATH $NICE_HOME/doc/notes
|
||||
|
||||
function _make_paths; mkdir -p $NOTES_PATH; end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
source "$DOTFILES_PATH/apps/de/polybar/run" --just-vars
|
||||
. "$DOTFILES_PATH/apps/de/polybar/run" --just-vars
|
||||
|
||||
LAUNCHER_FONT="$BAR_FONT"
|
||||
LAUNCHER_FONT_SIZE="$BAR_FONT_SIZE"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "Not implemented yet!"; exit 1
|
||||
|
||||
edfp="$ENV_PATH/$1"
|
||||
mkdir -p "$edfp/"
|
||||
mkdir -p "$edfp/.hidden/bash.d/"
|
||||
|
|
9
bin/gcwd
9
bin/gcwd
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
addon=""
|
||||
if [[ -n $1 ]]; then
|
||||
addon="-${1}"
|
||||
fi
|
||||
# TODO: must be sourced so as to not run in subshell?
|
||||
|
||||
addon=""; [ -n "$1" ] && addon="-${1}"
|
||||
cd "$(cat "${DOTFILES_PATH}/.cwd${addon}.tmp")" || return
|
||||
|
|
|
@ -17,4 +17,3 @@ NICE_HOME="$HOME"
|
|||
export NICE_HOME
|
||||
|
||||
. "$DOTFILES_PATH/bin/paths"
|
||||
|
||||
|
|
7
bin/scwd
7
bin/scwd
|
@ -1,7 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
addon=""
|
||||
if [[ -n $1 ]]; then
|
||||
addon="-${1}"
|
||||
fi
|
||||
addon=""; [ -n "$1" ] && addon="-${1}"
|
||||
echo "${PWD}" > "${DOTFILES_PATH}/.cwd${addon}.tmp"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
"${DOTFILES_PATH}/apps/de/polybar/run"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
fmt='#{session_id}:|#S|(#{session_attached} attached)'
|
||||
{ tmux display-message -p -F "$fmt" && tmux list-sessions -F "$fmt"; } \
|
||||
|
|
12
bin/workdock
12
bin/workdock
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# TODO: move to laptop env
|
||||
resrc
|
||||
. maybe_source_env_file workdock
|
||||
"${DOTFILES_PATH}/apps/de/x/loadresources" lodpi
|
||||
autorandr --change
|
||||
"${DOTFILES_PATH}/apps/de/bspwm/bspwmrc"
|
||||
"${DOTFILES_PATH}/apps/de/x/loadresources" lodpi
|
||||
restartbar
|
||||
"${HOME}/.fehbg"
|
||||
. maybe_source_env_file workdock
|
3
env/desktop/bash
vendored
Executable file
3
env/desktop/bash
vendored
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
. "$ENV_PATH/.hidden/bash"
|
4
env/desktop/bspwm
vendored
Executable file
4
env/desktop/bspwm
vendored
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# TODO: this doesn't quite work all the time
|
||||
export REVERSE_DESKTOP_ORDERING=1
|
6
env/desktop/config.fish
vendored
Executable file
6
env/desktop/config.fish
vendored
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
echo whee
|
||||
function I_AM_HELP
|
||||
help
|
||||
end
|
16
env/desktop/x/resources
vendored
Executable file
16
env/desktop/x/resources
vendored
Executable file
|
@ -0,0 +1,16 @@
|
|||
## *.font: xft:scientifica:size=11
|
||||
## *.faceName: xft:scientifica:size=11
|
||||
## URxvt.font: xft:scientifica:size=11
|
||||
## URxvt.faceName: xft:scientifica:size=11
|
||||
|
||||
*.font: xft:Iosevka Term:pixelsize=14,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14
|
||||
*.boldFont: xft:Iosevka Term Semibold:pixelsize=14
|
||||
|
||||
## *.font: xft:curie:pixelsize=10,xft:Noto Emoji,xft:Font Awesome 5 Free,xft:FreeSans
|
||||
## *.boldFont: xft:curie:pixelsize=10,xft:Noto Emoji,xft:Font Awesome 5 Free,xft:FreeSans
|
||||
|
||||
## *.font: xft:scientifica:size=11
|
||||
## *.faceName: xft:scientifica:size=11
|
||||
## URxvt.font: xft:scientifica:size=11
|
||||
## URxvt.faceName: xft:scientifica:size=11
|
||||
|
0
env/laptop/app-launcher
vendored
0
env/laptop/app-launcher
vendored
7
env/laptop/bar
vendored
7
env/laptop/bar
vendored
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export BAR_SIDE_MARGIN=0
|
||||
export BAR_HEIGHT=80
|
||||
|
||||
[[ -v OVERRIDE_BAR_MONITOR ]] && export BAR_MONITOR="$OVERRIDE_BAR_MONITOR"
|
||||
[[ -v OVERRIDE_BAR_HEIGHT ]] && export BAR_HEIGHT="$OVERRIDE_BAR_HEIGHT"
|
3
env/laptop/bash
vendored
3
env/laptop/bash
vendored
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
. maybe_source_env_file .hidden/bash
|
|
@ -1,9 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
resrc
|
||||
|
||||
export OVERRIDE_BAR_MONITOR="DP1"
|
||||
export OVERRIDE_BAR_HEIGHT="24"
|
||||
export BAR_ICON_FONT_SIZE="9"
|
||||
|
||||
"${DOTFILES_PATH}/apps/de/x/loadresources" lodpi
|
||||
autorandr --change
|
||||
"${DOTFILES_PATH}/apps/de/bspwm/bspwmrc"
|
||||
restartbar
|
||||
"${HOME}/.fehbg"
|
||||
"${DOTFILES_PATH}/apps/de/x/loadresources" lodpi
|
||||
xrdb -merge "$ENV_PATH/lodpi-resource"
|
||||
|
||||
xrandr --output eDP1 --scale-from 1600x900 --filter nearest --mode 3200x1800
|
3
env/laptop/bspwm
vendored
3
env/laptop/bspwm
vendored
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export WINDOW_GAP=0
|
|
@ -13,7 +13,7 @@ myself when setting up a new machine.
|
|||
## Setup
|
||||
|
||||
* Clone the repo into `~/.config/dotfiles`
|
||||
* Run `~/.config/dotfiles/setup`
|
||||
* Run `~/.config/dotfiles/setup.bash`
|
||||
* Read the warning, obey it, backup your files, *then* agree
|
||||
* **Optional**: Reboot once the script finishes
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ done
|
|||
links=(
|
||||
# desktop environment files
|
||||
"$dfp/apps/de/bspwm/rc" "$XDG_CONFIG_HOME/bspwm/bspwmrc"
|
||||
"$dfp/apps/de/bspwm/fehbg" "$HOME/.fehbg"
|
||||
"$dfp/apps/de/bspwm/wallpapers" "$HOME/.fehbg"
|
||||
"$dfp/apps/de/sway/config" "$XDG_CONFIG_HOME/sway/config"
|
||||
"$dfp/apps/de/sxhkd/rc" "$XDG_CONFIG_HOME/sxhkd/sxhkdrc"
|
||||
"$dfp/apps/de/x/resources" "$HOME/.Xresources"
|
Reference in a new issue