a lot of zsh and git submodule stuff

This commit is contained in:
Melissa Dumont 2025-06-30 14:52:26 -04:00
parent 016638acf6
commit 83898ba0b0
15 changed files with 371 additions and 31 deletions

View File

@ -1,8 +1,8 @@
[General] [General]
ColorScheme=BreezeLight ColorScheme=BreezeDark
[Icons] [Icons]
Theme=breeze Theme=breeze-dark
[KDE] [KDE]
widgetStyle=Breeze widgetStyle=Breeze

View File

@ -1 +1 @@
org.debian.desktop org.kde.breezedark.desktop

View File

@ -1,2 +1,2 @@
[Theme] [Theme]
name=breeze-dark name=default

View File

@ -3,6 +3,7 @@ _k_friendly_name=Activity Manager
switch-to-activity-0abc61f0-ba9b-4974-bc53-241e81eac6c1=none,none,Switch to activity "Default" switch-to-activity-0abc61f0-ba9b-4974-bc53-241e81eac6c1=none,none,Switch to activity "Default"
switch-to-activity-5f9c2a4b-4fc6-442d-9dcc-992b332d806c=none,none,Switch to activity "Default" switch-to-activity-5f9c2a4b-4fc6-442d-9dcc-992b332d806c=none,none,Switch to activity "Default"
switch-to-activity-9259eab2-29ca-4d2e-9de0-ac16b8941aaa=none,none,Switch to activity "Default" switch-to-activity-9259eab2-29ca-4d2e-9de0-ac16b8941aaa=none,none,Switch to activity "Default"
switch-to-activity-9b919e70-d816-4d13-9538-37201be6f1d7=none,none,Switch to activity "Default"
[KDE Keyboard Layout Switcher] [KDE Keyboard Layout Switcher]
Switch to Last-Used Keyboard Layout=Meta+Alt+L,Meta+Alt+L,Switch to Last-Used Keyboard Layout Switch to Last-Used Keyboard Layout=Meta+Alt+L,Meta+Alt+L,Switch to Last-Used Keyboard Layout
@ -16,7 +17,7 @@ _k_friendly_name=Accessibility
[kcm_touchpad] [kcm_touchpad]
Disable Touchpad=Touchpad Off,Touchpad Off,Disable Touchpad Disable Touchpad=Touchpad Off,Touchpad Off,Disable Touchpad
Enable Touchpad=Touchpad On,Touchpad On,Enable Touchpad Enable Touchpad=Touchpad On,Touchpad On,Enable Touchpad
Toggle Touchpad=Touchpad Toggle\tCtrl+Touchpad Toggle,Touchpad Toggle\tMeta+Ctrl+Zenkaku Hankaku,Toggle Touchpad Toggle Touchpad=Touchpad Toggle\tCtrl+Touchpad Toggle,Touchpad Toggle,Toggle Touchpad
_k_friendly_name=Touchpad _k_friendly_name=Touchpad
[kded5] [kded5]
@ -280,8 +281,9 @@ activate task manager entry 8=Meta+8,Meta+8,Activate Task Manager Entry 8
activate task manager entry 9=Meta+9,Meta+9,Activate Task Manager Entry 9 activate task manager entry 9=Meta+9,Meta+9,Activate Task Manager Entry 9
activate widget 113=none,none,Activate Application Launcher Widget activate widget 113=none,none,Activate Application Launcher Widget
activate widget 137=none,none,Activate Application Launcher Widget activate widget 137=none,none,Activate Application Launcher Widget
activate widget 3=,none,Activate Application Launcher Widget activate widget 3=none,none,Activate Application Launcher Widget
activate widget 30=Meta+Space,none,Activate Application Launcher Widget activate widget 30=Meta+Space,none,Activate Application Launcher Widget
activate widget 5=,none,Activate Application Launcher Widget
activate widget 94=none,none,Activate Compact Pager Widget activate widget 94=none,none,Activate Compact Pager Widget
clear-history=none,,Clear Clipboard History clear-history=none,,Clear Clipboard History
clipboard_action=none,Meta+Ctrl+X,Automatic Action Popup Menu clipboard_action=none,Meta+Ctrl+X,Automatic Action Popup Menu

