summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-30 08:23:45 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-30 08:23:45 +0200
commit3f8594ee04d2a3d9b40a259daf3b564a53b510fa (patch)
tree66ed50643cdc81af813b5771a99732d0f78bb618 /config
parent45d39ae0c67bb086f4df0c366b251e06c888408d (diff)
parent333aaf38c66a1e4ba41d3acea38b21613c0075b2 (diff)
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'config')
-rw-r--r--config/X/dunst/dunstrc27
-rw-r--r--config/common/alacritty/alacritty.yml3
-rwxr-xr-xconfig/common/mpv/mpv.conf2
-rw-r--r--config/common/ncmpcpp/bindings4
-rwxr-xr-xconfig/common/tmux/tmux.conf56
-rw-r--r--config/essentials/nvim/after/plugin/luasnip.lua14
-rw-r--r--config/essentials/nvim/ftplugin/sh.lua8
-rw-r--r--config/essentials/nvim/lua/user/packer.lua2
-rw-r--r--config/essentials/nvim/lua/user/remap.lua10
-rw-r--r--config/essentials/nvim/lua/user/zk.lua5
-rw-r--r--config/essentials/zsh/.zshrc12
-rw-r--r--config/essentials/zsh/aliases.sh81
-rw-r--r--config/essentials/zsh/functions.zsh145
-rw-r--r--config/extra/tridactyl/tridactylrc11
-rw-r--r--config/home/.zshenv15
-rw-r--r--config/hyprland/hypr/binds.conf4
-rw-r--r--config/hyprland/hypr/hyprland.conf13
-rwxr-xr-xconfig/hyprland/hypr/startup.sh1
-rw-r--r--config/hyprland/tofi/themes/nord35
-rw-r--r--config/hyprland/waybar/config.jsonc17
-rw-r--r--config/hyprland/waybar/schemes/base16.css63
21 files changed, 298 insertions, 230 deletions
diff --git a/config/X/dunst/dunstrc b/config/X/dunst/dunstrc
index 71998b9..0c4eebc 100644
--- a/config/X/dunst/dunstrc
+++ b/config/X/dunst/dunstrc
@@ -30,10 +30,10 @@
height = 80
# Position the notification in the top right corner
- origin = top-center
+ origin = right
# Offset from the origin
- offset = 0x10
+ offset = 10x10
# Scale factor. It is auto-detected if value is 0.
scale = 0
@@ -87,7 +87,7 @@
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
- frame_width = 1
+ frame_width = 0
# Defines color of the frame around the notification window.
frame_color = "#969B95"
@@ -96,7 +96,7 @@
# If value is greater than 0, separator_height will be ignored and a border
# of size frame_width will be drawn around each notification instead.
# Click events on gaps do not currently propagate to applications below.
- gap_size = 2
+ gap_size = 4
# Define a color for the separator.
# possible values are:
@@ -118,11 +118,11 @@
### Text ###
- font = mononoki nerd font mono 10
+ font = mononoki nerd font mono 11
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
- line_height = 11
+ line_height = 7
# Possible values are:
# full: Allow a small subset of html markup in notifications:
@@ -158,7 +158,7 @@
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
- format = "%b"
+ format = "[<u>%s</u>]\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
@@ -181,7 +181,7 @@
ignore_newline = no
# Stack together notifications with the same content
- stack_duplicates = false
+ stack_duplicates = true
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
@@ -310,13 +310,13 @@
# Otherwise the "#" and following would be interpreted as a comment.
# Icon for notifications with low urgency, uncomment to enable
#default_icon = /path/to/icon
- background = "#d08770"
- foreground = "#2E3541"
+ background = "#b48ead"
+ foreground = "#2e3440"
frame_color = "#81a1c1"
timeout = 6
[urgency_normal]
- background = "#b48ead"
+ background = "#81a1c1"
foreground = "#2e3440"
frame_color = "#2e3440"
timeout = 5
@@ -324,9 +324,10 @@
#default_icon = /path/to/icon
[urgency_critical]
- background = "#b48ead"
- foreground = "#d8dee9"
+ background = "#d08770"
+ foreground = "#2e3440"
frame_color = "#81a1c1"
+ format = "[<u>%s</u>]\n<b>%b</b>"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#default_icon = /path/to/icon
diff --git a/config/common/alacritty/alacritty.yml b/config/common/alacritty/alacritty.yml
index e5664f1..32fc95b 100644
--- a/config/common/alacritty/alacritty.yml
+++ b/config/common/alacritty/alacritty.yml
@@ -761,7 +761,7 @@ hints:
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
-# key_bindings:
+key_bindings:
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
@@ -871,6 +871,7 @@ hints:
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
+ - {key: F11, action: ToggleFullscreen}
#debug:
# Display the time it takes to redraw each frame.
diff --git a/config/common/mpv/mpv.conf b/config/common/mpv/mpv.conf
index 4f5e251..7d9d1fe 100755
--- a/config/common/mpv/mpv.conf
+++ b/config/common/mpv/mpv.conf
@@ -26,3 +26,5 @@ force-seekable=yes
slang=eng, en, english
alang=jpn
+
+screenshot-directory=~/pics/screenshots
diff --git a/config/common/ncmpcpp/bindings b/config/common/ncmpcpp/bindings
index d2a5eb6..b7921e7 100644
--- a/config/common/ncmpcpp/bindings
+++ b/config/common/ncmpcpp/bindings
@@ -194,9 +194,9 @@ def_key "p"
def_key "P"
play
-def_key "H"
+def_key "g"
move_home
-def_key "L"
+def_key "G"
move_end
def_key "ctrl-u"
diff --git a/config/common/tmux/tmux.conf b/config/common/tmux/tmux.conf
index 409ad66..80ab9ca 100755
--- a/config/common/tmux/tmux.conf
+++ b/config/common/tmux/tmux.conf
@@ -1,9 +1,5 @@
-# By Nicholas Marriott. Public domain.
-# but -now- me.
+# Special thanks to Nicholas Marriott.
-# Some tweaks to the status line
-set -g status-right "%H:%M"
-set -g window-status-current-style "underscore"
# Enable RGB color if running in xterm
set-option -sa terminal-overrides ",xterm*:Tc"
# Change the default $TERM to xterm-256color
@@ -26,7 +22,7 @@ set -g focus-events on
# KEYBINDINGS
# Reload config file
-bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
+bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded ~/.tmux.conf"
# Clipboard
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -r -selection clipboard"
@@ -82,9 +78,55 @@ bind -n M-I switch-client -n
bind n command-prompt "rename-window '%%'"
bind N command-prompt "rename-session '%%'"
# Starting new windows
-bind w new-window -c "#{pane_current_path}"
+bind w new-window -c "$HOME"
bind W new-session -c "$HOME"
# Show tree
bind S choose-tree -Z
# Menu for mounting and ejecting devices.
bind E display-menu -T "#[align=centre]#I:#W" -x W -y W '' Mount 0 "display-popup -E 'amount'"
+
+# Theme
+
+#+---------+
+#+ Options +
+#+---------+
+set -g status-interval 1
+set -g status on
+
+#+--------+
+#+ Status +
+#+--------+
+#+--- Layout ---+
+set -g set-titles-string "[#S:#I] #T"
+set -g set-titles on
+set -g status-position top
+set -g window-status-current-style "underscore"
+set -g status-justify left
+set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]"
+set -g status-right "#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] #{client_user} #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H "
+#+--- Colors ---+
+set -g status-style bg=black,fg=white
+
+#+-------+
+#+ Panes +
+#+-------+
+set -g pane-border-style bg=default,fg=brightblack
+set -g pane-active-border-style bg=default,fg=blue
+set -g display-panes-colour black
+set -g display-panes-active-colour brightblack
+
+#+------------+
+#+ Clock Mode +
+#+------------+
+setw -g clock-mode-colour cyan
+
+#+----------+
+#+ Messages +
+#+---------+
+set -g message-style bg=brightblack,fg=cyan
+set -g message-command-style bg=brightblack,fg=cyan
+
+#+--- Windows ---+
+set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
+set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]"
+set -g window-status-separator ""
diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua
index 7ee274f..5657560 100644
--- a/config/essentials/nvim/after/plugin/luasnip.lua
+++ b/config/essentials/nvim/after/plugin/luasnip.lua
@@ -155,18 +155,14 @@ ls.add_snippets("sh", {
stty \$old_stty_cfg
}
]], {}),
- parse("fdie",
+ parse("flogn",
[[
- die ()
- {
- echo "\$@" >&2
- }
+ logn () { >&2 printf '%s\n' "\$@"; }
]], {}),
- s("die", fmt(
+ parse("flog",
[[
- die "{}: {}"{}
- ]],
- { c(1, {t "I", t "E", t "W"}), i(2), i(0) })),
+ log () { >&2 printf '%s' "\$@"; }
+ ]], {}),
s("inp", fmt(
[[
test -z "${{{}:=$1}}" &&
diff --git a/config/essentials/nvim/ftplugin/sh.lua b/config/essentials/nvim/ftplugin/sh.lua
index 01b20d6..e18170a 100644
--- a/config/essentials/nvim/ftplugin/sh.lua
+++ b/config/essentials/nvim/ftplugin/sh.lua
@@ -1,6 +1,6 @@
-vim.keymap.set("n", "<LocalLeader>t", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2\"<cr>")
-vim.keymap.set("n", "<LocalLeader>i", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2: $\\2\"<cr>")
-vim.keymap.set("i", "<LocalLeader>t", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2\"<cr><esc>A")
-vim.keymap.set("i", "<LocalLeader>i", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2: $\\2\"<cr><esc>A")
+vim.keymap.set("n", "<LocalLeader>t", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1>\\&2 printf \"\\2\"<cr>")
+vim.keymap.set("n", "<LocalLeader>i", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1>\\&2 printf \"\\2: %s\\\\n\" \"$\\2\"<cr>")
+vim.keymap.set("i", "<LocalLeader>t", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1>\\&2 printf \"\\2\"<cr><esc>A")
+vim.keymap.set("i", "<LocalLeader>i", "<cmd>s/\\(\\s*\\)\\(.*\\)/\\1>\\&2 printf \"\\2: %s\\\\n\" \"$\\2\"<cr><esc>A")
vim.keymap.set({"i", "n"}, "<LocalLeader>v", "<esc>A)\"<esc>I\"$(<esc>I")
vim.opt.formatoptions = "cqrnj"
diff --git a/config/essentials/nvim/lua/user/packer.lua b/config/essentials/nvim/lua/user/packer.lua
index c9e27a2..9351460 100644
--- a/config/essentials/nvim/lua/user/packer.lua
+++ b/config/essentials/nvim/lua/user/packer.lua
@@ -3,7 +3,7 @@ return require('packer').startup(function(use)
-- files
use {
- 'nvim-telescope/telescope.nvim', tag = '0.1.1',
+ 'nvim-telescope/telescope.nvim', tag = '0.1.2',
requires = { {'nvim-lua/plenary.nvim'} }
}
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
diff --git a/config/essentials/nvim/lua/user/remap.lua b/config/essentials/nvim/lua/user/remap.lua
index 0fe4164..c50d346 100644
--- a/config/essentials/nvim/lua/user/remap.lua
+++ b/config/essentials/nvim/lua/user/remap.lua
@@ -15,13 +15,9 @@ vim.keymap.set("i", "\\\\", "\\", { noremap = true })
vim.keymap.set("n", "gb", "<cmd>buffers<cr>:buffer<Space>", { noremap = true })
vim.keymap.set("n", "<Leader>q", "<cmd>q!<cr>", { noremap = true })
vim.keymap.set("n", "<Leader>Q", "<cmd>qa!<cr>", { noremap = true })
+-- close all except focused buffer
+vim.keymap.set("n", "<leader>1", "<cmd>%bd|e#<cr>", { noremap = true })
--- Windows
-vim.keymap.set("n", "<A-h>", "<C-W>h", { noremap = true })
-vim.keymap.set("n", "<A-j>", "<C-W>j", { noremap = true })
-vim.keymap.set("n", "<A-k>", "<C-W>k", { noremap = true })
-vim.keymap.set("n", "<A-l>", "<C-W>l", { noremap = true })
-vim.keymap.set("n", "<A-o>", "<C-W>o", { noremap = true })
-- command line
vim.keymap.set("c", "<M-b>", "<C-Left>", { noremap = true })
vim.keymap.set("c", "<M-f>", "<C-Right>", { noremap = true })
@@ -34,6 +30,8 @@ vim.keymap.set("c", "<C-a>", "<Home>", { noremap = true })
vim.keymap.set("v", "J", "<cmd>m '>+1<cr>gv=gv<cr>", { noremap = true })
vim.keymap.set("v", "K", "<cmd>m '<-2<cr>gv=gv<cr>", { noremap = true })
+vim.keymap.set("n", "+", "<cmd>tabe .<cr>", { noremap = true })
+
-- clipboard
vim.keymap.set("n", "<Leader>y", "\"+y", { noremap = true })
diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua
index 613c8e5..8004238 100644
--- a/config/essentials/nvim/lua/user/zk.lua
+++ b/config/essentials/nvim/lua/user/zk.lua
@@ -50,6 +50,11 @@ require('telekasten').setup({
template_new_note = home .. "/" .. "templates/new_note.md",
new_note_filename = "title",
},
+ NetworkEssentials = {
+ home = home .. "/" .. "NetworkEssentials",
+ template_new_note = home .. "/" .. "templates/new_note.md",
+ new_note_filename = "title",
+ },
C = {
home = home .. "/" .. "C",
template_new_note = home .. "/" .. "templates/new_note.md",
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index d8675d4..eeb4439 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -5,9 +5,9 @@ then
clear
if [ "/dev/tty1" = "$TTY" ]
then
- startw > /dev/null 2>&1
+ exec startw > /dev/null 2>&1
else
- startx > /dev/null 2>&1
+ exec startx > /dev/null 2>&1
fi
exit
fi
@@ -89,7 +89,7 @@ rehash_precmd() {
# window title hooks
add-zsh-hook -Uz precmd rehash_precmd
set_wt_action () {
- print -Pn '\e]0;$1\a'
+ print -Pn "\e]0;$1\a\033[0m"
}
add-zsh-hook -Uz preexec set_wt_action
set_wt () {
@@ -121,13 +121,13 @@ RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(par
setopt prompt_subst
parse_git_remote() {
- b="$(git branch -v 2> /dev/null | grep "^*" | sed 's/.\+\[\([^ ]\+\).*$/\1/')"
+ b="$(git branch -v 2>/dev/null | grep "^*" | cut -f2 -d'[' | cut -f1 -d' ')"
if [ "$b" = "behind" ]
then
- echo -n "↓ "
+ printf "↓ "
elif [ "$b" = "ahead" ]
then
- echo -n "↑ "
+ printf "↑ "
fi
}
parse_git_branch() {
diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh
index 6df28e3..6ac39d5 100644
--- a/config/essentials/zsh/aliases.sh
+++ b/config/essentials/zsh/aliases.sh
@@ -5,9 +5,6 @@
if [ $SHELL = "/bin/zsh" ]
then
# googoo aliases
- alias o.='o .'
- alias go.='go .'
- alias ogo.='ogo .'
alias o/='o /'
alias o/s='o /srv'
alias go/='go /'
@@ -15,6 +12,8 @@ then
alias ogo/='ogo /'
alias ogo/s='ogo /srv'
+ alias calc='bc <<<'
+
if [ "$WAYLAND_DISPLAY" ]
then
alias -g clipp='wl-copy -n'
@@ -40,6 +39,7 @@ fi
if grep -qi "debian\|ubuntu" /etc/os-release 2> /dev/null
then
alias aptup='apt update && apt upgrade -y'
+ alias ufwd='echo y | ufw delete "$(ufw status numbered | tail -n +5 | fzf | cut -f2 -d'\''['\'' | cut -f1 -d'\'']'\'')" > /dev/null 2>&1 && >&2 echo "deleted."'
fi
# Programs
@@ -128,12 +128,9 @@ alias xrandr-default='xrandr --auto --output VGA-1 --mode 1920x1080 --left-of HD
alias d='du -d 0 -h'
alias dud='du .* * -d 0 -h 2>/dev/null | sort -h'
alias df='df -h'
+alias diff='diff -u --color'
alias shred='shred -uz'
alias lsblk='lsblk -o name,type,fsused,fsavail,size,fstype,label,mountpoint'
-alias floc='doas find / -type "f" 2> /dev/null | grep'
-alias dloc='doas find / -type "d" 2> /dev/null | grep'
-alias fif='find . -type "f" | grep'
-alias fid='find . -type "d" | grep'
alias sxt='sxiv -t'
alias wgsh='wget --quiet --show-progress'
alias wgc='wgsh "$(clipo)"'
@@ -144,7 +141,6 @@ alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb'
# ssh
alias sha='ssh-add'
alias sshs='eval "$(ssh-agent)" && ssh-add'
-
alias vidlen='ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i'
alias whatsmyip='curl -s "ifconfig.co"'
alias icognito='unset HISTFILE'
@@ -173,16 +169,17 @@ alias kll='killall'
alias pi='ping archlinux.org -c4'
alias sba='source env/bin/activate || source bin/activate'
alias smc='systemctl'
-alias ssc='doas systemctl'
+alias dsmc='doas systemctl'
alias smcu='smc --user'
-alias zsr='source ${ZDOTDIR:-$HOME}/.zshrc && rehash'
+alias zsr='source ${ZDOTDIR:-~}/.zshrc && rehash'
alias rh='rehash'
alias wf='doas wipefs -a'
alias dmci="doas make clean install"
alias rmd='rm -f *.{orig,rej}'
alias cdzot='mkdir -p /tmp/zottesite && cd /tmp/zottesite'
-alias gdate="date +%y%m%d_%H%M%S"
+alias gdate='date +%y_%m_%d-%T'
alias tpid='tail -f /dev/null --pid'
+alias pwdcp='pwd | clipp'
alias vbm='vboxmanage'
alias vbls='vbm list vms'
@@ -190,7 +187,7 @@ alias vblsr='vbm list runningvms'
alias vb='vbm startvm'
# quick config
-alias ez='$EDITOR ${ZDOTDIR:-$HOME}/.zshrc'
+alias ez='$EDITOR ${ZDOTDIR:-~}/.zshrc'
alias eza='$EDITOR ${ZDOTDIR}/aliases.sh'
alias ezf='$EDITOR ${ZDOTDIR}/functions.zsh'
alias eto='$EDITOR ~/sync/TODO'
@@ -202,43 +199,48 @@ alias est='$EDITOR ~/proj/suckless/st/config.def.h'
alias esl='$EDITOR ~/proj/suckless/slock/config.def.h'
alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h'
alias ehy='$EDITOR ~/.config/hypr/hyprland.conf'
+alias ewbj='$EDITOR ~/src/dotfiles/config/hyprland/waybar/config.jsonc'
+alias ewbs='$EDITOR ~/src/dotfiles/config/hyprland/waybar/style.css'
alias cfd='$EDITOR config.def.h'
# /# quick cd jV}k:!sort -t "'" -k 2
-alias cdl='cd $HOME/dl'
-alias cdoc='cd $HOME/docs'
-alias cda='cd $HOME/docs/android/projects'
-alias cdm='cd $HOME/music'
-alias cdp='cd $HOME/pics'
-alias cdpa='cd $HOME/pics/ai-outputs/'
-alias cdpp='cd $HOME/proj/personal/'
-alias chom='cd $HOME/proj/personal/homepage'
-alias lov='cd $HOME/proj/personal/lola'
-alias cdsw='cd $HOME/proj/personal/WheelAdvisor'
-alias cddm='cd $HOME/proj/suckless/dmenu'
-alias cdw='cd $HOME/proj/suckless/dwm'
-alias cdslo='cd $HOME/proj/suckless/slock'
-alias cdsl='cd $HOME/proj/suckless/slstatus'
-alias cdst='cd $HOME/proj/suckless/st'
-alias cdsta='cd $HOME/proj/suckless/stable-diffusion-webui'
-alias cdsu='cd $HOME/proj/suckless/surf'
-alias cds='cd $HOME/src/'
-alias cdsb='cd $HOME/src/build'
-alias cdsc='cd $HOME/src/comfyui/'
-alias cdo='cd $HOME/src/dotfiles'
-alias cdi='cd $HOME/src/installdrier'
-alias cdia='cd $HOME/src/installdrier/arch'
-alias cdib='cd $HOME/src/installdrier/deb'
-alias czo='cd $HOME/zot/'
-alias cdpw='cd ${PASSWORD_STORE_DIR:-$HOME/.password-store}'
+alias cdl='cd ~/dl'
+alias cdoc='cd ~/docs'
+alias cda='cd ~/docs/android/projects'
+alias cdm='cd ~/music'
+alias cdp='cd ~/pics'
+alias cdpa='cd ~/pics/ai-outputs/'
+alias cdpp='cd ~/proj/personal/'
+alias chom='cd ~/proj/personal/homepage'
+alias lov='cd ~/proj/personal/lola'
+alias cdsh='~/proj/personal/scheduler'
+alias cdsw='cd ~/proj/personal/WheelAdvisor'
+alias cddm='cd ~/proj/suckless/dmenu'
+alias cdw='cd ~/proj/suckless/dwm'
+alias cdslo='cd ~/proj/suckless/slock'
+alias cdsl='cd ~/proj/suckless/slstatus'
+alias cdst='cd ~/proj/suckless/st'
+alias cdsta='cd ~/proj/suckless/stable-diffusion-webui'
+alias cdsu='cd ~/proj/suckless/surf'
+alias cds='cd ~/src/'
+alias cdsb='cd ~/src/build'
+alias cdsc='cd ~/src/comfyui/'
+alias cdo='cd ~/src/dotfiles'
+alias cdi='cd ~/src/installdrier'
+alias cdia='cd ~/src/installdrier/arch'
+alias cdib='cd ~/src/installdrier/deb'
+alias czo='cd ~/zot/'
+alias cdpw='cd ${PASSWORD_STORE_DIR:-~/.password-store}'
alias cdng='cd /etc/nginx'
alias cdrs='cd /srv/'
# fzf aliases
+alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n"| fzf)"'
+alias cfg='find -L ~/src/dotfiles -type f | fzf | xargs -r $EDITOR'
alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp'
alias asf='alias | fzf'
alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp"
alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"'
-alias pff='find ${PASSWORD_STORE_DIR:=$HOME/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c'
+alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c'
alias fzps='fzf --print0 | xargs -0I{}'
alias dcb='docker build'
@@ -254,7 +256,6 @@ alias dbinf='ssh db dlinfo'
alias sshdb='ssh -t db tmux a'
alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music'
-alias cfg='git --git-dir=$HOME/src/dotfiles/.git --work-tree=$HOME/src/dotfiles'
# oh-my-zsh git aliases
alias g='git'
alias ga='git add'
diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh
index 671e6fb..22a8fbe 100644
--- a/config/essentials/zsh/functions.zsh
+++ b/config/essentials/zsh/functions.zsh
@@ -1,28 +1,19 @@
#!/bin/zsh
-die ()
-{
- echo "$@" >&2
-}
-
-awnk() {
- awk "{print \$$1}"
-}
+log() { >&2 printf '%s' "$@"; }
+logn() { >&2 printf '%s\n' "$@"; }
vmp() {
col -b | \
vim -MR \
-c 'set ft=man nolist nonu nornu'
}
-vimh() {
- vim -c "help $1" -c 'call feedkeys("\<c-w>o")'
-}
nvf() {
local cache="$HOME/.cache/nvf"
local match="$(grep -m1 "$1$" "$cache" 2> /dev/null)"
if test ! -f "$match"
then
- die "resetting cache..."
+ logn "resetting cache..."
match="$(goo | tee "$cache" | grep -m 1 "$1$" 2> /dev/null)"
# # Alternative:
# match="$(goo | grep -m 1 "$1" 2> /dev/null | tee -a | "$cache")"
@@ -31,7 +22,7 @@ nvf() {
then
$EDITOR "$match" && return
else
- die "no match." && return 1
+ logn "no match." && return 1
fi
}
@@ -39,27 +30,43 @@ nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit }
ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit }
# googoo aliases
-ff () { goo f "$1" | fzf }
-fd () { goo d "$1" | fzf }
-fdf () { goo f "$1" | fzf | xargs -I {} dirname "{}" }
-o ()
+_googoo_fzf_opt()
+{
+ if [ "$1" ]
+ then
+ [ -d "$1" ] && dest="$1" || opt="-q $1"
+ fi
+}
+o()
{
- f="$(ff $1)"
+ _googoo_fzf_opt "$1"
+ f="$(goo f "$dest" | fzf $opt)"
test "$1" && shift
- test -n "$f" && $EDITOR $@ "$f"
+ test -f "$f" && $EDITOR $@ "$f"
}
-go ()
+go()
{
- d="$(fd $1)"
- test -d "$d" && cd "$d"
+ _googoo_fzf_opt "$1"
+ cd "$(goo d "$dest" | fzf $opt)"
}
-ogo ()
+ogo()
{
- d="$(fdf $1)"
- test -d "$d" && cd "$d"
+ _googoo_fzf_opt "$1"
+ cd "$(dirname "$(goo f "$dest" | fzf $opt)")"
}
-ipc ()
+# Onelineres
+awnk() { awk "{print \$$1}"; }
+vimh() { vi -c "help $1" -c 'call feedkeys("\<c-w>o")'; }
+dgo() { cd "$(goo d ~ | fzf --filter "$@" | head -n 1)"; }
+open() { $EDITOR "$(goo f ~ | fzf --filter "$@" | head -n 1)"; }
+pkbs() { pkgfile -b "$1" | tee /dev/stderr | doas pacman -S -; }
+oclip() { printf "\033]52;c;$(echo -n "$@" | base64)\a"; }
+sms() { ssh phone sendmsg "$1" "'$2'"; }
+trcp() { scp "$1" db:/media/basilisk/downloads/transmission/torrents/; }
+rln() { ln -s "$(readlink -f "$1")" "$2"; }
+
+ipc()
{
if [[ "$(ip link show eno1 | awk -F, 'NR=1 {print $3}')" == "UP" ]]
then
@@ -69,16 +76,20 @@ ipc ()
fi
}
-calc () { echo "$@" | bc -l }
+psgrep()
+{
+ [ $# -eq 0 ] && return 1
+ pgrep "$@" | xargs ps
+}
-unique () {
+unique() {
local f
f="$(mktemp)"
awk '!x[$0]++' "$1" > "$f"
mv "$f" "$1"
}
-clip () {
+clip() {
if [ "$WAYLAND_DISPLAY" ]
then
echo -n "$@" | wl-copy
@@ -87,7 +98,7 @@ clip () {
fi
}
-unzipp () {
+unzipp() {
file=$1
shift
unzip $file $@ || exit 1
@@ -95,22 +106,23 @@ unzipp () {
}
# fix long waiting time
-__git_files () {
+__git_files() {
_wanted files expl 'local files' _files
}
-esc () {
+esc() {
$EDITOR "$(which $1)"
}
-delfile () {
+delfile() {
curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}"
}
-upfile () {
+upfile() {
curl -F "file=@\"$1\"" ${2:-https://upfast.cronyakatsuki.xyz}
}
-sgd () {
+# git
+sgd() {
d="$PWD"
find $HOME/src -maxdepth 1 -mindepth 1 -type d |
while read -r dir
@@ -129,16 +141,24 @@ sgd () {
unset d
}
-# Git functions
+ginit()
+{
+ [ "$1" ] || return 1
+ ssh db /var/git/initdir.sh "$1"
+ git remote add origin git@db:"$1.git"
+ git push --set-upstream origin $(git_current_branch)
+}
+
# Returns current branch
-function git_current_branch()
+git_current_branch()
{
command git rev-parse --git-dir &>/dev/null || return
git branch --show-current
}
# Check if main exists and use instead of master
-function git_main_branch() {
+git_main_branch()
+{
command git rev-parse --git-dir &>/dev/null || return
local ref
for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default}; do
@@ -164,7 +184,7 @@ function git_develop_branch() {
}
# gpg backup
-gpg_backup ()
+gpg_backup()
{
gpg --export-secret-keys --armor > private.asc
gpg --export --armor > public.asc
@@ -173,7 +193,7 @@ gpg_backup ()
shred -uz {public,private,trust}.asc
}
-gpg_import ()
+gpg_import()
{
tar xf $1
shred -uz $1
@@ -183,29 +203,29 @@ gpg_import ()
shred -uz {public,private,trust}.asc
}
-ngenable ()
+ngenable()
{
ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/
}
-vbsr ()
+vbsr()
{
vboxmanage snapshot "$1" restore "$2" &&
vboxmanage startvm "$1" ||
vboxmanage controlvm "$1" poweroff
}
-vbsrr ()
+vbsrr()
{
vbsr "$1" "$2"
sleep 3
vbsr "$1" "$2"
}
-vbst ()
+vbst()
{
vboxmanage snapshot "$1" take "$2"
}
-pacsize ()
+pacsize()
{
if test -n "$1"; then
packages="$@"
@@ -219,22 +239,18 @@ pacsize ()
expac '%m %n' - |
numfmt --to=iec-i --suffix=B --format="%.2f"
}
-pkbs ()
-{
- pkgfile -b "$1" | tee /dev/stderr | doas pacman -S -
-}
mime-default ()
{
- die "Setting '$1' as default for its mimetypes"
+ logn "Setting '$1' as default for its mimetypes"
grep "MimeType=" /usr/share/applications/"$1" |
cut -d '=' -f 2- |
tr ';' '\n' |
xargs -I {} xdg-mime default "$1" "{}"
- die "Done."
+ logn "Done."
}
-addedkeys () {
+addedkeys() {
find ~/.ssh -iname "*.pub" | while read key
do
local fingerprint="$(ssh-keygen -lf "$key" 2>/dev/null)"
@@ -245,7 +261,7 @@ addedkeys () {
done | sed "s,$HOME/.ssh/,,"
}
-fpass () {
+fpass() {
find $HOME/.password-store -type f -not -path ".git" |
grep "\.gpg$" |
sed "s,$HOME/.password-store/,,;s,\.gpg$,," |
@@ -253,33 +269,18 @@ fpass () {
xargs pass show -c
}
-oclip ()
-{
- printf "\033]52;c;$(echo -n "$@" | base64)\a"
-}
-
-sms ()
-{
- ssh phone sendmsg "$1" "'$2'"
-}
-
-trcp ()
-{
- scp "$1" db:/media/basilisk/downloads/transmission/torrents/
-}
-
-muttmail ()
+muttmail()
{
- die -n "email set: "
+ log "email set: "
ls $HOME/.config/mutt/configs |
fzf |
tee /dev/stderr |
xargs -I {} ln -sf "$HOME/.config/mutt/configs/{}" $HOME/.config/mutt/muttrc
- die -n 'Press [Enter to login]'
+ log 'Press [Enter to login]'
read && mutt
}
-resize ()
+resize()
{
test $# -lt 2 &&
printf "usage: %s <format> <file> [out]\n" "$0" >&2 &&
diff --git a/config/extra/tridactyl/tridactylrc b/config/extra/tridactyl/tridactylrc
index c48ffe1..f7e1935 100644
--- a/config/extra/tridactyl/tridactylrc
+++ b/config/extra/tridactyl/tridactylrc
@@ -8,7 +8,8 @@ set searchurls.aur https://aur.archlinux.org/packages?O=0&K=%s
set searchurls.aw https://wiki.archlinux.org/title/%s
set searchurls.cnrtl http://www.cnrtl.fr/lexicographie/
set searchurls.dhu https://hub.docker.com/search?q=%s
-set searchurls.g https://www.google.com/search?q=%s
+set searchurls.g https://www.qwant.com/?q=%s
+set searchurls.google https://www.qwant.com/?q=%s
set searchurls.gm https://www.google.com/maps?q=%s
set searchurls.gwi https://wiki.gentoo.org/index.php?title=Special%3ASearch&profile=default&fulltext=Search&search=
set searchurls.im https://www.imdb.com/find?q=%s
@@ -59,3 +60,11 @@ bind gpdy tabopen http://debuc.com:9010
" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl
" vim: set filetype=tridactyl
+
+modeindicatormodes.normal true
+set modeindicatormodes.insert true
+set modeindicatormodes.input true
+set modeindicatormodes.ignore false
+set modeindicatormodes.ex true
+set modeindicatormodes.hint true
+set modeindicatormodes.visual true
diff --git a/config/home/.zshenv b/config/home/.zshenv
index d1cd73a..b83cad5 100644
--- a/config/home/.zshenv
+++ b/config/home/.zshenv
@@ -19,11 +19,16 @@ export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc-2.0
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
-export NVM_DIR="$XDG_DATA_HOME/nvm"
+export NVM_DIR="$XDG_DATA_HOME"/nvm
export W3M_DIR="$XDG_STATE_HOME"/w3m
export GOPATH="$XDG_DATA_HOME"/go
export GOMODCACHE="$XDG_CACHE_HOME"/go/mod
export TNS_ADMIN=/opt/oracle/instantclient_21_9/network/admin
+export WGETRC="$XDG_CONFIG_HOME"/wgetrc
+export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
+export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel
+export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history
+export RANDFILE="$XDG_CACHE_HOME"/rnd
export XINITRC="$XDG_CONFIG_HOME/x11"/xinitrc
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
@@ -50,3 +55,11 @@ export PASSWORD_STORE_CLIP_TIME=5
# export VIMINIT="source ~/.config/vim/vimrc"
# export fpath=($XDG_CONFIG_HOME/zsh/completion/ $fpath)
# export CUDA_CACHE_PATH="$XDG_CONFIG_HOME"/nv
+
+export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
+ --color=fg:#e5e9f0,hl:#88c0d0
+ --color=pointer:blue
+ --color=gutter:#2e3440
+ --color=fg+:#81a1c1,hl+:#ebcb8b
+ --color=info:#b48ead,prompt:#bf6069,pointer:#b48dac
+ --color=marker:#a3be8b,spinner:#ebcb8b,header:#a3be8b'
diff --git a/config/hyprland/hypr/binds.conf b/config/hyprland/hypr/binds.conf
index eb3d4a2..8100868 100644
--- a/config/hyprland/hypr/binds.conf
+++ b/config/hyprland/hypr/binds.conf
@@ -2,12 +2,10 @@ $mainMod = SUPER
$term = foot
-$menu = $(tofi-run)
-$menu_opt = $(tofi-run --auto-accept-single=false)
+$menu = $(commander -r -h)
bind = $mainMod, Return, exec, $term
bind = $mainMod SHIFT, Return, exec, $menu
-bind = $mainMod CTRL, Return, exec, $menu_opt
bind = $mainMod, C, killactive,
bind = $mainMod SHIFT, C, exec, hyprctl kill
bind = $mainMod SHIFT, Q, exit,
diff --git a/config/hyprland/hypr/hyprland.conf b/config/hyprland/hypr/hyprland.conf
index a8a99c2..17f0235 100644
--- a/config/hyprland/hypr/hyprland.conf
+++ b/config/hyprland/hypr/hyprland.conf
@@ -41,14 +41,17 @@ misc {
}
decoration {
- rounding = 2
- blur = no
- blur_size = 3
- blur_passes = 1
- blur_new_optimizations = on
+ rounding = 0
+ blur {
+ enabled = 1
+ size = 6
+ }
dim_inactive = true
dim_strength = 0.08
+ active_opacity = 0.98
+ inactive_opacity = 0.92
+
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
diff --git a/config/hyprland/hypr/startup.sh b/config/hyprland/hypr/startup.sh
index 83fefe4..6d5957f 100755
--- a/config/hyprland/hypr/startup.sh
+++ b/config/hyprland/hypr/startup.sh
@@ -5,3 +5,4 @@ gammastep &
wl-paste --watch cliphist store &
keyadd id_rsa &
swayidle 300 locker &
+$TERMINAL &
diff --git a/config/hyprland/tofi/themes/nord b/config/hyprland/tofi/themes/nord
index cf78b5c..c8a6192 100644
--- a/config/hyprland/tofi/themes/nord
+++ b/config/hyprland/tofi/themes/nord
@@ -1,7 +1,9 @@
### Font
font = monospace bold
font-size = 12
+anchor=top
+# colors
text-color = #d8dee9
prompt-color = #81a1c1
placeholder-color = #4c566a
@@ -9,25 +11,28 @@ input-color = #d8dee9
default-result-color = #88c0d0
selection-color = #5e81ac
selection-match-color = #ffffff
+background-color = #3b4252f2
+outline-color = #81a1c1
+border-color = #88c0d0
-prompt-text = ""
-prompt-padding = 0
-placeholder-text = "..."
-
-width = 20%
+# sizes
+width = 100%
height = 20%
-background-color = #2e3440f0
-outline-width = 0
-outline-color = #81a1c1
+
border-width = 2
-border-color = #88c0d0
-corner-radius = 26
+outline-width = 0
+prompt-padding = 0
-padding-top = 0
-padding-bottom = 0
-padding-left = 0
-# padding-left = 7%
-padding-right = 0
+padding-top = 5
+padding-bottom = 5
+padding-left = 5
+padding-right = 5
+
+corner-radius = 0
+
+# general
+prompt-text = ""
+placeholder-text = "..."
matching-algorithm = prefix
require-match = false
diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc
index aadc6d3..6866f62 100644
--- a/config/hyprland/waybar/config.jsonc
+++ b/config/hyprland/waybar/config.jsonc
@@ -1,21 +1,18 @@
{
"layer": "top",
- "modules-left": ["battery", "clock", "wlr/workspaces", "mpd"],
- "modules-center": ["hyprland/window"],
+ "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"],
+ "modules-center": ["clock"],
"modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "tray"],
- "wlr/workspaces": {
- "on-click": "activate",
- },
"mpd": {
- "tooltip": false,
"format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",
"artist-len": 24,
- "format-disconnected": "",
+ "format-disconnected": "s",
"format-stopped": "",
"state-icons": {
"playing": "",
"paused": "",
},
+ "tooltip-format": "{songPosition}/{queueLength} ({volume}%)",
"on-click": "mpc toggle",
"on-scroll-up": "mpc volume +5",
"on-scroll-down": "mpc volume -5",
@@ -29,7 +26,6 @@
"separate-outputs": true,
},
"pulseaudio": {
- "tooltip": false,
"scroll-step": 5,
"format": "{icon} {volume:3}%",
"format-icons": {
@@ -57,7 +53,6 @@
"format-disconnected": "",
},
"cpu": {
- "tooltip": false,
"format": " {usage:2}%",
"interval": 3,
},
@@ -67,8 +62,8 @@
"restart-interval": 3,
},
"clock": {
- "format": "{:%H:%M}",
- "format-alt": "{:(%R) %A %d %B}",
+ "format": "{:%R}",
+ "format-alt": "{:(%T) %A %d %B}",
"interval": 1,
},
"tray": {
diff --git a/config/hyprland/waybar/schemes/base16.css b/config/hyprland/waybar/schemes/base16.css
index 19bb703..76efbb3 100644
--- a/config/hyprland/waybar/schemes/base16.css
+++ b/config/hyprland/waybar/schemes/base16.css
@@ -29,6 +29,12 @@ window#waybar.hidden {
opacity: 0.2;
}
+tooltip {
+ background: @background;
+ color: @foreground;
+ border: 2px solid @color0;
+}
+
window#waybar.termite #window,
window#waybar.Firefox #window,
window#waybar.Navigator #window,
@@ -37,19 +43,21 @@ window#waybar.PCSX2 #window {
background: @color7;
}
-#mpd, #battery,
-#window,
-#custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory {
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- border-radius: 26px;
+.modules-right * {
+ padding: 0 16px;
+}
+
+.modules-right {
+ margin-right: 2px;
+}
+.modules-left {
+ margin-left: 2px;
}
#workspaces, #mpd, #battery, #clock,
-#window,
#custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory, #tray {
- border: solid @background 2px;
+ border: solid @background;
+ border-width: 2px 2px 2px 0;
margin-top: 4px;
margin-bottom: 2px;
transition: none;
@@ -62,20 +70,18 @@ window#waybar.PCSX2 #window {
}
#workspaces {
- margin-left: 12px;
- border-radius: 26px;
+ border: solid @background 2px;
background: @color3;
}
#workspaces button {
transition: none;
background: transparent;
- font-size: 16px;
color: @background;
}
#workspaces button.active {
- text-shadow: 1px 0px 1px @background;
+ text-shadow: 0px 1px 0px @color1;
}
#workspaces button:hover {
@@ -85,6 +91,7 @@ window#waybar.PCSX2 #window {
#mpd {
color: @background;
+ padding: 0 16px;
background: @color6;
}
@@ -96,30 +103,27 @@ window#waybar.PCSX2 #window {
}
#clock {
- margin-top: 4px;
- margin-bottom: 2px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- border-radius: 26px;
+ border: solid @color4 2px;
+ padding: 0 16px;
color: @color3;
background: @background;
- border-color: @color4;
}
#window {
- color: @background;
- background: @color4;
+ margin-left: 16px;
+ padding: 0;
+ color: @color5;
}
#custom-wireguard {
color: @color5;
- border-color: @color8;
+ border: 2px solid @color8;
background: @background;
}
#network {
color: @background;
+ border-left: 2px solid @background;
background: @color5;
}
@@ -139,20 +143,13 @@ window#waybar.PCSX2 #window {
}
#custom-memory {
- margin-left: 8px;
- margin-right: 12px;
- padding-left: 16px;
- padding-right: 16px;
- border-radius: 26px;
+ padding: 0 16px;
color: @background;
background: @color5;
}
-#tray {
- border: none;
- margin-right: 12px;
- color: @foreground;
- background: transparent;
+#tray * {
+ padding: unset;
}
#tray > .needs-attention {