aboutsummaryrefslogtreecommitdiff
path: root/bash/dot-config
diff options
context:
space:
mode:
authorMohammad Reza Karimi <m.r.karimi.j@gmail.com>2026-01-09 17:34:31 -0500
committerMohammad Reza Karimi <m.r.karimi.j@gmail.com>2026-01-09 17:34:31 -0500
commit5e83a094476f28eb77508c8b470efe3dfd56de83 (patch)
treef0f39b694fcad8e408c2a41f3d3240dfce44c504 /bash/dot-config
parent6c17d2c74ea4daeb9dbf2c2b7aafeb86111b7f65 (diff)
some big changes
Diffstat (limited to 'bash/dot-config')
-rw-r--r--bash/dot-config/bash/functions.bash13
-rw-r--r--bash/dot-config/bash/gentoo-color.bash6
-rw-r--r--bash/dot-config/bash/notes.bash18
-rw-r--r--bash/dot-config/shellshort/bm-files5
-rw-r--r--bash/dot-config/shellshort/shortcutrc5
5 files changed, 36 insertions, 11 deletions
diff --git a/bash/dot-config/bash/functions.bash b/bash/dot-config/bash/functions.bash
index a2a96ba..33bfd67 100644
--- a/bash/dot-config/bash/functions.bash
+++ b/bash/dot-config/bash/functions.bash
@@ -46,3 +46,16 @@ yayS()
{
yay -Slq | fzf --multi --preview 'yay -Si {1}' | xargs -ro yay -S
}
+
+# cp and mv but with rsync
+# source: https://wiki.archlinux.org/title/Rsync#As_cp/mv_alternative
+cpr()
+{
+ rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 "$@"
+}
+
+mvr()
+{
+ rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files "$@"
+}
+
diff --git a/bash/dot-config/bash/gentoo-color.bash b/bash/dot-config/bash/gentoo-color.bash
index a9abef8..4ca33c9 100644
--- a/bash/dot-config/bash/gentoo-color.bash
+++ b/bash/dot-config/bash/gentoo-color.bash
@@ -47,13 +47,13 @@ fi
# For direxpand to be missing indicates that bash is lacking readline support.
if (( gentoo_color <= 0 )) || ( ! shopt -u direxpand 2>/dev/null ); then
# Define a prompt without color.
- PS1='\u@\h \w \$ '
+ PS1='[\u@\h \W]\$ '
elif (( EUID == 0 )); then
# If root, omit the username and print the hostname in red.
- PS1='\[\e[01;31m\]\h\[\e[01;34m\] \w \$\[\e[00m\] '
+ PS1='[\[\e[01;31m\]\h\[\e[01;34m\] \W\[\e[00m\]]\$ '
else
# Otherwise, print the username and hostname in green.
- PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[00m\] '
+ PS1='[\[\e[32m\]\u@\h\[\e[34m\] \W\[\e[00m\]]\$ '
fi
if (( gentoo_color > 0 )); then
diff --git a/bash/dot-config/bash/notes.bash b/bash/dot-config/bash/notes.bash
new file mode 100644
index 0000000..82ed521
--- /dev/null
+++ b/bash/dot-config/bash/notes.bash
@@ -0,0 +1,18 @@
+note() {
+ if (($# == 0)); then
+ tmpfile=$(mktemp --tmpdir --suffix=.md note.XXXXXXXXXXX)
+ echo "- [ ] $(date +'%m-%d-%Y %H:%M') " >> "$tmpfile"
+ nvim "$tmpfile"
+ cat "$tmpfile" >> ~/pkm/0_inbox.md
+ else
+ echo "- [ ] $(date +'%m-%d-%Y %H:%M') $*" >> ~/pkm/0_inbox.md
+ fi
+}
+
+todos() {
+ printf $'\e[01;33mINBOX\e[0m\n'
+ bat -P -p ~/pkm/0_inbox.md
+ echo
+ printf $'\e[01;33mALL\e[0m\n'
+ rg --color=always --no-line-number --no-heading --smart-case --glob "!.git" --glob "!0_inbox.md" --hyperlink-format='file://{path}' -- "-\\s\\[\\s\\]" ~/pkm/
+}
diff --git a/bash/dot-config/shellshort/bm-files b/bash/dot-config/shellshort/bm-files
index 4e2b76d..fd99fa2 100644
--- a/bash/dot-config/shellshort/bm-files
+++ b/bash/dot-config/shellshort/bm-files
@@ -1,5 +1,2 @@
cala $XDG_CONFIG_HOME/alacritty/alacritty.toml
-cgho $XDG_CONFIG_HOME/ghostty/config
-cvim $XDG_CONFIG_HOME/nvim/init.lua
-chy $XDG_CONFIG_HOME/hypr/hyprland.conf
-cway $XDG_CONFIG_HOME/waybar/config.jsonc
+cnir $XDG_CONFIG_HOME/niri/config.kdl
diff --git a/bash/dot-config/shellshort/shortcutrc b/bash/dot-config/shellshort/shortcutrc
index 1eebef3..e701151 100644
--- a/bash/dot-config/shellshort/shortcutrc
+++ b/bash/dot-config/shellshort/shortcutrc
@@ -1,6 +1,3 @@
# vim: filetype=sh
alias cala="$EDITOR /home/moreka/.config/alacritty/alacritty.toml" \
-cgho="$EDITOR /home/moreka/.config/ghostty/config" \
-cvim="$EDITOR /home/moreka/.config/nvim/init.lua" \
-chy="$EDITOR /home/moreka/.config/hypr/hyprland.conf" \
-cway="$EDITOR /home/moreka/.config/waybar/config.jsonc" \
+cnir="$EDITOR /home/moreka/.config/niri/config.kdl" \