Compare commits
11 Commits
f4dd706b6a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dd079c4ef2 | |||
| 732cdffd25 | |||
| 22c64e10a0 | |||
| 88302b9bca | |||
| 7023046b63 | |||
| 6fd661f286 | |||
| 882a27b1cb | |||
| dd11cd9253 | |||
| bfb053a4ef | |||
| 6d5bb72149 | |||
| ee9d27147e |
@@ -6,17 +6,19 @@ PACKAGES=(
|
|||||||
|
|
||||||
linux base linux-firmware lvm2 sudo polkit # base
|
linux base linux-firmware lvm2 sudo polkit # base
|
||||||
pulseaudio pulseaudio-bluetooth bluez bluez-utils networkmanager udisks2 # device management
|
pulseaudio pulseaudio-bluetooth bluez bluez-utils networkmanager udisks2 # device management
|
||||||
openssh strace sysstat htop screen man-db which # system
|
openssh rsync strace sysstat htop screen man-db which dnsutils # system
|
||||||
|
|
||||||
nodejs dash jq # runtime
|
nodejs dash jq # runtime
|
||||||
qemu-system-x86 # virt
|
qemu-system-x86 # virt
|
||||||
|
postgresql #db
|
||||||
|
|
||||||
rlwrap fzf # shell helpers
|
rlwrap fzf # shell helpers
|
||||||
vifm vim less # nav & edit
|
vifm vim less # nav & edit
|
||||||
vim-ale vim-fugitive # vim plugins
|
vim-ale vim-fugitive # vim plugins
|
||||||
|
|
||||||
just shellcheck # shell scripting
|
just shellcheck # shell scripting
|
||||||
git zip # data processing
|
git zip # storage
|
||||||
|
bc xxd # data processing
|
||||||
gnupg pass pass-otp pwgen # crypt
|
gnupg pass pass-otp pwgen # crypt
|
||||||
imv mpv imagemagick gimp # media
|
imv mpv imagemagick gimp # media
|
||||||
aichat libqalculate translate-shell # utils
|
aichat libqalculate translate-shell # utils
|
||||||
@@ -28,7 +30,7 @@ PACKAGES=(
|
|||||||
|
|
||||||
greetd sway swaybg swayidle # desktop basic
|
greetd sway swaybg swayidle # desktop basic
|
||||||
alacritty wmenu i3blocks mako libnotify # terminals, ui
|
alacritty wmenu i3blocks mako libnotify # terminals, ui
|
||||||
wev wl-clipboard wtype slurp grim # interaction
|
wev wl-clipboard cliphist wtype slurp grim # interaction
|
||||||
ttf-roboto ttf-roboto-mono otf-font-awesome # fonts
|
ttf-roboto ttf-roboto-mono otf-font-awesome # fonts
|
||||||
kvantum kvantum-qt5 kvantum-theme-materia materia-gtk-theme # themes
|
kvantum kvantum-qt5 kvantum-theme-materia materia-gtk-theme # themes
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
shift
|
shift
|
||||||
query="$1"
|
query="$1"
|
||||||
if [ -z "$query" ]; then
|
if [ -z "$query" ]; then
|
||||||
query="$(echo "tui" | bemenu --prompt "qalc")"
|
query="$(echo "tui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
|
||||||
fi
|
fi
|
||||||
if [ "$query" = "tui" ]; then
|
if [ "$query" = "tui" ]; then
|
||||||
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "qalc"
|
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "qalc"
|
||||||
elif [ -n "$query" ]; then
|
elif [ -n "$query" ]; then
|
||||||
qalc_res="$(qalc --terse "$query")"
|
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
|
if [ "$qalc_res" = "$menu_res" ]; then
|
||||||
wl-copy "$qalc_res"
|
wl-copy "$qalc_res"
|
||||||
notify-send "$qalc_res" -a calc "Result copied to clipboard"
|
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 '"$@"' -- "$@"
|
||||||
@@ -4,9 +4,12 @@ shift
|
|||||||
page="$1"
|
page="$1"
|
||||||
if [ -z "$page" ]; then
|
if [ -z "$page" ]; then
|
||||||
page="$(
|
page="$(
|
||||||
apropos -s 1,8 . | \
|
apropos -s 1,5,8 . | \
|
||||||
(~/.local/bin/menu/vertical.sh -p "man" || exec ~/.local/bin/menu/run.sh) | \
|
~/.local/bin/menu/vertical.sh -p "man" | \
|
||||||
sed ' s/\s\+\-.*//;s/ //g'
|
sed 's/ (\([^)]*\)).*/.\1/'
|
||||||
)"
|
)"
|
||||||
|
if [ -z "$page" ]; then
|
||||||
|
exec ~/.local/bin/menu/run.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "man '$page' || read -n1"
|
exec ~/.local/bin/menu/run-float-sh.sh "man" "$page"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n'
|
|||||||
pw="$(echo "$pws" | ~/.local/bin/menu/vertical.sh -p "pass")"
|
pw="$(echo "$pws" | ~/.local/bin/menu/vertical.sh -p "pass")"
|
||||||
|
|
||||||
case "$2" in
|
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";;
|
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";;
|
*) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
rl_full="$(cat ~/.config/menu/*.runlist)"
|
rl_full="$(cat ~/.config/menu/*.runlist)"
|
||||||
rl="$(echo "$rl_full" | cut -d' ' -f2-)"
|
rl="$(echo "$rl_full" | cut -d' ' -f2-)"
|
||||||
|
|
||||||
inp="$(echo "$rl" | ~/.local/bin/menu/vertical.sh -p ">")"
|
inp="$(echo "$rl" | sed 's/$/ /' | ~/.local/bin/menu/vertical.sh -p ">")"
|
||||||
[ -z "$inp" ] && exit 0
|
[ -z "$inp" ] && exit 0
|
||||||
eval "inp_arr=($inp)"
|
eval "inp_arr=($inp)"
|
||||||
|
|
||||||
@@ -16,7 +16,5 @@ done <<< "$rl"
|
|||||||
|
|
||||||
case "$exectr" in
|
case "$exectr" in
|
||||||
exec) exec $inp;;
|
exec) exec $inp;;
|
||||||
float-sh) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c "($inp)";;
|
*) bash "$HOME/.local/bin/menu/run-$exectr.sh" "${inp_arr[@]}" || notify-send "Executor error" -a run.sh "exec: $exectr\nargs: ${inp_arr[@]}\ncode: $?"
|
||||||
float-sh-keep) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "($inp); read -n1";;
|
|
||||||
*) exec bash "$HOME/.local/bin/menu/run-$exectr.sh" "${inp_arr[@]}"
|
|
||||||
esac
|
esac
|
||||||
|
|||||||
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"
|
||||||
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
|
||||||
|
|
||||||
@@ -13,6 +13,11 @@ alias ls='ls --color=auto'
|
|||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
alias node='NODE_NO_READLINE=1 rlwrap node'
|
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 EDITOR=vim
|
||||||
|
|
||||||
export FZF_COMPLETION_TRIGGER='*'
|
export FZF_COMPLETION_TRIGGER='*'
|
||||||
|
|||||||
1
arch-user/config/cliphist/config
Normal file
1
arch-user/config/cliphist/config
Normal file
@@ -0,0 +1 @@
|
|||||||
|
max-items 50
|
||||||
@@ -3,13 +3,13 @@ export WMENU_VOPTS="\
|
|||||||
-i \
|
-i \
|
||||||
-f '{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}' \
|
-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" }} \
|
-n {{ .theme.color.fg }} -N {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
-m {{ .theme.color.fg }} -M {{ .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 }} -S {{ .theme.color.bg_accent_light }} \
|
-s {{ .theme.color.fg_accent }} -S {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
"
|
"
|
||||||
export WMENU_HOPTS="\
|
export WMENU_HOPTS="\
|
||||||
-i \
|
-i \
|
||||||
-f '{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}' \
|
-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 }} \
|
-n {{ .theme.color.fg }} -N {{ .theme.color.bg }} \
|
||||||
-m {{ .theme.color.fg }} -M {{ .theme.color.bg }} \
|
-m {{ .theme.color.bg_accent_dark }} -M {{ .theme.color.fg_accent }} \
|
||||||
-s {{ .theme.color.fg }} -S {{ .theme.color.bg_accent_light }} \
|
-s {{ .theme.color.fg_accent }} -S {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
"
|
"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ bar {
|
|||||||
separator #{{ .theme.color.fg_dark }}
|
separator #{{ .theme.color.fg_dark }}
|
||||||
focused_workspace #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }}
|
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 }}
|
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 }}
|
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+x exec wtype -M ctrl x -m ctrl
|
||||||
$mod+c exec wtype -M ctrl c -m ctrl
|
$mod+c exec wtype -M ctrl c -m ctrl
|
||||||
$mod+v exec wtype -M ctrl v -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+Slash exec ~/.local/bin/sway/search-mode.sh
|
||||||
$mod+z focus child
|
$mod+z focus child
|
||||||
}
|
}
|
||||||
@@ -181,6 +182,11 @@ floating_modifier $mod normal
|
|||||||
bindsym --to-code {
|
bindsym --to-code {
|
||||||
# generic
|
# generic
|
||||||
$mod+Escape kill
|
$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
|
# media
|
||||||
XF86MonBrightnessDown exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%-
|
XF86MonBrightnessDown exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%-
|
||||||
XF86MonBrightnessUp exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%+
|
XF86MonBrightnessUp exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%+
|
||||||
@@ -189,11 +195,6 @@ bindsym --to-code {
|
|||||||
XF86AudioRaiseVolume 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
|
XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+2 i3blocks
|
||||||
XF86Calculator exec .local/bin/menu/run-calc.sh calc tui
|
XF86Calculator exec .local/bin/menu/run-calc.sh calc tui
|
||||||
# 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
|
|
||||||
}
|
}
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
@@ -201,6 +202,7 @@ bindsym --to-code {
|
|||||||
exec mako
|
exec mako
|
||||||
exec swayidle
|
exec swayidle
|
||||||
exec alacritty --daemon
|
exec alacritty --daemon
|
||||||
|
exec wl-paste --watch cliphist store
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
############## app-specific ##################
|
############## app-specific ##################
|
||||||
|
|||||||
@@ -93,6 +93,5 @@ export IS_COMPAT=0
|
|||||||
###############################
|
###############################
|
||||||
|
|
||||||
swaymsg reload || true
|
swaymsg reload || true
|
||||||
. ~/.profile
|
|
||||||
|
|
||||||
echo ok
|
echo ok
|
||||||
|
|||||||
Reference in New Issue
Block a user