commit 02cdb3858bb1e605f91c5134db5627241f1c562b Author: tombdf Date: Wed Dec 18 00:56:47 2024 +0100 feat!: migrate from stow to chezmoi diff --git a/.chezmoiignore b/.chezmoiignore new file mode 100644 index 0000000..9c441ba --- /dev/null +++ b/.chezmoiignore @@ -0,0 +1,7 @@ +README.md +install.sh +scripts +utils +{{- if ne .chezmoi.hostname "ecole" }} +.config/gtk-3.0 +{{- end }} diff --git a/dot_bashrc b/dot_bashrc new file mode 100644 index 0000000..4513b48 --- /dev/null +++ b/dot_bashrc @@ -0,0 +1,128 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' +alias c='clear' +alias csc='sudo cytech-site-change' +alias quit='exit' +alias compresse='echo "tar -cv [nomDuFichieràCompresser] -f [nomArchive].tar"' +alias cps='cp ~/Desktop/Programme/script-c/script.sh ./script.sh' +alias sql='mysql -u thomas -p' +alias waterfox='~/waterfox/waterfox' + +# Add an "alert" alias for long running commands. Use like so: +# sleep 10; alert +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +eval "$(zoxide init --cmd cd bash)" + +eval "$(oh-my-posh init bash)" diff --git a/dot_scryerrc b/dot_scryerrc new file mode 100644 index 0000000..67e90f0 --- /dev/null +++ b/dot_scryerrc @@ -0,0 +1,4 @@ +:- use_module(library(clpz)). +:- use_module(library(lists)). +:- use_module(library(reif)). +:- use_module(library(dif)). diff --git a/dot_vimrc b/dot_vimrc new file mode 100644 index 0000000..e5c164a --- /dev/null +++ b/dot_vimrc @@ -0,0 +1,312 @@ +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" +" ██╗ ██╗██╗███╗ ███╗██████╗ ██████╗ +" ██║ ██║██║████╗ ████║██╔══██╗██╔════╝ +" ██║ ██║██║██╔████╔██║██████╔╝██║ +" ╚██╗ ██╔╝██║██║╚██╔╝██║██╔══██╗██║ +" ╚████╔╝ ██║██║ ╚═╝ ██║██║ ██║╚██████╗ +" ╚═══╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Disable compatibility with vi which can cause unexpected issues. +set nocompatible + +" Enable type file detection. Vim will be able to try to detect the type of file in use. +filetype on + +" Enable plugins and load plugin for the detected file type. +filetype plugin on + +" Load an indent file for the detected file type. +filetype indent on + +" Turn syntax highlighting on. +syntax on + +" Add numbers to each line on the left-hand side. +set number + +" Highlight cursor line underneath the cursor horizontally. +set cursorline + +" Highlight cursor line underneath the cursor vertically. +set cursorcolumn + +" Set shift width to 4 spaces. +set shiftwidth=4 + +" Set tab width to 4 columns. +set tabstop=4 + +" Use space characters instead of tabs. +set expandtab + +" Do not save backup files. +set nobackup + +" Do not let cursor scroll below or above N number of lines when scrolling. +set scrolloff=10 + +" Do not wrap lines. Allow long lines to extend as far as the line goes. +set nowrap + +" While searching though a file incrementally highlight matching characters as you type. +set incsearch + +" Ignore capital letters during search. +set ignorecase + +" Intelligent indent for programming +set autoindent +set smartindent + +" Override the ignorecase option if searching for capital letters. +" This will allow you to search specifically for capital letters. +set smartcase + +" Show partial command you type in the last line of the screen. +set showcmd + +" Show the mode you are on the last line. +set showmode + +" Show matching words during a search. +set showmatch + +" Use highlighting when doing a search. +set hlsearch + +" Set the commands to save in history default number is 20. +set history=1000 + +" Enable auto completion menu after pressing TAB. +set wildmenu + +" Make wildmenu behave like similar to Bash completion. +set wildmode=list:longest + +" There are certain files that we would never want to edit with Vim. +" Wildmenu will ignore files with these extensions. +set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx + +" Permit the recognition of alias by vim +set shell=/bin/zsh +set shellcmdflag=-ic + +" PLUGINS ---------------------------------------------------------------- {{{ + +call plug#begin('~/.vim/plugged') + Plug 'dense-analysis/ale' + + Plug 'preservim/nerdtree' + + Plug 'chrisbra/vim-commentary' + + Plug 'vim-airline/vim-airline' + + Plug 'wfxr/minimap.vim' + + Plug 'morhetz/gruvbox' + +call plug#end() + +" }}} + + +" MAPPINGS --------------------------------------------------------------- {{{ + +" Set the backslash as the leader key. +let mapleader = "," + +" Press ,, to jump back to the last cursor position. +nnoremap , `` + +" Put a word into double " +nnoremap " viwa"bi"lel + +" Print a ( and it's matching ) +inoremap ( ()ha + +" Print a double " +inoremap " ""ha + +" Open a command block delimited by {} +inoremap ' {oo0a}ki + +" Type jj to exit insert mode quickly. +inoremap jj + +" Press the space bar to type the : character in command mode. +nnoremap : + +" Pressing the letter o will open a new line below the current one. +" Exit insert mode after creating a new line above or below the current line. +nnoremap o o +nnoremap O O + +" Center the cursor vertically when moving to the next word during a search. +nnoremap n nzz +nnoremap N Nzz + +" Yank from cursor to the end of line. +nnoremap Y y$ + +" Map the navigating keys to match the AZERTY keyboard +nnoremap j h +nnoremap k j +nnoremap l k +nnoremap m l + +" Same as the above but in visual mode +vnoremap j h +vnoremap k j +vnoremap l k +vnoremap m l + +" You can split the window in Vim by typing :split or :vsplit. +" Navigate the split view easier by pressing CTRL+j, CTRL+k, CTRL+l, or CTRL+m. +nnoremap j +nnoremap k +nnoremap h +nnoremap l + +" Resize split windows using arrow keys by pressing: +" CTRL+UP, CTRL+DOWN, CTRL+LEFT, or CTRL+RIGHT. +noremap + +noremap - +noremap > +noremap < + +" Delete a line in normal mode +inoremap ddi + +" NERDTree specific mappings. +" Map the F3 key to toggle NERDTree open and close. +nnoremap :NERDTreeToggle + +" Have nerdtree ignore certain files and directories. +let NERDTreeIgnore=['\.git$', '\.jpg$', '\.mp4$', '\.ogg$', '\.iso$', '\.pdf$', '\.pyc$', '\.odt$', '\.png$', '\.gif$', '\.db$'] + +" }}} + + +" VIMSCRIPT -------------------------------------------------------------- {{{ + +" This will enable code folding. +" Use the marker method of folding. +augroup filetype_vim + autocmd! + autocmd FileType vim setlocal foldmethod=marker +augroup END + +" Enable the marker method of folding. +augroup filetype_vim + autocmd! + autocmd FileType vim setlocal foldmethod=marker +augroup END + +" If the current file type is HTML, set indentation to 2 spaces. +autocmd Filetype html setlocal tabstop=2 shiftwidth=2 expandtab + +" If Vim version is equal to or greater than 7.3 enable undofile. +" This allows you to undo changes to a file even after saving it. +if version >= 703 + set undodir=~/.vim/backup + set undofile + set undoreload=10000 +endif + +" You can split a window into sections by typing `:split` or `:vsplit`. +" Display cursorline and cursorcolumn ONLY in active window. +augroup cursor_off + autocmd! + autocmd WinLeave * set nocursorline nocursorcolumn + autocmd WinEnter * set cursorline cursorcolumn +augroup END + +" If GUI version of Vim is running set these options. +" if has('gui_running') + + " Set the background tone. + " set background=dark + + " Set the color scheme. + " colorscheme wal + + " Set a custom font you have installed on your computer. + " Syntax: set guifont=\ \ + " set guifont=Cartograph\ Regular\ 12 + + " Display more of the file by default. + " Hide the toolbar. + " set guioptions-=T + + " Hide the the left-side scroll bar. + " set guioptions-=L + + " Hide the the right-side scroll bar. + " set guioptions-=r + + " Hide the the menu bar. + " set guioptions-=m + + " Hide the the bottom scroll bar. + " set guioptions-=b + + " Map ,m to toggle the menu, toolbar, and scroll bar. + " is the pipe character. + " is the enter key. + " nnoremap m :if &guioptions=~#'mTr' + " \set guioptions-=mTr + " \else + " \set guioptions+=mTr + " \endif + +" endif + +" gruvbox +"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. +"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support +"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.) +if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal') + if (has("nvim")) + "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > + let $NVIM_TUI_ENABLE_TRUE_COLOR=1 + endif + "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > + "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > + " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > + if (has("termguicolors")) + set termguicolors + endif +endif +let g:airline_powerline_fonts = 1 +set background=dark +let g:gruvbox_contrast_dark = 'soft' +let g:gruvbox_transparent_bg = 1 +let g:gruvbox_termcolors=16 +colorscheme gruvbox +hi! Normal guibg=NONE ctermbg=NONE + +" }}} + + +" STATUS LINE ------------------------------------------------------------ {{{ + +" Clear status line when vimrc is reloaded. +set statusline= + +" Status line left side. +set statusline+=\ %F\ %M\ %Y\ %R + +" Use a divider to separate the left side from the right side. +set statusline+=%= + +" Status line right side. +set statusline+=\ ascii:\ %b\ hex:\ 0x%B\ row:\ %l\ col:\ %c\ percent:\ %p%% + +" Show the status on the second to last line. +set laststatus=2 + +" }}} diff --git a/dot_wallpapers/backwater.jpg b/dot_wallpapers/backwater.jpg new file mode 100644 index 0000000..4fff553 Binary files /dev/null and b/dot_wallpapers/backwater.jpg differ diff --git a/dot_wallpapers/empire.png b/dot_wallpapers/empire.png new file mode 100644 index 0000000..0f1e39a Binary files /dev/null and b/dot_wallpapers/empire.png differ diff --git a/dot_wallpapers/empire_gruvbox.png b/dot_wallpapers/empire_gruvbox.png new file mode 100644 index 0000000..ae0128f Binary files /dev/null and b/dot_wallpapers/empire_gruvbox.png differ diff --git a/dot_zshrc b/dot_zshrc new file mode 100644 index 0000000..0931c92 --- /dev/null +++ b/dot_zshrc @@ -0,0 +1,165 @@ +########################################################################## +# +# ███████╗███████╗██╗ ██╗██████╗ ██████╗ +# ╚══███╔╝██╔════╝██║ ██║██╔══██╗██╔════╝ +# ███╔╝ ███████╗███████║██████╔╝██║ +# ███╔╝ ╚════██║██╔══██║██╔══██╗██║ +# ███████╗███████║██║ ██║██║ ██║╚██████╗ +# ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ +# +########################################################################## + +# Zsh and Zinit configuration ---------------------------------------------------------------- {{{ + +# If you come from bash you might have to change your $PATH. +export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin/:$HOME/.cargo/bin/:$PATH + +# Path to your Zinit installation. +export ZSH="${XDG_DATE_HOME:-${HOME}/.local/share}/zinit/zinit.git" + +# Download and install Zinit if it's not already installed +if [ ! -d $ZSH ]; then + git clone https://github.com/zdharma-continuum/zinit.git $ZSH +fi + +source $ZSH/zinit.zsh + +# Theme ---------------------------------------------------------------- {{{ + +# Set the theme to use with Oh My Posh +eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/prompt.json)" + +# }}} + +# General options ---------------------------------------------------------------- {{{ + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="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. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #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="dd.mm.yyyy" + +# }}} + +# Plugins and snippets ---------------------------------------------------------------- {{{ + +zinit light zsh-users/zsh-syntax-highlighting +zinit light zsh-users/zsh-autosuggestions +zinit light zsh-users/zsh-completions +zinit ice from'gh-r' as'program' +zinit light sei40kr/fast-alias-tips-bin +zinit light sei40kr/zsh-fast-alias-tips + +zinit snippet OMZP::git +zinit snippet OMZP::zoxide + +# }}} + +# History ---------------------------------------------------------------- {{{ + +HISTSIZE=5000 # The number of commands to remember in the command history +HISTFILE=~/.zsh_history # The file to save the command history to +SAVEHIST=$HISTSIZE # The number of commands to save in the history file +HISTDUP=erase # Erase duplicates in the history file +setopt appendhistory # Append history to the history file +setopt sharehistory # Share history between all sessions +setopt hist_ignore_space # Ignore commands that start with a space +setopt hist_ignore_dups # Ignore duplicate commands +setopt hist_ignore_all_dups # Ignore all duplicate commands +setopt hist_save_no_dups # Do not save duplicate commands +setopt hist_find_no_dups # Do not display duplicate commands + +# Key bindings +bindkey "^p" history-search-backward # Search backward in history +bindkey "^n" history-search-forward # Search forward in history + +# }}} + +# Completion ---------------------------------------------------------------- {{{ + +# Zsh allows command completion. +# The completion is very modifiable, here are some options +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' +zstyle ':completion:*:descriptions' format '%U%B%d%b%u' +zstyle ':completion:*:warnings' format '%BSorry, no results' +zstyle ':completion:*' menu select=2 +zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s +zstyle ':completion:*' list-colors '${(s.:.)LS_COLORS}' + +# Load bash completion functions +autoload -Uz +X compinit && compinit +autoload -Uz +X bashcompinit && bashcompinit + + # -q is for quiet; actually run all the `compdef's saved before `compinit` call +# (`compinit' declares the `compdef' function, so it cannot be used until +# `compinit' is ran; Zinit solves this via intercepting the `compdef'-calls and +# storing them for later use with `zinit cdreplay') +zinit cdreplay -q + +# }}} + +# }}} + +# User configuration ---------------------------------------------------------------- {{{ + +# Preferred editor for local and remote sessions +if [[ -n $SSH_CONNECTION ]]; then + export EDITOR='nvim' +else + export EDITOR='vim' +fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Aliases ---------------------------------------------------------------- {{{ + +# Set personal aliases +# For a full list of active aliases, run `alias`. +alias ls='lsd' +alias ll='ls -alF' +alias rm='rip' +alias cat='bat' +alias grep='rg' +alias find='fd -H' +alias sed='sd' +alias c='clear' +alias prolog='~/.config/scryer-prolog/target/release/scryer-prolog' # À remplacer par prolog='scryer-prolog' +alias csc='sudo cytech-site-change' +alias quit='exit' +alias compresse='echo "tar -cv [nomDuFichieràCompresser] -f [nomArchive].tar"' +alias maj='~/./miseajour.sh' +alias vi='\vim' +alias vim='nvim' + +# }}} + +# Allow zoxide to work and to replace cd +eval "$(zoxide init --cmd cd zsh)" + +# }}} diff --git a/private_dot_config/bat/config b/private_dot_config/bat/config new file mode 100644 index 0000000..507d118 --- /dev/null +++ b/private_dot_config/bat/config @@ -0,0 +1,25 @@ +# This is `bat`s configuration file. Each line either contains a comment or +# a command-line option that you want to pass to `bat` by default. You can +# run `bat --help` to get a list of all possible configuration options. + +# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` +# for a list of all available themes +--theme="gruvbox-dark" + +# Enable this to use italic text on the terminal. This is not supported on all +# terminal emulators (like tmux, by default): +--italic-text=always + +# Uncomment the following line to disable automatic paging: +--paging=never + +# Uncomment the following line if you are using less version >= 551 and want to +# enable mouse scrolling support in `bat` when running inside tmux. This might +# disable text selection, unless you press shift. +#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" + +# Syntax mappings: map a certain filename pattern to a language. +# Example 1: use the C++ syntax for Arduino .ino files +# Example 2: Use ".gitignore"-style highlighting for ".ignore" files +#--map-syntax "*.ino:C++" +#--map-syntax ".ignore:Git Ignore" diff --git a/private_dot_config/betterfox/user.js b/private_dot_config/betterfox/user.js new file mode 100644 index 0000000..c3febc3 --- /dev/null +++ b/private_dot_config/betterfox/user.js @@ -0,0 +1,287 @@ +// +/* You may copy+paste this file and use it as it is. + * + * If you make changes to your about:config while the program is running, the + * changes will be overwritten by the user.js when the application restarts. + * + * To make lasting changes to preferences, you will have to edit the user.js. + */ + +/**************************************************************************** + * Betterfox * + * "Ad meliora" * + * version: 126 * + * url: https://github.com/yokoffing/Betterfox * +****************************************************************************/ + +/**************************************************************************** + * SECTION: FASTFOX * +****************************************************************************/ +/** GENERAL ***/ +user_pref("content.notify.interval", 100000); + +/** GFX ***/ +user_pref("gfx.canvas.accelerated.cache-items", 4096); +user_pref("gfx.canvas.accelerated.cache-size", 512); +user_pref("gfx.content.skia-font-cache-size", 20); + +/** DISK CACHE ***/ +user_pref("browser.cache.jsbc_compression_level", 3); + +/** MEDIA CACHE ***/ +user_pref("media.memory_cache_max_size", 65536); +user_pref("media.cache_readahead_limit", 7200); +user_pref("media.cache_resume_threshold", 3600); + +/** IMAGE CACHE ***/ +user_pref("image.mem.decode_bytes_at_a_time", 32768); + +/** NETWORK ***/ +user_pref("network.http.max-connections", 1800); +user_pref("network.http.max-persistent-connections-per-server", 10); +user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5); +user_pref("network.http.pacing.requests.enabled", false); +user_pref("network.dnsCacheExpiration", 3600); +user_pref("network.ssl_tokens_cache_capacity", 10240); + +/** SPECULATIVE LOADING ***/ +user_pref("network.dns.disablePrefetch", true); +user_pref("network.dns.disablePrefetchFromHTTPS", true); +user_pref("network.prefetch-next", false); +user_pref("network.predictor.enabled", false); +user_pref("network.predictor.enable-prefetch", false); + +/** EXPERIMENTAL ***/ +user_pref("layout.css.grid-template-masonry-value.enabled", true); +user_pref("dom.enable_web_task_scheduling", true); +user_pref("dom.security.sanitizer.enabled", true); + +/**************************************************************************** + * SECTION: SECUREFOX * +****************************************************************************/ +/** TRACKING PROTECTION ***/ +user_pref("browser.contentblocking.category", "strict"); +user_pref("urlclassifier.trackingSkipURLs", "*.reddit.com, *.twitter.com, *.twimg.com, *.tiktok.com"); +user_pref("urlclassifier.features.socialtracking.skipURLs", "*.instagram.com, *.twitter.com, *.twimg.com"); +user_pref("network.cookie.sameSite.noneRequiresSecure", true); +user_pref("browser.download.start_downloads_in_tmp_dir", true); +user_pref("browser.helperApps.deleteTempFileOnExit", true); +user_pref("browser.uitour.enabled", false); +user_pref("privacy.globalprivacycontrol.enabled", true); + +/** OCSP & CERTS / HPKP ***/ +user_pref("security.OCSP.enabled", 0); +user_pref("security.remote_settings.crlite_filters.enabled", true); +user_pref("security.pki.crlite_mode", 2); + +/** SSL / TLS ***/ +user_pref("security.ssl.treat_unsafe_negotiation_as_broken", true); +user_pref("browser.xul.error_pages.expert_bad_cert", true); +user_pref("security.tls.enable_0rtt_data", false); + +/** DISK AVOIDANCE ***/ +user_pref("browser.privatebrowsing.forceMediaMemoryCache", true); +user_pref("browser.sessionstore.interval", 60000); + +/** SHUTDOWN & SANITIZING ***/ +user_pref("privacy.history.custom", true); + +/** SEARCH / URL BAR ***/ +user_pref("browser.search.separatePrivateDefault.ui.enabled", true); +user_pref("browser.urlbar.update2.engineAliasRefresh", true); +user_pref("browser.search.suggest.enabled", false); +user_pref("browser.urlbar.suggest.quicksuggest.sponsored", false); +user_pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); +user_pref("browser.formfill.enable", false); +user_pref("security.insecure_connection_text.enabled", true); +user_pref("security.insecure_connection_text.pbmode.enabled", true); +user_pref("network.IDN_show_punycode", true); + +/** HTTPS-FIRST POLICY ***/ +user_pref("dom.security.https_first", true); +user_pref("dom.security.https_first_schemeless", true); + +/** PASSWORDS ***/ +user_pref("signon.formlessCapture.enabled", false); +user_pref("signon.privateBrowsingCapture.enabled", false); +user_pref("network.auth.subresource-http-auth-allow", 1); +user_pref("editor.truncate_user_pastes", false); + +/** MIXED CONTENT + CROSS-SITE ***/ +user_pref("security.mixed_content.block_display_content", true); +user_pref("security.mixed_content.upgrade_display_content", true); +user_pref("security.mixed_content.upgrade_display_content.image", true); +user_pref("pdfjs.enableScripting", false); +user_pref("extensions.postDownloadThirdPartyPrompt", false); + +/** HEADERS / REFERERS ***/ +user_pref("network.http.referer.XOriginTrimmingPolicy", 2); + +/** CONTAINERS ***/ +user_pref("privacy.userContext.ui.enabled", true); + +/** WEBRTC ***/ +user_pref("media.peerconnection.ice.proxy_only_if_behind_proxy", true); +user_pref("media.peerconnection.ice.default_address_only", true); + +/** SAFE BROWSING ***/ +user_pref("browser.safebrowsing.downloads.remote.enabled", false); + +/** MOZILLA ***/ +user_pref("permissions.default.desktop-notification", 2); +user_pref("permissions.default.geo", 2); +user_pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); +user_pref("permissions.manager.defaultsUrl", ""); +user_pref("webchannel.allowObject.urlWhitelist", ""); + +/** TELEMETRY ***/ +user_pref("datareporting.policy.dataSubmissionEnabled", false); +user_pref("datareporting.healthreport.uploadEnabled", false); +user_pref("toolkit.telemetry.unified", false); +user_pref("toolkit.telemetry.enabled", false); +user_pref("toolkit.telemetry.server", "data:,"); +user_pref("toolkit.telemetry.archive.enabled", false); +user_pref("toolkit.telemetry.newProfilePing.enabled", false); +user_pref("toolkit.telemetry.shutdownPingSender.enabled", false); +user_pref("toolkit.telemetry.updatePing.enabled", false); +user_pref("toolkit.telemetry.bhrPing.enabled", false); +user_pref("toolkit.telemetry.firstShutdownPing.enabled", false); +user_pref("toolkit.telemetry.coverage.opt-out", true); +user_pref("toolkit.coverage.opt-out", true); +user_pref("toolkit.coverage.endpoint.base", ""); +user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false); +user_pref("browser.newtabpage.activity-stream.telemetry", false); + +/** EXPERIMENTS ***/ +user_pref("app.shield.optoutstudies.enabled", false); +user_pref("app.normandy.enabled", false); +user_pref("app.normandy.api_url", ""); + +/** CRASH REPORTS ***/ +user_pref("breakpad.reportURL", ""); +user_pref("browser.tabs.crashReporting.sendReport", false); +user_pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false); + +/** DETECTION ***/ +user_pref("captivedetect.canonicalURL", ""); +user_pref("network.captive-portal-service.enabled", false); +user_pref("network.connectivity-service.enabled", false); + +/**************************************************************************** + * SECTION: PESKYFOX * +****************************************************************************/ +/** MOZILLA UI ***/ +user_pref("browser.privatebrowsing.vpnpromourl", ""); +user_pref("extensions.getAddons.showPane", false); +user_pref("extensions.htmlaboutaddons.recommendations.enabled", false); +user_pref("browser.discovery.enabled", false); +user_pref("browser.shell.checkDefaultBrowser", false); +user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false); +user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false); +user_pref("browser.preferences.moreFromMozilla", false); +user_pref("browser.tabs.tabmanager.enabled", false); +user_pref("browser.aboutConfig.showWarning", false); +user_pref("browser.aboutwelcome.enabled", false); + +/** THEME ADJUSTMENTS ***/ +user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); +user_pref("browser.compactmode.show", true); +user_pref("browser.display.focus_ring_on_anything", true); +user_pref("browser.display.focus_ring_style", 0); +user_pref("browser.display.focus_ring_width", 0); +user_pref("layout.css.prefers-color-scheme.content-override", 2); +user_pref("browser.privateWindowSeparation.enabled", false); // WINDOWS + +/** COOKIE BANNER HANDLING ***/ +user_pref("cookiebanners.service.mode", 1); +user_pref("cookiebanners.service.mode.privateBrowsing", 1); + +/** FULLSCREEN NOTICE ***/ +user_pref("full-screen-api.transition-duration.enter", "0 0"); +user_pref("full-screen-api.transition-duration.leave", "0 0"); +user_pref("full-screen-api.warning.delay", -1); +user_pref("full-screen-api.warning.timeout", 0); + +/** URL BAR ***/ +user_pref("browser.urlbar.suggest.calculator", true); +user_pref("browser.urlbar.unitConversion.enabled", true); +user_pref("browser.urlbar.trending.featureGate", false); + +/** NEW TAB PAGE ***/ +user_pref("browser.newtabpage.activity-stream.feeds.topsites", false); +user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); + +/** POCKET ***/ +user_pref("extensions.pocket.enabled", false); + +/** DOWNLOADS ***/ +user_pref("browser.download.always_ask_before_handling_new_types", true); +user_pref("browser.download.manager.addToRecentDocs", false); + +/** PDF ***/ +user_pref("browser.download.open_pdf_attachments_inline", true); + +/** TAB BEHAVIOR ***/ +user_pref("browser.bookmarks.openInTabClosesMenu", false); +user_pref("browser.menu.showViewImageInfo", true); +user_pref("findbar.highlightAll", true); +user_pref("layout.word_select.eat_space_to_next_word", false); + +/**************************************************************************** + * START: MY OVERRIDES * +****************************************************************************/ +// visit https://github.com/yokoffing/Betterfox/wiki/Common-Overrides +// visit https://github.com/yokoffing/Betterfox/wiki/Optional-Hardening +// Enter your personal overrides below this line: + +// PREF: restore login manager +user_pref("signon.rememberSignons", true); + +// PREF: allow websites to ask you for your location +user_pref("permissions.default.geo", 0); + +// PREF: restore search engine suggestions +user_pref("browser.search.suggest.enabled", true); + +// PREF: enable HTTPS-Only Mode +// Warn me before loading sites that don't support HTTPS +// in both Normal and Private Browsing windows. +user_pref("dom.security.https_only_mode", true); +user_pref("dom.security.https_only_mode_error_page_user_suggestions", true); + +// PREF: do not save extra session data such as form content, +// scrollbar positions, and POST data after crashes or restarts +user_pref("browser.sessionstore.privacy_level", 2); + +// PREF: delete cookies, cache, and site data on shutdown +user_pref("privacy.sanitize.sanitizeOnShutdown", true); +user_pref("privacy.clearOnShutdown.cache", true); +user_pref("privacy.clearOnShutdown.cookies", true); +user_pref("privacy.clearOnShutdown.offlineApps", true); + +// PREF: set DoH provider +user_pref("network.trr.uri", ""); + +// PREF: enforce DNS-over-HTTPS (DoH) +user_pref("network.trr.mode", 3); +user_pref("network.dns.skipTRR-when-parental-control-enabled", false); + +// PREF: disable all DRM content +user_pref("media.eme.enabled", false); + +// PREF: hide the setting; this also disables the DRM prompt (optional) +user_pref("browser.eme.ui.enabled", false); + +// PREF: require safe SSL negotiation +// [ERROR] SSL_ERROR_UNSAFE_NEGOTIATION +user_pref("security.ssl.require_safe_negotiation", true); + +/**************************************************************************** + * SECTION: SMOOTHFOX * +****************************************************************************/ +// visit https://github.com/yokoffing/Betterfox/blob/main/Smoothfox.js +// Enter your scrolling overrides below this line: + +/**************************************************************************** + * END: BETTERFOX * +****************************************************************************/ diff --git a/private_dot_config/dunst/dunstrc b/private_dot_config/dunst/dunstrc new file mode 100644 index 0000000..890d205 --- /dev/null +++ b/private_dot_config/dunst/dunstrc @@ -0,0 +1,68 @@ +[global] + monitor = 0 + follow = mouse + width = 300 + height = 300 + origin = top-right + offset = 10x50 + scale = 0 + notification_limit = 0 + progress_bar = true + progress_bar_height = 10 + progress_bar_frame_width = 1 + progress_bar_min_width = 150 + progress_bar_max_width = 300 + indicate_hidden = yes + transparency = 0 + separator_height = 2 + padding = 8 + horizontal_padding = 8 + text_icon_padding = 0 + frame_width = 2 + frame_color = "#504945" + separator_color = frame + sort = yes + font = JetBrainsMono Nerd Font 11 + line_height = 0 + markup = full + format = "%s\n%b" + alignment = left + vertical_alignment = center + show_age_threshold = 60 + ellipsize = middle + ignore_newline = no + stack_duplicates = true + hide_duplicate_count = false + show_indicators = yes + icon_position = left + min_icon_size = 0 + max_icon_size = 32 + icon_path = /usr/share/icons/Papirus-Dark/16x16/status/:/usr/share/icons/Papirus-Dark/16x16/devices/ + sticky_history = yes + history_length = 20 + browser = /usr/bin/firefox -new-tab + always_run_script = true + title = Dunst + class = Dunst + corner_radius = 8 + ignore_dbusclose = false + force_xinerama = false + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +[urgency_low] + background = "#282828" + foreground = "#ebdbb2" + timeout = 10 + +[urgency_normal] + background = "#3c3836" + foreground = "#ebdbb2" + timeout = 10 + +[urgency_critical] + background = "#cc241d" + foreground = "#ebdbb2" + frame_color = "#fb4934" + timeout = 0 diff --git a/private_dot_config/eww/eww.scss b/private_dot_config/eww/eww.scss new file mode 100644 index 0000000..259ae76 --- /dev/null +++ b/private_dot_config/eww/eww.scss @@ -0,0 +1,186 @@ +/* ~/.config/eww/eww.scss */ + +/* Variables pour les couleurs Gruvbox */ +$bg0: rgba(40, 40, 40, 0.95); +$bg1: rgba(60, 56, 54, 0.8); +$bg2: rgba(80, 73, 69, 0.8); +$fg: #ebdbb2; +$green: #98971a; +$bright-green: #b8bb26; +$red: #cc241d; +$bright-red: #fb4934; +$blue: #458588; +$purple: #b16286; +$aqua: #689d6a; +$orange: #d65d0e; + +/* Styles de base pour le centre de contrôle */ +.control-center { + background-color: $bg0; + border: 2px solid $bg2; + border-radius: 12px; + padding: 1.5rem; + color: $fg; + animation: slide-in 200ms ease-out; +} + +/* En-tête du centre de contrôle */ +.header { + margin-bottom: 1rem; + font-size: 1.2rem; + font-weight: bold; + + .close-button { + margin-left: auto; + padding: 0 8px; + border-radius: 6px; + background: transparent; + color: $fg; + font-size: 1.4rem; + + &:hover { + background: $red; + color: $bg0; + } + } +} + +/* Styles communs pour toutes les sections */ +.section { + background: $bg1; + border-radius: 10px; + padding: 1rem; + margin-bottom: 1rem; +} + +/* Section des curseurs */ +.sliders-box { + .slider { + margin: 0.5rem 0; + + .icon { + min-width: 2rem; + margin-right: 1rem; + font-size: 1.2rem; + color: $fg; + + &.muted { + color: $red; + } + } + + scale { + min-width: 180px; + min-height: 20px; + + trough { + background: $bg2; + border-radius: 6px; + min-height: 6px; + + highlight { + background: $green; + border-radius: 6px; + } + } + + &:hover trough highlight { + background: $bright-green; + } + } + } +} + +/* Section des toggles rapides */ +.toggles-box { + .toggle { + background: $bg2; + min-width: 3rem; + min-height: 3rem; + border-radius: 8px; + font-size: 1.3rem; + transition: all 200ms ease; + + &:hover { + background: darken($bg2, 10%); + } + + &.active { + background: $green; + color: $bg0; + + &:hover { + background: $bright-green; + } + } + } +} + +/* Section d'information système */ +.system-info { + .system-info-item { + margin: 0.5rem 0; + + .icon { + min-width: 2rem; + font-size: 1.2rem; + } + + label { + margin-right: 1rem; + } + + .progress-bar { + min-width: 100px; + + trough { + background: $bg2; + border-radius: 4px; + min-height: 6px; + + progress { + background: $green; + border-radius: 4px; + } + } + } + + /* Couleurs progressives basées sur les classes */ + &.high progress { + background: $red; + } + + &.medium progress { + background: $orange; + } + } +} + +/* Animation d'entrée du panneau */ +@keyframes slide-in { + from { + opacity: 0; + transform: translateY(-10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +/* Animation pour les transitions d'état des boutons */ +.toggle, .close-button { + transition: all 200ms ease; +} + +/* Style des tooltips */ +tooltip { + background: $bg0; + border: 1px solid $bg2; + border-radius: 6px; + + label { + color: $fg; + padding: 4px 8px; + } +} diff --git a/private_dot_config/eww/eww.yuck b/private_dot_config/eww/eww.yuck new file mode 100644 index 0000000..ca3c387 --- /dev/null +++ b/private_dot_config/eww/eww.yuck @@ -0,0 +1,113 @@ +;; Définition de la fenêtre principale +(defwindow control_center + :monitor 0 + :geometry (geometry :x "8px" + :y "42px" + :width "280px" + :height "400px" + :anchor "top right") + :stacking "fg" + :exclusive false + (control_center_widget)) + +;; Widget principal qui organise tous nos contrôles +(defwidget control_center_widget [] + (box :class "control-center" + :orientation "v" + :space-evenly false + + ;; En-tête avec le titre + (box :class "header" + :orientation "h" + :space-evenly false + (label :text "Control Center") + (button :onclick "eww close control_center" + :class "close-button" + "×")) + + ;; Section des curseurs + (box :class "section sliders-box" + :orientation "v" + :spacing 10 + (volume-slider) + (brightness-slider)) + + ;; Section d'information système + (box :class "section system-info" + :orientation "v" + :spacing 5 + (cpu-info) + (memory-info) + (battery-info)))) + +;; Widgets individuels pour chaque contrôle +(defwidget volume-slider [] + (box :class "slider" + :orientation "h" + :space-evenly false + (button :onclick "pactl set-sink-mute @DEFAULT_SINK@ toggle" + :class "icon ${volume-muted ? 'muted' : ''}" + {volume-muted ? "󰝟" : "󰕾"}) + (scale :min 0 + :max 101 + :value volume + :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"))) + +(defwidget brightness-slider [] + (box :class "slider" + :orientation "h" + :space-evenly false + (label :class "icon" :text "") + (scale :min 0 + :max 101 + :value brightness + :onchange "brightnessctl set {}%"))) + +(defwidget cpu-info [] + (box :class "system-info-item" + :orientation "h" + :space-evenly false + (label :class "icon" :text "󰻠") + (label :text "CPU: ${cpu}%") + (progress :value cpu + :class "progress-bar"))) + +(defwidget memory-info [] + (box :class "system-info-item" + :orientation "h" + :space-evenly false + (label :class "icon" :text "󰍛") + (label :text "RAM: ${memory}%") + (progress :value memory + :class "progress-bar"))) + +(defwidget battery-info [] + (box :class "system-info-item" + :orientation "h" + :space-evenly false + (label :class "icon" :text {battery-icon}) + (label :text "Battery: ${battery}%") + (progress :value battery + :class "progress-bar"))) + +;; Variables pour les écouteurs d'événements +(deflisten volume :initial "0" + "scripts/get-volume.sh") + +(deflisten volume-muted :initial "false" + "scripts/get-mute-state.sh") + +(deflisten brightness :initial "0" + "scripts/get-brightness.sh") + +(deflisten cpu :initial "0" + "scripts/get-cpu.sh") + +(deflisten memory :initial "0" + "scripts/get-memory.sh") + +(deflisten battery :initial "0" + "scripts/get-battery.sh") + +(deflisten battery-icon :initial "" + "scripts/get-battery-icon.sh")" diff --git a/private_dot_config/eww/scripts/get-battery-icon.sh b/private_dot_config/eww/scripts/get-battery-icon.sh new file mode 100755 index 0000000..8a634aa --- /dev/null +++ b/private_dot_config/eww/scripts/get-battery-icon.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Détermine l'icône de batterie appropriée + +while true; do + capacity=$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "0") + status=$(cat /sys/class/power_supply/BAT0/status 2>/dev/null || echo "Unknown") + + if [ "$status" = "Charging" ]; then + echo "󰂄" + elif [ $capacity -ge 90 ]; then + echo "" + elif [ $capacity -ge 70 ]; then + echo "" + elif [ $capacity -ge 40 ]; then + echo "" + elif [ $capacity -ge 20 ]; then + echo "" + else + echo "" + fi + sleep 5 +done diff --git a/private_dot_config/eww/scripts/get-battery.sh b/private_dot_config/eww/scripts/get-battery.sh new file mode 100755 index 0000000..741bfcf --- /dev/null +++ b/private_dot_config/eww/scripts/get-battery.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Surveille le niveau de batterie + +while true; do + # Récupère le pourcentage de batterie + cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "0" + sleep 5 +done diff --git a/private_dot_config/eww/scripts/get-brightness.sh b/private_dot_config/eww/scripts/get-brightness.sh new file mode 100755 index 0000000..bd029d5 --- /dev/null +++ b/private_dot_config/eww/scripts/get-brightness.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Surveille la luminosité de l'écran + +while true; do + # Récupère le pourcentage de luminosité actuel + brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}' + sleep 0.5 +done diff --git a/private_dot_config/eww/scripts/get-cpu.sh b/private_dot_config/eww/scripts/get-cpu.sh new file mode 100755 index 0000000..f1f5900 --- /dev/null +++ b/private_dot_config/eww/scripts/get-cpu.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Surveille l'utilisation du CPU + +while true; do + # Calcule l'utilisation CPU moyenne + top -bn1 | grep "Cpu(s)" | awk '{print int($2 + $4)}' + sleep 1 +done diff --git a/private_dot_config/eww/scripts/get-memory.sh b/private_dot_config/eww/scripts/get-memory.sh new file mode 100755 index 0000000..813a502 --- /dev/null +++ b/private_dot_config/eww/scripts/get-memory.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Surveille l'utilisation de la mémoire + +while true; do + # Calcule le pourcentage de mémoire utilisée + free | grep Mem | awk '{print int($3/$2 * 100)}' + sleep 1 +done diff --git a/private_dot_config/eww/scripts/get-mute-state.sh b/private_dot_config/eww/scripts/get-mute-state.sh new file mode 100755 index 0000000..86807db --- /dev/null +++ b/private_dot_config/eww/scripts/get-mute-state.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Surveille l'état muet de l'audio + +while true; do + # Renvoie "true" si le son est coupé, "false" sinon + pactl get-sink-mute @DEFAULT_SINK@ | grep -q "yes" && echo "true" || echo "false" + sleep 0.5 +done diff --git a/private_dot_config/eww/scripts/get-volume.sh b/private_dot_config/eww/scripts/get-volume.sh new file mode 100755 index 0000000..f8b1ab5 --- /dev/null +++ b/private_dot_config/eww/scripts/get-volume.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Ce script surveille en continu le niveau du volume + +while true; do + # Récupère le volume actuel en pourcentage, supprime le symbole % + pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1 + sleep 0.5 +done diff --git a/private_dot_config/fish/config.fish b/private_dot_config/fish/config.fish new file mode 100644 index 0000000..4741893 --- /dev/null +++ b/private_dot_config/fish/config.fish @@ -0,0 +1,63 @@ +set fish_greeting + +# Plugins installation and configuration +# The fish_inclusion variable is used to avoid multiple inclusions of the plugins +# because of the fish configuration file being sourced every time fisher is called +# Everithing related to the plugins must be in the if block +if not set -q fish_inclusion + + set -U fish_inclusion 1 + + function install_fisher_plugin + set -l plugin_path $argv[1] + set -l plugin_name $argv[2] + + if not test -e $plugin_path + if test $plugin_name = "jorgebucaran/fisher" + # Install Fisher + curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install $plugin_name + else + fisher install $plugin_name + end + end + end + + install_fisher_plugin ~/.config/fish/functions/fisher.fish jorgebucaran/fisher + install_fisher_plugin ~/.config/fish/functions/theme_gruvbox.fish jomik/fish-gruvbox # Gruvbox theme for bg and fg + install_fisher_plugin ~/.config/fish/conf.d/gruvbox.fish sujaybokil/fish-gruvbox # Gruvbox theme for syntax highlighting + install_fisher_plugin ~/.config/fish/conf.d/autopair.fish jorgebucaran/autopair.fish + install_fisher_plugin ~/.config/fish/conf.d/sponge.fish meaningful-ooo/sponge + install_fisher_plugin ~/.config/fish/conf.d/abbr_tips.fish gazorby/fish-abbreviation-tips + + theme_gruvbox dark soft + + set sponge_regex_patterns '^\s+.*' + set sponge_allow_previously_successful true + + set -eU fish_inclusion +end + + +# Set personal aliases +# For a full list of active aliases, run `alias`. +alias ls='lsd' +alias ll='ls -alF' +alias rm='rip' +alias cat='bat' +alias grep='rg' +alias find='fd -H' +alias sed='sd' +alias c='clear' +alias prolog='~/.config/scryer-prolog/target/release/scryer-prolog' # À remplacer par prolog='scryer-prolog' +alias csc='sudo cytech-site-change' +alias quit='exit' +alias compresse='echo "tar -cv [nomDuFichieràCompresser] -f [nomArchive].tar"' +alias maj='~/./miseajour.sh' +alias vi='/usr/sbin/vim' +alias vim='nvim' + +# Set the Oh-My-Posh prompt +oh-my-posh init fish --config $HOME/.config/ohmyposh/prompt.json | source + +# Allow zoxide to work and to replace cd +zoxide init --cmd cd fish | source diff --git a/private_dot_config/gtk-3.0/settings.ini b/private_dot_config/gtk-3.0/settings.ini new file mode 100644 index 0000000..5c38e34 --- /dev/null +++ b/private_dot_config/gtk-3.0/settings.ini @@ -0,0 +1,16 @@ +[Settings] +gtk-theme-name=Gruvbox-Material-Dark +gtk-icon-theme-name=Gruvbox-Material-Dark +gtk-font-name=JetBrainsMono Nerd Font 11 +gtk-cursor-theme-name=Bibata-Modern-Classic +gtk-cursor-theme-size=24 +gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=0 +gtk-enable-input-feedback-sounds=0 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintslight +gtk-xft-rgba=rgb diff --git a/private_dot_config/hypr/env.conf b/private_dot_config/hypr/env.conf new file mode 100644 index 0000000..74484d1 --- /dev/null +++ b/private_dot_config/hypr/env.conf @@ -0,0 +1,11 @@ +# GTK theme +env = GTK_THEME,Gruvbox-Material-Dark +env = XCURSOR_THEME,Bibata-Modern-Classic +env = XCURSOR_SIZE,24 + +# Qt theme +env = QT_QPA_PLATFORMTHEME,qt5ct +env = QT_QPA_PLATFORM,wayland +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 + +env = KITTY_ENABLE_WAYLAND,1 diff --git a/private_dot_config/hypr/hyprland.conf b/private_dot_config/hypr/hyprland.conf new file mode 100644 index 0000000..34e2d9f --- /dev/null +++ b/private_dot_config/hypr/hyprland.conf @@ -0,0 +1,99 @@ +input { + kb_layout = fr + repeat_rate = 50 + repeat_delay = 300 + + follow_mouse = 1 + touchpad { + natural_scroll = yes + } + + sensitivity = -0.3 # -1.0 - 1.0, 0 means no modification. + accel_profile = flat +} + +# Gruvbox variables +$bg = rgb(282828) +$bg1 = rgb(3c3836) +$bg2 = rgb(504945) +$fg = rgb(ebdbb2) +$red = rgb(cc241d) +$green = rgb(98971a) +$yellow = rgb(d79921) +$blue = rgb(458588) +$purple = rgb(b16286) +$aqua = rgb(689d6a) +$orange = rgb(d65d0e) + +# Monitor configuration +monitor=,preferred,auto,1 + +# General configuration +general { + gaps_in = 5 + gaps_out = 10 + border_size = 2 + col.active_border = $green $blue 45deg + col.inactive_border = $bg2 + layout = dwindle +} + +# Window decoration +decoration { + rounding = 8 + active_opacity = 1.0 + inactive_opacity = 0.95 + blur { + enabled = true + size = 5 + passes = 2 + new_optimizations = true + } +} + +# Animations +animations { + enabled = true + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +# Layout +dwindle { + pseudotile = true + preserve_split = true +} + +misc { + disable_splash_rendering = true + disable_hyprland_logo = true +} + +# Basic workspaces configuration +workspace=1,default:true +workspace=2 +workspace=3 +workspace=4 +workspace=5 +workspace=HDMI-A-1,6 +workspace=HDMI-A-1,7 +workspace=HDMI-A-1,8 +workspace=HDMI-A-1,9 +workspace=HDMI-A-1,0 + +# Window rules +windowrule = float, ^(pavucontrol)$ +windowrule = float, ^(nm-connection-editor)$ +windowrule = float, ^(rofi)$ + +# Autostart +exec-once = waybar +exec-once = hyprpaper +exec-once = dunst + +source = ~/.config/hypr/keybindings.conf +source = ~/.config/hypr/env.conf diff --git a/private_dot_config/hypr/hyprpaper.conf b/private_dot_config/hypr/hyprpaper.conf new file mode 100644 index 0000000..958890d --- /dev/null +++ b/private_dot_config/hypr/hyprpaper.conf @@ -0,0 +1,11 @@ +# Preloading wallpapers +preload = ~/.wallpapers/empire.png + +# Per monitor configuration +wallpaper = ,~/.wallpapers/empire.png + +# Enable IPC mode +ipc = true + +# Disable splash screen +splash = false diff --git a/private_dot_config/hypr/keybindings.conf b/private_dot_config/hypr/keybindings.conf new file mode 100644 index 0000000..efba949 --- /dev/null +++ b/private_dot_config/hypr/keybindings.conf @@ -0,0 +1,37 @@ +$mainMod = SUPER # windows key + +# Workspace actions +bind = ALT, TAB, workspace, e+1 +bind = ALT SHIFT, TAB, workspace, e-1 +bind = $mainMod, TAB, workspace, r+1 +bind = $mainMod SHIFT, TAB, workspace, r-1 +bind = $mainMod, return, workspace, empty + +# Window/Session actions +bind = $mainMod, Q, killactive +bind = $mainMod, return, fullscreen +bind = $mainMod, L, exec, swaylock + +# Application shortcuts +bind = $mainMod, T, exec, kitty +bind = $mainMod, E, exec, dolphin +bind = $mainMod, F, exec, firefox + +# Move focus with ALT + WASD +bind = ALT, Q, movefocus, l +bind = ALT, D, movefocus, r +bind = ALT, Z, movefocus, u +bind = ALT, S, movefocus, d + +# Resize windows +binde = $mainMod SHIFT, right, resizeactive, 30 0 +binde = $mainMod SHIFT, left, resizeactive, -30 0 +binde = $mainMod SHIFT, up, resizeactive, 0 -30 +binde = $mainMod SHIFT, down, resizeactive, 0 30 + +# Move/Resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Trigger when the switch is turning off +bindl= , switch:on:Lid Switch, exec, swaylock && systemctl suspend diff --git a/private_dot_config/kitty/kitty.conf b/private_dot_config/kitty/kitty.conf new file mode 100644 index 0000000..c5ded03 --- /dev/null +++ b/private_dot_config/kitty/kitty.conf @@ -0,0 +1,1472 @@ +# vim:fileencoding=utf-8:ft=conf:foldmethod=marker + +#: Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +font_family JetBrainsMono Nerd Font +bold_font auto +italic_font auto +bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. To get a full list of supported fonts use the `kitty +#: list-fonts` command. By default they are derived automatically, by +#: the OSes font system. Setting them manually is useful for font +#: families that have many weight variants like Book, Medium, Thick, +#: etc. For example:: + +#: font_family Operator Mono Book +#: bold_font Operator Mono Medium +#: italic_font Operator Mono Book Italic +#: bold_italic_font Operator Mono Medium Italic + +font_size 13.0 + +#: Font size (in pts) + +force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the the string been LTR. For example, assuming the Hebrew word +#: ירושלים, selecting the character that on the screen appears to be ם +#: actually writes into the selection buffer the character י. kitty's +#: default behavior is useful in conjunction with a filter to reverse +#: the word order, however, if you wish to manipulate RTL glyphs, it +#: can be very challenging to work with, so this option is provided to +#: turn it off. Furthermore, this option can be used with the command +#: line program GNU FriBidi +#: to get BIDI +#: support, because it will force kitty to always treat the text as +#: LTR, which FriBidi expects for terminals. + +adjust_line_height 0 +adjust_column_width 0 + +#: Change the size of each character cell kitty renders. You can use +#: either numbers, which are interpreted as pixels or percentages +#: (number followed by %), which are interpreted as percentages of the +#: unmodified values. You can use negative pixels or percentages less +#: than 100% to reduce sizes (but this might cause rendering +#: artifacts). + +adjust_baseline 0 + +#: Adjust the vertical alignment of text (the height in the cell at +#: which text is positioned). You can use either numbers, which are +#: interpreted as pixels or a percentages (number followed by %), +#: which are interpreted as the percentage of the line height. A +#: positive value moves the baseline up, and a negative value moves +#: them down. The underline and strikethrough positions are adjusted +#: accordingly. + +symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 JetBrainsMono Nerd Font + +#: Map the specified unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each unicode code +#: point is specified in the form U+. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. symbol_map itself can be specified multiple +#: times. Syntax is:: + +#: symbol_map codepoints Font Family Name + +disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features setting. + +# font_features none + +#: Choose exactly which OpenType features to enable or disable. This +#: is useful as some fonts might have features worthwhile in a +#: terminal. For example, Fira Code Retina includes a discretionary +#: feature, zero, which in that font changes the appearance of the +#: zero (0), to make it more easily distinguishable from Ø. Fira Code +#: Retina also includes other discretionary features known as +#: Stylistic Sets which have the tags ss01 through ss20. + +#: For the exact syntax to use for individual features, see the +#: Harfbuzz documentation . + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, these are read from the FontConfig database first and +#: then this, setting is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use kitty + list-fonts +#: --psnames: + +#: .. code-block:: sh + +#: $ kitty + list-fonts --psnames | grep Fira +#: Fira Code +#: Fira Code Bold (FiraCode-Bold) +#: Fira Code Light (FiraCode-Light) +#: Fira Code Medium (FiraCode-Medium) +#: Fira Code Regular (FiraCode-Regular) +#: Fira Code Retina (FiraCode-Retina) + +#: The part in brackets is the PostScript name. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero:: + +#: font_features FiraCode-Retina +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +box_drawing_scale 0.001, 1, 1.5, 2 + +#: Change the sizes of the lines used for the box drawing unicode +#: characters These values are in pts. They will be scaled by the +#: monitor DPI to arrive at a pixel value. There must be four values +#: corresponding to thin, normal, thick, and very thick lines. + +#: }}} + +#: Cursor customization {{{ + +cursor #cccccc + +#: Default cursor color + +cursor_text_color #111111 + +#: Choose the color of text under the cursor. If you want it rendered +#: with the background color of the cell underneath instead, use the +#: special keyword: background + +cursor_shape block + +#: The cursor shape can be one of (block, beam, underline). Note that +#: when reloading the config this will be changed only if the cursor +#: shape has not been set by the program running in the terminal. + +cursor_beam_thickness 1.5 + +#: Defines the thickness of the beam cursor (in pts) + +cursor_underline_thickness 2.0 + +#: Defines the thickness of the underline cursor (in pts) + +cursor_blink_interval -1 + +#: The interval (in seconds) at which to blink the cursor. Set to zero +#: to disable blinking. Negative values mean use system default. Note +#: that numbers smaller than repaint_delay will be limited to +#: repaint_delay. + +cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. + +#: }}} + +#: Scrollback {{{ + +scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position. + +scrollback_pager_history_size 0 + +#: Separate scrollback history size, used only for browsing the +#: scrollback buffer (in MB). This separate buffer is not available +#: for interactive scrolling but will be piped to the pager program +#: when viewing scrollback buffer in a separate window. The current +#: implementation stores the data in UTF-8, so approximatively 10000 +#: lines per megabyte at 100 chars per line, for pure ASCII text, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +scrollback_fill_enlarged_window no + +#: Fill new space with lines from the scrollback buffer after +#: enlarging a window. + +wheel_scroll_multiplier 5.0 + +#: Modify the amount scrolled by the mouse wheel. Note this is only +#: used for low precision scrolling devices, not for high precision +#: scrolling on platforms such as macOS and Wayland. Use negative +#: numbers to change scroll direction. + +touch_scroll_multiplier 1.0 + +#: Modify the amount scrolled by a touchpad. Note this is only used +#: for high precision scrolling devices on platforms such as macOS and +#: Wayland. Use negative numbers to change scroll direction. + +#: }}} + +#: Mouse {{{ + +mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +url_color #0087bd +url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, single, double, curly + +open_url_with default + +#: The program with which to open URLs that are clicked on. The +#: special value default means to use the operating system's default +#: URL handler. + +url_prefixes http https file ftp gemini irc gopher mailto news git + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. + +url_excluded_characters + +#: Additional characters to be disallowed from URLs, when detecting +#: URLs under the mouse cursor. By default, all characters legal in +#: URLs are allowed. + +copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, simply selecting text with the mouse will cause the text +#: to be copied to clipboard. Useful on platforms such as macOS that +#: do not have the concept of primary selections. You can instead +#: specify a name such as a1 to copy to a private kitty buffer +#: instead. Map a shortcut with the paste_from_buffer action to paste +#: from this private buffer. For example:: + +#: map cmd+shift+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. always will always do it. + +select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the unicode database will be matched. + +click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around + +pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. Valid values are: arrow, beam and hand + +default_pointer_shape beam + +#: The default shape of the mouse pointer. Valid values are: arrow, +#: beam and hand + +pointer_shape_when_dragging beam + +#: The default shape of the mouse pointer when dragging across text. +#: Valid values are: arrow, beam and hand + +#: Mouse actions {{{ + +#: Mouse buttons can be remapped to perform arbitrary actions. The +#: syntax for doing so is: + +#: .. code-block:: none + +#: mouse_map button-name event-type modes action + +#: Where ``button-name`` is one of ``left``, ``middle``, ``right`` or +#: ``b1 ... b8`` with added keyboard modifiers, for example: +#: ``ctrl+shift+left`` refers to holding the ctrl+shift keys while +#: clicking with the left mouse button. The number ``b1 ... b8`` can +#: be used to refer to upto eight buttons on a mouse. + +#: ``event-type`` is one ``press``, ``release``, ``doublepress``, +#: ``triplepress``, ``click`` and ``doubleclick``. ``modes`` +#: indicates whether the action is performed when the mouse is grabbed +#: by the program running in the terminal, or not. It can have one or +#: more or the values, ``grabbed,ungrabbed``. ``grabbed`` refers to +#: when the program running in the terminal has requested mouse +#: events. Note that the click and double click events have a delay of +#: click_interval to disambiguate from double and triple presses. + +#: You can run kitty with the kitty --debug-input command line option +#: to see mouse events. See the builtin actions below to get a sense +#: of what is possible. + +#: If you want to unmap an action map it to ``no-op``. For example, to +#: disable opening of URLs with a plain click:: + +#: mouse_map left click ungrabbed no-op + +#: .. note:: +#: Once a selection is started, releasing the button that started it will +#: automatically end it and no release event will be dispatched. + +mouse_map left click ungrabbed mouse_click_url_or_select +mouse_map shift+left click grabbed,ungrabbed mouse_click_url_or_select +mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_click_url + +#: Variant with ctrl+shift is present because the simple click based +#: version has an unavoidable delay of click_interval, to disambiguate +#: clicks from double clicks. + +mouse_map ctrl+shift+left press grabbed discard_event + +#: Prevent this press event from being sent to the program that has +#: grabbed the mouse, as the corresponding release event is used to +#: open a URL. + +mouse_map middle release ungrabbed paste_from_selection +mouse_map left press ungrabbed mouse_selection normal +mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle +mouse_map left doublepress ungrabbed mouse_selection word +mouse_map left triplepress ungrabbed mouse_selection line + +#: Select the entire line + +mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point + +#: Select from the clicked point to the end of the line + +mouse_map right press ungrabbed mouse_selection extend +mouse_map shift+middle release ungrabbed,grabbed paste_selection +mouse_map shift+left press ungrabbed,grabbed mouse_selection normal +mouse_map shift+ctrl+alt+left press ungrabbed,grabbed mouse_selection rectangle +mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word +mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line + +#: Select the entire line + +mouse_map shift+ctrl+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point + +#: Select from the clicked point to the end of the line + +mouse_map shift+right press ungrabbed,grabbed mouse_selection extend +#: }}} + +#: }}} + +#: Performance tuning {{{ + +repaint_delay 10 + +#: Delay (in milliseconds) between screen updates. Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS you have to either +#: set sync_to_monitor to no or use a monitor with a high refresh +#: rate. Also, to minimize latency when there is pending input to be +#: processed, repaint_delay is ignored. + +input_delay 3 + +#: Delay (in milliseconds) before input from the program running in +#: the terminal is processed. Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. + +sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents tearing (https://en.wikipedia.org/wiki/Screen_tearing) +#: when scrolling. However, it limits the rendering speed to the +#: refresh rate of your monitor. With a very high speed mouse/high +#: keyboard repeat rate, you may notice some slight input latency. If +#: so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +enable_audio_bell yes + +#: Enable/disable the audio bell. Useful in environments that require +#: silence. + +visual_bell_duration 0.0 + +#: Visual bell duration. Flash the screen when a bell occurs for the +#: specified number of seconds. Set to zero to disable. + +window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on linux. + +bell_on_tab yes + +#: Show a bell symbol on the tab if a bell occurs in one of the +#: windows in the tab and the window is not the currently focused +#: window + +command_on_bell none + +#: Program to run when a bell occurs. + +#: }}} + +#: Window layout {{{ + +remember_window_size no +initial_window_width 800 +initial_window_height 500 + +#: If enabled, the window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the https://sw.kovidgoyal.net/kitty/index.html#layouts. + +window_resize_step_cells 2 +window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing windows. The cells value is used for horizontal resizing +#: and the lines value for vertical resizing. + +window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified the unit is assumed to +#: be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: minimum needed borders for inactive windows are drawn. That is only +#: the borders that separate the inactive window from a neighbor. Note +#: that setting a non-zero window margin overrides this and causes all +#: borders to be drawn. + +window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +single_window_margin_width -1 + +#: The window margin (in pts) to use when only a single window is +#: visible. Negative values will cause the value of +#: window_margin_width to be used instead. A single value sets all +#: four sides. Two values set the vertical and horizontal sides. Three +#: values set top, horizontal and bottom. Four values set top, right, +#: bottom and left. + +window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be on +#: only the bottom and right edges. + +active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +inactive_border_color #cccccc + +#: The color for the border of inactive windows + +bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred + +inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +hide_window_decorations yes + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only can be used to only hide the titlebar. +#: Whether this works and exactly what effect it has depends on the +#: window manager/operating system. Note that the effects of changing +#: this setting when reloading config are undefined. + +resize_debounce_time 0.1 + +#: The time (in seconds) to wait before redrawing the screen when a +#: resize event is received. On platforms such as macOS, where the +#: operating system sends events corresponding to the start and end of +#: a resize, this number is ignored. + +resize_draw_strategy static + +#: Choose how kitty draws a window while a resize is in progress. A +#: value of static means draw the current window contents, mostly +#: unchanged. A value of scale means draw the current window contents +#: scaled. A value of blank means draw a blank window. A value of size +#: means show the window size in cells. + +resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with an +#: initial_window_width and initial_window_height in number of cells, +#: this option can be used to keep the margins as small as possible +#: when resizing the OS window. Note that this does not currently work +#: on Wayland. + +confirm_os_window_close 0 + +#: Ask for confirmation when closing an OS window or a tab that has at +#: least this number of kitty windows in it. A value of zero disables +#: confirmation. This confirmation also applies to requests to quit +#: the entire application (all OS windows, via the quit action). + +#: }}} + +#: Tab bar {{{ + +tab_bar_edge bottom + +#: Which edge to show the tab bar on, top or bottom + +tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts) + +tab_bar_margin_height 0.0 0.0 + +#: The margin above and below the tab bar (in pts). The first number +#: is the margin between the edge of the OS Window and the tab bar and +#: the second number is the margin between the tab bar and the +#: contents of the current tab. + +tab_bar_style fade + +#: The tab bar style, can be one of: fade, separator, powerline, or +#: hidden. In the fade style, each tab's edges fade into the +#: background color, in the separator style, tabs are separated by a +#: configurable separator, and the powerline shows the tabs as a +#: continuous line. If you use the hidden style, you might want to +#: create a mapping for the select_tab action which presents you with +#: a list of tabs and allows for easy switching to a tab. + +tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown + +tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +tab_powerline_style angled + +#: The powerline separator style between tabs in the tab bar when +#: using powerline as the tab_bar_style, can be one of: angled, +#: slanted, or round. + +tab_activity_symbol none + +#: Some text or a unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. + +tab_title_template "{title}" + +#: A template to render the tab title. The default just renders the +#: title. If you wish to include the tab-index as well, use something +#: like: {index}: {title}. Useful if you have shortcuts mapped for +#: goto_tab N. If you prefer to see the index as a superscript, use +#: {sup.index}. In addition you can use {layout_name} for the current +#: layout name and {num_windows} for the number of windows in the tab. +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. +#: If you want to style the text, you can use styling directives, for +#: example: {fmt.fg.red}red{fmt.fg.default}normal{fmt.bg._00FF00}green +#: bg{fmt.bg.normal}. Similarly, for bold and italic: +#: {fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}. + +active_tab_title_template none + +#: Template to use for active tabs, if not specified falls back to +#: tab_title_template. + +active_tab_foreground #000 +active_tab_background #eee +active_tab_font_style bold-italic +inactive_tab_foreground #444 +inactive_tab_background #999 +inactive_tab_font_style normal + +#: Tab bar colors and styles + +tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +#: }}} + +#: Color scheme {{{ + +foreground #dddddd +background #000000 + +#: The foreground and background colors + +background_opacity 1.00 + +#: The opacity of the background. A number between 0 and 1, where 1 is +#: opaque and 0 is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the background color's opacity in +#: cells that have the same background color as the default terminal +#: background. This is so that things like the status bar in vim, +#: powerline prompts, etc. still look good. But it means that if you +#: use a color theme with a background color in your editor, it will +#: not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. Be aware that using a value less than 1.0 is a +#: (possibly significant) performance hit. If you want to dynamically +#: change transparency of windows set dynamic_background_opacity to +#: yes (this is off by default as it has a performance cost). Changing +#: this setting when reloading the config will only work if +#: dynamic_background_opacity was enabled in the original config. + +background_image none + +#: Path to a background image. Must be in PNG format. + +background_image_layout tiled + +#: Whether to tile or scale the background image. + +background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. + +dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +#: Changing this setting by reloading the config is not supported. + +background_tint 0.0 + +#: How much to tint the background image by the background color. The +#: tint is applied only under the text area, not margin/borders. Makes +#: it easier to read the text. Tinting is done using the current +#: background color for each window. This setting applies only if +#: background_opacity is set and transparent windows are supported or +#: background_image is set. + +dim_opacity 0.75 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +selection_foreground #000000 + +#: The foreground for text selected with the mouse. A value of none +#: means to leave the color unchanged. + +selection_background #fffacd + +#: The background for text selected with the mouse. + +#: The color table {{{ + +#: The 256 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version, for the first 16 colors. You can set the +#: remaining 240 colors as color16 to color255. + +# color0 #000000 +# color8 #767676 + +#: black + +# color1 #cc0403 +# color9 #f2201f + +#: red + +# color2 #19cb00 +# color10 #23fd00 + +#: green + +# color3 #cecb00 +# color11 #fffd00 + +#: yellow + +# color4 #0d73cc +# color12 #1a8fff + +#: blue + +# color5 #cb1ed1 +# color13 #fd28ff + +#: magenta + +# color6 #0dcdcd +# color14 #14ffff + +#: cyan + +# color7 #dddddd +# color15 #ffffff + +#: white + +# mark1_foreground black + +#: Color for marks of type 1 + +# mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) + +# mark2_foreground black + +#: Color for marks of type 2 + +# mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) + +# mark3_foreground black + +#: Color for marks of type 3 + +# mark3_background #f274bc + +#: Color for marks of type 3 (violet) + +#: }}} + +include ./theme.conf + +#: }}} + +#: Advanced {{{ + +shell . + +#: The shell program to execute. The default value of . means to use +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login to ensure that the shell starts in interactive mode and +#: reads its startup rc files. + +editor . + +#: The console editor to use when editing the kitty config file or +#: similar tasks. A value of . means to use the environment variables +#: VISUAL and EDITOR in that order. Note that this environment +#: variable has to be set not just in your shell startup scripts but +#: system-wide, otherwise kitty will not see it. + +close_on_child_death no + +#: Close the window when the child process (shell) exits. If no (the +#: default), the terminal will remain open when the child exits as +#: long as there are still processes outputting to the terminal (for +#: example disowned or backgrounded processes). If yes, the window +#: will close as soon as the child process exits. Note that setting it +#: to yes means that any background processes still using the terminal +#: can fail silently because their stdout/stderr/stdin no longer work. + +allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over ssh +#: connections. You can chose to either allow any program running +#: within kitty to control it, with yes or only programs that connect +#: to the socket specified with the kitty --listen-on command line +#: option, if you use the value socket-only. The latter is useful if +#: you want to prevent programs running on a remote computer over ssh +#: from controlling kitty. Changing this option by reloading the +#: config will only affect newly created windows. + +listen_on none + +#: Tell kitty to listen to the specified unix/tcp socket for remote +#: control connections. Note that this will apply to all kitty +#: instances. It can be overridden by the kitty --listen-on command +#: line flag. This option accepts only UNIX sockets, such as +#: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment +#: variables are expanded. If {kitty_pid} is present then it is +#: replaced by the PID of the kitty process, otherwise the PID of the +#: kitty process is appended to the value, with a hyphen. This option +#: is ignored unless you also set allow_remote_control to enable +#: remote control. See the help for kitty --listen-on for more +#: details. Changing this option by reloading the config is not +#: supported. + +# env + +#: Specify environment variables to set in all child processes. Note +#: that environment variables are expanded recursively, so if you +#: use:: + +#: env MYVAR1=a +#: env MYVAR2=${MYVAR1}/${HOME}/b + +#: The value of MYVAR2 will be a//b. + +update_check_interval 24 + +#: Periodically check if an update to kitty is available. If an update +#: is found a system notification is displayed informing you of the +#: available update. The default is to check every 24 hrs, set to zero +#: to disable. Changing this option by reloading the config is not +#: supported. + +startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session command line option for +#: individual instances. See +#: https://sw.kovidgoyal.net/kitty/index.html#sessions in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. Changing this option by reloading the +#: config is not supported. + +clipboard_control write-clipboard write-primary + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: set of possible actions is: write-clipboard read-clipboard write- +#: primary read-primary. You can additionally specify no-append to +#: disable kitty's protocol extension for clipboard concatenation. The +#: default is to allow writing to the clipboard and primary selection +#: with concatenation enabled. Note that enabling the read +#: functionality is a security risk as it means that any program, even +#: one running on a remote server via SSH can read your clipboard. + +allow_hyperlinks yes + +#: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click by holding down ctrl+shift and clicking +#: with the mouse. The special value of ``ask`` means that kitty will +#: ask before opening the link. + +term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on Stack Overflow +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. Changing this option by reloading the config will only affect +#: newly created windows. + +#: }}} + +#: OS specific tweaks {{{ + +wayland_titlebar_color system + +#: Change the color of the kitty window's titlebar on Wayland systems +#: with client side window decorations such as GNOME. A value of +#: system means to use the default system color, a value of background +#: means to use the background color of the currently active window +#: and finally you can use an arbitrary color, such as #12af59 or red. + +macos_titlebar_color system + +#: Change the color of the kitty window's titlebar on macOS. A value +#: of system means to use the default system color, a value of +#: background means to use the background color of the currently +#: active window and finally you can use an arbitrary color, such as +#: #12af59 or red. WARNING: This option works by using a hack, as +#: there is no proper Cocoa API for it. It sets the background color +#: of the entire window and makes the titlebar transparent. As such it +#: is incompatible with background_opacity. If you want to use both, +#: you are probably better off just hiding the titlebar with +#: hide_window_decorations. + +macos_option_as_alt no + +#: Use the option key as an alt key. With this set to no, kitty will +#: use the macOS native Option+Key = unicode character behavior. This +#: will break any Alt+key keyboard shortcuts in your terminal +#: programs, but you can use the macOS unicode input technique. You +#: can use the values: left, right, or both to use only the left, +#: right or both Option keys as Alt, instead. Changing this setting by +#: reloading the config is not supported. + +macos_hide_from_tasks no + +#: Hide the kitty window from running tasks (⌘+Tab) on macOS. Changing +#: this setting by reloading the config is not supported. + +macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed. By +#: default, kitty will stay running, even with no open windows, as is +#: the expected behavior on macOS. + +macos_window_resizable yes + +#: Disable this if you want kitty top-level (OS) windows to not be +#: resizable on macOS. Changing this setting by reloading the config +#: will only affect newly created windows. + +macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes. For example, a value of +#: 0.75 will result in rendering that looks similar to sub-pixel +#: antialiasing at common font sizes. + +macos_traditional_fullscreen no + +#: Use the traditional full-screen transition, that is faster, but +#: less pretty. + +macos_show_window_title_in all + +#: Show or hide the window title in the macOS window or menu-bar. A +#: value of window will show the title of the currently active window +#: at the top of the macOS window. A value of menubar will show the +#: title of the currently active window in the macOS menu-bar, making +#: use of otherwise wasted space. all will show the title everywhere +#: and none hides the title in the window and the menu-bar. + +macos_custom_beam_cursor no + +#: Enable/disable custom mouse cursor for macOS that is easier to see +#: on both light and dark backgrounds. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. Changing this setting +#: by reloading the config is not supported. + +linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. Changing this setting by +#: reloading the config is not supported. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase unicode characters. +#: For example: ``a`` for the A key, ``[`` for the left square bracket +#: key, etc. For functional keys, such as ``Enter or Escape`` the +#: names are present at https://sw.kovidgoyal.net/kitty/keyboard- +#: protocol.html#functional-key-definitions. For a list of modifier +#: names, see: GLFW mods +#: + +#: On Linux you can also use XKB key names to bind keys that are not +#: supported by GLFW. See XKB keys +#: for a list of key names. The name to use is the part +#: after the XKB_KEY_ prefix. Note that you can only use an XKB key +#: name for keys that are not known as GLFW keys. + +#: Finally, you can use raw system key codes to map keys, again only +#: for keys that are not known as GLFW keys. To see the system key +#: code for a key, start kitty with the kitty --debug-input option. +#: Then kitty will output some debug text for every key event. In that +#: text look for ``native_code`` the value of that becomes the key +#: name in the shortcut. For example: + +#: .. code-block:: none + +#: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a' + +#: Here, the key name for the A key is 0x61 and you can use it with:: + +#: map ctrl+0x61 something + +#: to map ctrl+a to something. + +#: You can use the special action no_op to unmap a keyboard shortcut +#: that is assigned in the default configuration:: + +#: map kitty_mod+space no_op + +#: You can combine multiple actions to be triggered by a single +#: shortcut, using the syntax below:: + +#: map key combine action1 action2 action3 ... + +#: For example:: + +#: map kitty_mod+e combine : new_window : next_layout + +#: this will create a new window and switch to the next available +#: layout + +#: You can use multi-key shortcuts using the syntax shown below:: + +#: map key1>key2>key3 action + +#: For example:: + +#: map ctrl+f>2 set_font_size 20 + +kitty_mod ctrl+shift + +#: The value of kitty_mod is used as the modifier for all default +#: shortcuts, you can change it in your kitty.conf to change the +#: modifiers for all the default shortcuts. + +clear_all_shortcuts no + +#: You can have kitty remove all shortcut definition seen up to this +#: point. Useful, for instance, to remove the default shortcuts. + +# kitten_alias hints hints --hints-offset=0 + +#: You can create aliases for kitten names, this allows overriding the +#: defaults for kitten options and can also be used to shorten +#: repeated mappings of the same kitten with a specific group of +#: options. For example, the above alias changes the default value of +#: kitty +kitten hints --hints-offset to zero for all mappings, +#: including the builtin ones. + +#: Clipboard {{{ + +map kitty_mod+c copy_to_clipboard + +#: There is also a copy_or_interrupt action that can be optionally +#: mapped to Ctrl+c. It will copy only if there is a selection and +#: send an interrupt otherwise. Similarly, copy_and_clear_or_interrupt +#: will copy and clear the selection or send an interrupt if there is +#: no selection. + +map kitty_mod+v paste_from_clipboard +map kitty_mod+s paste_from_selection +map kitty_mod+o pass_selection_to_program + +#: You can also pass the contents of the current selection to any +#: program using pass_selection_to_program. By default, the system's +#: open program is used, but you can specify your own, the selection +#: will be passed as a command line argument to the program, for +#: example:: + +#: map kitty_mod+o pass_selection_to_program firefox + +#: You can pass the current selection to a terminal program running in +#: a new kitty window, by using the @selection placeholder:: + +#: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +map kitty_mod+up scroll_line_up +map kitty_mod+down scroll_line_down +map kitty_mod+page_up scroll_page_up +map kitty_mod+page_down scroll_page_down +map kitty_mod+home scroll_home +map kitty_mod+end scroll_end +map kitty_mod+h show_scrollback + +#: You can pipe the contents of the current screen + history buffer as +#: STDIN to an arbitrary program using the ``launch`` function. For +#: example, the following opens the scrollback buffer in less in an +#: overlay window:: + +#: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#: For more details on piping screen and buffer contents to external +#: programs, see launch. + +#: }}} + +#: Window management {{{ + +map kitty_mod+enter new_window + +#: You can open a new window running an arbitrary program, for +#: example:: + +#: map kitty_mod+y launch mutt + +#: You can open a new window with the current working directory set to +#: the working directory of the current window using:: + +#: map ctrl+alt+enter launch --cwd=current + +#: You can open a new window that is allowed to control kitty via the +#: kitty remote control facility by prefixing the command line with @. +#: Any programs running in that window will be allowed to control +#: kitty. For example:: + +#: map ctrl+enter launch --allow-remote-control some_program + +#: You can open a new window next to the currently active window or as +#: the first window, with:: + +#: map ctrl+n launch --location=neighbor some_program +#: map ctrl+f launch --location=first some_program + +#: For more details, see launch. + +map kitty_mod+n new_os_window + +#: Works like new_window above, except that it opens a top level OS +#: kitty window. In particular you can use new_os_window_with_cwd to +#: open a window with the current working directory. + +map kitty_mod+w close_window +map kitty_mod+] next_window +map kitty_mod+[ previous_window +map kitty_mod+f move_window_forward +map kitty_mod+b move_window_backward +map kitty_mod+` move_window_to_top +map kitty_mod+r start_resizing_window +map kitty_mod+1 first_window +map kitty_mod+2 second_window +map kitty_mod+3 third_window +map kitty_mod+4 fourth_window +map kitty_mod+5 fifth_window +map kitty_mod+6 sixth_window +map kitty_mod+7 seventh_window +map kitty_mod+8 eighth_window +map kitty_mod+9 ninth_window +map kitty_mod+0 tenth_window +#: }}} + +#: Tab management {{{ + +map kitty_mod+right next_tab +map kitty_mod+left previous_tab +map kitty_mod+t new_tab +map kitty_mod+q close_tab +map shift+cmd+w close_os_window +map kitty_mod+. move_tab_forward +map kitty_mod+, move_tab_backward +map kitty_mod+alt+t set_tab_title + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, and any number larger than the last tab being the last tab:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and use +#: new_tab_with_cwd. Finally, if you want the new tab to open next to +#: the current tab rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +map kitty_mod+l next_layout + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +map kitty_mod+equal change_font_size all +2.0 +map kitty_mod+minus change_font_size all -2.0 +map kitty_mod+backspace change_font_size all 0 + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +map kitty_mod+e kitten hints + +#: Open a currently visible URL using the keyboard. The program used +#: to open the URL is specified in open_url_with. + +map kitty_mod+p>f kitten hints --type path --program - + +#: Select a path/filename and insert it into the terminal. Useful, for +#: instance to run git commands on a filename output from a previous +#: git command. + +map kitty_mod+p>shift+f kitten hints --type path + +#: Select a path/filename and open it with the default open program. + +map kitty_mod+p>l kitten hints --type line --program - + +#: Select a line of text and insert it into the terminal. Use for the +#: output of things like: ls -1 + +map kitty_mod+p>w kitten hints --type word --program - + +#: Select words and insert into terminal. + +map kitty_mod+p>h kitten hints --type hash --program - + +#: Select something that looks like a hash and insert it into the +#: terminal. Useful with git, which uses sha1 hashes to identify +#: commits + +map kitty_mod+p>n kitten hints --type linenum + +#: Select something that looks like filename:linenum and open it in +#: vim at the specified line number. + +map kitty_mod+p>y kitten hints --type hyperlink + +#: Select a hyperlink (i.e. a URL that has been marked as such by the +#: terminal program, for example, by ls --hyperlink=auto). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see kittens/hints. +#: }}} + +#: Miscellaneous {{{ + +map kitty_mod+f11 toggle_fullscreen +map kitty_mod+f10 toggle_maximized +map kitty_mod+u kitten unicode_input +map kitty_mod+f2 edit_config_file +map kitty_mod+escape kitty_shell window + +#: Open the kitty shell in a new window/tab/overlay/os_window to +#: control kitty using commands. + +map kitty_mod+a>m set_background_opacity +0.1 +map kitty_mod+a>l set_background_opacity -0.1 +map kitty_mod+a>1 set_background_opacity 1 +map kitty_mod+a>d set_background_opacity default +map kitty_mod+delete clear_terminal reset active + +#: You can create shortcuts to clear/reset the terminal. For example:: + +#: # Reset the terminal +#: map kitty_mod+f9 clear_terminal reset active +#: # Clear the terminal screen by erasing all contents +#: map kitty_mod+f10 clear_terminal clear active +#: # Clear the terminal scrollback by erasing it +#: map kitty_mod+f11 clear_terminal scrollback active +#: # Scroll the contents of the screen into the scrollback +#: map kitty_mod+f12 clear_terminal scroll active + +#: If you want to operate on all windows instead of just the current +#: one, use all instead of active. + +#: It is also possible to remap Ctrl+L to both scroll the current +#: screen contents into the scrollback buffer and clear the screen, +#: instead of just clearing the screen, for example, for ZSH add the +#: following to ~/.zshrc: + +#: .. code-block:: sh + +#: scroll-and-clear-screen() { +#: printf '\n%.0s' {1..$LINES} +#: zle clear-screen +#: } +#: zle -N scroll-and-clear-screen +#: bindkey '^l' scroll-and-clear-screen + +map kitty_mod+f5 load_config_file + +#: Reload kitty.conf, applying any changes since the last time it was +#: loaded. Note that a handful of settings cannot be dynamically +#: changed and require a full restart of kitty. You can also map a +#: keybinding to load a different config file, for example:: + +#: map f5 load_config /path/to/alternative/kitty.conf + +#: Note that all setting from the original kitty.conf are discarded, +#: in other words the new conf settings *replace* the old ones. + +map kitty_mod+f6 debug_config + +#: Show details about exactly what configuration kitty is running with +#: and its host environment. Useful for debugging issues. + + +#: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#: client program when pressing specified shortcut keys. For example:: + +#: map ctrl+alt+a send_text all Special text + +#: This will send "Special text" when you press the ctrl+alt+a key +#: combination. The text to be sent is a python string literal so you +#: can use escapes like \x1b to send control codes or \u21fb to send +#: unicode characters (or you can just input the unicode characters +#: directly as UTF-8 text). The first argument to send_text is the +#: keyboard modes in which to activate the shortcut. The possible +#: values are normal or application or kitty or a comma separated +#: combination of them. The special keyword all means all modes. The +#: modes normal and application refer to the DECCKM cursor key mode +#: for terminals, and kitty refers to the special kitty extended +#: keyboard protocol. + +#: Another example, that outputs a word and then moves the cursor to +#: the start of the line (same as pressing the Home key):: + +#: map ctrl+alt+a send_text normal Word\x1b[H +#: map ctrl+alt+a send_text application Word\x1bOH + +#: }}} + +#: }}} diff --git a/private_dot_config/lsd/config.yaml b/private_dot_config/lsd/config.yaml new file mode 100644 index 0000000..9a3a8db --- /dev/null +++ b/private_dot_config/lsd/config.yaml @@ -0,0 +1,149 @@ +# == Classic == +# This is a shorthand to override some of the options to be backwards compatible +# with `ls`. It affects the "color"->"when", "sorting"->"dir-grouping", "date" +# and "icons"->"when" options. +# Possible values: false, true +classic: false + +# == Blocks == +# This specifies the columns and their order when using the long and the tree +# layout. +# Possible values: permission, user, group, context, size, date, name, inode, links, git +blocks: + - permission + - user + - group + - size + - date + - git + - name + +# == Color == +# This has various color options. (Will be expanded in the future.) +color: + # When to colorize the output. + # When "classic" is set, this is set to "never". + # Possible values: never, auto, always + when: auto + # How to colorize the output. + # When "classic" is set, this is set to "no-color". + # Possible values: default, custom + # When "custom" is set, lsd will look in the config directory for `colors.yaml`. + theme: default + +# == Date == +# This specifies the date format for the date column. The freeform format +# accepts a strftime like string. +# When "classic" is set, this is set to "date". +# Possible values: date, locale, relative, '+' +# `date_format` will be a `strftime` formatted value. e.g. `date: '+%d %b %y %X'` will give you a date like this: 17 Jun 21 20:14:55 +date: date + +# == Dereference == +# Whether to dereference symbolic links. +# Possible values: false, true +dereference: false + +# == Display == +# What items to display. Do not specify this for the default behavior. +# Possible values: all, almost-all, directory-only +# display: all + +# == Icons == +icons: + # When to use icons. + # When "classic" is set, this is set to "never". + # Possible values: always, auto, never + when: auto + # Which icon theme to use. + # Possible values: fancy, unicode + theme: fancy + # Separator between icon and the name + # Default to 1 space + separator: " " + +# == Ignore Globs == +# A list of globs to ignore when listing. +# ignore-globs: +# - .git + +# == Indicators == +# Whether to add indicator characters to certain listed files. +# Possible values: false, true +indicators: false + +# == Layout == +# Which layout to use. "oneline" might be a bit confusing here and should be +# called "one-per-line". It might be changed in the future. +# Possible values: grid, tree, oneline +layout: grid + +# == Recursion == +recursion: + # Whether to enable recursion. + # Possible values: false, true + enabled: false + # How deep the recursion should go. This has to be a positive integer. Leave + # it unspecified for (virtually) infinite. + # depth: 3 + +# == Size == +# Specifies the format of the size column. +# Possible values: default, short, bytes +size: default + +# == Permission == +# Specify the format of the permission column +# Possible value: rwx, octal, attributes (windows only), disabled +# permission: rwx + +# == Sorting == +sorting: + # Specify what to sort by. + # Possible values: extension, name, time, size, version + column: name + # Whether to reverse the sorting. + # Possible values: false, true + reverse: false + # Whether to group directories together and where. + # When "classic" is set, this is set to "none". + # Possible values: first, last, none + dir-grouping: none + +# == No Symlink == +# Whether to omit showing symlink targets +# Possible values: false, true +no-symlink: false + +# == Total size == +# Whether to display the total size of directories. +# Possible values: false, true +total-size: false + +# == Hyperlink == +# Attach hyperlink to filenames +# Possible values: always, auto, never +hyperlink: never + +# == Symlink arrow == +# Specifies how the symlink arrow display, chars in both ascii and utf8 +symlink-arrow: ⇒ + +# == Header == +# Whether to display block headers. +# Possible values: false, true +header: false + +# == Literal == +# Whether to show quotes on filenames. +# Possible values: false, true +# literal: false + +# == Truncate owner == +# How to truncate the username and group names for a file if they exceed a certain +# number of characters. +# truncate-owner: + # Number of characters to keep. By default, no truncation is done (empty value). + # after: + # String to be appended to a name if truncated. + # marker: "" diff --git a/private_dot_config/nvim/init.lua b/private_dot_config/nvim/init.lua new file mode 100644 index 0000000..00571a9 --- /dev/null +++ b/private_dot_config/nvim/init.lua @@ -0,0 +1,37 @@ +vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +vim.g.mapleader = "," + +-- bootstrap lazy and all plugins +local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + +if not vim.loop.fs_stat(lazypath) then + local repo = "https://github.com/folke/lazy.nvim.git" + vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } +end + +vim.opt.rtp:prepend(lazypath) + +local lazy_config = require "configs.lazy" + +-- load plugins +require("lazy").setup({ + { + "NvChad/NvChad", + lazy = false, + branch = "v2.5", + import = "nvchad.plugins", + }, + + { import = "plugins" }, +}, lazy_config) + +-- load theme +dofile(vim.g.base46_cache .. "defaults") +dofile(vim.g.base46_cache .. "statusline") + +require "options" +require "nvchad.autocmds" + +vim.schedule(function() + require "mappings" +end) diff --git a/private_dot_config/nvim/lua/autocmds.lua b/private_dot_config/nvim/lua/autocmds.lua new file mode 100644 index 0000000..4583e42 --- /dev/null +++ b/private_dot_config/nvim/lua/autocmds.lua @@ -0,0 +1,70 @@ +local autocmd = vim.api.nvim_create_autocmd + +-- dont list quickfix buffers +autocmd("FileType", { + pattern = "qf", + callback = function() + vim.opt_local.buflisted = false + end, +}) + +-- reload some chadrc options on-save +autocmd("BufWritePost", { + pattern = vim.tbl_map(function(path) + return vim.fs.normalize(vim.loop.fs_realpath(path)) + end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/**/*.lua", true, true, true)), + group = vim.api.nvim_create_augroup("ReloadNvChad", {}), + + callback = function(opts) + local fp = vim.fn.fnamemodify(vim.fs.normalize(vim.api.nvim_buf_get_name(opts.buf)), ":r") --[[@as string]] + local app_name = vim.env.NVIM_APPNAME and vim.env.NVIM_APPNAME or "nvim" + local module = string.gsub(fp, "^.*/" .. app_name .. "/lua/", ""):gsub("/", ".") + + require("plenary.reload").reload_module "nvconfig" + require("plenary.reload").reload_module "chadrc" + require("plenary.reload").reload_module "base46" + require("plenary.reload").reload_module(module) + + local config = require "nvconfig" + + -- statusline + require("plenary.reload").reload_module "nvchad.stl.utils" + require("plenary.reload").reload_module("nvchad.stl." .. config.ui.statusline.theme) + vim.opt.statusline = "%!v:lua.require('nvchad.stl." .. config.ui.statusline.theme .. "')()" + + -- tabufline + if config.ui.tabufline.enabled then + require("plenary.reload").reload_module "nvchad.tabufline.modules" + vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules')()" + end + + require("base46").load_all_highlights() + -- vim.cmd("redraw!") + end, +}) + +-- user event that loads after UIEnter + only if file buf is there +vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, { + group = vim.api.nvim_create_augroup("NvFilePost", { clear = true }), + callback = function(args) + local file = vim.api.nvim_buf_get_name(args.buf) + local buftype = vim.api.nvim_buf_get_option(args.buf, "buftype") + + if not vim.g.ui_entered and args.event == "UIEnter" then + vim.g.ui_entered = true + end + + if file ~= "" and buftype ~= "nofile" and vim.g.ui_entered then + vim.api.nvim_exec_autocmds("User", { pattern = "FilePost", modeline = false }) + vim.api.nvim_del_augroup_by_name "NvFilePost" + + vim.schedule(function() + vim.api.nvim_exec_autocmds("FileType", {}) + + if vim.g.editorconfig then + require("editorconfig").config(args.buf) + end + end, 0) + end + end, +}) diff --git a/private_dot_config/nvim/lua/chadrc.lua b/private_dot_config/nvim/lua/chadrc.lua new file mode 100644 index 0000000..0bcb399 --- /dev/null +++ b/private_dot_config/nvim/lua/chadrc.lua @@ -0,0 +1,149 @@ +-------------------------------------------------------------------------- +-- +-- ██████╗██╗ ██╗ █████╗ ██████╗ ██████╗ ██████╗ +-- ██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔════╝ +-- ██║ ███████║███████║██║ ██║██████╔╝██║ +-- ██║ ██╔══██║██╔══██║██║ ██║██╔══██╗██║ +-- ╚██████╗██║ ██║██║ ██║██████╔╝██║ ██║╚██████╗ +-- ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝ +-- +-------------------------------------------------------------------------- + +---@type ChadrcConfig +local options = { + + ui = { + ------------------------------- nvchad_ui modules ----------------------------- + statusline = { + enabled = true, + theme = "default", -- default/vscode/vscode_colored/minimal + -- default/round/block/arrow separators work only for default statusline theme + -- round and block will work for minimal theme only + separator_style = "arrow", + order = nil, + modules = nil, + }, + + -- lazyload it when there are 1+ buffers + tabufline = { + enabled = true, + lazyload = true, + order = { "treeOffset", "buffers", "tabs", "btns" }, + modules = nil, + }, + + telescope = { style = "bordered" }, -- borderless / bordered + + cmp = { + icons = true, + icons_left = false, -- only for non-atom styles! + lspkind_text = true, + style = "default", -- default/flat_light/flat_dark/atom/atom_colored + format_colors = { + tailwind = false, -- will work for css lsp too + icon = "󱓻", + }, + }, + }, + + nvdash = { + load_on_startup = true, + header = { + " I use ", + " ██████ █████ █████ █████ ███ ", + " ░░██████ ░░███ ░░███ ░░███ ░░░ ", + " ░███░███ ░███ ██████ ██████ ░███ ░███ ████ █████████████ ", + " ░███░░███░███ ███░░███ ███░░███ ░███ ░███ ░░███ ░░███░░███░░███ ", + " ░███ ░░██████ ░███████ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███ ", + " ░███ ░░█████ ░███░░░ ░███ ░███ ░░░█████░ ░███ ░███ ░███ ░███ ", + " █████ ░░█████░░██████ ░░██████ ░░███ █████ █████░███ █████ ", + " ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░ ", + " btw ", + }, + buttons = { + { txt = " Find file", keys = ", f f", cmd = "Telescope find_files" }, + { txt = "󰈚 Recent Files", keys = ", f o", cmd = "Telescope oldfiles" }, + { txt = "󰈭 Find Word", keys = ", f w", cmd = "Telescope live_grep" }, + { txt = " Bookmarks", keys = ", m a", cmd = "Telescope marks" }, + { txt = " Themes", keys = ", t h", cmd = "Telescope themes" }, + { txt = " Mappings", keys = ", c h", cmd = "NvCheatsheet" }, + { txt = "─", hl = "NvDashFooter", no_gap = true, rep = true }, + + { + txt = function() + local stats = require("lazy").stats() + local ms = math.floor(stats.startuptime) .. " ms" + return " Loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms + end, + hl = "NvDashFooter", + no_gap = true, + }, + + { txt = "─", hl = "NvDashFooter", no_gap = true, rep = true }, + }, + }, + + term = { + winopts = { number = false, relativenumber = false }, + sizes = { sp = 0.3, vsp = 0.2, ["bo sp"] = 0.3, ["bo vsp"] = 0.2 }, + float = { + relative = "editor", + row = 0.3, + col = 0.25, + width = 0.5, + height = 0.4, + border = "single", + }, + }, + + lsp = { + signature = true, + semantic_tokens = false, + }, + + cheatsheet = { theme = "grid" }, -- simple/grid + + base46 = { + integrations = { + "codeactionmenu", + "cmp", + "dap", + "defaults", + "devicons", + "git", + "lsp", + "lspsaga", + "markview", + "mason", + "notify", + "nvcheatsheet", + "nvimtree", + "statusline", + "syntax", + "treesitter", + "trouble", + "tbline", + "telescope", + "whichkey", + }, + + theme = "gruvbox", -- default theme + + hl_override = { + Comment = { fg = "#928374" }, + ["@comment"] = { fg = "#928374" }, + LineNr = { fg = "#928374" }, + }, + transparency = true, + }, + + colorify = { + enabled = true, + mode = "virtual", -- fg, bg, virtual + virt_text = "󱓻 ", + highlight = { hex = true, lspvars = true }, + }, +} + +local status, chadrc = pcall(require, "chadrc") +return vim.tbl_deep_extend("force", options, status and chadrc or {}) diff --git a/private_dot_config/nvim/lua/configs/conform.lua b/private_dot_config/nvim/lua/configs/conform.lua new file mode 100644 index 0000000..f15e11f --- /dev/null +++ b/private_dot_config/nvim/lua/configs/conform.lua @@ -0,0 +1,26 @@ +local options = { + lsp_fallback = true, + + formatters_by_ft = { + lua = { "stylua" }, + python = { "ruff", "black" }, + c = { "clang-format" }, + cpp = { "clang-format" }, + html = { "prettier" }, + css = { "prettier" }, + javascript = { "prettier" }, + markdown = { "prettier" }, + md = { "prettier" }, + text = { "prettier" }, + json = { "prettier" }, + yaml = { "prettier" }, + toml = { "prettier" }, + }, + + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, +} + +return options diff --git a/private_dot_config/nvim/lua/configs/lazy.lua b/private_dot_config/nvim/lua/configs/lazy.lua new file mode 100644 index 0000000..cd170bd --- /dev/null +++ b/private_dot_config/nvim/lua/configs/lazy.lua @@ -0,0 +1,47 @@ +return { + defaults = { lazy = true }, + install = { colorscheme = { "nvchad" } }, + + ui = { + icons = { + ft = "", + lazy = "󰂠 ", + loaded = "", + not_loaded = "", + }, + }, + + performance = { + rtp = { + disabled_plugins = { + "2html_plugin", + "tohtml", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", + }, + }, + }, +} diff --git a/private_dot_config/nvim/lua/configs/lspconfig.lua b/private_dot_config/nvim/lua/configs/lspconfig.lua new file mode 100644 index 0000000..cfa3a73 --- /dev/null +++ b/private_dot_config/nvim/lua/configs/lspconfig.lua @@ -0,0 +1,14 @@ +require("nvchad.configs.lspconfig").defaults() + +local lspconfig = require("lspconfig") + +local nvlsp = require("nvchad.configs.lspconfig") +local servers = { "jdtls", "html", "cssls", "clangd", "pylsp", "basedpyright", "ruff" } + +for _, lsp in ipairs(servers) do + lspconfig[lsp].setup({ + on_init = nvlsp.on_init, + on_attach = nvlsp.on_attach, + capabilities = nvlsp.capabilities, + }) +end diff --git a/private_dot_config/nvim/lua/configs/overrides.lua b/private_dot_config/nvim/lua/configs/overrides.lua new file mode 100644 index 0000000..b904b41 --- /dev/null +++ b/private_dot_config/nvim/lua/configs/overrides.lua @@ -0,0 +1,84 @@ +local M = {} + +M.treesitter = { + ensure_installed = { + "vim", + "lua", + "html", + "css", + "javascript", + "typescript", + "tsx", + "php", + "c", + "cpp", + "java", + "python", + "ninja", + "rst", + "markdown", + "markdown_inline", + "bash", + "fish", + "regex", + "git_config", + "gitcommit", + "git_rebase", + "gitignore", + "gitattributes", + "dockerfile", + }, + indent = { + enable = true, + }, +} + +M.mason = { + cmd = true, + pkgs = { + -- lua stuff + "lua-language-server", + "stylua", + + -- web dev stuff + "css-lsp", + "html-lsp", + "prettier", + + -- c/cpp stuff + "clangd", + "clang-format", + + -- java stuff + "jdtls", + "java-test", + "java-debug-adapter", + "spring-boot-tools", + "lombok", + + -- python stuff + "pylsp", + "basedpyright", + "ruff", + "black", + + "hadolint", + }, +} + +-- git support in nvimtree +M.nvimtree = { + git = { + enable = true, + }, + renderer = { + highlight_git = true, + icons = { + show = { + git = true, + }, + }, + }, +} + +return M diff --git a/private_dot_config/nvim/lua/mappings.lua b/private_dot_config/nvim/lua/mappings.lua new file mode 100644 index 0000000..761a30e --- /dev/null +++ b/private_dot_config/nvim/lua/mappings.lua @@ -0,0 +1,212 @@ +local map = vim.keymap.set + +map("i", "", "^i", { desc = "Move Beginning of line" }) +map("i", "", "", { desc = "Move End of line" }) +map("i", "", "", { desc = "Move Left" }) +map("i", "", "", { desc = "Move Right" }) +map("i", "", "", { desc = "Move Down" }) +map("i", "", "", { desc = "Move Up" }) + +map("n", "", "noh", { desc = "General Clear highlights" }) + +map("n", "", "w", { desc = "File Save" }) +map("n", "", "%y+", { desc = "File Copy whole" }) + +map("n", "n", "set nu!", { desc = "Toggle Line number" }) +map("n", "rn", "set rnu!", { desc = "Toggle Relative number" }) +map("n", "ch", "NvCheatsheet", { desc = "Toggle NvCheatsheet" }) + +map("n", "fm", function() + require("conform").format { lsp_fallback = true } +end, { desc = "Format Files" }) + +-- lsp mappings +map("n", "", "Lspsaga code_action", { desc = "Lsp code action" }) +map("v", "", "Lspsaga code_action", { desc = "Lsp code action" }) +map("n", "", "Lspsaga peek_definition", { desc = "Lsp peek definition" }) +map("n", "", "Lspsaga peek_type_definition", { desc = "Lsp peek type definition" }) +map("v", "", "Lspsaga peek_definition", { desc = "Lsp peek definition" }) +map("v", "", "Lspsaga peek_type_definition", { desc = "Lsp peek type definition" }) +map("n", "", "Lspsaga goto_definition", { desc = "Lsp goto definition" }) +map("n", "", "Lspsaga goto_type_definition", { desc = "Lsp goto type definition" }) +map("v", "", "Lspsaga goto_definition", { desc = "Lsp goto definition" }) +map("v", "", "Lspsaga goto_type_definition", { desc = "Lsp goto type definition" }) +map("n", "", "Lspsaga rename ++project", { desc = "Lsp rename" }) +map("v", "", "Lspsaga rename ++project", { desc = "Lsp rename" }) +map("n", "", "Lspsaga diagnostic_jump_next", { desc = "Lsp diagnostic next" }) +map("v", "", "Lspsaga diagnostic_jump_next", { desc = "Lsp diagnostic next" }) +map("n", "", "Lspsaga diagnostic_jump_prev", { desc = "Lsp diagnostic previous" }) +map("v", "", "Lspsaga diagnostic_jump_prev", { desc = "Lsp diagnostic previous" }) + +-- tabufline +map("n", "b", "enew", { desc = "Buffer New" }) + +map("n", "", function() + require("nvchad.tabufline").next() +end, { desc = "Buffer Goto next" }) + +map("n", "", function() + require("nvchad.tabufline").prev() +end, { desc = "Buffer Goto prev" }) + +map("n", "x", function() + require("nvchad.tabufline").close_buffer() +end, { desc = "Buffer Close" }) + +-- Comment +map("n", "/", "gcc", { desc = "Comment toggle", remap = true }) +map("v", "/", "gc", { desc = "Comment toggle", remap = true }) + +-- Spider nvim movement +map("n", "w", "lua require('spider').motion('w')", {desc = "Spider Move to next word"}) +map("n", "b", "lua require('spider').motion('b')", {desc = "Spider Move to previous word"}) +map("n", "e", "lua require('spider').motion('e')", {desc = "Spider Move to end of word"}) +map("v", "w", "lua require('spider').motion('w')", {desc = "Spider Move to next word"}) +map("v", "b", "lua require('spider').motion('b')", {desc = "Spider Move to previous word"}) +map("v", "e", "lua require('spider').motion('e')", {desc = "Spider Move to end of word"}) + +-- nvimtree +map("n", "", "NvimTreeToggle", { desc = "Nvimtree Toggle window" }) +map("n", "e", "NvimTreeFocus", { desc = "Nvimtree Focus window" }) + +-- telescope +map("n", "fw", "Telescope live_grep", { desc = "Telescope Live grep" }) +map("n", "fb", "Telescope buffers", { desc = "Telescope Find buffers" }) +map("n", "fh", "Telescope help_tags", { desc = "Telescope Help page" }) + +map("n", "fo", "Telescope oldfiles", { desc = "Telescope Find oldfiles" }) +map("n", "fz", "Telescope current_buffer_fuzzy_find", { desc = "Telescope Find in current buffer" }) +map("n", "cm", "Telescope git_commits", { desc = "Telescope Git commits" }) +map("n", "gt", "Telescope git_status", { desc = "Telescope Git status" }) +map("n", "pt", "Telescope terms", { desc = "Telescope Pick hidden term" }) +map("n", "th", "Telescope themes", { desc = "Telescope Nvchad themes" }) +map("n", "ff", "Telescope find_files", { desc = "Telescope Find files" }) +map( + "n", + "fa", + "Telescope find_files follow=true no_ignore=true hidden=true", + { desc = "Telescope Find all files" } +) + +-- terminal +map("t", "", "", { desc = "Terminal Escape terminal mode" }) + +-- new terminals +map("n", "h", function() + require("nvchad.term").new { pos = "sp", size = 0.3 } +end, { desc = "Terminal New horizontal term" }) + +map("n", "v", function() + require("nvchad.term").new { pos = "vsp", size = 0.3 } +end, { desc = "Terminal New vertical window" }) + +-- toggleable +map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 } +end, { desc = "Terminal Toggleable vertical term" }) + +map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.3 } +end, { desc = "Terminal New horizontal term" }) + +map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "float", id = "floatTerm" } +end, { desc = "Terminal Toggle Floating term" }) + +map("t", "", function() + local win = vim.api.nvim_get_current_win() + vim.api.nvim_win_close(win, true) +end, { desc = "Terminal Close term in terminal mode" }) + +-- whichkey +map("n", "wK", "WhichKey ", { desc = "Whichkey all keymaps" }) + +map("n", "wk", function() + vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ") +end, { desc = "Whichkey query lookup" }) + +-- blankline +map("n", "cc", function() + local config = { scope = {} } + config.scope.exclude = { language = {}, node_type = {} } + config.scope.include = { node_type = {} } + local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config) + + if node then + local start_row, _, end_row, _ = node:range() + if start_row ~= end_row then + vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 }) + vim.api.nvim_feedkeys("_", "n", true) + end + end +end, { desc = "Blankline Jump to current context" }) + +-- copilotchat +map("n", "cch", function() + local actions = require("CopilotChat.actions") + require("CopilotChat.integrations.telescope").pick(actions.help_actions()) +end, { desc = "CopilotChat - Help actions" }) +map("n", "ccp", function() + local actions = require("CopilotChat.actions") + require("CopilotChat.integrations.telescope").pick(actions.prompt_actions()) +end, { desc = "CopilotChat - Prompt actions" }) +map("v", "cch", function() + local actions = require("CopilotChat.actions") + require("CopilotChat.integrations.telescope").pick(actions.help_actions()) +end, { desc = "CopilotChat - Help actions" }) +map("v", "ccp", function() + local actions = require("CopilotChat.actions") + require("CopilotChat.integrations.telescope").pick(actions.prompt_actions()) +end, { desc = "CopilotChat - Prompt actions" }) + + + + +-- Custom mappings +map("n", "", ":", { desc = "Enter command mode" }) +map({ "n", "v" }, "j", "h", { desc = "Move left" }) +map({ "n", "v" }, "k", "j", { desc = "Move down" }) +map({ "n", "v" }, "l", "k", { desc = "Move up" }) +map({ "n", "v" }, "m", "l", { desc = "Move right" }) +map("n", "", "h", { desc = "Move the cursor to the left window" }) +map("n", "", "j", { desc = "Move the cursor to the bottom window" }) +map("n", "", "k", { desc = "Move the cursor to the upper window" }) +map("n", "", "l", { desc = "Move the cursor to the right window" }) +map("n", "", "+", { desc = "Enlarge window upwards" }) +map("n", "", "-", { desc = "Enlarge window downwards" }) +map("n", "", ">", { desc = "Enlarge window to the left" }) +map("n", "", "<", { desc = "Enlarge window to the rigth" }) +map("n", "o", "o") +map("n", "O", "O") +map("n", "n", "nzz") +map("n", "N", "Nzz") +map({ "n", "v" }, "y", "\"+y") +map("n", "yy", "\"+yy") +map({ "n", "v" }, "Y", "\"+yg_") +map({ "n", "v" }, "p", "\"+p") +map({ "n", "v" }, "P", "\"+P") +map("n", "a", function() + require("treesj").toggle() +end, { desc = "Extends or retracts an instruction block" }) +map("n", "gb", "Gitsigns blame", { desc = "Git blame" }) +map("v", "gb", "Gitsigns blame", { desc = "Git blame" }) +map("i", "jj", "", { desc = "Go into normal mode" }) +map("i", "", "ddi", { desc = "Delete a line" }) + +-- Disable mappings +-- local nomap = vim.keymap.del + +-- nomap("n", "h") +-- nomap("n", "j") +-- nomap("n", "k") +-- nomap("n", "l") +-- nomap("n", "") +-- nomap("n", "") +-- nomap("n", "") +-- nomap("n", "") +-- nomap("n", "") + +-- nomap("v", "h") +-- nomap("v", "j") +-- nomap("v", "k") +-- nomap("v", "l") diff --git a/private_dot_config/nvim/lua/options.lua b/private_dot_config/nvim/lua/options.lua new file mode 100644 index 0000000..0b427c4 --- /dev/null +++ b/private_dot_config/nvim/lua/options.lua @@ -0,0 +1,13 @@ +require("nvchad.options") + +vim.opt.termguicolors = true + +-- Modification de la taille des tabulations +vim.opt.shiftwidth = 4 +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 + +vim.opt.shell = "/usr/local/bin/fish" + +-- local o = vim.o +-- o.cursorlineopt ='both' -- to enable cursorline! diff --git a/private_dot_config/nvim/lua/plugins/init.lua b/private_dot_config/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..3b4c5ea --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/init.lua @@ -0,0 +1,63 @@ +local overrides = require("configs.overrides") + +return { + -- Format the file on save + { + "stevearc/conform.nvim", + event = 'BufWritePre', + config = function() + require "configs.conform" + end, + }, + -- Install the parser (overrides) + { + "nvim-treesitter/nvim-treesitter", + opts = overrides.treesitter, + }, + -- File explorer (overrides) + { + "nvim-tree/nvim-tree.lua", + opts = overrides.nvimtree, + }, + -- Install and manage LSP servers (overrides) + { + "williamboman/mason.nvim", + opts = overrides.mason, + }, + -- LSP configuration (overrides) + { + "neovim/nvim-lspconfig", + config = function() + require("nvchad.configs.lspconfig").defaults() + require "configs.lspconfig" + end, + dependencies = { + { + "nvimdev/lspsaga.nvim", + config = function() + require('lspsaga').setup({ + lightbulb = { + virtual_text = false, + }, + code_action = { + extend_gitsigns = true, + }, + rename = { + auto_save = true, + } + }) + end, + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-tree/nvim-web-devicons", + } + } + }, + }, + { + "mfussenegger/nvim-dap", + dependencies = { + "mfussenegger/nvim-dap-python", + }, + } +} diff --git a/private_dot_config/nvim/lua/plugins/plugins.lua b/private_dot_config/nvim/lua/plugins/plugins.lua new file mode 100644 index 0000000..f307967 --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/plugins.lua @@ -0,0 +1,343 @@ +local plugins = { + -- Open binary files in hex mode and edit them + { + "RaafatTurki/hex.nvim", + config = true, + lazy = false, + }, + -- Auto-save files when in normal mode + { + "Pocco81/auto-save.nvim", + lazy = false, + config = function() + require("auto-save").setup({}) + end, + }, + -- Open every file where you left off + { + "ethanholz/nvim-lastplace", + event = "BufRead", + config = function() + require("nvim-lastplace").setup({ + lastplace_ignore_buftype = { "quickfix", "nofile", "help" }, + lastplace_ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit", }, + lastplace_open_folds = true, + }) + end, + }, + -- Map keys for better word movement + { + "chrisgrieser/nvim-spider", + lazy = true, + }, + -- Map keys for smooth scrolling + { + "karb94/neoscroll.nvim", + event = "WinScrolled", + config = function() + require('neoscroll').setup({ + -- All these keys will be mapped to their corresponding default scrolling animation + mappings = { '', '', '', '', '', '', 'zt', 'zz', 'zb' }, + hide_cursor = true, -- Hide cursor while scrolling + stop_eof = true, -- Stop at when scrolling downwards + use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope + respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file + cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further + easing_function = nil, -- Default easing function + pre_hook = nil, -- Function to run before the scrolling animation starts + post_hook = nil, -- Function to run after the scrolling animation ends + }) + end, + }, + -- Underline current and matching word + { + "itchyny/vim-cursorword", + event = {"BufEnter", "BufNewFile"}, + config = function() + vim.api.nvim_command("augroup user_plugin_cursorword") + vim.api.nvim_command("autocmd!") + vim.api.nvim_command("autocmd FileType NvimTree,lspsagafinder,dashboard,vista let b:cursorword = 0") + vim.api.nvim_command("autocmd WinEnter * if &diff || &pvw | let b:cursorword = 0 | endif") + vim.api.nvim_command("autocmd InsertEnter * let b:cursorword = 0") + vim.api.nvim_command("autocmd InsertLeave * let b:cursorword = 1") + vim.api.nvim_command("augroup END") + end, + }, + -- Highlight the entire line in visual line mode + { + "0xAdk/full_visual_line.nvim", + keys = 'V', + opts = {}, + }, + -- Display number of uses of a Function + { + 'VidocqH/lsp-lens.nvim', + event = "VeryLazy", + opts = { + setup = function() + require('lsp-lens').setup() + end, + }, + }, + -- Split or join block of code + { + "Wansmer/treesj", + dependencies = { 'nvim-treesitter/nvim-treesitter' }, + config = function() + require('treesj').setup({ + use_default_keymaps = false, + }) + end, + }, + -- Replace the UI for messages, cmdline, and the popupmenu + { + "folke/noice.nvim", + event = "VeryLazy", + config = function() + require("noice").setup({ + lsp = { + override = { + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, + }, + signature = { enable = false }, + hover = { enable = false }, + }, + presets = { + bottom_search = true, + command_palette = true, + long_message_to_split = true, + inc_rename = false, + lsp_doc_border = false, + }, + }) + end, + dependencies = { + "MunifTanjim/nui.nvim", + { + "rcarriga/nvim-notify", + opts = { + background_colour = "#000000", + } + }, + }, + opts = { + }, + }, + -- Display the lsp diagnostics in a window + { + "folke/trouble.nvim", + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = "Trouble", + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "cs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + }, + }, + -- Minimap plugin + { + "gorbit99/codewindow.nvim", + lazy = false, + config = function() + local codewindow = require("codewindow") + -- vim.api.nvim_set_hl(0, "CodewindowBorder", {fg = "#928374"}) + codewindow.setup({ + auto_enable = true, + minimap_width = 10, + screen_bounds = "background", + window_border = "none", + }) + codewindow.apply_default_keybinds({}) + end, + }, + -- Highlight the indent line and the current chunk + { + "shellRaining/hlchunk.nvim", + event = { "UIEnter" }, + config = function() + require("hlchunk").setup({ + chunk = { + enable = true, + chars = { + horizontal_line = "─", + vertical_line = "│", + left_top = "╭", + left_bottom = "╰", + right_arrow = ">", + }, + style = { + { fg = "#FABD2F" }, + { fg = "#c21f30" }, -- this fg is used to highlight wrong chunk + }, + }, + indent = { + enable = false, + }, + line_num = { + enable = true, + style = "#FABD2F", + }, + blank = { + enable = false, + }, + }) + end + }, + -- Integrate Github Copilot in NeoVim + { + "zbirenbaum/copilot.lua", + lazy = false, + cmd = "Copilot", + event = "InsertEnter", + config = function() + require("copilot").setup({ + panel = { + enabled = true, + auto_refresh = true, + keymap = { + jump_prev = "[[", + jump_next = "]]", + accept = "", + refresh = "gr", + open = "" + }, + layout = { + position = "bottom", -- | top | left | right + ratio = 0.4 + }, + }, + suggestion = { + enabled = true, + auto_trigger = true, + debounce = 75, + keymap = { + accept = "", + accept_word = false, + accept_line = false, + next = "", + prev = "", + dismiss = "", + }, + }, + filetypes = { + yaml = false, + markdown = true, + help = false, + gitcommit = false, + gitrebase = false, + hgcommit = false, + svn = false, + cvs = false, + ["."] = false, + }, + copilot_node_command = 'node', -- Node.js version must be > 18.x + server_opts_overrides = {}, + }) + end, + }, + -- Chat for copilot + { + "CopilotC-Nvim/CopilotChat.nvim", + event = "VeryLazy", + branch = "main", + dependencies = { + { "zbirenbaum/copilot.lua" }, -- or github/copilot.vim + { "nvim-lua/plenary.nvim" }, -- for curl, log wrapper + { + 'MeanderingProgrammer/render-markdown.nvim', + dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = {}, + config = function () + require('render-markdown').setup({ + file_types = { 'markdown', 'copilot-chat' }, + }) + end + }, + }, + build = "make tiktoken", + opts = { + debug = true, -- Enable debugging + model = "claude-3.5-sonnet", + }, + keys = { + { + "ccq", + function() + local input = vim.fn.input("Quick Chat: ") + if input ~= "" then + require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer }) + end + end, + desc = "CopilotChat - Quick chat", + }, + { + "ccf", + function() + require("CopilotChat").ask("Fix this, using the lsp diagnostics if needed", { selection = require("CopilotChat.select").visual }) + end, + desc = "CopilotChat - Fix this", + }, + }, + config = function () + require('CopilotChat').setup({ + highlight_headers = false, + separator = '---', + error_header = '> [!ERROR] Error', + }) + end + }, + -- Suspend unused lsp + { + "zeioth/garbage-day.nvim", + dependencies = "neovim/nvim-lspconfig", + event = "VeryLazy", + }, + -- DAP and JTDLS (lsp) configuration for Java + { + "nvim-java/nvim-java", + lazy = false, + dependencies = { + "nvim-java/lua-async-await", + "nvim-java/nvim-java-core", + "nvim-java/nvim-java-test", + "nvim-java/nvim-java-dap", + "nvim-java/nvim-java-refactor", + "MunifTanjim/nui.nvim", + "neovim/nvim-lspconfig", + "mfussenegger/nvim-dap", + { + "williamboman/mason.nvim", + opts = { + registries = { + "github:nvim-java/mason-registry", + "github:mason-org/mason-registry", + }, + }, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = { + handlers = { + ["jdtls"] = function() + require("java").setup() + require("lspconfig").jdtls.setup({}) + end, + }, + }, + }, + }, + } +} + +return plugins diff --git a/private_dot_config/ohmyposh/prompt.json b/private_dot_config/ohmyposh/prompt.json new file mode 100644 index 0000000..eca72ae --- /dev/null +++ b/private_dot_config/ohmyposh/prompt.json @@ -0,0 +1,138 @@ +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "blocks": [ + { + "alignment": "left", + "segments": [ + { + "background": "#a313a8", + "foreground": "#FFEB3B", + "style": "plain", + "template": "\u26a1 ", + "type": "root" + }, + { + "background": "#3A3A3A", + "foreground": "#ffffff", + "leading_diamond": "\u256d\u2500\ue0b6", + "style": "diamond", + "template": "{{ if .WSL }}WSL at {{ end }}{{.Icon}} ", + "type": "os" + }, + { + "background": "#458588", + "foreground": "#ffffff", + "leading_diamond": "<#49404f>\ue0b0", + "properties": { + "folder_icon": "...", + "folder_separator_icon": " \ue0bd ", + "home_icon": "\ueb06", + "style": "agnoster_short" + }, + "style": "diamond", + "template": " {{ .Path }} ", + "trailing_diamond": "\ue0b0", + "type": "path" + }, + { + "background": "#98971A", + "background_templates": [ + "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}", + "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FF4500{{ end }}", + "{{ if gt .Ahead 0 }}#B388FF{{ end }}", + "{{ if gt .Behind 0 }}#B388FF{{ end }}" + ], + "foreground": "#000000", + "powerline_symbol": "\ue0b0", + "properties": { + "fetch_stash_count": true, + "fetch_status": true + }, + "style": "powerline", + "template": " {{ .HEAD }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ", + "type": "git" + }, + { + "background": "#49404f", + "foreground": "#ffffff", + "leading_diamond": "\ue0b0", + "properties": { + "style": "dallas", + "threshold": 0 + }, + "style": "diamond", + "template": " {{ .FormattedMs }}s ", + "trailing_diamond": "\ue0b0", + "type": "executiontime" + }, + { + "background": "#910000", + "foreground": "#ffffff", + "powerline_symbol": "\ue0b0", + "style": "powerline", + "template": " \uf12a {{ reason .Code }} ", + "type": "status" + } + ], + "type": "prompt" + }, + { + "alignment": "right", + "segments": [ + { + "background": "#29315A", + "foreground": "#43CCEA", + "leading_diamond": "\ue0c5", + "trailing_diamond": "\ue0bc", + "style": "diamond", + "template": " {{ .UserName }} / {{ .Shell }} ", + "type": "session" + }, + { + "background": "#29315A", + "foreground": "#3EC669", + "properties": { + "time_format": "15:04:05" + }, + "leading_diamond": "\ue0ba", + "style": "diamond", + "template": " {{ .CurrentDate | date .Format }} ", + "type": "time" + } + ], + "type": "prompt" + }, + { + "alignment": "left", + "newline": true, + "segments": [ + { + "foreground": "#49404f", + "style": "plain", + "template": "\u2570\u2500", + "type": "text" + }, + { + "foreground": "#ffffff", + "foreground_templates": [ + "{{ if gt .Code 0 }}#ff0000{{ end }}" + ], + "properties": { + "always_enabled": true + }, + "style": "plain", + "template": "\u276f ", + "type": "status" + } + ], + "type": "prompt" + } + ], + "transient_prompt": { + "background": "transparent", + "foreground": "#ebdbb2", + "template": "> " + }, + "console_title_template": "{{if .Root}} \u26a1 {{end}}{{.Folder | replace \"~\" \"🏚\" }} @ {{.HostName}}", + "version": 3 +} diff --git a/private_dot_config/qt5ct/qt5ct.conf b/private_dot_config/qt5ct/qt5ct.conf new file mode 100644 index 0000000..da15637 --- /dev/null +++ b/private_dot_config/qt5ct/qt5ct.conf @@ -0,0 +1,25 @@ +[Appearance] +color_scheme_path=/usr/share/qt5ct/colors/darker.conf +custom_palette=true +icon_theme=Gruvbox-Material-Dark +standard_dialogs=default +style=kvantum-dark + +[Fonts] +fixed="JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0" +general="JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0" + +[Interface] +activate_item_on_single_click=1 +buttonbox_layout=0 +cursor_flash_time=1000 +dialog_buttons_have_icons=1 +double_click_interval=400 +gui_effects=@Invalid() +keyboard_scheme=2 +menus_have_icons=true +show_shortcuts_in_context_menus=true +stylesheets=@Invalid() +toolbutton_style=4 +underline_shortcut=1 +wheel_scroll_lines=3 diff --git a/private_dot_config/rofi/config.rasi b/private_dot_config/rofi/config.rasi new file mode 100644 index 0000000..8ef3b0a --- /dev/null +++ b/private_dot_config/rofi/config.rasi @@ -0,0 +1,16 @@ +configuration { + modi: "drun,run,window"; + font: "JetBrainsMono Nerd Font 12"; + terminal: "kitty"; + drun-display-format: "{icon} {name}"; + location: 0; + disable-history: false; + hide-scrollbar: true; + display-drun: " Apps "; + display-run: " Run "; + display-window: " 﩯 Window"; + display-Network: " 󰤨 Network"; + sidebar-mode: true; +} + +@theme "gruvbox" diff --git a/private_dot_config/rofi/gruvbox.rasi b/private_dot_config/rofi/gruvbox.rasi new file mode 100644 index 0000000..8525b9d --- /dev/null +++ b/private_dot_config/rofi/gruvbox.rasi @@ -0,0 +1,95 @@ +* { + bg-col: #282828; + bg-col-light: #3c3836; + border-col: #504945; + selected-col: #98971a; + blue: #458588; + fg-col: #ebdbb2; + fg-col2: #282828; + grey: #928374; + width: 600; +} + +element-text, element-icon , mode-switcher { + background-color: inherit; + text-color: inherit; +} + +window { + height: 360px; + border: 3px; + border-color: @border-col; + background-color: @bg-col; +} + +mainbox { + background-color: @bg-col; +} + +inputbar { + children: [prompt,entry]; + background-color: @bg-col; + border-radius: 5px; + padding: 2px; +} + +prompt { + background-color: @selected-col; + padding: 6px; + text-color: @bg-col; + border-radius: 3px; + margin: 20px 0px 0px 20px; +} + +textbox-prompt-colon { + expand: false; + str: ":"; +} + +entry { + padding: 6px; + margin: 20px 0px 0px 10px; + text-color: @fg-col; + background-color: @bg-col; +} + +listview { + border: 0px 0px 0px; + padding: 6px 0px 0px; + margin: 10px 0px 0px 20px; + columns: 2; + lines: 5; + background-color: @bg-col; +} + +element { + padding: 5px; + background-color: @bg-col; + text-color: @fg-col ; +} + +element-icon { + size: 25px; +} + +element selected { + background-color: @selected-col ; + text-color: @fg-col2 ; +} + +mode-switcher { + spacing: 0; +} + +button { + padding: 10px; + background-color: @bg-col-light; + text-color: @grey; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +button selected { + background-color: @bg-col; + text-color: @selected-col; +} diff --git a/private_dot_config/swaylock/config b/private_dot_config/swaylock/config new file mode 100644 index 0000000..a0d7b76 --- /dev/null +++ b/private_dot_config/swaylock/config @@ -0,0 +1,55 @@ +# General appearance settings +font=JetBrainsMono Nerd Font +font-size=20 + +# Enable effects +screenshots +fade-in=0.2 +effect-blur=15x3 +effect-scale=0.3 +effect-vignette=0.2:0.5 + +# Lock indicator +indicator +indicator-radius=100 +indicator-thickness=7 +indicator-caps-lock + +# Inner ring +inside-color=282828aa +inside-clear-color=98971a66 +inside-caps-lock-color=d7992166 +inside-ver-color=45858866 +inside-wrong-color=cc241d66 + +# Outer ring +ring-color=98971a66 +ring-clear-color=98971acc +ring-caps-lock-color=d79921cc +ring-ver-color=458588cc +ring-wrong-color=cc241dcc + +# Text +text-color=ebdbb2cc +text-clear-color=282828cc +text-caps-lock-color=282828cc +text-ver-color=282828cc +text-wrong-color=282828cc + +# Special keys +key-hl-color=98971acc +bs-hl-color=cc241dcc +caps-lock-key-hl-color=d79921cc +caps-lock-bs-hl-color=cc241dcc + +# Separator +separator-color=28282800 + +# Date and time format +timestr=%H:%M:%S +datestr=%A, %d %B + +# Behavior +ignore-empty-password +show-failed-attempts +show-keyboard-layout diff --git a/private_dot_config/tealdeer/config.toml b/private_dot_config/tealdeer/config.toml new file mode 100644 index 0000000..ffa42b6 --- /dev/null +++ b/private_dot_config/tealdeer/config.toml @@ -0,0 +1,20 @@ +[display] +use_pager = false +compact = false + +[style.description] +bold = true + +[style.command_name] +foreground = "blue" +bold = true + +[style.exemple_text] +background = "blue" + +[style.exemple_variable] +underline = true + +[updates] +auto_update = true +auto_update_interval_hours = 360 diff --git a/private_dot_config/topgrade.d/topgrade.toml b/private_dot_config/topgrade.d/topgrade.toml new file mode 100644 index 0000000..f382df6 --- /dev/null +++ b/private_dot_config/topgrade.d/topgrade.toml @@ -0,0 +1,229 @@ +# Include any additional configuration file(s) +# [include] sections are processed in the order you write them +# Files in $CONFIG_DIR/topgrade.d/ are automatically included before this file +[include] +# paths = ["~/.config/topgrade/topgrade.toml"] + + +[misc] +# Run `sudo -v` to cache credentials at the start of the run +# This avoids a blocking password prompt in the middle of an unattended run +# (default: false) +pre_sudo = true + +# Sudo command to be used +sudo_command = "sudo" + +# Disable specific steps - same options as the command line flag +# disable = ["system", "emacs"] + +# Ignore failures for these steps +# ignore_failures = ["powershell"] + +# List of remote machines with Topgrade installed on them +# remote_topgrades = ["toothless", "pi", "parnas"] + +# Path to Topgrade executable on remote machines +# remote_topgrade_path = ".cargo/bin/topgrade" + +# Arguments to pass to SSH when upgrading remote systems +# ssh_arguments = "-o ConnectTimeout=2" + +# Do not set the terminal title (default: true) +set_title = true + +# Display the time in step titles (default: true) +display_time = true + +# Don't ask for confirmations (no default value) +assume_yes = true + +# Do not ask to retry failed steps (default: false) +no_retry = true + +# Run inside tmux (default: false) +# run_in_tmux = true + +# Cleanup temporary or old files (default: false) +cleanup = true + +# Send a notification for every step (default: false) +notify_each_step = false + +# Skip sending a notification at the end of a run (default: false) +skip_notify = true + +# The Bash-it branch to update (default: "stable") +# bashit_branch = "stable" + +# Run specific steps - same options as the command line flag +# only = ["system", "emacs"] + +# Whether to self update +# +# this will be ignored if the binary is built without self update support +# +# available also via setting the environment variable TOPGRADE_NO_SELF_UPGRADE) +no_self_update = false + +# Extra tracing filter directives +# These are prepended to the `--log-filter` argument +# See: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives +# log_filters = ["topgrade::command=debug", "warn"] + + +# Commands to run before anything +[pre_commands] +# "Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" + + +# Commands to run after anything +[post_commands] +# "Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" + + +# Custom commands +[commands] +# "Python Environment" = "~/dev/.env/bin/pip install -i https://pypi.python.org/simple -U --upgrade-strategy eager jupyter" +# "Custom command using interactive shell (unix)" = "-i vim_upgrade" + + +[python] +# enable_pip_review = true ###disabled by default +# enable_pip_review_local = true ###disabled by default +# enable_pipupgrade = true ###disabled by default +# pipupgrade_arguments = "-y -u --pip-path pip" ###disabled by default + + +[composer] +# self_update = true + + +[brew] +# greedy_cask = true +# autoremove = true + + +[linux] +# Arch Package Manager to use. +# Allowed values: +# autodetect, aura, garuda_update, pacman, pamac, paru, pikaur, trizen, yay +arch_package_manager = "pacman" + +# Arguments to pass yay (or paru) when updating packages +# yay_arguments = "--nodevel" + +# Arguments to pass dnf when updating packages +# dnf_arguments = "--refresh" + +# aura_aur_arguments = "-kx" + +# aura_pacman_arguments = "" +# garuda_update_arguments = "" + +# show_arch_news = true + +# trizen_arguments = "--devel" + +# pikaur_arguments = "" + +# pamac_arguments = "--no-devel" + +# enable_tlmgr = true + +# emerge_sync_flags = "-q" + +# emerge_update_flags = "-uDNa --with-bdeps=y world" + +# redhat_distro_sync = false + +# suse_dup = false + +# rpm_ostree = false + +# nix_arguments = "--flake" + +# nix_env_arguments = "--prebuilt-only" + +# Extra Home Manager arguments +# home_manager_arguments = ["--flake", "file"] + + +[git] +# How many repos to pull at max in parallel +# max_concurrency = 5 + +# Additional git repositories to pull +# repos = [ +# "~/src/*/", +# "~/.config/something" +# ] + +# Don't pull the predefined git repos +# pull_predefined = false + +# Arguments to pass Git when pulling Repositories +# arguments = "--rebase --autostash" + + +[windows] +# Manually select Windows updates +# accept_all_updates = false + +# open_remotes_in_new_terminal = true + +# wsl_update_pre_release = true + +# wsl_update_use_web_download = true + +# Causes Topgrade to rename itself during the run to allow package managers +# to upgrade it. Use this only if you installed Topgrade by using a package +# manager such as Scoop or Cargo +# self_rename = true + +# Enable WinGet upgrade +# enable_winget = true + + +[npm] +# Use sudo if the NPM directory isn't owned by the current user +# use_sudo = true + + +[yarn] +# Run `yarn global upgrade` with `sudo` +# use_sudo = true + + +[vim] +# For `vim-plug`, execute `PlugUpdate!` instead of `PlugUpdate` +# force_plug_update = true + + +[firmware] +# Offer to update firmware; if false just check for and display available updates +# upgrade = true + + +[vagrant] +# Vagrant directories +# directories = [] + +# power on vagrant boxes if needed +# power_on = true + +# Always suspend vagrant boxes instead of powering off +# always_suspend = true + + +[flatpak] +# Use sudo for updating the system-wide installation +# use_sudo = true + + +[distrobox] +# use_root = false + +# containers = ["archlinux-latest"] +[containers] +# ignored_containers = ["ghcr.io/rancher-sandbox/rancher-desktop/rdx-proxy:latest"] diff --git a/private_dot_config/waybar/config b/private_dot_config/waybar/config new file mode 100644 index 0000000..5f5d947 --- /dev/null +++ b/private_dot_config/waybar/config @@ -0,0 +1,100 @@ +{ + "layer": "top", + "position": "top", + "height": 30, + "spacing": 0, + "margin-top": 4, + "margin-left": 8, + "margin-right": 8, + + "modules-left": [ + "hyprland/window" + ], + + "modules-center": [ + "hyprland/workspaces" + ], + + "modules-right": [ + "custom/controls", + "network", + "battery", + "clock", + "custom/power" + ], + + "hyprland/window": { + "format": "{}", + "max-length": 50, + "separate-outputs": true + }, + + "hyprland/workspaces": { + "format": "{icon}", + "on-click": "activate", + "format-icons": { + "1": "•", + "2": "•", + "3": "•", + "4": "•", + "5": "•", + "urgent": "", + "active": "", + "default": "·" + }, + "persistent-workspaces": { + "*": 5 + }, + "sort-by-number": true + }, + + "custom/controls": { + "format": "󱁤", + "on-click": "~/.config/waybar/scripts/control-center.sh", + "tooltip": false + }, + + "clock": { + "format": " {:%H:%M}", + "format-alt": " {:%a %d %b}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "calendar": { + "mode": "month", + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + } + }, + + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon}", + "format-charging": "󰂄", + "format-plugged": "", + "format-alt": "{capacity}%", + "format-icons": ["", "", "", "", ""] + }, + + "network": { + "format-wifi": "󰤨", + "format-ethernet": "󰈀", + "format-linked": "󰈀", + "format-disconnected": "󰤭", + "tooltip-format": "{essid} ({signalStrength}%)", + "on-click": "nm-connection-editor" + }, + + "custom/power": { + "format": "󰐥", + "on-click": "wlogout -b 4", + "tooltip": false + } +} diff --git a/private_dot_config/waybar/scripts/control-center.sh b/private_dot_config/waybar/scripts/control-center.sh new file mode 100755 index 0000000..339fd58 --- /dev/null +++ b/private_dot_config/waybar/scripts/control-center.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +WINDOW_NAME="control_center" + +# Vérifie si la fenêtre est déjà ouverte +if eww list-windows | grep -q "^${WINDOW_NAME}\*$"; then + # Si ouverte, la ferme + eww close $WINDOW_NAME +else + # Si fermée, on s'assure que le daemon tourne et on ouvre la fenêtre + if ! eww ping > /dev/null 2>&1; then + eww daemon + sleep 0.5 + fi + eww open $WINDOW_NAME +fi diff --git a/private_dot_config/waybar/style.css b/private_dot_config/waybar/style.css new file mode 100644 index 0000000..1bb6923 --- /dev/null +++ b/private_dot_config/waybar/style.css @@ -0,0 +1,128 @@ +* { + font-family: "JetBrainsMono Nerd Font"; + font-size: 13px; + min-height: 0; + transition: all 0.3s ease; +} + +window#waybar { + background: transparent; + color: #ebdbb2; +} + +tooltip { + background: rgba(40, 40, 40, 0.95); + border: 2px solid rgba(80, 73, 69, 0.9); + border-radius: 8px; +} + +tooltip label { + color: #ebdbb2; +} + +#workspaces { + background: rgba(60, 56, 54, 0.8); + border-radius: 8px; + margin: 4px; + padding: 2px 8px; +} + +#workspaces button { + padding: 0 4px; + background: transparent; + color: #928374; + border: none; + border-radius: 0; + margin: 0 2px; + transition: all 0.3s ease; + font-size: 18px; +} + +#workspaces button.active { + color: #ebdbb2; + font-weight: bold; + padding: 0 8px; +} + +#workspaces button:hover { + color: #ebdbb2; + text-shadow: 0 0 2px rgba(235, 219, 178, 0.377); + background: transparent; +} + +#window { + background: rgba(60, 56, 54, 0.8); + border-radius: 8px; + margin: 4px; + padding: 0 8px; +} + +#custom-controls { + background: rgba(104, 157, 106, 0.8); + color: #282828; + border-radius: 8px; + margin: 4px; + padding: 0 12px; + font-size: 15px; +} + +#custom-controls:hover { + background: rgba(142, 192, 124, 0.8); +} + +#custom-power { + background: rgba(204, 36, 29, 0.8); + color: #282828; + border-radius: 8px; + margin: 4px; + padding: 0 8px; + font-size: 15px; +} + +#custom-power:hover { + background: rgba(251, 73, 52, 0.8); +} + +#clock, +#battery, +#network { + background: rgba(60, 56, 54, 0.8); + padding: 0 12px; + margin: 4px 2px; + border-radius: 8px; + min-width: 16px; +} + +#clock { + background-color: rgba(146, 131, 116, 0.8); + color: #282828; +} + +#battery { + background-color: rgba(152, 151, 26, 0.8); + color: #282828; +} + +#battery.charging { + background-color: rgba(184, 187, 38, 0.8); +} + +#battery.critical:not(.charging) { + background-color: rgba(204, 36, 29, 0.8); + animation: blink 0.5s linear infinite alternate; +} + +@keyframes blink { + to { + background-color: rgba(251, 73, 52, 0.8); + } +} + +#network { + background-color: rgba(69, 133, 136, 0.8); + color: #282828; +} + +#network.disconnected { + background-color: rgba(204, 36, 29, 0.8); +} diff --git a/private_dot_config/wlogout/layout b/private_dot_config/wlogout/layout new file mode 100644 index 0000000..7812b50 --- /dev/null +++ b/private_dot_config/wlogout/layout @@ -0,0 +1,24 @@ +{ + "label" : "lock", + "action" : "swaylock", + "text" : "Verrouiller", + "keybind" : "l" +} +{ + "label" : "suspend", + "action" : "systemctl suspend", + "text" : "Suspendre", + "keybind" : "u" +} +{ + "label" : "reboot", + "action" : "systemctl reboot", + "text" : "Redémarrer", + "keybind" : "r" +} +{ + "label" : "shutdown", + "action" : "systemctl poweroff", + "text" : "Éteindre", + "keybind" : "s" +} diff --git a/private_dot_config/wlogout/style.css b/private_dot_config/wlogout/style.css new file mode 100644 index 0000000..b22741f --- /dev/null +++ b/private_dot_config/wlogout/style.css @@ -0,0 +1,63 @@ +* { + background-image: none; + font-family: "JetBrainsMono Nerd Font"; + font-size: 15px; +} + +window { + background-color: rgba(29, 32, 33, 0.85); +} + +button { + color: #928374; + background-color: rgba(60, 56, 54, 0.7); + border-style: solid; + border-width: 2px; + border-radius: 20px; + border-color: rgba(80, 73, 69, 0.5); + padding: 20px; + margin: 20px; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + transition: all 0.3s ease; + outline: none; +} + +button:focus, button:active, button:hover { + background-color: rgba(152, 151, 26, 0.7); + color: #282828; + border-color: #98971a; +} + +#lock { + background-image: image(url("/usr/share/wlogout/icons/lock.png")); +} + +#logout { + background-image: image(url("/usr/share/wlogout/icons/logout.png")); +} + +#suspend { + background-image: image(url("/usr/share/wlogout/icons/suspend.png")); +} + +#hibernate { + background-image: image(url("/usr/share/wlogout/icons/hibernate.png")); +} + +#shutdown { + background-image: image(url("/usr/share/wlogout/icons/shutdown.png")); +} + +#reboot { + background-image: image(url("/usr/share/wlogout/icons/reboot.png")); +} + +button label { + padding-top: 120px; + color: inherit; + font-size: 14px; + font-weight: bold; +} diff --git a/private_dot_config/xdg-desktop-portal/hyprland-portals.conf b/private_dot_config/xdg-desktop-portal/hyprland-portals.conf new file mode 100644 index 0000000..cf421e6 --- /dev/null +++ b/private_dot_config/xdg-desktop-portal/hyprland-portals.conf @@ -0,0 +1,3 @@ +[preferred] +default=hyprland;gtk +org.freedesktop.impl.portal.FileChooser=kde