Compare commits
54
Commits
6a0b19dbd2
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f66163741
|
||
|
|
7caa72b21e
|
||
|
|
efde01267c
|
||
|
|
0c381a97bb
|
||
|
|
19736f22ef
|
||
|
|
7795d4c59f
|
||
|
|
cd52da6847
|
||
|
|
804cfcc031
|
||
|
|
714bd2dcf9
|
||
|
|
4585bd366e
|
||
|
|
e84e060569
|
||
|
|
8121a98f4e
|
||
|
|
5b27f46791
|
||
|
|
315e62265e
|
||
|
|
4c18754fb3
|
||
|
|
27ee6c5131
|
||
|
|
1f7e26e867
|
||
|
|
8c1fe28feb
|
||
|
|
98363ae818
|
||
|
|
ac90bbcb3d
|
||
|
|
baaff31f82
|
||
|
|
24dde33d73
|
||
|
|
d44eb32499
|
||
|
|
7fa5726200
|
||
|
|
0629d064dd | ||
|
|
1465e32255 | ||
|
|
c1136c365e | ||
|
|
115f05ba1c | ||
|
|
48ed08feb0 | ||
|
|
ba5014b1a4 | ||
|
|
17329aa1c6 | ||
|
|
dbbde6df11 | ||
|
|
c871c7ea00 | ||
|
|
498e24e547 | ||
|
|
a52d5153b6 | ||
|
|
7b414c0655 | ||
|
|
04311a5ea0 | ||
|
|
f6cfd554b7 | ||
|
|
bce88635b7 | ||
|
|
666c87e30c | ||
|
|
695f79c9ee | ||
|
|
cffe11c4e9 | ||
|
|
ab2cffdfff | ||
|
|
9b25cebd91 | ||
|
|
941eee9a45 | ||
|
|
23669cd927 | ||
|
|
71a884218b | ||
|
|
58b4e426bf | ||
|
|
62c1742962 | ||
|
|
8984a2caa2 | ||
|
|
ee6d63d2f3 | ||
|
|
69a8ce3503 | ||
|
|
20e404b3a5 | ||
|
|
a16d480140 |
No files matched your search
@@ -818,7 +818,7 @@ mail-received=notify-send "[$AERC_ACCOUNT/$AERC_FOLDER] New mail from $AERC_FROM
|
||||
#
|
||||
# Executed when aerc starts
|
||||
#aerc-startup=aerc :terminal calcurse && aerc :next-tab
|
||||
aerc-startup=aerc :terminal khal interactive && aerc :next-tab
|
||||
aerc-startup=aerc :terminal khal interactive && aerc :next-tab && aerc :terminal newsboat -r && aerc :next-tab
|
||||
|
||||
#
|
||||
# Executed when aerc shuts down.
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
|
||||
key=`setxkbmap -query | grep "layout\|variant" | awk '{print $2}' | xargs`
|
||||
|
||||
if [[ $key = "be" ]]; then
|
||||
if [[ $key = "fr" ]]; then
|
||||
setxkbmap us
|
||||
elif [[ $key = "us" ]]; then
|
||||
setxkbmap us -variant dvp
|
||||
setxkbmap us -variant dvorak
|
||||
elif [[ $key = "us dvorak" ]]; then
|
||||
setxkbmap be
|
||||
setxkbmap fr
|
||||
else
|
||||
setxkbmap fr
|
||||
fi
|
||||
|
||||
key=`setxkbmap -query | grep "layout\|variant" | awk '{print $2}' | xargs`
|
||||
notify-send "Keyboard Layout: $key"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
current_resolution=$(xrandr | awk '/DSI1/ {print $4}')
|
||||
|
||||
if [[ $current_resolution == 1920x1200* ]];
|
||||
then
|
||||
xrandr --size 600x960
|
||||
else
|
||||
xrandr --size 1200x1920
|
||||
fi
|
||||
chwp
|
||||
@@ -1355,6 +1355,7 @@
|
||||
🈺 Japanese “open for business” button; U+1F23A
|
||||
🈵 Japanese “no vacancy” button; U+1F235
|
||||
🔴 red circle; U+1F534
|
||||
🟢 green circle; U+1F7E2
|
||||
🔵 blue circle; U+1F535
|
||||
⚪ white circle; U+26AA
|
||||
⚫ black circle; U+26AB
|
||||
|
||||
@@ -98,6 +98,8 @@ bspc rule -a Zathura state=tiled
|
||||
bspc rule -a arduino state=pseudo_tiled
|
||||
bspc rule -a Spotify desktop=VII follow=off focus=off
|
||||
bspc rule -a discord desktop=VII follow=off focus=off
|
||||
bspc rule -a steam_app_2666510 state=pseudo_tiled split_dir=south split_ratio 340 locked private layer=above rectangle=1920x340+0+740
|
||||
#bspc rule -a steam_app_2666510 state=pseudo_tiling locked=on private=on split_dir=south split_ratio 296 layer=above rectangle=1920x296+0+784
|
||||
|
||||
## Autogap adjusts windowgap automatically according to the number of
|
||||
## windows on the desktop. Using it disables negative window gap.
|
||||
|
||||
@@ -38,7 +38,6 @@ conky.config = {
|
||||
font = 'Fira Code:size=10',
|
||||
gap_x = -1800,
|
||||
gap_y = 40,
|
||||
minimum_height = 950,
|
||||
minimum_width = 300,
|
||||
|
||||
net_avg_samples = 2,
|
||||
@@ -67,11 +66,9 @@ conky.config = {
|
||||
}
|
||||
|
||||
|
||||
mailpath = "/disks/TwoTO/Mails"
|
||||
if hostname == "minitonitchtop" then
|
||||
conky.config.gap_x = 20
|
||||
conky.config.font = 'Fira Code:size=14'
|
||||
mailpath = "$HOME/Mails"
|
||||
end
|
||||
|
||||
function disksbars()
|
||||
@@ -93,8 +90,8 @@ end
|
||||
function cpubars()
|
||||
if hostname == "minitonitchtop" then
|
||||
return [[
|
||||
${color}${cpubar cpu1 8, 220} ${cpubar cpu2 8, 220}
|
||||
${cpubar cpu3 8, 220} ${cpubar cpu4 8, 220}
|
||||
${color}${cpubar cpu1 8, 150} ${cpubar cpu2 8, 150}
|
||||
${cpubar cpu3 8, 150} ${cpubar cpu4 8, 150}
|
||||
]]
|
||||
else
|
||||
return [[
|
||||
@@ -162,9 +159,7 @@ ${color grey}Processes $hr
|
||||
${color gray}Count: $color$processes
|
||||
${color grey}Infos $hr
|
||||
$color${font FiraCode Nerd Font:size=10}${execi 1800 curl -s 'wttr.in/?format=4'}$font
|
||||
${color gray}mto $color${new_mails ]]..mailpath..[[/minecraftonitch/INBOX/ 900} / ${mails ]]..mailpath..[[/minecraftonitch/INBOX/ 900} | ${color gray}d.t $color${new_mails ]]..mailpath..[[/d.tonitch/INBOX/ 900} / ${mails ]]..mailpath..[[/d.tonitch/INBOX/ 900} | ${color gray}d.a $color${new_mails ]]..mailpath..[[/debucquoy.anthony/INBOX/ 900} / ${mails ]]..mailpath..[[/debucquoy.anthony/INBOX/ 900}
|
||||
${color grey}TODO $hr
|
||||
$color${execi 60 todo list --sort priority}
|
||||
${color grey}CALENDAR $hr
|
||||
$color${execi 60 khal list}
|
||||
]]
|
||||
${color grey}System: $color${execi 60 systemctl is-failed} $alignr${color grey}User:$color${execi 60 systemctl --user is-failed}
|
||||
${color grey}nc-sync:${execi 60 systemctl --user status nc-sync | awk '/Active:/ {sub(/[^;]*; /,"",$0);print;}'}
|
||||
${color grey}vdirsyncer:${execi 60 systemctl --user status vdirsyncer | awk '/Active:/ {sub(/[^;]*; /,"",$0);print;}'}
|
||||
]]
|
||||
@@ -0,0 +1,80 @@
|
||||
-- Conky, a system monitor https://github.com/brndnmtthws/conky
|
||||
--
|
||||
-- This configuration file is Lua code. You can write code in here, and it will
|
||||
-- execute when Conky loads. You can use it to generate your own advanced
|
||||
-- configurations.
|
||||
--
|
||||
-- Try this (remove the `--`):
|
||||
--
|
||||
-- print("Loading Conky config")
|
||||
--
|
||||
-- For more on Lua, see:
|
||||
-- https://www.lua.org/pil/contents.html
|
||||
--
|
||||
-- Conky Lua API: https://conky.cc/lua
|
||||
|
||||
-- Configuration settings: https://conky.cc/config_settings
|
||||
|
||||
io.input("/etc/hostname")
|
||||
hostname = io.read()
|
||||
|
||||
conky.config = {
|
||||
alignment = 'top_left',
|
||||
background = false,
|
||||
border_width = 1,
|
||||
|
||||
cpu_avg_samples = 2,
|
||||
double_buffer = true,
|
||||
update_interval = 1.0,
|
||||
|
||||
default_color = 'green',
|
||||
default_outline_color = 'green',
|
||||
default_shade_color = 'dark green',
|
||||
draw_borders = false,
|
||||
draw_graph_borders = true,
|
||||
draw_outline = false,
|
||||
draw_shades = true,
|
||||
extra_newline = false,
|
||||
font = 'Fira Code:size=10',
|
||||
gap_x = 1850,
|
||||
gap_y = 40,
|
||||
minimum_width = 300,
|
||||
|
||||
net_avg_samples = 2,
|
||||
no_buffers = true,
|
||||
|
||||
out_to_console = false,
|
||||
out_to_ncurses = false,
|
||||
out_to_stderr = false,
|
||||
out_to_wayland = false,
|
||||
out_to_x = true,
|
||||
|
||||
own_window = true,
|
||||
own_window_class = 'Conky',
|
||||
own_window_type = 'desktop',
|
||||
own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
|
||||
own_window_argb_visual = true,
|
||||
own_window_argb_value = 200,
|
||||
own_window_colour = "#222222",
|
||||
|
||||
show_graph_range = false,
|
||||
show_graph_scale = false,
|
||||
stippled_borders = 0,
|
||||
uppercase = false,
|
||||
use_spacer = 'none',
|
||||
use_xft = true,
|
||||
}
|
||||
|
||||
|
||||
if hostname == "minitonitchtop" then
|
||||
conky.config.gap_x = 20
|
||||
conky.config.font = 'Fira Code:size=14'
|
||||
end
|
||||
|
||||
-- Variables: https://conky.cc/variables
|
||||
conky.text = [[
|
||||
${color grey}TODO $hr
|
||||
$color${execi 60 todo list --sort priority}
|
||||
${color grey}CALENDAR $hr
|
||||
$color${execi 60 khal list}
|
||||
]]
|
||||
+8
-1
@@ -1,5 +1,5 @@
|
||||
[user]
|
||||
email = debucquoy.anthony@gmail.com
|
||||
email = tonitch@herisson.ovh
|
||||
name = Anthony Debucquoy
|
||||
signingkey = 3D06B2E67463D272D769DF59A78D6421F083D42E
|
||||
[init]
|
||||
@@ -17,3 +17,10 @@
|
||||
fap = fetch --all --prune
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
[credential]
|
||||
helper = store
|
||||
@@ -1,12 +1,22 @@
|
||||
[calendars]
|
||||
|
||||
[[google_local]]
|
||||
path = ~/.cache/calendar/google/*
|
||||
color = light blue
|
||||
type = discover
|
||||
|
||||
[[nextcloud_cal_local]]
|
||||
path = ~/.cache/calendar/nextcloud/*
|
||||
color = dark green
|
||||
type = discover
|
||||
|
||||
[[nextcloud_card_local]]
|
||||
path = ~/.cache/contact/nextcloud/*
|
||||
type = discover
|
||||
|
||||
[[umons]]
|
||||
path = ~/.cache/calendar/umons/*
|
||||
type = discover
|
||||
|
||||
[locale]
|
||||
timeformat = %H:%M
|
||||
@@ -23,7 +33,7 @@
|
||||
|
||||
[highlight_days]
|
||||
color = dark green
|
||||
default_color = dark blue
|
||||
default_color = light blue
|
||||
multiple = dark red
|
||||
|
||||
[view]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[Unit]
|
||||
Description=Syncronise Nextcloud instance
|
||||
Description=Run vdirSyncer
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=nextcloudcmd /media/nextcloud 'https://tonitch:jOkN5UaCMRRnjLIe3cH9KEXzb@nc.debucquoy.me'
|
||||
ExecStart=vdirsyncer sync
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -1,5 +1,5 @@
|
||||
[Unit]
|
||||
Description=Run nextcloud sync every 15 minutes
|
||||
Description=run vdirsyncer every 15 min
|
||||
|
||||
[Timer]
|
||||
OnActiveSec=10min
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
path = "~/.cache/calendar/nextcloud/whatdo/"
|
||||
path = "~/.cache/calendar/nextcloud/*/"
|
||||
# date_format = "%d/%m/%Y"
|
||||
# time_format = "%H:%M"
|
||||
default_list = "Personal"
|
||||
default_due = 0
|
||||
default_list = "whatdo"
|
||||
default_due = 0
|
||||
@@ -34,3 +34,34 @@ status_path = "~/.vdirsyncer/status/"
|
||||
b = "nextcloud_card_local"
|
||||
collections = ["from a"]
|
||||
metadata= ["displayname"]
|
||||
|
||||
[storage debucquoyanthony_remote]
|
||||
type = "google_calendar"
|
||||
client_id.fetch = ["command", "cat", "~/.config/pass/debucquoyanthony_id.txt"]
|
||||
client_secret.fetch = ["command", "cat", "~/.config/pass/debucquoyanthony_secret.txt"]
|
||||
token_file = "~/.config/pass/debucquoyanthony_token.txt"
|
||||
|
||||
[storage debucquoyanthony_local]
|
||||
type = "filesystem"
|
||||
path = "~/.cache/calendar/google/debucquoyanthony"
|
||||
fileext = ".ics"
|
||||
|
||||
[pair debucquoyanthony_cal]
|
||||
a = "debucquoyanthony_remote"
|
||||
b = "debucquoyanthony_local"
|
||||
collections = ["from a"]
|
||||
metadata= ["color", "displayname", "description", "order"]
|
||||
|
||||
[storage umons_remote]
|
||||
type = "http"
|
||||
url = "https://ical.umons.ac.be/0CAF46D3-390C-4D34-AE43-B662CD784F67.ics"
|
||||
|
||||
[storage umons_local]
|
||||
type = "filesystem"
|
||||
path = "~/.cache/calendar/umons/2026-2027"
|
||||
fileext = ".ics"
|
||||
|
||||
[pair umons]
|
||||
a = "umons_remote"
|
||||
b = "umons_local"
|
||||
collections = null
|
||||
@@ -1,6 +1,5 @@
|
||||
vim.g.vimtex_view_method="zathura"
|
||||
vim.opt.completeopt="menu,popup,noinsert,noselect"
|
||||
vim.g.python3_host_prog="/bin/python"
|
||||
|
||||
require("dapui").setup()
|
||||
require("plugin.dap.c")
|
||||
|
||||
@@ -21,4 +21,7 @@ do
|
||||
vim.keymap.set('i', '<C-S>', function()
|
||||
vim.lsp.buf.signature_help()
|
||||
end, { desc = 'vim.lsp.buf.signature_help()' })
|
||||
|
||||
vim.keymap.set('n', ']g', vim.diagnostic.goto_next)
|
||||
vim.keymap.set('n', '[g', vim.diagnostic.goto_prev)
|
||||
end
|
||||
@@ -1,5 +1,8 @@
|
||||
active-opacity = 1.0;
|
||||
inactive-opacity = 0.9;
|
||||
backend = "glx";
|
||||
shadow = true;
|
||||
corner-radius = 10;
|
||||
|
||||
opacity-rule = [
|
||||
"100:name ~?= 'YouTube — Mozilla Firefox'",
|
||||
@@ -7,3 +10,8 @@ opacity-rule = [
|
||||
"100:name ~?= 'Netflix — Mozilla Firefox'",
|
||||
"100:class_g = 'Zathura'"
|
||||
]
|
||||
|
||||
animation = ({
|
||||
triggers = ["open", "close"];
|
||||
preset = "appear";
|
||||
})
|
||||
@@ -1,8 +1,8 @@
|
||||
# bspwm hotkeys
|
||||
#
|
||||
# Cleanly quit bspwm
|
||||
super + shift + q
|
||||
bspc quit 1
|
||||
super + shift + a
|
||||
bspc quit 1 && pkill lemonpanel && pkill lemonbar
|
||||
|
||||
# Show keybindings
|
||||
super + F1
|
||||
@@ -96,7 +96,7 @@ super + Return
|
||||
# bspc node -n @/
|
||||
|
||||
# go (Shift=move) to desktop (and focus the monitor that the desktop is located on. Bspwm style)
|
||||
super + {_,shift + }{1,2,3,4,5,6,7,8,9,0}
|
||||
super + {_,shift + }{ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave}
|
||||
bspc {desktop -f,node -d} ^{1-9,10}
|
||||
|
||||
## Alternative: i3 style behavior (focus nth, desktop of the focused monitor)
|
||||
@@ -125,7 +125,7 @@ super + Tab
|
||||
WindowSelector
|
||||
|
||||
#Focus windows by direction, works with multihead
|
||||
super + {a,s,w,d}
|
||||
super + {q,s,z,d}
|
||||
focusmover {west,south,north,east}
|
||||
|
||||
super + {h,j,k,l}
|
||||
@@ -137,7 +137,7 @@ super + {Left,Down,Up,Right}
|
||||
# Move tiled windows. Moving a tiled window to
|
||||
# preselected one moves into preselection instead.
|
||||
# Moving out of the screen should move the window to next monitor if possible
|
||||
super + shift + {q,s,w,d}
|
||||
super + shift + {q,s,z,d}
|
||||
windowgrabber {west,south,north,east}
|
||||
|
||||
super + shift + {h,j,k,l}
|
||||
@@ -148,7 +148,7 @@ super + shift + {Left,Down,Up,Right}
|
||||
euclid_mover {west,south,north,east}
|
||||
|
||||
#resize windows
|
||||
super + ctrl + {a,s,w,d}
|
||||
super + ctrl + {q,s,z,d}
|
||||
bspwm_resize.sh {west,south,north,east}
|
||||
|
||||
super + ctrl + {h,j,k,l}
|
||||
@@ -335,9 +335,6 @@ super + ctrl + space
|
||||
{pkill picom ,\
|
||||
picom -b }
|
||||
|
||||
ctrl + alt +t
|
||||
pkill rotateScreen_au || rotateScreen_auto
|
||||
|
||||
# Remove receptacles
|
||||
super + BackSpace
|
||||
for i in $(bspc query -N -n .leaf.!window.local); do bspc node $i -k; done
|
||||
@@ -1,5 +1,6 @@
|
||||
set -g mouse
|
||||
set -g set-clipboard on
|
||||
set -g focus-events on
|
||||
|
||||
bind h selectp -L
|
||||
bind j selectp -D
|
||||
|
||||
@@ -20,10 +20,14 @@ $0
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $1
|
||||
rm -f tags compile_commands.json
|
||||
|
||||
bear: clean
|
||||
bear -- make
|
||||
|
||||
tags:
|
||||
ctags **.{c,h}
|
||||
|
||||
run: $1
|
||||
./$<
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
set keywordprg=go\ doc
|
||||
unmap K
|
||||
set makeprg=go\ run\ .
|
||||
@@ -1 +0,0 @@
|
||||
set tw=120
|
||||
Submodule
+1
Submodule vim/.vim/pack/autoload/start/loremipsum added at 39354ae1c8.
Submodule
+1
Submodule vim/.vim/pack/autoload/start/vimspector added at ee3bd01205.
+1
-5
@@ -179,9 +179,6 @@ zmodload zsh/terminfo
|
||||
# Enabling fzf capabilities
|
||||
source /usr/share/fzf/*.zsh
|
||||
|
||||
# source /usr/share/enhancd/init.sh
|
||||
# export ENHANCD_ENABLE_DOUBLE_DOT=false
|
||||
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
@@ -190,8 +187,7 @@ bindkey '^[[B' history-substring-search-down
|
||||
# Apply different settigns for different terminals
|
||||
case $(basename "$(cat "/proc/$PPID/comm")") in
|
||||
login)
|
||||
RPROMPT="%(?.%{$fg[green]%}✓ %{$reset_color%}.%{$fg[red]%}✗ %{$reset_color%})"
|
||||
# RPROMPT="%{$fg[red]%} %(?..[%?])"
|
||||
RPROMPT="%{$fg[red]%} %(?..[%?])"
|
||||
alias x='startx ~/.xinitrc' # Type name of desired desktop after x, xinitrc is configured for it
|
||||
;;
|
||||
# 'tmux: server')
|
||||
|
||||
-230
@@ -1,230 +0,0 @@
|
||||
## Options section
|
||||
setopt CORRECT # Auto correct mistakes
|
||||
setopt EXTENDED_GLOB # Extended globbing. Allows using regular expressions with *
|
||||
setopt NO_CASE_GLOB # Case insensitive globbing
|
||||
setopt RC_EXPAND_PARAM # Array expension with parameters
|
||||
setopt NO_CHECK_JOBS # Don't warn about running processes when exiting
|
||||
setopt NUMERIC_GLOB_SORT # Sort filenames numerically when it makes sense
|
||||
setopt NO_BEEP # No beep
|
||||
setopt APPEND_HISTORY # Immediately append history instead of overwriting
|
||||
setopt HIST_IGNORE_ALL_DUPS # If a new command is a duplicate, remove the older one
|
||||
setopt AUTO_CD # if only directory path is entered, cd there.
|
||||
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc)
|
||||
zstyle ':completion:*' rehash true # automatically find new executables in path
|
||||
# Speed up completions
|
||||
zstyle ':completion:*' accept-exact '*(N)'
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path ~/.zsh/cache
|
||||
HISTFILE=~/.zhistory
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=500
|
||||
#export EDITOR=/usr/bin/vim
|
||||
#export VISUAL=/usr/bin/gvim
|
||||
WORDCHARS=${WORDCHARS//\/[&.;]} # Don't consider certain characters part of the word
|
||||
|
||||
|
||||
## Keybindings section
|
||||
bindkey -v
|
||||
# bindkey '^[[7~' beginning-of-line # Home key
|
||||
# bindkey '^[[H' beginning-of-line # Home key
|
||||
# if [[ "${terminfo[khome]}" != "" ]]; then
|
||||
# bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line
|
||||
# fi
|
||||
# bindkey '^[[8~' end-of-line # End key
|
||||
# bindkey '^[[F' end-of-line # End key
|
||||
# if [[ "${terminfo[kend]}" != "" ]]; then
|
||||
# bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line
|
||||
# fi
|
||||
# bindkey '^[[2~' overwrite-mode # Insert key
|
||||
# bindkey '^[[3~' delete-char # Delete key
|
||||
bindkey '^[[C' forward-char # Right key
|
||||
bindkey '^[[D' backward-char # Left key
|
||||
bindkey '^[[5~' history-beginning-search-backward # Page up key
|
||||
bindkey '^[[6~' history-beginning-search-forward # Page down key
|
||||
|
||||
# Edit line in vim with ctrl-e
|
||||
autoload edit-command-line; zle -N edit-command-line
|
||||
bindkey '^e' edit-command-line
|
||||
|
||||
# Navigate words with ctrl+arrow keys
|
||||
bindkey '^[Oc' forward-word #
|
||||
bindkey '^[Od' backward-word #
|
||||
bindkey '^[[1;5D' backward-word #
|
||||
bindkey '^[[1;5C' forward-word #
|
||||
bindkey '^H' backward-kill-word # delete previous word with ctrl+backspace
|
||||
bindkey '^[[Z' undo # Shift+tab undo last action
|
||||
|
||||
## Alias section
|
||||
alias cp="cp -i" # Confirm before overwriting something
|
||||
alias rm="rm -i"
|
||||
alias df='df -h' # Human-readable sizes
|
||||
alias free='free -m' # Show sizes in MB
|
||||
alias gitu='git add . && git commit && git push'
|
||||
alias ls='ls --color=auto'
|
||||
alias cal='cal -m'
|
||||
alias dotfiles='git --git-dir=$HOME/.config/dotfiles --work-tree=$HOME'
|
||||
alias findfiles="find . -name "
|
||||
alias rofi="rofi -show combi"
|
||||
alias get_idf='source /opt/esp-idf/export.sh'
|
||||
alias open="xdg-open"
|
||||
alias sxiv=nsxiv
|
||||
alias :q=exit
|
||||
alias vim=nvim
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
alias radio="mpv https://radio.freenode.net/radio.ogg --volume=30"
|
||||
alias calc="calcurse-caldav && calcurse && calcurse-caldav"
|
||||
>>>>>>> 5bc0e97 (ranger nesting in zsh)
|
||||
|
||||
# Theming section
|
||||
autoload -U compinit colors zcalc
|
||||
compinit -d
|
||||
colors
|
||||
|
||||
# enable substitution for prompt
|
||||
setopt prompt_subst
|
||||
|
||||
# Prompt (on left side) similar to default bash prompt, or redhat zsh prompt with colors
|
||||
#PROMPT="%(!.%{$fg[red]%}[%n@%m %1~]%{$reset_color%}# .%{$fg[green]%}[%n@%m %1~]%{$reset_color%}$ "
|
||||
# Maia prompt
|
||||
PROMPT="%B%{$fg[cyan]%}%(4~|%-1~/.../%2~|%~)%u%b >%{$fg[cyan]%}>%B%(?.%{$fg[cyan]%}.%{$fg[red]%})>%{$reset_color%}%b " # Print some system information when the shell is first started
|
||||
# Print a greeting message when shell is started
|
||||
echo $USER@$HOST $(uname -srm) $(source /etc/os-release && echo "$BUILD_ID")
|
||||
## Prompt on right side:
|
||||
# - shows status of git when in git repository (code adapted from https://techanic.net/2012/12/30/my_git_prompt_for_zsh.html)
|
||||
# - shows exit status of previous command (if previous command finished with an error)
|
||||
# - is invisible, if neither is the case
|
||||
|
||||
# Modify the colors and symbols in these variables as desired.
|
||||
GIT_PROMPT_SYMBOL="%{$fg[blue]%}±" # plus/minus - clean repo
|
||||
GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$reset_color%}"
|
||||
GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}"
|
||||
GIT_PROMPT_AHEAD="%{$fg[red]%}ANUM%{$reset_color%}" # A"NUM" - ahead by "NUM" commits
|
||||
GIT_PROMPT_BEHIND="%{$fg[cyan]%}BNUM%{$reset_color%}" # B"NUM" - behind by "NUM" commits
|
||||
GIT_PROMPT_MERGING="%{$fg_bold[magenta]%}⚡︎%{$reset_color%}" # lightning bolt - merge conflict
|
||||
GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}" # red circle - untracked files
|
||||
GIT_PROMPT_MODIFIED="%{$fg_bold[yellow]%}●%{$reset_color%}" # yellow circle - tracked files modified
|
||||
GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}" # green circle - staged changes present = ready for "git push"
|
||||
|
||||
parse_git_branch() {
|
||||
# Show Git branch/tag, or name-rev if on detached head
|
||||
( git symbolic-ref -q HEAD || git name-rev --name-only --no-undefined --always HEAD ) 2> /dev/null
|
||||
}
|
||||
|
||||
parse_git_state() {
|
||||
# Show different symbols as appropriate for various Git repository states
|
||||
# Compose this value via multiple conditional appends.
|
||||
local GIT_STATE=""
|
||||
local NUM_AHEAD="$(git log --oneline @{u}.. 2> /dev/null | wc -l | tr -d ' ')"
|
||||
if [ "$NUM_AHEAD" -gt 0 ]; then
|
||||
GIT_STATE=$GIT_STATE${GIT_PROMPT_AHEAD//NUM/$NUM_AHEAD}
|
||||
fi
|
||||
local NUM_BEHIND="$(git log --oneline ..@{u} 2> /dev/null | wc -l | tr -d ' ')"
|
||||
if [ "$NUM_BEHIND" -gt 0 ]; then
|
||||
GIT_STATE=$GIT_STATE${GIT_PROMPT_BEHIND//NUM/$NUM_BEHIND}
|
||||
fi
|
||||
local GIT_DIR="$(git rev-parse --git-dir 2> /dev/null)"
|
||||
if [ -n $GIT_DIR ] && test -r $GIT_DIR/MERGE_HEAD; then
|
||||
GIT_STATE=$GIT_STATE$GIT_PROMPT_MERGING
|
||||
fi
|
||||
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
|
||||
GIT_STATE=$GIT_STATE$GIT_PROMPT_UNTRACKED
|
||||
fi
|
||||
if ! git diff --quiet 2> /dev/null; then
|
||||
GIT_STATE=$GIT_STATE$GIT_PROMPT_MODIFIED
|
||||
fi
|
||||
if ! git diff --cached --quiet 2> /dev/null; then
|
||||
GIT_STATE=$GIT_STATE$GIT_PROMPT_STAGED
|
||||
fi
|
||||
if [[ -n $GIT_STATE ]]; then
|
||||
echo "$GIT_PROMPT_PREFIX$GIT_STATE$GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
git_prompt_string() {
|
||||
local git_where="$(parse_git_branch)"
|
||||
|
||||
# If inside a Git repository, print its branch and state
|
||||
[ -n "$git_where" ] && echo "$GIT_PROMPT_SYMBOL$(parse_git_state)$GIT_PROMPT_PREFIX%{$fg[yellow]%}${git_where#(refs/heads/|tags/)}$GIT_PROMPT_SUFFIX"
|
||||
|
||||
# If not inside the Git repo, print exit codes of last command (only if it failed)
|
||||
[ ! -n "$git_where" ] && echo "%{$fg[red]%} %(?..[%?])"
|
||||
}
|
||||
|
||||
# Right prompt with exit status of previous command if not successful
|
||||
#RPROMPT="%{$fg[red]%} %(?..[%?])"
|
||||
# Right prompt with exit status of previous command marked with ✓ or ✗
|
||||
#RPROMPT="%(?.%{$fg[green]%}✓ %{$reset_color%}.%{$fg[red]%}✗ %{$reset_color%})"
|
||||
|
||||
|
||||
# Color man pages
|
||||
export LESS_TERMCAP_mb=$'\E[01;32m'
|
||||
export LESS_TERMCAP_md=$'\E[01;32m'
|
||||
export LESS_TERMCAP_me=$'\E[0m'
|
||||
export LESS_TERMCAP_se=$'\E[0m'
|
||||
export LESS_TERMCAP_so=$'\E[01;47;34m'
|
||||
export LESS_TERMCAP_ue=$'\E[0m'
|
||||
export LESS_TERMCAP_us=$'\E[01;36m'
|
||||
export LESS=-r
|
||||
|
||||
|
||||
## Plugins section: Enable fish style features
|
||||
# Use syntax highlighting
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
# Use history substring search
|
||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
# Use Vim mode
|
||||
source /usr/share/zsh/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
||||
# bind UP and DOWN arrow keys to history substring search
|
||||
zmodload zsh/terminfo
|
||||
# Enabling fzf capabilities
|
||||
source /usr/share/fzf/*.zsh
|
||||
|
||||
source /usr/share/enhancd/init.sh
|
||||
export ENHANCD_ENABLE_DOUBLE_DOT=false
|
||||
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
# Apply different settigns for different terminals
|
||||
case $(basename "$(cat "/proc/$PPID/comm")") in
|
||||
login)
|
||||
RPROMPT="%(?.%{$fg[green]%}✓ %{$reset_color%}.%{$fg[red]%}✗ %{$reset_color%})"
|
||||
# RPROMPT="%{$fg[red]%} %(?..[%?])"
|
||||
alias x='startx ~/.xinitrc' # Type name of desired desktop after x, xinitrc is configured for it
|
||||
;;
|
||||
# 'tmux: server')
|
||||
# RPROMPT='$(git_prompt_string)'
|
||||
# ## Base16 Shell color themes.
|
||||
# #possible themes: 3024, apathy, ashes, atelierdune, atelierforest, atelierhearth,
|
||||
# #atelierseaside, bespin, brewer, chalk, codeschool, colors, default, eighties,
|
||||
# #embers, flat, google, grayscale, greenscreen, harmonic16, isotope, londontube,
|
||||
# #marrakesh, mocha, monokai, ocean, paraiso, pop (dark only), railscasts, shapesifter,
|
||||
# #solarized, summerfruit, tomorrow, twilight
|
||||
# #theme="eighties"
|
||||
# #Possible variants: dark and light
|
||||
# #shade="dark"
|
||||
# #BASE16_SHELL="/usr/share/zsh/scripts/base16-shell/base16-$theme.$shade.sh"
|
||||
# #[[ -s $BASE16_SHELL ]] && source $BASE16_SHELL
|
||||
# # Use autosuggestion
|
||||
# source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
# ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
|
||||
# ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'
|
||||
# ;;
|
||||
*)
|
||||
RPROMPT='$(git_prompt_string)'
|
||||
# Use autosuggestion
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add level of ranger nesting if in ranger
|
||||
if [ -n "$RANGER_LEVEL" ]; then
|
||||
export RPROMPT="[r$RANGER_LEVEL]$RPROMPT";
|
||||
fi
|
||||
Reference in new issue
Block a user