added budgie

This commit is contained in:
Sohrab Behdani 2024-05-05 18:42:26 +03:30
parent 9bd2dbbc7c
commit bb40c35d62
21 changed files with 12 additions and 418 deletions

View file

@ -0,0 +1,12 @@
#!/bin/bash
sed -i -e '$aHidden=true' /usr/share/applications/bvnc.desktop
sed -i -e '$aHidden=true' /usr/share/applications/bssh.desktop
sed -i -e '$aHidden=true' /usr/share/applications/avahi-discover.desktop
sed -i -e '$aHidden=true' /usr/share/applications/qv4l2.desktop
sed -i -e '$aHidden=true' /usr/share/applications/qvidcap.desktop
sed -i -e '$aHidden=true' /usr/share/applications/gda-browser-5.0.desktop
sed -i -e '$aHidden=true' /usr/share/applications/gda-control-center-5.0.desktop
sed -i -e '$aHidden=true' /usr/share/applications/plank.desktop
rm -rf /usr/share/xsessions/gnome*

View file

@ -1,7 +0,0 @@
if [ -d "/opt/homebrew" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -d "~/.linuxbrew" ]; then
eval "$(~/.linuxbrew/bin/brew shellenv)"
elif [ -d "/home/linuxbrew" ]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi

View file

@ -1,21 +0,0 @@
# Unix
alias ll="ls -al"
alias ln="ln -v"
alias mkdir="mkdir -p"
alias e="$EDITOR"
alias v="$VISUAL"
# Bundler
alias b="bundle"
# Rails
alias migrate="bin/rails db:migrate db:rollback && bin/rails db:migrate db:test:prepare"
alias s="rspec"
# Pretty print the path
alias path='echo $PATH | tr -s ":" "\n"'
# Include custom aliases
if [[ -f ~/.aliases.local ]]; then
source ~/.aliases.local
fi

View file

@ -1,7 +0,0 @@
#compdef ag
if (( CURRENT == 2 )); then
compadd $(cut -f 1 tmp/tags .git/tags 2>/dev/null)
else;
_files
fi

View file

