diff --git a/install.sh b/install.sh index ced363e..f3e7bf6 100644 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ echo "installing pre-requisites" -sudo pacman -Syu ghostty firefox dms-shell yay git nautilus brightnessctl pipewire-pulse pipewire matugen adw-gtk-theme wl-copy hyprshot grim satty code-oss zoxide zsh zsh-theme-powerlevel10k eza kanshi ttf-nerd-fonts-symbols-common ttf-nerd-fonts-symbols-mono ttf-nerd-fonts-symbols ttf-cascadia-code-nerd ttf-cascadia-mono-nerd ttf-terminus-nerd ttf-firacode-nerd ttf-ubuntu-nerd +sudo pacman -Syu ghostty shelly firefox dms-shell yay git nautilus zsh-history-substring-search zsh-syntax-highlighting zsh-autosuggestions zsh-doc stow brightnessctl pipewire-pulse pipewire matugen adw-gtk-theme wl-copy hyprshot grim satty code-oss zoxide zsh zsh-theme-powerlevel10k eza kanshi ttf-nerd-fonts-symbols-common ttf-nerd-fonts-symbols-mono ttf-nerd-fonts-symbols ttf-cascadia-code-nerd ttf-cascadia-mono-nerd ttf-terminus-nerd ttf-firacode-nerd ttf-ubuntu-nerd yay -S mangowm-git dsearch-bin @@ -12,22 +12,45 @@ if [ $WORKINGDIR != "/home/$(whoami)/SDG-OS"]; then ln -sf $WORKINGDIR /home/$(whoami) fi -mv /home/$(whoami)/.config/mango /home/$(whoami)/.config/mango-old-$(date %b%D) +mv /home/$(whoami)/.config/mango /home/$(whoami)/.config/mango-old-$RANDOM cp -r /home/$(whoami)/SDG-OS/mango /home/$(whoami)/.config -mv /home/$(whoami)/.config/sdgos /home/$(whoami)/.config/sdgos-old-$(date %b%D) +mv /home/$(whoami)/.config/sdgos /home/$(whoami)/.config/sdgos-old-$RANDOM cp -r /home/$(whoami)/SDG-OS/sdgos /home/$(whoami)/.config -mv /home/$(whoami)/.config/ghostty /home/$(whoami)/.config/ghostty-old-$(date %b%D) +mv /home/$(whoami)/.config/ghostty /home/$(whoami)/.config/ghostty-old-$RANDOM cp -r /home/$(whoami)/SDG-OS/ghostty /home/$(whoami)/.config echo "projects" > ~/.config/projectdir.state mkdir -p ~/projects -mv /home/$(whoami)/.zshrc /home/$(whoami)/.zshrc-old-$(date %b%D) +mv /home/$(whoami)/.zshrc /home/$(whoami)/.zshrc-old-$RANDOM cp /home/$(Whoami)/.config/sdgos/zshrc /home/$(whoami)/.zshrc -mv /home/$(whoami)/.p10k.zsh /home/$(whoami)/.p10k.zsh-old-$(date %b%D) +mv /home/$(whoami)/.p10k.zsh /home/$(whoami)/.p10k.zsh-old-$RANDOM cp /home/$(Whoami)/.config/sdgos/p10k.zsh /home/$(whoami)/.p10k.zsh chmod -R a+x ~/.config/sdgos +echo "SDG-OS comes with the following optional extra scripts:" +echo " - unipkg: universal package management TUI scripting" +echo " - dotfile-git-sync: a script to make migrating your dotfiles to a github directory easy" +echo "" +read -p "Do you want to install the additional scripts? [Y/n] " -n 1 -r +echo # Move to a new line +if [[ ! $REPLY =~ ^[Nn]$ ]]; then + git clone https://github.com/SDG-Den/unipkg ~/projects/unipkg + git clone https://github.com/SDG-Den/dotfile-git-sync ~/projects/dotfile-git-sync + echo "installing unipkg" + bash -c "~/projects/unipkg/install.sh" + mkdir -p ~/.local/share/dotfile-git-sync + cp ~/projects/dotfile-git-sync/dotfile-git-sync ~/.local/share/dotfile-git-sync + sudo ln -sf /home/$(whoami)/.local/share/dotfiles-git-sync/dotfiles-git-sync /usr/bin + chmod a+x ~/.local/share/dotfiles-git-sync/dotfiles-git-sync + +else + echo "optional scripts skipped, you can always install them manually later." +fi + + + + echo "installation complete! you should now be able to log out and switch to \"mango\"" diff --git a/mango/binds.conf b/mango/binds.conf index 64551f0..1e5a3c6 100644 --- a/mango/binds.conf +++ b/mango/binds.conf @@ -38,10 +38,11 @@ bind=SUPER,S,spawn_shell,dms ipc call settings toggle # toggle settings ###! SDG-OS custom scripts bind=SUPER,M,spawn_shell,ghostty -e ~/.config/sdgos/mango-config.sh # show mango config editor bind=SUPER+ALT,M,spawn_shell,ghostty -e ~/.config/sdgos/config-overview/menu.sh # mango config explainer menu -bind=SUPER,Y,spawn_shell,ghostty -e ~/.config/sdgos/tuis/pkg-install.sh # install packages +bind=SUPER,Y,spawn_shell,shelly-ui bind=SUPER+SHIFT,Y,spawn_shell,ghostty -e ~/.config/sdgos/tuis/aur-install.sh # install AUR packages +bind=SUPER+ALT,Y,spawn_shell,ghostty -e unipkg launch-tui # launch unipkg tui +bind=SUPER+ctrl,Y,spawn_shell,ghostty -e ~/.config/sdgos/tuis/pkg-install.sh # install packages via TUI bind=SUPER,W,spawn_shell,ghostty -e ~/.config/sdgos/tuis/layout-switch.sh # switch between layouts on the current workspace -bind=SUPER+ALT,Y,spawn_shell,ghostty -e unipkg launch-tui ##! program launchers bind=SUPER,RETURN,spawn_shell,ghostty @@ -125,11 +126,16 @@ bind=SUPER+alt,7,toggleview,7 # toggle on workspace 7 bind=SUPER+alt,8,toggleview,8 # toggle on workspace 8 bind=SUPER+alt,9,toggleview,9 # toggle on workspace 9 +# move between monitors with mainmod + ctrl + 1-9 +bind=SUPER+ctrl,1,tagmon,name:^DP-1$ # move to monitor DP-1 +bind=SUPER+ctrl,2,tagmon,name:^HDMI-A-1$ # move to monitor HDMI-A-1 +bind=SUPER+ctrl,3,tagmon,name:^DP-2$ # move to monitor DP-2 + # Mouse Button Bindings # btn_left and btn_right can't bind none mod key mousebind=SUPER,btn_left,moveresize,curmove -mousebind=NONE,btn_middle,togglemaximizescreen,0 +mousebind=SUPER,btn_middle,togglemaximizescreen,0 mousebind=SUPER,btn_right,moveresize,curresize diff --git a/sdgos/zshconfig.zsh b/sdgos/zshconfig.zsh index 02aef43..6c00155 100644 --- a/sdgos/zshconfig.zsh +++ b/sdgos/zshconfig.zsh @@ -35,10 +35,10 @@ alias documentation=~/.config/sdgos/tuis/documentation.sh alias tldrtui=~/.config/sdgos/help/cmd-help.sh alias helptui=~/.config/sdgos/help/help.sh -EDITOR=micro -IMAGEPROGRAM='satty --filename' -TIPS=$(cat ~/.config/sdgos/tips/tips.list) -SHELL=/bin/zsh +export EDITOR=micro +export IMAGEPROGRAM='satty --filename' +export TIPS=$(cat ~/.config/sdgos/tips/tips.list) +export SHELL=/bin/zsh function plz() { if [ -z "$1" ]; then @@ -61,6 +61,7 @@ alias -s png=$IMAGEPROGRAM alias -s jpg=$IMAGEPROGRAM alias -s jpeg=$IMAGEPROGRAM alias -s webp=$IMAGEPROGRAM +alias -s nix=$EDITOR eval "$(zoxide init zsh --cmd cd )" -source <(fzf --zsh) \ No newline at end of file +source <(fzf --zsh) diff --git a/sdgos/zshrc b/sdgos/zshrc index 3f0afa4..6d876ec 100755 --- a/sdgos/zshrc +++ b/sdgos/zshrc @@ -5,13 +5,100 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi -source /usr/share/cachyos-zsh-config/cachyos-config.zsh +# Path to your oh-my-zsh installation. +export ZSH="/usr/share/oh-my-zsh" + +# Uncomment the following line if pasting URLs and other text is messed up. +#DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to enable command auto-correction. +ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +COMPLETION_WAITING_DOTS="true" + +[[ -z "${plugins[*]}" ]] && plugins=(git fzf extract) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Ignore commands that start with spaces and duplicates. + +export HISTCONTROL=ignoreboth + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Don't add certain commands to the history file. + +export HISTORY_IGNORE="(\&|[bf]g|c|clear|history|exit|q|pwd|* --help)" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Use custom `less` colors for `man` pages. + +export LESS_TERMCAP_md="$(tput bold 2> /dev/null; tput setaf 2 2> /dev/null)" +export LESS_TERMCAP_me="$(tput sgr0 2> /dev/null)" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Make new shells get the history lines from all previous +# shells instead of the default "last window closed" history. + +export PROMPT_COMMAND="history -a; $PROMPT_COMMAND" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +#alias open="xdg-open" +alias make="make -j`nproc`" +alias ninja="ninja -j`nproc`" +alias n="ninja" +alias c="clear" +alias rmpkg="sudo pacman -Rsn" +alias cleanch="sudo pacman -Scc" +alias fixpacman="sudo rm /var/lib/pacman/db.lck" +alias update="sudo pacman -Syu" + +# Help people new to Arch +alias apt="man pacman" +alias apt-get="man pacman" +alias please="sudo" +alias tb="nc termbin.com 9999" + +# Cleanup orphaned packages +alias cleanup="sudo pacman -Rsn $(pacman -Qtdq)" + +# Get the error messages from journalctl +alias jctl="journalctl -p 3 -xb" + +# Recent installed packages +alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" + +source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme + +# Fish-like syntax highlighting and autosuggestions +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh + +# Use history substring search +source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh + +# pkgfile "command not found" handler +source /usr/share/doc/pkgfile/command-not-found.zsh + +export FZF_BASE=/usr/share/fzf + # Added by LM Studio CLI (lms) -export PATH="$PATH:/home/den/.lmstudio/bin" +export PATH="$PATH:/home/$(whoami)/.lmstudio/bin" # End of LM Studio CLI section export EDITOR=micro # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh -source /home/den/.config/sdgos/zshconfig.zsh +source /home/$(whoami)/.config/sdgos/zshconfig.zsh diff --git a/update.sh b/update.sh index 8a51725..292319b 100644 --- a/update.sh +++ b/update.sh @@ -7,7 +7,7 @@ git pull echo "re-installing/updating pre-requisites" -sudo pacman -Syu ghostty firefox dms-shell yay git nautilus brightnessctl pipewire-pulse pipewire matugen adw-gtk-theme wl-copy hyprshot grim satty code-oss zoxide zsh zsh-theme-powerlevel10k eza kanshi ttf-nerd-fonts-symbols-common ttf-nerd-fonts-symbols-mono ttf-nerd-fonts-symbols ttf-cascadia-code-nerd ttf-cascadia-mono-nerd ttf-terminus-nerd ttf-firacode-nerd ttf-ubuntu-nerd +sudo pacman -Syu ghostty firefox dms-shell yay git nautilus zsh-history-substring-search zsh-syntax-highlighting zsh-autosuggestions zsh-doc stow brightnessctl pipewire-pulse pipewire matugen adw-gtk-theme wl-copy hyprshot grim satty code-oss zoxide zsh zsh-theme-powerlevel10k eza kanshi ttf-nerd-fonts-symbols-common ttf-nerd-fonts-symbols-mono ttf-nerd-fonts-symbols ttf-cascadia-code-nerd ttf-cascadia-mono-nerd ttf-terminus-nerd ttf-firacode-nerd ttf-ubuntu-nerd yay -S mangowm-git dsearch-bin @@ -17,7 +17,7 @@ if [ $WORKINGDIR != "/home/$(whoami)/SDG-OS"]; then ln -sf $WORKINGDIR /home/$(whoami) fi -RAND=$(date %b%D) +RAND=$RANDOM read -p "do you want to update and refresh your mango config? this will reset you back to SDG-OS defaults [y/N] " -n 1 -r REPLY echo