Reworked config using chezmoi
This commit is contained in:
1
.chezmoiignore
Normal file
1
.chezmoiignore
Normal file
@@ -0,0 +1 @@
|
||||
to_install.txt
|
||||
16
.gitmodules
vendored
16
.gitmodules
vendored
@@ -1,16 +0,0 @@
|
||||
[submodule "dotbot"]
|
||||
path = dotbot
|
||||
url = https://github.com/anishathalye/dotbot
|
||||
ignore = dirty
|
||||
[submodule "oh-my-zsh"]
|
||||
path = oh-my-zsh
|
||||
url = https://git.jika.li/Jika/oh-my-zsh
|
||||
[submodule "ohmyzsh"]
|
||||
path = ohmyzsh
|
||||
url = https://git.jika.li/Jika/ohmyzsh
|
||||
[submodule "omz-custom/plugins/zsh-autosuggestions"]
|
||||
path = omz-custom/plugins/zsh-autosuggestions
|
||||
url = https://github.com/zsh-users/zsh-autosuggestions
|
||||
[submodule "omz-custom/plugins/zsh-syntax-highlighting"]
|
||||
path = omz-custom/plugins/zsh-syntax-highlighting
|
||||
url = https://github.com/zsh-users/zsh-syntax-highlighting
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# vim: ft=bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Github : @adi1090x
|
||||
@@ -62,11 +63,19 @@ run_cmd() {
|
||||
selected="$(confirm_exit)"
|
||||
if [[ "$selected" == "$yes" ]]; then
|
||||
if [[ $1 == '--shutdown' ]]; then
|
||||
{{- if eq .chezmoi.os "linux" }}
|
||||
shutdown now
|
||||
{{- else }}
|
||||
shutdown -p now
|
||||
{{ end }}
|
||||
elif [[ $1 == '--reboot' ]]; then
|
||||
shutdown -r now
|
||||
elif [[ $1 == '--suspend' ]]; then
|
||||
{{- if eq .chezmoi.os "linux" }}
|
||||
systemctl suspend
|
||||
{{- else }}
|
||||
acpiconf -s 3
|
||||
{{ end }}
|
||||
elif [[ $1 == '--logout' ]]; then
|
||||
if [[ "$XDG_SESSION_DESKTOP" == 'openbox' ]]; then
|
||||
openbox --exit
|
||||
@@ -1,3 +1,4 @@
|
||||
# vim: ft=swayconfig
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
seat seat0 xcursor_theme Breeze-Obsidian 25
|
||||
|
||||
@@ -28,12 +29,14 @@ set $menu ~/.config/rofi/launcher
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/local/share/backgrounds/sway/)
|
||||
# Default wallpaper (more resolutions are available in /usr/local/share/backgrounds/sway/)
|
||||
{{- if eq .chezmoi.os "linux" }}
|
||||
output * bg ~/.config/sway/od_arch.png fill
|
||||
{{- else }}
|
||||
output * bg ~/.config/sway/od_freebsd.png fill
|
||||
{{ end }}
|
||||
|
||||
# Example configuration:
|
||||
#
|
||||
output DP-3 resolution 3440x1440@165hz position 1920,0
|
||||
include ~/.config/sway/outputs.d/{{ .swayProfile }}.conf
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
|
||||
BIN
dot_config/sway/od_arch.png
Normal file
BIN
dot_config/sway/od_arch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
1
dot_config/sway/outputs.d/laptop.conf
Normal file
1
dot_config/sway/outputs.d/laptop.conf
Normal file
@@ -0,0 +1 @@
|
||||
output eDP-1 resolution 2880x1800@120hz
|
||||
0
dot_config/sway/outputs.d/splitscreen.conf
Normal file
0
dot_config/sway/outputs.d/splitscreen.conf
Normal file
1
dot_config/sway/outputs.d/ultrawide.conf
Normal file
1
dot_config/sway/outputs.d/ultrawide.conf
Normal file
@@ -0,0 +1 @@
|
||||
output DP-3 resolution 3440x1440@165hz position 1920,0
|
||||
@@ -1,31 +1,27 @@
|
||||
// vim: ft=json5
|
||||
{{- $hasBattery := false -}}
|
||||
{{- if eq .chezmoi.os "linux" -}}
|
||||
{{- if (glob "/sys/class/power_supply/BAT*") -}}
|
||||
{{- $hasBattery = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{
|
||||
"include": ["~/.config/waybar/media.json"],
|
||||
"layer": "top",
|
||||
"output": ["DP-3"],
|
||||
// "mode": "dock",
|
||||
{{ include (printf "dot_config/waybar/outputs.d/%s.conf" .swayProfile) }}
|
||||
"gtk-layer-shell": "true",
|
||||
//"exclusive": "false",
|
||||
//"passthrough": "true",
|
||||
"spacing": 0,
|
||||
"margin-top": 0,
|
||||
"margin-bottom": 2,
|
||||
"height": 32,
|
||||
"modules-left": ["custom/launcher","sway/workspaces","cpu","memory","disk","sway/window"],
|
||||
"modules-center": ["custom/media"],
|
||||
"modules-right": ["custom/update_audio","sway/mode","custom/kernel","custom/network","pulseaudio","tray","clock","custom/power"],
|
||||
"modules-right": ["custom/update_audio","sway/mode","custom/kernel",{{- if eq .chezmoi.os "linux" -}}"network"{{- else }} "custom/network"{{ end}},"pulseaudio","tray","clock",{{- if $hasBattery -}}
|
||||
"battery",
|
||||
{{- end -}}"custom/power"],
|
||||
|
||||
|
||||
"custom/media": {
|
||||
"format": " {} {icon}",
|
||||
"return-type": "json",
|
||||
"format-icons": {
|
||||
"Playing": " ",
|
||||
"Paused": " ",
|
||||
"Stopped": " ",
|
||||
},
|
||||
"max-length":70,
|
||||
"exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}'",
|
||||
"on-click": "playerctl play-pause",
|
||||
"interval": 1,
|
||||
},
|
||||
"keyboard-state": {
|
||||
"numlock": true,
|
||||
"capslock": true,
|
||||
@@ -68,7 +64,6 @@
|
||||
"active": "",
|
||||
"focused": ""
|
||||
},
|
||||
"on-click": "activate",
|
||||
"window-rewrite": {}
|
||||
// "sort-by-coordinates": true
|
||||
},
|
||||
@@ -142,14 +137,22 @@
|
||||
"on-click" : "",
|
||||
},
|
||||
"network": {
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-wifi": "",
|
||||
// "interface": "wlan0", // (Optional) To force the use of this interface
|
||||
"format-wifi": " {bandwidthDownBytes}",
|
||||
"format-ethernet": " {ifname}: {ipaddr}/{cidr}",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": "睊 Not connected",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}",
|
||||
"tooltip-format": "{essid} {signalStrength}%"
|
||||
},
|
||||
"battery": {
|
||||
"format": "{icon} {capacity}%",
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-bluetooth": "{icon} {volume}% {format_source}",
|
||||
@@ -192,7 +195,11 @@
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/launcher": {
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
"format": "",
|
||||
{{ else -}}
|
||||
"format": "",
|
||||
{{ end -}}
|
||||
"on-click": "~/.config/rofi/launcher",
|
||||
"on-click-right": "killall -9 rofi",
|
||||
"tooltip": false
|
||||
@@ -240,9 +247,14 @@
|
||||
"on-click" : "",
|
||||
},
|
||||
"custom/kernel": {
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
"format": " {}",
|
||||
"exec": "uname -rn | cut -d '-' -f1",
|
||||
{{ else -}}
|
||||
"format": " {}",
|
||||
"interval": 7200,
|
||||
"exec": "uname -v | cut -d '-' -f1",
|
||||
{{ end -}}
|
||||
"interval": 7200,
|
||||
"on-click" : "",
|
||||
},
|
||||
"custom/eix": {
|
||||
13
dot_config/waybar/media.json
Normal file
13
dot_config/waybar/media.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{"custom/media": {
|
||||
"format": " {} {icon}",
|
||||
"return-type": "json",
|
||||
"format-icons": {
|
||||
"Playing": " ",
|
||||
"Paused": " ",
|
||||
"Stopped": " ",
|
||||
},
|
||||
"max-length":70,
|
||||
"exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}'",
|
||||
"on-click": "playerctl play-pause",
|
||||
"interval": 1,
|
||||
},
|
||||
1
dot_config/waybar/outputs.d/laptop.conf
Normal file
1
dot_config/waybar/outputs.d/laptop.conf
Normal file
@@ -0,0 +1 @@
|
||||
"output": ["eDP-1"],
|
||||
0
dot_config/waybar/outputs.d/splitscreen.conf
Normal file
0
dot_config/waybar/outputs.d/splitscreen.conf
Normal file
1
dot_config/waybar/outputs.d/ultrawide.conf
Normal file
1
dot_config/waybar/outputs.d/ultrawide.conf
Normal file
@@ -0,0 +1 @@
|
||||
"output": ["DP-3"],
|
||||
@@ -53,6 +53,7 @@ tooltip {
|
||||
#custom-update,
|
||||
#custom-media,
|
||||
#disk,
|
||||
#battery,
|
||||
#tray {
|
||||
background-color: #1e222a;
|
||||
padding: 0 6px;
|
||||
@@ -62,14 +63,13 @@ tooltip {
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #efbd5d;
|
||||
}
|
||||
|
||||
#custom-power,
|
||||
#pulseaudio.muted {
|
||||
background-color: #e06c75;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#custom-kernel,
|
||||
#custom-gputmp {
|
||||
color: #41a7fc;
|
||||
}
|
||||
@@ -78,19 +78,19 @@ tooltip {
|
||||
color: #c75ae8;
|
||||
}
|
||||
|
||||
#battery,
|
||||
#memory {
|
||||
color: #8bcd5b;
|
||||
}
|
||||
|
||||
#pulseaudio,
|
||||
#cpu {
|
||||
color: #efbd5d;
|
||||
}
|
||||
|
||||
#custom-uptime {
|
||||
color: #34bfd0;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
#temperature,
|
||||
#custom-network,
|
||||
#network {
|
||||
color: #c75ae8;
|
||||
}
|
||||
|
||||
@@ -99,23 +99,14 @@ tooltip {
|
||||
color: #1f1f1f;
|
||||
}
|
||||
|
||||
#custom-kernel {
|
||||
color: #41a7fc;
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
color: #34bfd0;
|
||||
}
|
||||
|
||||
#mode,
|
||||
#custom-uptime,
|
||||
#custom-weather,
|
||||
#custom-media,
|
||||
#disk {
|
||||
color: #34bfd0;
|
||||
}
|
||||
|
||||
#custom-network {
|
||||
color: #e06c75;
|
||||
}
|
||||
|
||||
#workspaces{
|
||||
}
|
||||
|
||||
@@ -142,38 +133,22 @@ tooltip {
|
||||
color: #e06c75;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: #41a7fc;
|
||||
}
|
||||
|
||||
#mode {
|
||||
color: #34bfd0;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: #abb2bf;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
color: #e06c75;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
font-size: 13px;
|
||||
color: #ADA8D0;
|
||||
}
|
||||
#custom-eix {
|
||||
color: #2ec27e;
|
||||
}
|
||||
|
||||
#custom-eix,
|
||||
#custom-update {
|
||||
color: #2ec27e;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #c75ae8;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #1f1f1f;
|
||||
background-color: #e06c75;
|
||||
59
dot_zshrc
Normal file
59
dot_zshrc
Normal file
@@ -0,0 +1,59 @@
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=$HOME/.oh-my-zsh
|
||||
export PATH="/home/jika/Scripts/:/home/jika/.cargo/bin:$PATH"
|
||||
export PATH="/home/jika/.local/bin:/home/jika/.deno/bin:$PATH"
|
||||
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
|
||||
export EDITOR="/usr/bin/nvim"
|
||||
ZSH_THEME="archcraft"
|
||||
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Aliases
|
||||
alias ip='ip -c'
|
||||
alias sshh='fast-ssh'
|
||||
alias gitui='eval `ssh-agent -s` && ssh-add && gitui'
|
||||
alias open='~/.local/bin/open.sh'
|
||||
alias ytdlv='yt-dlp -vU -S "res:1080,fps"'
|
||||
alias ytdlm='yt-dlp --embed-thumbnail --embed-metada -x --audio-format best'
|
||||
alias mpv4='mpv --ytdl-raw-options=force-ipv4='
|
||||
|
||||
# omz
|
||||
alias zshconfig="vim ~/.zshrc"
|
||||
alias ohmyzsh="cd ~/.oh-my-zsh"
|
||||
|
||||
# cli replacement
|
||||
alias cat='bat'
|
||||
alias grep='rg'
|
||||
alias du='dust'
|
||||
alias df='dysk'
|
||||
|
||||
# ls
|
||||
alias ls='eza --icons=always --git'
|
||||
alias l='ls -lb'
|
||||
alias l1='ls -1'
|
||||
alias ll='ls -lab'
|
||||
alias lb='ls -lb --reverse --sort=size'
|
||||
alias lr='ls -R'
|
||||
alias lt='ls -T'
|
||||
alias lg='ls -l --group-directories-first'
|
||||
|
||||
# git
|
||||
alias gcl='git clone --depth 1'
|
||||
alias gi='git init'
|
||||
alias ga='git add'
|
||||
alias gc='git commit -m'
|
||||
alias gp='git push origin master'
|
||||
|
||||
#cd
|
||||
alias cd..='cd ..'
|
||||
|
||||
# yazi
|
||||
function y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
builtin cd -- "$cwd"
|
||||
fi
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
1
dotbot
1
dotbot
Submodule dotbot deleted from 720206578a
15
install
15
install
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
CONFIG="install.conf.yaml"
|
||||
DOTBOT_DIR="dotbot"
|
||||
|
||||
DOTBOT_BIN="bin/dotbot"
|
||||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
cd "${BASEDIR}"
|
||||
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
|
||||
git submodule update --init --recursive "${DOTBOT_DIR}"
|
||||
|
||||
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
|
||||
@@ -1,24 +0,0 @@
|
||||
- defaults:
|
||||
create: true
|
||||
link:
|
||||
relink: true
|
||||
|
||||
- clean: ['~']
|
||||
|
||||
- link:
|
||||
~/.config/alacritty:
|
||||
~/.config/sway:
|
||||
~/.config/waybar:
|
||||
~/.config/rofi:
|
||||
~/.config/yazi:
|
||||
~/.config/nvim:
|
||||
~/.zshrc:
|
||||
~/.oh-my-zsh:
|
||||
path: ohmyzsh
|
||||
create: true
|
||||
~/.local/bin/open.sh:
|
||||
|
||||
- shell:
|
||||
- [git submodule update --init --recursive, Installing submodules]
|
||||
- [cp -r omz-custom/* ohmyzsh/custom]
|
||||
- [cat to_install.txt]
|
||||
1
ohmyzsh
1
ohmyzsh
Submodule ohmyzsh deleted from c68ff8aeed
Submodule omz-custom/plugins/zsh-autosuggestions deleted from a411ef3e09
Submodule omz-custom/plugins/zsh-syntax-highlighting deleted from caa749d030
7
open.sh
7
open.sh
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [[ -n $1 ]] ; then
|
||||
xdg-open $1 &
|
||||
disown %xdg-open
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
37
run_once_before_install_omz.sh
Executable file
37
run_once_before_install_omz.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
OMZ_DIR="${ZSH:-$HOME/.oh-my-zsh}"
|
||||
OMZ_CUSTOM="${ZSH_CUSTOM:-$OMZ_DIR/custom}"
|
||||
PLUGINS_DIR="$OMZ_CUSTOM/plugins"
|
||||
|
||||
clone_or_update_plugin() {
|
||||
name="$1"
|
||||
url="$2"
|
||||
dest="$PLUGINS_DIR/$name"
|
||||
|
||||
if [ -d "$dest/.git" ]; then
|
||||
# update existing plugin repo
|
||||
git -C "$dest" pull --ff-only
|
||||
elif [ -e "$dest" ]; then
|
||||
# path exists but isn't a git repo (avoid clobbering)
|
||||
echo "Skip: $dest exists but is not a git repo" >&2
|
||||
else
|
||||
git clone "$url" "$dest"
|
||||
fi
|
||||
}
|
||||
|
||||
# 1) Oh My Zsh: clone only if missing
|
||||
if [ -d "$OMZ_DIR/.git" ]; then
|
||||
: # OMZ already installed, do nothing
|
||||
elif [ -e "$OMZ_DIR" ]; then
|
||||
echo "Skip: $OMZ_DIR exists but is not a git repo" >&2
|
||||
else
|
||||
git clone https://github.com/ohmyzsh/ohmyzsh.git "$OMZ_DIR"
|
||||
fi
|
||||
|
||||
# 2) Plugins: if present pull, else clone (requires OMZ dirs)
|
||||
mkdir -p "$PLUGINS_DIR"
|
||||
|
||||
clone_or_update_plugin "zsh-autosuggestions" "https://github.com/zsh-users/zsh-autosuggestions"
|
||||
clone_or_update_plugin "zsh-syntax-highlighting" "https://github.com/zsh-users/zsh-syntax-highlighting"
|
||||
155
zshrc
155
zshrc
@@ -1,155 +0,0 @@
|
||||
#If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=$HOME/.oh-my-zsh
|
||||
export PATH="/home/jika/Scripts/:/home/jika/.cargo/bin:$PATH"
|
||||
export PATH="/home/jika/.local/bin:/home/jika/.deno/bin:$PATH"
|
||||
export RR_STATION="teo"
|
||||
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
|
||||
export EDITOR="/usr/bin/nvim"
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
ZSH_THEME="archcraft"
|
||||
|
||||
# Set list of themes to pick from when loading at random
|
||||
# Setting this variable when ZSH_THEME="archcraft"
|
||||
# a theme from this variable instead of looking in $ZSH/themes/
|
||||
# If set to an empty array, this variable will have no effect.
|
||||
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion.
|
||||
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to automatically update without prompting.
|
||||
# DISABLE_UPDATE_PROMPT="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="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.
|
||||
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# You can set one of the optional three formats:
|
||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# or set a custom format using the strftime function format specifications,
|
||||
# see 'man strftime' for details.
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# Which plugins would you like to load?
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
#
|
||||
|
||||
|
||||
# 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.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Aliases
|
||||
alias ip='ip -c'
|
||||
alias sshh='fast-ssh'
|
||||
alias gitui='eval `ssh-agent -s` && ssh-add && gitui'
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
alias open='~/.local/bin/open.sh'
|
||||
alias ytdlv='yt-dlp -vU -S "res:1080,fps"'
|
||||
alias ytdlm='yt-dlp --embed-thumbnail --embed-metada -x --audio-format best'
|
||||
alias mpv4='mpv --ytdl-raw-options=force-ipv4='
|
||||
|
||||
# omz
|
||||
alias zshconfig="vim ~/.zshrc"
|
||||
alias ohmyzsh="cd ~/.oh-my-zsh"
|
||||
|
||||
# cli replacement
|
||||
alias cat='bat'
|
||||
alias grep='rg'
|
||||
alias du='dust'
|
||||
alias df='dysk'
|
||||
|
||||
# ls
|
||||
alias ls='eza --icons=always --git'
|
||||
alias l='ls -lb'
|
||||
alias l1='ls -1'
|
||||
alias ll='ls -lab'
|
||||
alias lb='ls -lb --reverse --sort=size'
|
||||
alias lr='ls -R'
|
||||
alias lt='ls -T'
|
||||
alias lg='ls -l --group-directories-first'
|
||||
|
||||
# git
|
||||
alias gcl='git clone --depth 1'
|
||||
alias gi='git init'
|
||||
alias ga='git add'
|
||||
alias gc='git commit -m'
|
||||
alias gp='git push origin master'
|
||||
|
||||
#cd
|
||||
alias cd..='cd ..'
|
||||
|
||||
# yazi
|
||||
function y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
builtin cd -- "$cwd"
|
||||
fi
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
Reference in New Issue
Block a user