View File

@ -1,2 +0,0 @@
[Theme]
name=Sweet

View File

@ -10,6 +10,6 @@ Gtk/MenuImages 1
Gtk/ButtonImages 1 Gtk/ButtonImages 1
Gtk/CursorThemeSize 24 Gtk/CursorThemeSize 24
Gtk/CursorThemeName "breeze_cursors" Gtk/CursorThemeName "breeze_cursors"
Net/IconThemeName "breeze" Net/IconThemeName "breeze-dark"
Gtk/FontName "Noto Sans, 10" Gtk/FontName "Noto Sans, 10"

18
.gitmodules vendored
View File

@ -1,15 +1,15 @@
[submodule ".config/emacs"] [submodule ".config/emacs"]
path = .config/emacs path = .config/emacs
url = https://github.com/doomemacs/doomemacs/ url = https://github.com/doomemacs/doomemacs/
[submodule ".oh-my-zsh/.oh-my-zsh"] [submodule ".omz-plugins/autoupdate"]
path = .oh-my-zsh/.oh-my-zsh path = .omz-plugins/plugins/autoupdate
url = https://github.com/ohmyzsh/ohmyzsh
[submodule ".oh-my-zsh/custom/plugins/.oh-my-zsh/custom/plugins/autoupdate"]
path = .oh-my-zsh/custom/plugins/.oh-my-zsh/custom/plugins/autoupdate
url = https://github.com/tamcore/autoupdate-oh-my-zsh-plugins url = https://github.com/tamcore/autoupdate-oh-my-zsh-plugins
[submodule ".oh-my-zsh/custom/plugins/.oh-my-zsh/custom/plugins/zsh-autosuggestions"] [submodule ".omz-plugins/zsh-autosuggestions"]
path = .oh-my-zsh/custom/plugins/.oh-my-zsh/custom/plugins/zsh-autosuggestions path = .omz-plugins/plugins/zsh-autosuggestions
url = https://github.com/zsh-users/zsh-autosuggestions url = https://github.com/zsh-users/zsh-autosuggestions
[submodule ".oh-my-zsh/custom/plugins/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"] [submodule ".omz-plugins/zsh-syntax-highlighting"]
path = .oh-my-zsh/custom/plugins/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting path = .omz-plugins/plugins/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting url = https://github.com/zsh-users/zsh-syntax-highlighting
[submodule ".omz-plugins/themes/agnoster-repopath"]
path = .omz-plugins/themes/agnoster-repopath
url = https://github.com/ivanfurlan/agnoster-repopath-theme

View File

@ -0,0 +1 @@
complete -W "$(cat /home/melissa/.local/share/AM/list 2>/dev/null)" am

@ -0,0 +1 @@
Subproject commit d7368cbefa8c6dbbc4dcae00f55ba6db525ea1ea

@ -0,0 +1 @@
Subproject commit 85919cd1ffa7d2d5412f6d3fe437ebdbeeec4fc5

@ -0,0 +1 @@
Subproject commit 5eb677bb0fa9a3e60f0eff031dc13926e093df92

@ -0,0 +1 @@
Subproject commit 81585953c7a4ec7028c41b8f34436293bd53a26b

View File

