Adjust some things and create functions.zsh
This commit is contained in:
parent
0326a5dc92
commit
ac5118f117
|
@ -6,13 +6,14 @@ if [ "$(lsb_release -si)" != "Artix" ]; then
|
|||
fi
|
||||
|
||||
echo "Configuring directories..."
|
||||
cd -- "$(dirname -- $0)"
|
||||
mkdir -p "$HOME/.config/zsh" # Symlink only the individual files instead of the entire directory
|
||||
sleep 0.5
|
||||
|
||||
cd -- "$(dirname -- $0)"
|
||||
set -- "alacritty" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh"
|
||||
mkdir -p "$HOME/.config/zsh" # Symlink only the individual files instead of the entire directory
|
||||
|
||||
sleep 0.5
|
||||
echo "Creating the symlinks with stow..."
|
||||
|
||||
set -- "alacritty" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh"
|
||||
for pkg in "$@"; do
|
||||
echo "* Stowing $pkg"
|
||||
stow -t "$HOME" --ignore="README.md" "$pkg"
|
||||
|
@ -29,6 +30,6 @@ chmod +x sway/.config/sway/autostart.sh
|
|||
chmod +x waybar/.config/waybar/ivpn-reconnect.sh
|
||||
chmod +x waybar/.config/waybar/ivpn-status.sh
|
||||
chmod +x waybar/.config/waybar/mediaplayer.py
|
||||
sleep 0.5
|
||||
|
||||
sleep 0.5
|
||||
echo "Done!"
|
||||
|
|
|
@ -8,12 +8,12 @@ fi
|
|||
echo "Configuring directories..."
|
||||
|
||||
cd -- "$(dirname -- $0)"
|
||||
set -- "nvim" "scripts" "zsh"
|
||||
mkdir -p "$HOME/.config/zsh" # Symlink only the individual files instead of the entire directory
|
||||
sleep 0.5
|
||||
|
||||
sleep 0.5
|
||||
echo "Creating the symlinks with stow..."
|
||||
|
||||
set -- "nvim" "scripts" "zsh"
|
||||
for pkg in "$@"; do
|
||||
echo "* Stowing $pkg"
|
||||
stow -t "$HOME" --ignore="README.md" "$pkg"
|
||||
|
@ -26,6 +26,6 @@ echo "Making scripts executable..."
|
|||
chmod +x scripts/.local/bin/clear-clipboard.sh
|
||||
chmod +x scripts/.local/bin/update.sh
|
||||
chmod +x scripts/.local/bin/vfio.sh
|
||||
sleep 0.5
|
||||
|
||||
sleep 0.5
|
||||
echo "Done!"
|
||||
|
|
|
@ -8,6 +8,6 @@ function kill_services {
|
|||
pkill "^pipewire$"
|
||||
}
|
||||
|
||||
[[ $(tty) == /dev/tty1 ]] && [[ $(lsb_release -si) == Artix ]] &&
|
||||
kill_services &> /dev/null
|
||||
[[ $(tty) == "/dev/tty1" ]] && [[ $(lsb_release -si) == "Artix" ]] &&
|
||||
kill_services >/dev/null
|
||||
unfunction kill_services
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
if [[ $(tty) == /dev/tty1 ]] && [[ $(lsb_release -si) == Artix ]]; then
|
||||
if [[ $(tty) == "/dev/tty1" ]] && [[ $(lsb_release -si) == "Artix" ]]; then
|
||||
export $(gnome-keyring-daemon --start)
|
||||
export XDG_CURRENT_DESKTOP=Unity
|
||||
export XDG_CURRENT_DESKTOP="Unity"
|
||||
export GTK_USE_PORTAL=1
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_QPA_PLATFORM="wayland"
|
||||
|
||||
dbus-launch --sh-syntax --exit-with-session sway &>/dev/null; exit
|
||||
fi
|
||||
|
|
|
@ -19,9 +19,8 @@ alias u="update.sh"
|
|||
alias wl-copy="wl-copy -n"
|
||||
alias zgrep="zgrep --color=always"
|
||||
|
||||
if [[ $(lsb_release -si) == Artix ]]; then
|
||||
if [[ $(lsb_release -si) == "Artix" ]]; then
|
||||
alias code="codium --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
alias doasedit="doas -L; doas sh -c '$EDITOR /etc/doas.conf; doas -C /etc/doas.conf && echo ok || echo error'; doas -L"
|
||||
alias poweroff="doas poweroff"
|
||||
alias reboot="doas reboot"
|
||||
fi
|
||||
|
|
12
zsh/.config/zsh/functions.zsh
Normal file
12
zsh/.config/zsh/functions.zsh
Normal file
|
@ -0,0 +1,12 @@
|
|||
function pz_upgrade {
|
||||
pz zcompile -c >/dev/null
|
||||
pz pull
|
||||
pz zcompile >/dev/null
|
||||
}
|
||||
|
||||
(( ${+commands[doas]} )) && function doasedit {
|
||||
doas -L
|
||||
doas $EDITOR /etc/doas.conf
|
||||
doas doas -C /etc/doas.conf && echo "ok" || echo "error"
|
||||
doas -L
|
||||
}
|
Loading…
Reference in a new issue