Compare commits
18 Commits
533cafa56d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dd079c4ef2 | |||
| 732cdffd25 | |||
| 22c64e10a0 | |||
| 88302b9bca | |||
| 7023046b63 | |||
| 6fd661f286 | |||
| 882a27b1cb | |||
| dd11cd9253 | |||
| bfb053a4ef | |||
| 6d5bb72149 | |||
| ee9d27147e | |||
| f4dd706b6a | |||
| dc4de3e6b8 | |||
| 67a6e5fa53 | |||
| 20abc74f48 | |||
| 178608bb04 | |||
| d5dc5f651e | |||
| 0a4c5c39f9 |
@@ -6,16 +6,19 @@ PACKAGES=(
|
||||
|
||||
linux base linux-firmware lvm2 sudo polkit # base
|
||||
pulseaudio pulseaudio-bluetooth bluez bluez-utils networkmanager udisks2 # device management
|
||||
openssh strace sysstat htop screen man-db which rlwrap # system
|
||||
openssh rsync strace sysstat htop screen man-db which dnsutils # system
|
||||
|
||||
nodejs dash jq # runtime
|
||||
qemu-system-x86 # virt
|
||||
postgresql #db
|
||||
|
||||
rlwrap fzf # shell helpers
|
||||
vifm vim less # nav & edit
|
||||
vim-ale vim-fugitive # vim plugins
|
||||
|
||||
just shellcheck # shell scripting
|
||||
git zip # data processing
|
||||
git zip # storage
|
||||
bc xxd # data processing
|
||||
gnupg pass pass-otp pwgen # crypt
|
||||
imv mpv imagemagick gimp # media
|
||||
aichat libqalculate translate-shell # utils
|
||||
@@ -26,8 +29,8 @@ PACKAGES=(
|
||||
neomutt telegram-desktop # communication
|
||||
|
||||
greetd sway swaybg swayidle # desktop basic
|
||||
alacritty bemenu-wayland i3blocks mako libnotify # terminals, ui
|
||||
wev wl-clipboard wtype slurp grim # interaction
|
||||
alacritty wmenu i3blocks mako libnotify # terminals, ui
|
||||
wev wl-clipboard cliphist wtype slurp grim # interaction
|
||||
ttf-roboto ttf-roboto-mono otf-font-awesome # fonts
|
||||
kvantum kvantum-qt5 kvantum-theme-materia materia-gtk-theme # themes
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
shift
|
||||
page="$1"
|
||||
if [ -z "$page" ]; then
|
||||
page="$(
|
||||
man -k . | \
|
||||
(bemenu --prompt "man" || exec ~/.local/bin/bemenu/run.sh) | \
|
||||
sed ' s/\s\+\-.*//;s/ //g'
|
||||
)"
|
||||
fi
|
||||
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "man '$page' || read -n1"
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rl_full="$(cat "$HOME/.config/bemenu/"*.runlist)"
|
||||
rl="$(echo "$rl_full" | cut -d' ' -f2-)"
|
||||
|
||||
inp="$(echo "$rl" | bemenu --prompt ">")"
|
||||
[ -z "$inp" ] && exit 0
|
||||
eval "inp_arr=($inp)"
|
||||
|
||||
exectr=float-sh-keep
|
||||
while IFS= read -r line; do
|
||||
if [[ "$inp" == "$line"* ]]; then
|
||||
exectr="$(echo "$rl_full" | grep -F "$line" -m 1 | cut -d' ' -f1)"
|
||||
fi
|
||||
done <<< "$rl"
|
||||
|
||||
case "$exectr" in
|
||||
exec) exec $inp;;
|
||||
float-sh) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c "($inp)";;
|
||||
float-sh-keep) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "($inp); read -n1";;
|
||||
*) exec bash "$HOME/.local/bin/bemenu/run-$exectr.sh" "${inp_arr[@]}"
|
||||
esac
|
||||
101
arch-user/bin/i3blocks/bandwidth.sh
Executable file
101
arch-user/bin/i3blocks/bandwidth.sh
Executable file
@@ -0,0 +1,101 @@
|
||||
#!/usr/bin/env bash
|
||||
# https://github.com/vivien/i3blocks-contrib/blob/master/bandwidth/bandwidth
|
||||
# Copyright (C) 2012 Stefan Breunig <stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de>
|
||||
# Copyright (C) 2014 kaueraal
|
||||
# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
|
||||
|
||||
# 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 3 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/>.
|
||||
|
||||
# Get custom IN and OUT labels if provided by command line arguments
|
||||
INLABEL="🠟 "
|
||||
OUTLABEL="🠝 "
|
||||
|
||||
# Use the provided interface, otherwise the device used for the default route.
|
||||
if [[ -z $INTERFACE ]] && [[ -n $BLOCK_INSTANCE ]]; then
|
||||
INTERFACE=$BLOCK_INSTANCE
|
||||
elif [[ -z $INTERFACE ]]; then
|
||||
INTERFACE=$(ip route | awk '/^default/ { print $5 ; exit }')
|
||||
fi
|
||||
|
||||
# Exit if there is no default route
|
||||
[[ -z "$INTERFACE" ]] && exit
|
||||
|
||||
# Issue #36 compliant.
|
||||
if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || \
|
||||
(! [ "$TREAT_UNKNOWN_AS_UP" = "1" ] &&
|
||||
! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ])
|
||||
then
|
||||
echo "$INTERFACE down"
|
||||
echo "$INTERFACE down"
|
||||
echo "#FF0000"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# path to store the old results in
|
||||
path="/tmp/$(basename $0)-${INTERFACE}"
|
||||
|
||||
# grabbing data for each adapter.
|
||||
read rx < "/sys/class/net/${INTERFACE}/statistics/rx_bytes"
|
||||
read tx < "/sys/class/net/${INTERFACE}/statistics/tx_bytes"
|
||||
|
||||
# get time
|
||||
time="$(date +%s)"
|
||||
|
||||
# write current data if file does not exist. Do not exit, this will cause
|
||||
# problems if this file is sourced instead of executed as another process.
|
||||
if ! [[ -f "${path}" ]]; then
|
||||
echo "${time} ${rx} ${tx}" > "${path}"
|
||||
chmod 0666 "${path}"
|
||||
fi
|
||||
|
||||
|
||||
# read previous state and update data storage
|
||||
read old < "${path}"
|
||||
echo "${time} ${rx} ${tx}" > "${path}"
|
||||
|
||||
# parse old data and calc time passed
|
||||
old=(${old//;/ })
|
||||
time_diff=$(( $time - ${old[0]} ))
|
||||
|
||||
# sanity check: has a positive amount of time passed
|
||||
[[ "${time_diff}" -gt 0 ]] || exit
|
||||
|
||||
# calc bytes transferred, and their rate in byte/s
|
||||
rx_diff=$(( $rx - ${old[1]} ))
|
||||
tx_diff=$(( $tx - ${old[2]} ))
|
||||
rx_rate=$(( $rx_diff / $time_diff ))
|
||||
tx_rate=$(( $tx_diff / $time_diff ))
|
||||
|
||||
# shift by 10 bytes to get KiB/s. If the value is larger than
|
||||
# 1024^2 = 1048576, then display MiB/s instead
|
||||
|
||||
# incoming
|
||||
echo -n "$INLABEL"
|
||||
rx_kib=$(( $rx_rate >> 10 ))
|
||||
if hash bc 2>/dev/null && [[ "$rx_rate" -gt 1048576 ]]; then
|
||||
printf '%sM' "`echo "scale=1; $rx_kib / 1024" | bc`"
|
||||
else
|
||||
echo -n "${rx_kib}K"
|
||||
fi
|
||||
|
||||
echo -n " "
|
||||
|
||||
# outgoing
|
||||
echo -n "$OUTLABEL"
|
||||
tx_kib=$(( $tx_rate >> 10 ))
|
||||
if hash bc 2>/dev/null && [[ "$tx_rate" -gt 1048576 ]]; then
|
||||
printf '%sM\n' "`echo "scale=1; $tx_kib / 1024" | bc`"
|
||||
else
|
||||
echo "${tx_kib}K"
|
||||
fi
|
||||
@@ -10,5 +10,7 @@ if [ "$stat" = "1" ]; then
|
||||
echo "🔌 $cap% ${w}W"
|
||||
else
|
||||
echo "🔋 $cap% ${w}W"
|
||||
[ "$cap" -lt "15" ] && exit 33
|
||||
if [ "$cap" -lt "15" ]; then
|
||||
exit 33
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
curl "https://wttr.in/?format=%l;%t%20%p" --silent | sed 's/^\(.\{3\}\)\(.*\);/\1 /'
|
||||
echo
|
||||
2
arch-user/bin/menu/horizontal.sh
Executable file
2
arch-user/bin/menu/horizontal.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
eval "wmenu $WMENU_HOPTS \"$@\""
|
||||
@@ -8,13 +8,13 @@
|
||||
#exec 2>/tmp/pinentry.log
|
||||
#set -x
|
||||
|
||||
############################### PATCH #################################
|
||||
. ~/.config/menu/env.sh
|
||||
#######################################################################
|
||||
|
||||
VERSION='1.0'
|
||||
FLAVOR='bash'
|
||||
|
||||
############################### PATCH #################################
|
||||
. ~/.config/bemenu/env.sh
|
||||
#######################################################################
|
||||
|
||||
keyinfo=''
|
||||
error=''
|
||||
timeout=0
|
||||
@@ -125,9 +125,8 @@ cmd_getpin()
|
||||
output="$(
|
||||
echo -n "|"
|
||||
############################### PATCH #################################
|
||||
bemenu \
|
||||
--password indicator \
|
||||
--prompt "${prompt:-$def_prompt}" \
|
||||
~/.local/bin/menu/horizontal.sh \
|
||||
-Pp "${prompt:-$def_prompt}" \
|
||||
</dev/null | tr -d '\n'
|
||||
ret=${PIPESTATUS[0]}
|
||||
# yad \
|
||||
@@ -3,13 +3,13 @@
|
||||
shift
|
||||
query="$1"
|
||||
if [ -z "$query" ]; then
|
||||
query="$(echo "tui" | bemenu --prompt "qalc")"
|
||||
query="$(echo "tui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
|
||||
fi
|
||||
if [ "$query" = "tui" ]; then
|
||||
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "qalc"
|
||||
elif [ -n "$query" ]; then
|
||||
qalc_res="$(qalc --terse "$query")"
|
||||
menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")"
|
||||
menu_res="$(echo -e "$qalc_res\ntui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
|
||||
if [ "$qalc_res" = "$menu_res" ]; then
|
||||
wl-copy "$qalc_res"
|
||||
notify-send "$qalc_res" -a calc "Result copied to clipboard"
|
||||
3
arch-user/bin/menu/run-float-sh-keep.sh
Executable file
3
arch-user/bin/menu/run-float-sh-keep.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c '"$@"; { echo "[exited with code $?]"; read -n1; }' -- "$@"
|
||||
|
||||
2
arch-user/bin/menu/run-float-sh.sh
Executable file
2
arch-user/bin/menu/run-float-sh.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c '"$@"' -- "$@"
|
||||
15
arch-user/bin/menu/run-man.sh
Executable file
15
arch-user/bin/menu/run-man.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
shift
|
||||
page="$1"
|
||||
if [ -z "$page" ]; then
|
||||
page="$(
|
||||
apropos -s 1,5,8 . | \
|
||||
~/.local/bin/menu/vertical.sh -p "man" | \
|
||||
sed 's/ (\([^)]*\)).*/.\1/'
|
||||
)"
|
||||
if [ -z "$page" ]; then
|
||||
exec ~/.local/bin/menu/run.sh
|
||||
fi
|
||||
fi
|
||||
exec ~/.local/bin/menu/run-float-sh.sh "man" "$page"
|
||||
@@ -3,10 +3,10 @@ set -e
|
||||
|
||||
cd "$PASSWORD_STORE_DIR"
|
||||
pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//')"
|
||||
pw="$(echo "$pws" | bemenu --prompt "pass")"
|
||||
pw="$(echo "$pws" | ~/.local/bin/menu/vertical.sh -p "pass")"
|
||||
|
||||
case "$2" in
|
||||
info) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "pass $pw | vim -";;
|
||||
info) ~/.local/bin/menu/run-float-sh.sh sh -c "pass $pw | vim -";;
|
||||
otp) pass otp -c "$pw" && notify-send "$pw" -a pass "OTP copied to clipboard, clears in 45s";;
|
||||
*) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";;
|
||||
esac
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
sure() {
|
||||
echo yes | bemenu --prompt "sure?" || exec ~/.local/bin/bemenu/run.sh
|
||||
echo yes | ~/.local/bin/menu/horizontal.sh -p "sure?" || exec ~/.local/bin/menu/run.sh
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
20
arch-user/bin/menu/run.sh
Executable file
20
arch-user/bin/menu/run.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
rl_full="$(cat ~/.config/menu/*.runlist)"
|
||||
rl="$(echo "$rl_full" | cut -d' ' -f2-)"
|
||||
|
||||
inp="$(echo "$rl" | sed 's/$/ /' | ~/.local/bin/menu/vertical.sh -p ">")"
|
||||
[ -z "$inp" ] && exit 0
|
||||
eval "inp_arr=($inp)"
|
||||
|
||||
exectr=float-sh-keep
|
||||
while IFS= read -r line; do
|
||||
if [[ "$inp" == "$line"* ]]; then
|
||||
exectr="$(echo "$rl_full" | grep -F "$line" -m 1 | cut -d' ' -f1)"
|
||||
fi
|
||||
done <<< "$rl"
|
||||
|
||||
case "$exectr" in
|
||||
exec) exec $inp;;
|
||||
*) bash "$HOME/.local/bin/menu/run-$exectr.sh" "${inp_arr[@]}" || notify-send "Executor error" -a run.sh "exec: $exectr\nargs: ${inp_arr[@]}\ncode: $?"
|
||||
esac
|
||||
4
arch-user/bin/menu/vertical.sh
Executable file
4
arch-user/bin/menu/vertical.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
input=$(cat)
|
||||
lines=$(echo "$input" | wc -l)
|
||||
echo "$input" | eval "wmenu $WMENU_VOPTS -l $((lines < 50 ? lines : 50)) \"$@\""
|
||||
16
arch-user/bin/postgres/start.sh
Executable file
16
arch-user/bin/postgres/start.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$1" != "foreground" ]; then
|
||||
exec ~/.local/bin/screen/detach.sh postgres "$0" foreground
|
||||
fi
|
||||
|
||||
version="$(pg_config --version | sed -n 's/^PostgreSQL \([0-9]*\).*/\1/p')"
|
||||
export PGDATA=~/know/db/"$version"
|
||||
|
||||
mkdir -p "$PGDATA"
|
||||
if [ ! -f "$PGDATA/postgresql.conf" ]; then
|
||||
initdb
|
||||
fi
|
||||
|
||||
postgres -c "unix_socket_directories=/run/user/$(id -u)" -c "listen_addresses=" -c "io_method=sync"
|
||||
4
arch-user/bin/psql.sh
Executable file
4
arch-user/bin/psql.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
psql -h "/run/user/$(id -u)" "$1"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
out="$(printf '' | bemenu --prompt ':sway')"
|
||||
out="$(printf '' | ~/.local/bin/menu/horizontal.sh -p ':sway')"
|
||||
eval "executor_args=($out)"
|
||||
#shellcheck disable=SC2154
|
||||
sway "${executor_args[@]}"
|
||||
|
||||
7
arch-user/bin/sway/paste-from-history.sh
Executable file
7
arch-user/bin/sway/paste-from-history.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
item="$(cliphist list | ~/.local/bin/menu/vertical.sh -p paste)"
|
||||
if [ -n "$item" ]; then
|
||||
echo "$item" | cliphist decode | wl-copy
|
||||
wtype -M ctrl v -m ctrl
|
||||
fi
|
||||
|
||||
@@ -41,7 +41,7 @@ formatted_list=$(echo "$window_list" | while IFS='|' read -r id app_id name work
|
||||
printf "%s%s%s %s %s\n" "$workspace" "$indicator" "$id" "$app_id" "$name"
|
||||
done)
|
||||
|
||||
selection=$(echo "$formatted_list" | bemenu --auto-select --width-factor 100 --prompt "/" --index "$(echo "$formatted_list" | awk 'substr($0,2,1)==">" {print NR-1}')" )
|
||||
selection=$(echo "$formatted_list" | ~/.local/bin/menu/vertical.sh -p "/")
|
||||
[ -z "$selection" ] && exit 0
|
||||
|
||||
window_id=$(echo "$selection" | sed -E 's/^...([0-9]+).*/\1/')
|
||||
|
||||
@@ -13,6 +13,11 @@ alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias node='NODE_NO_READLINE=1 rlwrap node'
|
||||
|
||||
alias d='cd ~/dev'
|
||||
alias k='cd ~/know'
|
||||
alias t='cd ~/tmp'
|
||||
alias l='cd ~/lfs'
|
||||
|
||||
export EDITOR=vim
|
||||
|
||||
export FZF_COMPLETION_TRIGGER='*'
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
export BEMENU_OPTS="\
|
||||
--ignorecase \
|
||||
--width-factor 0.5 \
|
||||
--fn \"{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}\" \
|
||||
--list 500 \
|
||||
--border 2 \
|
||||
--scrollbar autohide \
|
||||
--border-radius 4 \
|
||||
--bdr #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
--scf #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
--scb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
--nb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
--ab #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
--hb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
--fb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
--tb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
--nf #{{ .theme.color.fg }} \
|
||||
--af #{{ .theme.color.fg }} \
|
||||
--cf #{{ .theme.color.fg }} \
|
||||
--hf #{{ .theme.color.fg_accent }} \
|
||||
--tf #{{ .theme.color.fg_accent }} \
|
||||
--ff #{{ .theme.color.fg_accent }} \
|
||||
"
|
||||
1
arch-user/config/cliphist/config
Normal file
1
arch-user/config/cliphist/config
Normal file
@@ -0,0 +1 @@
|
||||
max-items 50
|
||||
@@ -1 +1 @@
|
||||
pinentry-program ~/.local/bin/bemenu/pinentry.sh
|
||||
pinentry-program ~/.local/bin/menu/pinentry.sh
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
separator_block_width=20
|
||||
command=~/.local/bin/i3blocks/$BLOCK_NAME.sh
|
||||
|
||||
[weather]
|
||||
label=⛅
|
||||
interval=3600
|
||||
[bandwidth]
|
||||
interval=10
|
||||
|
||||
[volume]
|
||||
interval=once
|
||||
signal=2
|
||||
|
||||
{{ if file.Exists "/sys/class/power_supply/ACAD/" }}
|
||||
[battery]
|
||||
interval=10
|
||||
{{ end }}
|
||||
|
||||
[volume]
|
||||
interval=once
|
||||
signal=2
|
||||
|
||||
[xkb_layout]
|
||||
label=⌨
|
||||
interval=once
|
||||
|
||||
15
arch-user/config/menu/env.sh.tmpl
Executable file
15
arch-user/config/menu/env.sh.tmpl
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
export WMENU_VOPTS="\
|
||||
-i \
|
||||
-f '{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}' \
|
||||
-n {{ .theme.color.fg }} -N {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
-m {{ .theme.color.bg_accent_dark }} -M {{ .theme.color.fg_accent }} \
|
||||
-s {{ .theme.color.fg_accent }} -S {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
"
|
||||
export WMENU_HOPTS="\
|
||||
-i \
|
||||
-f '{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}' \
|
||||
-n {{ .theme.color.fg }} -N {{ .theme.color.bg }} \
|
||||
-m {{ .theme.color.bg_accent_dark }} -M {{ .theme.color.fg_accent }} \
|
||||
-s {{ .theme.color.fg_accent }} -S {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||
"
|
||||
@@ -62,4 +62,10 @@ c.url.default_page = 'file:///home/'+env['USER']+'/.local/share/qutebrowser/star
|
||||
c.url.start_pages = ['file:///home/'+env['USER']+'/.local/share/qutebrowser/start.html']
|
||||
########################################
|
||||
|
||||
# downloads
|
||||
c.downloads.location.directory = "~/tmp/"
|
||||
c.downloads.location.prompt = False
|
||||
c.downloads.remove_finished = 10000
|
||||
########################################
|
||||
|
||||
#print(f"Execution time {time.time() - start_ts}")
|
||||
|
||||
@@ -25,6 +25,8 @@ set keymap vi-command
|
||||
"n":backward-char
|
||||
"\C-n":backward-char
|
||||
# e -> k (reverse swap)
|
||||
set keymap vi-insert
|
||||
"\C-e":"\C-j"
|
||||
set keymap vi-command
|
||||
"e":previous-history
|
||||
"\C-e":kill-line
|
||||
|
||||
@@ -39,7 +39,7 @@ bar {
|
||||
separator #{{ .theme.color.fg_dark }}
|
||||
focused_workspace #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }}
|
||||
inactive_workspace #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.fg }}
|
||||
urgent_workspace #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }}
|
||||
urgent_workspace #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_dark }}
|
||||
binding_mode #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }}
|
||||
}
|
||||
}
|
||||
@@ -161,6 +161,7 @@ bindsym --to-code {
|
||||
$mod+x exec wtype -M ctrl x -m ctrl
|
||||
$mod+c exec wtype -M ctrl c -m ctrl
|
||||
$mod+v exec wtype -M ctrl v -m ctrl
|
||||
$altmod+v exec ~/.local/bin/sway/paste-from-history.sh
|
||||
$mod+Slash exec ~/.local/bin/sway/search-mode.sh
|
||||
$mod+z focus child
|
||||
}
|
||||
@@ -181,6 +182,11 @@ floating_modifier $mod normal
|
||||
bindsym --to-code {
|
||||
# generic
|
||||
$mod+Escape kill
|
||||
# basic scripts
|
||||
$mod+Return exec alacritty msg create-window
|
||||
$altmod+Return exec alacritty
|
||||
$mod+Colon exec ~/.local/bin/sway/command-mode.sh
|
||||
$mod+Space exec ~/.local/bin/menu/run.sh
|
||||
# media
|
||||
XF86MonBrightnessDown exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%-
|
||||
XF86MonBrightnessUp exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%+
|
||||
@@ -188,11 +194,7 @@ bindsym --to-code {
|
||||
XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% && pkill -SIGRTMIN+2 i3blocks
|
||||
XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% && pkill -SIGRTMIN+2 i3blocks
|
||||
XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+2 i3blocks
|
||||
XF86Calculator exec .local/bin/bemenu/run-calc.sh calc tui
|
||||
# basic scripts
|
||||
$mod+Return exec alacritty msg create-window
|
||||
$mod+Colon exec ~/.local/bin/sway/command-mode.sh
|
||||
$mod+Space exec ~/.local/bin/bemenu/run.sh
|
||||
XF86Calculator exec .local/bin/menu/run-calc.sh calc tui
|
||||
}
|
||||
##############################################
|
||||
|
||||
@@ -200,6 +202,7 @@ bindsym --to-code {
|
||||
exec mako
|
||||
exec swayidle
|
||||
exec alacritty --daemon
|
||||
exec wl-paste --watch cliphist store
|
||||
##############################################
|
||||
|
||||
############## app-specific ##################
|
||||
|
||||
@@ -48,7 +48,7 @@ mkdir -p "${USER_DIRS[@]}"
|
||||
########## scripts #############
|
||||
cp -rf bin/* ~/.local/bin
|
||||
|
||||
LN_EXCLUDE_DIRS=(i3blocks bemenu sway fzf)
|
||||
LN_EXCLUDE_DIRS=(i3blocks menu sway)
|
||||
|
||||
ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} "
|
||||
for sdir in bin/*; do
|
||||
@@ -73,7 +73,6 @@ gomplate --input-dir config \
|
||||
-c user="file:///$HOME/.config/workspace.conf?type=application/x-env" \
|
||||
--exclude /workspace.conf \
|
||||
--exclude /workspace-compat/* --exclude !/workspace-compat/env.sh
|
||||
|
||||
ln -sf ~/.config/bash/bashrc ~/.bashrc
|
||||
ln -sf ~/.config/profile ~/.profile
|
||||
ln -sf ~/.config/less/lesskey ~/.lesskey
|
||||
@@ -82,7 +81,7 @@ mkdir -p ~/.gnupg && ln -sf ~/.config/gnupg/gpg-agent.conf ~/.gnupg
|
||||
|
||||
############# data ############
|
||||
gomplate --input-dir data \
|
||||
--output-map "$HOME/.config/{{ .in | strings.ReplaceAll \".tmpl\" \"\" }}" \
|
||||
--output-map "$HOME/.local/share/{{ .in | strings.ReplaceAll \".tmpl\" \"\" }}" \
|
||||
--exclude-processing "!*.tmpl" \
|
||||
-c theme=config/theme.json
|
||||
###############################
|
||||
|
||||
Reference in New Issue
Block a user