@ -1,72 +0,0 @@
#compdef bundle
local curcontext="$curcontext" state line _gems _opts ret=1
_arguments -C -A "-v" -A "--version" \
'(- 1 *)'{-v,--version}'[display version information]' \
'1: :->cmds' \
'*:: :->args' && ret=0
case $state in
cmds)
_values "bundle command" \
"install[Install the gems specified by the Gemfile or Gemfile.lock]" \
"update[Update dependencies to their latest versions]" \
"package[Package the .gem files required by your application]" \
"exec[Execute a script in the context of the current bundle]" \
"config[Specify and read configuration options for bundler]" \
"check[Determine whether the requirements for your application are installed]" \
"list[Show all of the gems in the current bundle]" \
"show[Show the source location of a particular gem in the bundle]" \
"console[Start an IRB session in the context of the current bundle]" \
"open[Open an installed gem in the editor]" \
"lock[Generate a lockfile for your dependencies]" \
"viz[Generate a visual representation of your dependencies]" \
"init[Generate a simple Gemfile, placed in the current directory]" \
"gem[Create a simple gem, suitable for development with bundler]" \
"help[Describe available tasks or one specific task]" \
"platform[Displays platform compatibility information]" \
"outdated[Show all of the outdated gems in the current bundle]" \
"clean[Cleans up unused gems in your bundler directory]"
ret=0
;;
args)
case $line[1] in
help)
_values 'commands' 'install' 'update' 'package' 'exec' 'config' 'check' 'list' 'show' 'console' 'open' 'lock' 'viz' 'init' 'gem' 'help' 'platform' 'outdated' 'clean' && ret=0
;;
install)
_arguments \
'(--no-color)--no-color[disable colorization in output]' \
'(--local)--local[do not attempt to connect to rubygems.org]' \
'(--quiet)--quiet[only output warnings and errors]' \
'(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \
'(--system)--system[install to the system location]' \
'(--deployment)--deployment[install using defaults tuned for deployment environments]' \
'(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \
'(--path)--path=-[specify a different path than the system default]:path:_files' \
'(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \
'(--without)--without=-[exclude gems that are part of the specified named group]:groups'
ret=0
;;
exec)
_normal && ret=0
;;
(open|show)
_gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
if [[ $_gems != "" ]]; then
_values 'gems' $_gems && ret=0
fi
;;
*)
_opts=( $(bundle help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') )
_opts+=( $(bundle help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') )
if [[ $_opts != "" ]]; then
_values 'options' $_opts && ret=0
fi
;;
esac
;;
esac
return ret

View file

@ -1,2 +0,0 @@
#compdef g
compdef g=git

View file

@ -1,2 +0,0 @@
#compdef production
compdef production=heroku

View file

@ -1,3 +0,0 @@
#compdef rspec
compadd -P spec/ $(ls spec/**/*_spec.rb | sed -E "s/spec\///g")

View file

@ -1,2 +0,0 @@
#compdef staging
compdef staging=heroku

View file

@ -1,6 +0,0 @@
# makes color constants available
autoload -U colors
colors
# enable colored output from ls, etc. on FreeBSD-based systems
export CLICOLOR=1

View file

@ -1,2 +0,0 @@
export VISUAL=vim
export EDITOR=$VISUAL

View file

@ -1,6 +0,0 @@
setopt hist_ignore_all_dups inc_append_history
HISTFILE=~/.zhistory
HISTSIZE=4096
SAVEHIST=4096
export ERL_AFLAGS="-kernel shell_history enabled"

View file

@ -1,4 +0,0 @@
# To opt in to Homebrew analytics, `unset` this in ~/.zshrc.local .
# Learn more about what you are opting in to at
# https://docs.brew.sh/Analytics
export HOMEBREW_NO_ANALYTICS=1

View file

@ -1,17 +0,0 @@
# give us access to ^Q
stty -ixon
# vi mode
bindkey -v
bindkey "^F" vi-cmd-mode
# handy keybindings
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey "^K" kill-line
bindkey "^R" history-incremental-search-backward
bindkey "^P" history-search-backward
bindkey "^Y" accept-and-hold
bindkey "^N" insert-last-word
bindkey "^Q" push-line-or-edit
bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"

View file

@ -1,9 +0,0 @@
# awesome cd movements from zshkit
setopt autocd autopushd pushdminus pushdsilent pushdtohome cdablevars
DIRSTACKSIZE=5
# Enable extended globbing
setopt extendedglob
# Allow [ or ] whereever you want
unsetopt nomatch

View file

@ -1,14 +0,0 @@
# load our own completion functions
fpath=(~/.zsh/completion /usr/local/share/zsh/site-functions $fpath)
# completion; use cache if updated within 24h
autoload -Uz compinit
if [[ -n $HOME/.zcompdump(#qN.mh+24) ]]; then
compinit -d $HOME/.zcompdump;
else
compinit -C;
fi;
# disable zsh bundled function mtools command mcd
# which causes a conflict.
compdef -d mcd

View file

@ -1,14 +0,0 @@
# ensure dotfiles bin directory is loaded first
PATH="$HOME/.bin:/usr/local/sbin:$PATH"
# Try loading ASDF from the regular home dir location
if [ -f "$HOME/.asdf/asdf.sh" ]; then
. "$HOME/.asdf/asdf.sh"
elif which brew >/dev/null; then
. "$(brew --prefix asdf)/libexec/asdf.sh"
fi
# mkdir .git/safe in the root of repositories you trust
PATH=".git/safe/../../bin:$PATH"
export -U PATH

View file

@ -1,14 +0,0 @@
# modify the prompt to contain git branch name if applicable
git_prompt_info() {
current_branch=$(git current-branch 2> /dev/null)
if [[ -n $current_branch ]]; then
echo " %{$fg_bold[green]%}$current_branch%{$reset_color%}"
fi
}
setopt promptsubst
# Allow exported PS1 variable to override default prompt.
if ! env | grep -q '^PS1='; then
PS1='${SSH_CONNECTION+"%{$fg_bold[green]%}%n@%m:"}%{$fg_bold[blue]%}%c%{$reset_color%}$(git_prompt_info) %# '
fi

View file

@ -1,116 +0,0 @@
##########################
####### functions ########
##########################
SAVEIFS=$IFS
IFS=$(echo -en "")
function extract {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
else
for n in "$@"
do
if [ -f "$n" ] ; then
case "${n%,}" in
*.cbt|*.tar.bz2|*.tar.gz|*.tar.xz|*.tbz2|*.tgz|*.txz|*.tar)
tar xvf "$n" ;;
*.lzma) unlzma ./"$n" ;;
*.bz2) bunzip2 ./"$n" ;;
*.cbr|*.rar) unrar x -ad ./"$n" ;;
*.gz) gunzip ./"$n" ;;
*.cbz|*.epub|*.zip) unzip ./"$n" ;;
*.z) uncompress ./"$n" ;;
*.7z|*.arj|*.cab|*.cb7|*.chm|*.deb|*.dmg|*.iso|*.lzh|*.msi|*.pkg|*.rpm|*.udf|*.wim|*.xar)
7z x ./"$n" ;;
*.xz) unxz ./"$n" ;;
*.exe) cabextract ./"$n" ;;
*.cpio) cpio -id < ./"$n" ;;
*.cba|*.ace) unace x ./"$n" ;;
*)
echo "extract: '$n' - unknown archive method"
return 1
;;
esac
else
echo "'$n' - file does not exist"
return 1
fi
done
fi
}
# navigation
up () {
local d=""
local limit="$1"
# Default to limit of 1
if [ -z "$limit" ] || [ "$limit" -le 0 ]; then
limit=1
fi
for ((i=1;i<=limit;i++)); do
d="../$d"
done
# perform cd. Show error if cd fails
if ! cd "$d"; then
echo "Couldn't go up $limit dirs.";
fi
}
# python virtualenv
venv(){
if [ -f .venv/bin/activate ]; then
source .venv/bin/activate
else
virtualenv .venv && source .venv/bin/activate
fi
}
# Make directory and change into it.
function mcd() {
mkdir -p "$1" && cd "$1";
}
# Change file extensions recursively in current directory
#
# change-extension erb haml
function change-extension() {
foreach f (**/*.$1)
mv $f $f:r.$2
end
}
# Load .env file into shell session for environment variables
function envup() {
if [ -f .env ]; then
export $(sed '/^ *#/ d' .env)
else
echo 'No .env file found' 1>&2
return 1
fi
}
# No arguments: `git status`
# With arguments: acts like `git`
g() {
if [[ $# -gt 0 ]]; then
git "$@"
else
git status
fi
}
_git_delete_branch ()
{
__gitcomp "$(__git_heads)"
}
# Include custom functions
if [[ -f ~/.functions.local ]]; then
source ~/.functions.local
fi

29
zshenv
View file

@ -1,29 +0,0 @@
local _old_path="$PATH"
# Local config
[[ -f ~/.zshenv.local ]] && source ~/.zshenv.local
if [[ $PATH != $_old_path ]]; then
# `colors` isn't initialized yet, so define a few manually
typeset -AHg fg fg_bold
if [ -t 2 ]; then
fg[red]=$'\e[31m'
fg_bold[white]=$'\e[1;37m'
reset_color=$'\e[m'
else
fg[red]=""
fg_bold[white]=""
reset_color=""
fi
cat <<MSG >&2
${fg[red]}Warning:${reset_color} your \`~/.zshenv.local' configuration seems to edit PATH entries.
Please move that configuration to \`.zshrc.local' like so:
${fg_bold[white]}cat ~/.zshenv.local >> ~/.zshrc.local && rm ~/.zshenv.local${reset_color}
(called from ${(%):-%N:%i})
MSG
fi
unset _old_path

71
zshrc
View file

@ -1,71 +0,0 @@
#!/usr/bin/env zsh
ZSH_PATH=$HOME/.zsh
#########################
######### PATH ##########
#########################
if [ -d "$HOME/.bin" ] ;
then PATH="$HOME/.bin:$PATH"
fi
if [ -d "$HOME/.local/bin" ] ;
then PATH="$HOME/.local/bin:$PATH"
fi
if [ -d "$HOME/Applications" ] ;
then PATH="$HOME/Applications:$PATH"
fi
if [ -d "$HOME/.cargo/bin" ]
then PATH="$HOME/.cargo/bin:$PATH"
fi
# Comment this line out to enable default emacs-like bindings
bindkey -v
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# functions
[[ -f "$ZSH_PATH/functions.zsh" ]] && source $ZSH_PATH/functions.zsh
# extra files in ~/.zsh/configs/pre , ~/.zsh/configs , and ~/.zsh/configs/post
# these are loaded first, second, and third, respectively.
_load_settings() {
_dir="$1"
if [ -d "$_dir" ]; then
if [ -d "$_dir/pre" ]; then
for config in "$_dir"/pre/**/*~*.zwc(N-.); do
. $config
done
fi
for config in "$_dir"/**/*(N-.); do
case "$config" in
"$_dir"/(pre|post)/*|*.zwc)
:
;;
*)
. $config
;;
esac
done
if [ -d "$_dir/post" ]; then
for config in "$_dir"/post/**/*~*.zwc(N-.); do
. $config
done
fi
fi
}
_load_settings "$ZSH_PATH/configs"
# Local config
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local
# aliases
[[ -f "$ZSH_PATH/aliases.zsh" ]] && source "$ZSH_PATH/aliases.zsh"