This commit is contained in:
elwrcl committed 2026-08-02 19:30:03 +03:00
1 parent 2961392e7e
commit b16fa1ba6e
4 files changed
+128 -29

No files matched your search

+86 -24
View File
@@ -11,19 +11,38 @@
ll = "eza -lah --icons --group-directories-first";
la = "eza -a --icons --group-directories-first";
lt = "eza --tree --level=2 --icons";
tree = "eza --tree --git-ignore --group-directories-first";
cat = "bat";
df = "df -h";
du = "du -h";
free = "free -h";
df = "^df -h";
du = "^du -h";
free = "^free -h";
rm = "trash-put";
sysinfo = "fastfetch";
monitor = "sudo btop";
ports = "sudo ss -tulpn";
myip = "curl ifconfig.me";
js = "jj status";
jl = "jj log";
jd = "jj diff";
jc = "jj commit";
jp = "jj git push";
jf = "jj git fetch";
gs = "git status";
ga = "git add";
gp = "git push";
gl = "git log --oneline --graph --decorate";
#gnu
gfind = "^find";
ggrep = "^grep --color=auto";
gls = "^ls";
gdu = "^du";
gmkdir = "^mkdir";
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
@@ -32,6 +51,8 @@
environmentVariables = {
MESA_SHADER_CACHE_MAX_SIZE = "2G";
MESA_SHADER_CACHE_DIR = "/tmp/mesa_shader_cache";
FZF_DEFAULT_OPTS = "--height 40% --layout=reverse --border";
FZF_DEFAULT_COMMAND = "fd --type f --hidden --follow --exclude .git";
};
extraEnv = ''
@@ -40,32 +61,73 @@
extraConfig = ''
$env.config.show_banner = false
def gc [msg: string] { git commit -m $msg }
def rebuild [] {
git -C ~/copland add -A
git -C ~/copland commit -m "update"
nh os switch
$env.config.history.file_format = "sqlite"
$env.config.history.max_size = 1_000_000
$env.config.history.isolation = false
$env.config.edit_mode = "vi"
$env.config.cursor_shape.vi_insert = "line"
$env.config.cursor_shape.vi_normal = "block"
$env.config.completions.algorithm = "substring"
$env.config.highlight_resolved_externals = true
def --env mc [path: path] {
mkdir $path
cd $path
}
def rebuild-dry [] { nh os switch --dry }
def rebuild-cop [] {
nix flake update --flake ~/copland
git -C ~/copland add -A
git -C ~/copland commit -m $"flake update (date now | format date '%Y-%m-%d')"
nh os switch
def --env mcg [path: path] {
mkdir $path
cd $path
jj git init --colocate
}
def extract [file: string] {
let ext = ($file | path parse | get extension)
match $ext {
"gz" => { tar xzf $file },
"bz2" => { tar xjf $file },
"tar" => { tar xf $file },
"zip" => { unzip $file },
"7z" => { 7z x $file },
"rar" => { unrar e $file },
_ => { print $"'($file)' can't be extracted" }
def rebuild [] {
jj --repository ~/copland status | ignore
nh os switch --accept-flake-config
}
def rebuild-dry [] {
nh os switch --dry --accept-flake-config
}
def rebuild-up [] {
nix flake update --flake ~/copland
jj --repository ~/copland status | ignore
nh os switch --accept-flake-config
}
def extract [file: path] {
let name = ($file | path basename)
match $name {
_ if ($name | str ends-with ".tar.bz2") => { ^tar xjf $file }
_ if ($name | str ends-with ".tar.gz") => { ^tar xzf $file }
_ if ($name | str ends-with ".tar.xz") => { ^tar xJf $file }
_ if ($name | str ends-with ".tar") => { ^tar xf $file }
_ if ($name | str ends-with ".bz2") => { ^bunzip2 $file }
_ if ($name | str ends-with ".gz") => { ^gunzip $file }
_ if ($name | str ends-with ".zip") => { ^unzip $file }
_ if ($name | str ends-with ".7z") => { ^7z x $file }
_ if ($name | str ends-with ".rar") => { ^unrar e $file }
_ => { print $"(ansi red)'($name)' açılamıyor(ansi reset)" }
}
}
# `which`, with canonicalize .
def realwhich [...applications: string, --all (-a)] {
which --all=$all ...$applications
| update path {|row|
match $row.type {
"external" => { $row.path | path expand }
_ => $row.path
}
}
}
if ($"($env.HOME)/.config/copetch/animated-copetch.sh" | path exists) {
^$"($env.HOME)/.config/copetch/animated-copetch.sh"
}
'';
};
};