@ -0,0 +1,331 @@
# vim:ft=zsh ts=2 sw=2 sts=2
# agnoster-repopath Theme - https://github.com/ivanfurlan/agnoster-repopath-theme
# Based on: agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# + with @ivanfurlan's modifications (https://github.com/ivanfurlan/)
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
# uses changed in 2012, and older versions will display incorrectly,
# in confusing ways.
#
# In addition, I recommend the
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
# using it on Mac OS X, [iTerm 2](https://iterm2.com/) over Terminal.app -
# it has significantly better color fidelity.
#
# If using with "light" variant of the Solarized color schema, set
# SOLARIZED_THEME variable to "light". If you don't specify, we'll assume
# you're using the "dark" variant.
#
# # Goals
#
# The aim of this theme is to only show you *relevant* information. Like most
# prompts, it will only show git information when in a git working directory.
# However, it goes a step further: everything from the current user and
# hostname to whether the last call exited with an error to whether background
# jobs are running in this shell will all be displayed automatically when
# appropriate.
### Segment drawing
# A few utility functions to make it easy and re-usable to draw segmented prompts
CURRENT_BG='NONE'
case ${SOLARIZED_THEME:-dark} in
light) CURRENT_FG='white';;
*) CURRENT_FG='black';;
esac
# Special Powerline characters
() {
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
# NOTE: This segment separator character is correct. In 2012, Powerline changed
# the code points they use for their special characters. This is the new code point.
# If this is not working for you, you probably have an old version of the
# Powerline-patched fonts installed. Download and install the new version.
# Do not submit PRs to change this unless you have reviewed the Powerline code point
# history and have new information.
# This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of
# what font the user is viewing this source code in. Do not replace the
# escape sequence with a single literal character.
# Do not change this! Do not make it '\u2b80'; that is the old, wrong code point.
SEGMENT_SEPARATOR=$'\ue0b0'
}
# Begin a segment
# Takes two arguments, background and foreground. Both can be omitted,
# rendering default background/foreground.
prompt_segment() {
local bg fg
[[ -n $1 ]] && bg="%K{$1}" || bg="%k"
[[ -n $2 ]] && fg="%F{$2}" || fg="%f"
if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
else
echo -n "%{$bg%}%{$fg%} "
fi
CURRENT_BG=$1
[[ -n $3 ]] && echo -n $3
}
# End the prompt, closing any open segments
prompt_end() {
if [[ -n $CURRENT_BG ]]; then
echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
else
echo -n "%{%k%}"
fi
echo -n "%{%f%}"
CURRENT_BG=''
}
### Prompt components
# Each component will draw itself, and hide itself if no information needs to be shown
# Context: user@hostname (who am I and where am I)
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)%n"
# prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m"
fi
}
# Git: branch/detached head, dirty status
prompt_git() {
(( $+commands[git] )) || return
if [[ "$(git config --get oh-my-zsh.hide-status 2>/dev/null)" = 1 ]]; then
return
fi
local PL_BRANCH_CHAR
() {
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
PL_BRANCH_CHAR=$'\ue0a0' # 
}
local ref dirty mode repo_path
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
repo_path=$(git rev-parse --git-dir 2>/dev/null)
dirty=$(parse_git_dirty)
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
if [[ -n $dirty ]]; then
prompt_segment yellow black
else
prompt_segment green $CURRENT_FG
fi
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
mode=" <B>"
elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
mode=" >M<"
elif [[ -e "${repo_path}/rebase" || -e "${repo_path}/rebase-apply" || -e "${repo_path}/rebase-merge" || -e "${repo_path}/../.dotest" ]]; then
mode=" >R>"
fi
setopt promptsubst
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' get-revision true
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr '✚'
zstyle ':vcs_info:*' unstagedstr '●'
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info
echo -n "${ref/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}"
fi
}
prompt_bzr() {
(( $+commands[bzr] )) || return
if (bzr status >/dev/null 2>&1); then
status_mod=`bzr status | head -n1 | grep "modified" | wc -m`
status_all=`bzr status | head -n1 | wc -m`
revision=`bzr log | head -n2 | tail -n1 | sed 's/^revno: //'`
if [[ $status_mod -gt 0 ]] ; then
prompt_segment yellow black
echo -n "bzr@"$revision "✚ "
else
if [[ $status_all -gt 0 ]] ; then
prompt_segment yellow black
echo -n "bzr@"$revision
else
prompt_segment green black
echo -n "bzr@"$revision
fi
fi
fi
}
prompt_hg() {
(( $+commands[hg] )) || return
local rev st branch
if $(hg id >/dev/null 2>&1); then
if $(hg prompt >/dev/null 2>&1); then
if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
# if files are not added
prompt_segment red white
st='±'
elif [[ -n $(hg prompt "{status|modified}") ]]; then
# if any modification
prompt_segment yellow black
st='±'
else
# if working copy is clean
prompt_segment green $CURRENT_FG
fi
echo -n $(hg prompt "☿ {rev}@{branch}") $st
else
st=""
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
branch=$(hg id -b 2>/dev/null)
if `hg st | grep -q "^\?"`; then
prompt_segment red black
st='±'
elif `hg st | grep -q "^[MA]"`; then
prompt_segment yellow black
st='±'
else
prompt_segment green $CURRENT_FG
fi
echo -n "☿ $rev@$branch" $st
fi
fi
}
# Dir: current working directory
prompt_dir() {
#if is repo print only the repo name
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
prompt_segment blue white "$(git rev-parse --show-toplevel | sed 's:.*/::')"
#print only the path inside the repo (starting fron the dir where there is .git dir)
prompt_segment blue $CURRENT_FG "/$(git rev-parse --show-prefix | sed 's/\/$//')"
else
if $(hg id >/dev/null 2>&1); then
prompt_segment blue white "$(hg root | sed 's:.*/::')"
prompt_segment blue $CURRENT_FG "/$(realpath --relative-to="$(hg root)" "$(pwd)")"
else
prompt_segment blue white '%~'
fi
fi
}
# Virtualenv: current working virtualenv
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
prompt_segment blue black "(`basename $virtualenv_path`)"
fi
}
# Status:
# - was there an error
# - am I root
# - are there background jobs?
prompt_status() {
local -a symbols
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
[[ -n "$symbols" ]] && prompt_segment black default "$symbols"
}
prompt_time() {
#echo -n "%{%F{red}%}"
#echo -n "\ue0b2"
prompt_segment red white "$(date '+%R')"
}
## Main prompt
build_prompt() {
RETVAL=$?
prompt_status
prompt_time
prompt_virtualenv
prompt_context
prompt_dir
prompt_git
prompt_bzr
prompt_hg
prompt_end
}
build_right_prompt() {
#prompt_time
}
# command execute before
preexec() {
COMMAND_TIME_BEIGIN="$(current_time_millis)";
}
# command execute after
precmd() {
# output command execute after
output_command_execute_after $last_cmd_result;
}
current_time_millis() {
local time_millis;
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# Linux
time_millis="$(date +%s.%3N)";
elif [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
time_millis="$(gdate +%s.%3N)";
else
# Unknown.
fi
echo $time_millis;
}
# output command execute after
output_command_execute_after() {
if [ "$COMMAND_TIME_BEIGIN" = "-20200325" ] || [ "$COMMAND_TIME_BEIGIN" = "" ];
then
return 1;
fi
local color_reset="$reset_color";
# start_time
local start_time="[s $(date -d @${COMMAND_TIME_BEIGIN} +%X)]"
local color_time="$fg_no_bold[cyan]";
start_time="${color_time}${start_time}${color_reset}";
# time
local time="[e $(date +%H:%M:%S)]"
local color_time="$fg_no_bold[cyan]";
time="${color_time}${time}${color_reset}";
# cost
local time_end="$(current_time_millis)";
local cost=$(bc -l <<<"${time_end}-${COMMAND_TIME_BEIGIN}");
COMMAND_TIME_BEIGIN="-20200325"
local length_cost=${#cost};
if [ "$length_cost" = "4" ];
then
cost="0${cost}"
fi
cost="[cost ${cost}s]"
local color_cost="$fg_no_bold[cyan]";
cost="${color_cost}${cost}${color_reset}";
echo -e "";
echo -e "${start_time} ${time} ${cost}";
}
PROMPT='%{%f%b%k%}$(build_prompt) '
RPROMPT='$(build_right_prompt)'

2
.zshrc
View File

@ -63,7 +63,7 @@ zstyle ':omz:update' mode reminder # just remind me to update when it's time
# HIST_STAMPS="mm/dd/yyyy" # HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom? # Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder export ZSH_CUSTOM="$HOME/.omz-plugins"
# Which plugins would you like to load? # Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/ # Standard plugins can be found in $ZSH/plugins/

View File

@ -2,8 +2,15 @@
# MANUALLY: need /etc/sudoers edited to add myself to sudoers # MANUALLY: need /etc/sudoers edited to add myself to sudoers
# ALSO: need to manually edit /etc/apt/sources.list to change to testing # ALSO: need to manually edit /etc/apt/sources.list to change to testing
# ALSO ALSO: run this manually, its weird to automate for some reason
# bash -ci \"$(wget -qO - 'https://shlink.makedeb.org/install')\"
sudo apt-add-repository -yns main non-free-firmware contrib non-free sudo apt-add-repository -yns main non-free-firmware contrib non-free
# need to be installed separately first
sudo apt install -y curl
# gpg # gpg
sudo curl -fsSLo /usr/share/keyrings/steam.gpg http://repo.steampowered.com/steam/archive/stable/steam.gpg sudo curl -fsSLo /usr/share/keyrings/steam.gpg http://repo.steampowered.com/steam/archive/stable/steam.gpg
sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
@ -12,19 +19,14 @@ sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mull
echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] http://repo.steampowered.com/steam/ stable steam" | sudo tee /etc/apt/sources.list.d/steam.list echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] http://repo.steampowered.com/steam/ stable steam" | sudo tee /etc/apt/sources.list.d/steam.list
echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable stable main" | sudo tee /etc/apt/sources.list.d/mullvad.list echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable stable main" | sudo tee /etc/apt/sources.list.d/mullvad.list
bash -ci "$(wget -qO - 'https://shlink.makedeb.org/install')" # update files, update debian
sudo apt update && sudo apt upgrade -y
# update files
sudo apt update
# apt # apt
sudo apt install autorandr i3gaps polybar cargo lightdm-gtk-greeter lightdm flatpak yadm git python3 pipx alacritty i3lock-fancy nm-applet rofi dunst neofetch htop wget keepassxc-full net-tools vim mullvad-vpn flameshot caffeine pasystray tmux plasma-discover-backend-flatpak zsh autorandr kdeconnect zsh am fwupd numlockx nvidia- sudo apt install -y autorandr i3 polybar lightdm-gtk-greeter lightdm flatpak yadm git python3 pipx alacritty i3lock-fancy network-manager-applet rofi dunst htop wget keepassxc-full net-tools vim mullvad-vpn flameshot caffeine pasystray tmux plasma-discover-backend-flatpak zsh autorandr kdeconnect fwupd numlockx
# chsh # chsh
sudo chsh /bin/zsh chsh melissa -s /bin/zsh
# Nvidia
# omz # omz
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --keep-zshrc --unattended" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --keep-zshrc --unattended"
@ -38,11 +40,13 @@ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.f
# flatpak installs # flatpak installs
flatpak install com.discordapp.Discord com.spotify.Client mo.kozec.syncthingtk org.jitsi.jitsi-meet org.signal.Signal org.telegram.desktop us.zoom.Zoom flatpak install com.discordapp.Discord com.spotify.Client mo.kozec.syncthingtk org.jitsi.jitsi-meet org.signal.Signal org.telegram.desktop us.zoom.Zoom
# am installs # am
# none currently wget -q https://raw.githubusercontent.com/ivan-hc/AM/main/AM-INSTALLER && chmod a+x ./AM-INSTALLER && ./AM-INSTALLER && rm ./AM-INSTALLER
# cargo installs # cargo installs
cargo install rustup cargo-update curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
cargo install cargo-update neofetch
# pipx # pipx
pipx install topgrade termdown pipx install topgrade termdown