Update alacritty to also use Iosevka, better shell functions filename, add some other miscellaneous helpers for managing polybar bar and screenshots

This commit is contained in:
Daniel Flanagan 2018-09-05 09:54:30 -05:00
parent b92da9287a
commit 67572b1c4c
8 changed files with 66 additions and 46 deletions

View file

@ -39,19 +39,19 @@ draw_bold_text_with_bright_colors: true
font:
# The normal (roman) font face to use.
normal:
family: Monaco # should be "Menlo" or something on macOS.
family: Iosevka # should be "Menlo" or something on macOS.
# Style can be specified to pick a specific face.
# style: Regular
# The bold font face
bold:
family: Monaco # should be "Menlo" or something on macOS.
family: Iosevka # should be "Menlo" or something on macOS.
# Style can be specified to pick a specific face.
# style: Bold
# The italic font face
italic:
family: Monaco # should be "Menlo" or something on macOS.
family: Iosevka # should be "Menlo" or something on macOS.
# Style can be specified to pick a specific face.
# style: Italic
@ -60,7 +60,7 @@ font:
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
offset:
x: -5.0
x: -37.0
y: 0.0
# OS X only: use thin stroke font rendering. Thin strokes are suitable

View file

@ -614,7 +614,7 @@ last-close = ignore
# multiple: Hide the tab bar if only one tab is open.
# switching: Show the tab bar when switching tabs.
# Default: always
show = multiple
show = switching
# show-switching-delay (Int):
# Time to show the tab bar before hiding it when tabs->show is set
@ -697,13 +697,13 @@ tabs-are-windows = false
# * `{backend}`: Either 'webkit' or 'webengine'
# * `{private}` : Indicates when private mode is enabled.
# Default: {index}: {title}
title-format = {index}: {title}
title-format = {title}
# title-format-pinned (FormatString):
# The format to use for the tab title for pinned tabs. The same
# placeholders like for title-format are defined.
# Default: {index}
title-format-pinned = {index}
title-format-pinned =
# title-alignment (TextAlignment):
# Alignment of the text inside of tabs
@ -1478,12 +1478,12 @@ prompts.selected.bg = #308cc6
# Default: xos4 Terminus, Terminus, Monospace, "DejaVu Sans Mono",
# Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Courier New",
# Courier, "Liberation Mono", monospace, Fixed, Consolas, Terminal
_monospace = Terminus, Monospace, "DejaVu Sans Mono", Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Courier New", Courier, "Liberation Mono", monospace, Fixed, Consolas, Terminal
_monospace = Iosevka, Terminus, Monospace, "DejaVu Sans Mono", Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Courier New", Courier, "Liberation Mono", monospace, Fixed, Consolas, Terminal
# completion (Font):
# Font used in the completion widget.
# Default: 8pt ${_monospace}
completion = 8pt ${_monospace}
completion = 9pt ${_monospace}
# completion.category (Font):
# Font used in the completion categories.

View file

@ -7,12 +7,11 @@ export BAR_ON_TOP=0
export BAR_SIDE_MARGIN=200
MONITOR_WIDTH=$(xrandr | grep "$BAR_MONITOR" | grep -Po ' \d+' | head -n 1)
export BAR_FONT=$(xrdb -query | sed -ne 's/.*font:\s*xft:\([^:]*\)\:.*$/\1/p' | head -n 1)
# export BAR_ICON_FONT="Font Awesome 5 Free"
# export BAR_ICON_FONT_2="Font Awesome 5 Brands"
export BAR_ICON_FONT="FontAwesome"
export BAR_FONT_SIZE=$(xrdb -query | sed -ne 's/.*font:\s*xft:[^-]*\=\([0-9]*\).*$/\1/p' | head -n 1)
export BAR_ICON_FONT_SIZE=$((BAR_FONT_SIZE))
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:-"FontAwesome"}"
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))}"
export GAP=$(bspc wm -d | grep -Po '(windowGap.*?,)' | grep -Po '\-?\d*' | head -n 1)

View file

@ -20,6 +20,8 @@ if [ -f "$HOME/.xmodmap" ]; then
xmodmap "$HOME/.xmodmap"
fi
xcape -e 'Control_L=Escape' &
pulseaudio --start &
xset s off -dpms &

View file

@ -1,2 +1,7 @@
remove Lock = Caps_Lock
keysym Caps_Lock = Escape
! convert caps lock to control
clear Lock
keycode 66 = Control_L
add Control = Control_L
! a fake keycode for xcape
keycode 999 = Escape

View file

@ -104,21 +104,8 @@ alias resrc="source \$HOME/.bashrc"
alias redshift="redshift -l 39.0997:-94.5786"
alias gpmdpe="electron --app=/usr/share/gpmdp/resources/app.asar"
screenshot() {
SCROT_DIR="$NICE_HOME/img/scrots/"
mkdir -p "$SCROT_DIR"
scrot "$@" "$NICE_HOME/img/scrots/%Y-%m-%d_%H-%M-%S_\$wx\$h.png"
}
export -f screenshot
export NOTES_DIR="$NICE_HOME"
n() {
SUBDIR="${2:-}"
mkdir -p "$NICE_HOME/doc/notes/$SUBDIR"
"$EDITOR" "$NICE_HOME/doc/notes/$SUBDIR/$(date +%Y-%m-%d)_$1.md"
}
# games aliases
# this sometimes fixes steam dynamic library issues?
# alias steam="LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' steam"

View file

@ -20,7 +20,7 @@ source "$DOTFILES_PATH/shell/paths"
source "$DOTFILES_PATH/shell/aliases"
# import our global shell functions
source "$DOTFILES_PATH/shell/shell_funcs"
source "$DOTFILES_PATH/shell/funcs"
# import our autocompletions
source "$DOTFILES_PATH/shell/autocompletions"

View file

@ -24,6 +24,33 @@ startbar() {
}
export -f startbar
restartbar() {
stopbar
startbar
}
export -f restartbar
screenshot() {
SCROT_DIR="$NICE_HOME/img/scrots/"
mkdir -p "$SCROT_DIR"
FILENAME="$NICE_HOME/img/scrots/%Y-%m-%d_%H-%M-%S_\$wx\$h.png"
scrot "$@" "${FILENAME}" >/dev/null && echo "Saved screenshot to: ${FILENAME}"
}
export -f screenshot
editscrot() {
SCROT_DIR="$NICE_HOME/img/scrots/"
LATEST_SCROT="$(\ls -Art "${SCROT_DIR}" | tail -n 1)"
krita "${SCROT_DIR}${LATEST_SCROT}"
}
n() {
SUBDIR="${2:-}"
mkdir -p "$NICE_HOME/doc/notes/$SUBDIR"
"$EDITOR" "$NICE_HOME/doc/notes/$SUBDIR/$(date +%Y-%m-%d)_$1.md"
}
export -f n
# save the current directory for later retrieval
scwd() {
addon=""