Compare commits

..

4 commits

12 changed files with 69 additions and 15 deletions

View file

@ -10,6 +10,7 @@ declare -A mapper=(
["environment.local"]="$HOME/.config/environment.local"
["git"]="$HOME/.config/git/config"
["git-ignore"]="$HOME/.config/git/ignore"
["home-manager"]="$HOME/.config/nixpkgs/home.nix"
["qutebrowser"]="$HOME/.config/qutebrowser/common.py"
["starship"]="$HOME/.config/starship.toml"
["sxhkd"]="$HOME/.config/sxhkd/sxhkdrc"

View file

@ -28,6 +28,8 @@ _autoinstall_base () {
_autoinstall_file \
"https://raw.githubusercontent.com/qw3rtman/git-fire/master/git-fire" \
"$HOME/.local/bin/git-fire"
return 0
}
_autoinstall_graphical () {
@ -50,11 +52,21 @@ _autoinstall_graphical () {
_autoinstall_archive \
"https://github.com/dracula/gtk/releases/download/v3.0/Dracula-cursors.tar.xz" \
"$HOME/.icons/Dracula-cursors.tar.xz"
_autoinstall_archive \
"$(curl -fsSL 'https://data.services.jetbrains.com/products?code=TBA&release.type=release&fields=releases' | jq -r '.[0].releases[0].downloads.linux.link')" \
"$HOME/.local/bin/jetbrains-toolbox.tar.gz" \
&& mv -f "$HOME/.local/bin/jetbrains-toolbox-"*"/jetbrains-toolbox" "$HOME/.local/bin/" \
&& rm -rf "$HOME/.local/bin/jetbrains-toolbox-"*
return 0
}
_autoinstall_all () {
_autoinstall_base
_autoinstall_graphical
return 0
}
_autoinstall_git () {
@ -63,7 +75,9 @@ _autoinstall_git () {
echo "Installing repo $1 to $2"
mkdir -p "$2"
git clone "$1" "$2" >/dev/null 2>&1
return 0
fi
return 1
}
_autoinstall_file () {
@ -74,7 +88,9 @@ _autoinstall_file () {
mkdir -p "$file_path"
cd "$file_path" || exit
curl -fsSLo "$2" "$1"
return 0
fi
return 1
}
_autoinstall_archive () {
@ -86,17 +102,22 @@ _autoinstall_archive () {
cd "$file_path" || exit
curl -fsSLo "$2" "$1"
tar xaf "$2"
return 0
fi
return 1
}
_autoinstall_env () {
if [ -x "$(command -v envsubst)" ]
then
envsubst < "$1.tpl" > "$1"
return 0
fi
return 1
}
case $1 in
action="${1:-base}"
case $action in
all) _autoinstall_all ;;
base) _autoinstall_base ;;
graphical) _autoinstall_graphical ;;
@ -104,5 +125,5 @@ case $1 in
file) _autoinstall_file "$2" "$3" ;;
archive) _autoinstall_archive "$2" "$3" ;;
env) _autoinstall_env "$2" ;;
*) echo "'$1' is not valid" ;;
*) echo "'$action' is not a valid action." ;;
esac

View file

@ -18,13 +18,14 @@ _list () {
}
_echo_table () {
printf "Unit\tFilename\tStatus\n"
printf "Unit\tFilename\tEnabled\tActive\n"
for unit in "$@"
do
printf "%s\t%s\t%s\n" \
printf "%s\t%s\t%s\t%s\n" \
"$unit" \
"$(_filename "$unit")" \
"$(_systemctl "$unit" is-enabled)"
"$(_systemctl "$unit" is-enabled)" \
"$(_systemctl "$unit" is-active)"
done
}
@ -79,7 +80,10 @@ case $1 in
edit) _systemctl "$2" edit --full ;;
enable) _systemctl "$2" add-wants autostart.target ;;
disable) _systemctl "$2" disable ;;
restart) _systemctl "${2:-*}" restart;;
start) _systemctl "${2:-*}" start;;
status) _systemctl "${2:-*}" status ;;
start) systemctl --user start autostart.target ;;
stop) _systemctl "${2:-*}" stop ;;
run) systemctl --user start autostart.target ;;
*) echo "'$1' is not valid" ;;
esac

