This commit is contained in:
tosu 2024-06-27 14:46:34 +02:00
parent dd884ff057
commit 38bbc87472
4 changed files with 22 additions and 19 deletions

View File

@ -43,9 +43,9 @@ vim.opt.updatetime = 50
vim.opt.paste = false
vim.opt.splitright = false
-- vim.diagnostic.config({
-- virtual_lines = false,
-- virtual_text = false,
-- underline = false,
-- signs = true,
-- })
vim.diagnostic.config({
virtual_lines = false,
virtual_text = false,
underline = false,
signs = true,
})

View File

@ -1,2 +1,2 @@
#! /bin/sh -
exec xrandr --output DP-1 --auto --output eDP-1 --off
exec xrandr --output DP-1 --auto --output eDP-1 --off --output HDMI-1 --off

View File

@ -1,2 +1,2 @@
#! /bin/sh -
exec xrandr --output HDMI-1 --auto --output eDP-1 --off
exec xrandr --output HDMI-1 --auto --output eDP-1 --off --output DP-1 --off

View File

@ -2,20 +2,23 @@
set -e
[ -z "$1" ] && { xargs -n 1 -d '\n' "$0"; exit 0; }
[ -z "${1}" ] && { xargs -n 1 -d '\n' "${0}"; exit 0; }
title=$*
title_len=${#title}
[ $title_len -gt 78 ] && { printf '%s\n' "$title"; exit 0; }
missing=$((80 - title_len - 2))
i=0
while [ $i -lt $((missing / 2)) ]; do
[ -z "${HTITLE_WIDTH}" ] && HTITLE_WIDTH="80" || HTITLE_WIDTH="$((HTITLE_WIDTH + 0))"
[ "${HTITLE_WIDTH}" -lt 0 ] && HTITLE_WIDTH="0"
title="${*}"
title_len="${#title}"
[ "${title_len}" -gt "$((HTITLE_WIDTH - 2))" ] && { printf '%s\n' "${title}"; exit 0; }
missing="$((HTITLE_WIDTH - title_len - 2))"
i="0"
while [ "${i}" -lt "$((missing / 2))" ]; do
printf '#'
i=$((i+1))
i="$((i+1))"
done
printf ' %s ' "$title"
while [ $i -lt $missing ]; do
printf ' %s ' "${title}"
while [ "${i}" -lt "${missing}" ]; do
printf '#'
i=$((i+1))
i="$((i+1))"
done
printf '\n'