View file

@ -6,5 +6,5 @@ case "$action" in
shutdown) systemctl poweroff -i ;;
reboot) systemctl reboot ;;
logout) systemctl --user exit ;;
autostart) autostart-manage start ;;
autostart) autostart-manage run ;;
*) ;; esac

View file

@ -32,13 +32,13 @@ main()
if [ -n "$1" ] && [ -e "$1" ]
then
convert "$1" "$path"
clip_image "$path"
upload_image "$path"
clip_image "$path"
else
if [ "$(flameshot gui -r | tee $path | wc -c)" -gt 0 ]
then
clip_image "$path"
upload_image "$path"
clip_image "$path"
fi
fi
}

View file

@ -7,7 +7,7 @@ env:
font:
normal:
family: JetBrains Mono NF
family: JetBrainsMono Nerd Font
size: 13.0
window:

View file

@ -6,6 +6,8 @@ alias :wq='exit'
alias aliases='$EDITOR ~/.config/aliasrc && . ~/.config/aliasrc'
alias aliases.local='$EDITOR ~/.config/aliasrc.local && . ~/.config/aliasrc'
# shellcheck disable=2154
alias arch-deps2deps='set -a; source PKGBUILD; set +a; sudo pacman -S --asdeps --noconfirm $depends && makepkg -fsi --noconfirm'
alias artisan='./artisan'
alias bspwm-default='echo "default" > /tmp/bspwm_mode; bspc wm -r'
@ -16,6 +18,7 @@ alias clip='xclip -selection clipboard'
alias cp='cp -iv'
alias df='df -h'
alias dns-flush='sudo systemctl restart systemd-resolved.service && sudo systemd-resolve --flush-caches && sudo resolvectl flush-caches'
alias doas='doas -- '
alias doasu='\doas -u '
alias docker-caddy-reload='docker compose exec app sh -c "caddy validate --config /etc/caddy/Caddyfile && caddy reload --config /etc/caddy/Caddyfile"'

View file

@ -45,6 +45,8 @@ export MAKEFLAGS="-j$_makeflags"
export MARKPATH="$XDG_CONFIG_HOME/zsh/jump_marks"
export MENU="bemenu"
_whoami=$(whoami)
export NIX_PATH="$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/$_whoami/channels${NIX_PATH:+:$NIX_PATH}"
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config"
export OPENFAAS_URL="https://faas.serguzim.me"
@ -80,6 +82,13 @@ export ZSH="$ZDOTDIR/oh-my-zsh"
[ -x "$(command -v moar)" ] && export MANPAGER="moar"
[ -x "$(command -v moar)" ] && export PAGER="moar"
set -a
if [ -x "$(command -v home-manager)" ] && [ -x "$(command -v nix)" ]
then
[ -f "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ] \
&& . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
[ -d "$HOME/.nix-profile/share" ] \
&& export XDG_DATA_DIRS="$HOME/.nix-profile/share:$XDG_DATA_DIRS"
fi
[ -f "$HOME/.config/environment.local" ] && . "$HOME/.config/environment.local"
set +a

View file

@ -19,6 +19,8 @@ def init(c):
c.fonts.hints = 'bold 18px default_family'
c.session.default_name = 'autosave'
c.tabs.background = True
c.tabs.mousewheel_switching = False
c.tabs.new_position.related = 'last'

View file

@ -0,0 +1,14 @@
[global]
# Your Spotify account name.
username = "serguzim"
password_cmd = "pass spotifyd"
use_mpris = true
backend = "pulseaudio"
volume_controller = "softvol"
device_name = "portalo"
#device_type = "computer" # correct but no shared sessions
device_type = "speaker" # allows shared sessions

View file

@ -1,2 +1,2 @@
. /etc/profile
. $HOME/.config/environment
. "/etc/profile"
. "$HOME/.config/environment"

View file

@ -21,7 +21,7 @@ _autostart()
pass x && sleep 5
autoinstall graphical
autostart-manage start
autostart-manage run
}
_autostart &