From 06ec517e209e19972afdc88c667ac34f47c485c2 Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Mon, 16 Jun 2025 21:16:49 +0200 Subject: [PATCH] migrate dotfiles to this repository --- home-manager/dotfiles.nix | 2 +- home/.clang-format | 16 + home/.config/alacritty/alacritty.toml | 37 ++ .../alacritty/themes/kanagawa_lotus.toml | 35 ++ .../alacritty/themes/kanagawa_wave.toml | 35 ++ home/.config/bat/config | 1 + home/.config/dotfiles/clone.sh | 29 ++ home/.config/ghostty/config | 2 + home/.config/git/common.gitconfig | 54 +++ home/.config/git/config | 5 + home/.config/git/ensimag.gitconfig | 3 + home/.config/git/ignore | 4 + home/.config/helix/config.toml | 21 ++ home/.config/helix/languages.toml | 59 ++++ home/.config/hut/config | 3 + home/.config/i3bar-river/bottom-config.toml | 6 + home/.config/i3bar-river/config.toml | 10 + home/.config/i3status-rust/bottom-config.toml | 53 +++ home/.config/i3status-rust/config.toml | 78 +++++ .../i3status-rust/themes/kanagawa.toml | 14 + home/.config/jj/config.toml | 9 + home/.config/kanshi/config | 5 + home/.config/kmonad/config.kbd | 46 +++ home/.config/mpd/mpd.conf | 10 + home/.config/niri/config.kdl | 320 ++++++++++++++++++ home/.config/senpai/senpai.scfg | 4 + home/.config/sh/aliases.sh | 24 ++ home/.config/sh/path.sh | 4 + home/.config/sway/config | 2 + home/.config/sway/config.d/bar | 37 ++ home/.config/sway/config.d/bindings | 169 +++++++++ home/.config/sway/config.d/input | 17 + home/.config/sway/config.d/programs | 16 + home/.config/sway/config.d/theme | 22 ++ home/.config/sway/kanagawa.sway | 110 ++++++ home/.config/swayidle/config | 10 + home/.config/swaylock/config | 29 ++ home/.config/task/taskrc | 4 + home/.config/tofi/config | 176 ++++++++++ home/.config/zsh/haze.zsh | 2 + home/.config/zsh/hooks.sh | 30 ++ home/.zshrc | 27 ++ 42 files changed, 1539 insertions(+), 1 deletion(-) create mode 100644 home/.clang-format create mode 100644 home/.config/alacritty/alacritty.toml create mode 100644 home/.config/alacritty/themes/kanagawa_lotus.toml create mode 100644 home/.config/alacritty/themes/kanagawa_wave.toml create mode 100644 home/.config/bat/config create mode 100644 home/.config/dotfiles/clone.sh create mode 100644 home/.config/ghostty/config create mode 100644 home/.config/git/common.gitconfig create mode 100644 home/.config/git/config create mode 100644 home/.config/git/ensimag.gitconfig create mode 100644 home/.config/git/ignore create mode 100644 home/.config/helix/config.toml create mode 100644 home/.config/helix/languages.toml create mode 100644 home/.config/hut/config create mode 100644 home/.config/i3bar-river/bottom-config.toml create mode 100644 home/.config/i3bar-river/config.toml create mode 100644 home/.config/i3status-rust/bottom-config.toml create mode 100644 home/.config/i3status-rust/config.toml create mode 100644 home/.config/i3status-rust/themes/kanagawa.toml create mode 100644 home/.config/jj/config.toml create mode 100644 home/.config/kanshi/config create mode 100644 home/.config/kmonad/config.kbd create mode 100644 home/.config/mpd/mpd.conf create mode 100644 home/.config/niri/config.kdl create mode 100644 home/.config/senpai/senpai.scfg create mode 100644 home/.config/sh/aliases.sh create mode 100644 home/.config/sh/path.sh create mode 100644 home/.config/sway/config create mode 100644 home/.config/sway/config.d/bar create mode 100644 home/.config/sway/config.d/bindings create mode 100644 home/.config/sway/config.d/input create mode 100644 home/.config/sway/config.d/programs create mode 100644 home/.config/sway/config.d/theme create mode 100644 home/.config/sway/kanagawa.sway create mode 100644 home/.config/swayidle/config create mode 100644 home/.config/swaylock/config create mode 100644 home/.config/task/taskrc create mode 100644 home/.config/tofi/config create mode 100644 home/.config/zsh/haze.zsh create mode 100644 home/.config/zsh/hooks.sh create mode 100644 home/.zshrc diff --git a/home-manager/dotfiles.nix b/home-manager/dotfiles.nix index 818bec3..ff9c6d8 100644 --- a/home-manager/dotfiles.nix +++ b/home-manager/dotfiles.nix @@ -5,7 +5,7 @@ path = lib.mkOption { type = lib.types.path; apply = toString; - default = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/rep/dotfiles"; + default = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/rep/flocon/home"; example = "${config.home.homeDirectory}/.dotfiles"; description = "Location of the dotfiles working copy"; }; diff --git a/home/.clang-format b/home/.clang-format new file mode 100644 index 0000000..340e78a --- /dev/null +++ b/home/.clang-format @@ -0,0 +1,16 @@ +BasedOnStyle: LLVM + +IndentWidth: 8 +TabWidth: 8 +UseTab: Always + +ColumnLimit: 80 + +IndentCaseLabels: false +IndentGotoLabels: false + +BreakBeforeBraces: Custom +BraceWrapping: + AfterFunction: false + +AlwaysBreakAfterDefinitionReturnType: false diff --git a/home/.config/alacritty/alacritty.toml b/home/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..62b95bd --- /dev/null +++ b/home/.config/alacritty/alacritty.toml @@ -0,0 +1,37 @@ +[general] +live_config_reload = false +import = ["~/.config/alacritty/themes/kanagawa_wave.toml"] + +[font] +size = 14 + +[font.bold] +family = "Jetbrains Mono NF" +style = "Bold" + +[font.bold_italic] +family = "Jetbrains Mono NF" +style = "Bold Italic" + +[font.italic] +family = "Jetbrains Mono NF" +style = "Italic" + +[font.normal] +family = "Jetbrains Mono NF" +style = "Regular" + +[[keyboard.bindings]] +action = "CreateNewWindow" +key = "Return" +mods = "Control|Shift" + +[mouse] +hide_when_typing = true + +[window] +opacity = 1.0 + +[window.padding] +x = 4 +y = 4 diff --git a/home/.config/alacritty/themes/kanagawa_lotus.toml b/home/.config/alacritty/themes/kanagawa_lotus.toml new file mode 100644 index 0000000..7621688 --- /dev/null +++ b/home/.config/alacritty/themes/kanagawa_lotus.toml @@ -0,0 +1,35 @@ +[colors.primary] +background = '#f2ecbc' +foreground = '#545464' + +[colors.normal] +black = "#1f1f28" +red = "#c84053" +green = "#6f894e" +yellow = "#77713f" +blue = "#4d699b" +magenta = "#b35b79" +cyan = "#597b75" +white = "#545464" + +[colors.bright] +black = "#8a8980" +red = "#d7474b" +green = "#6e915f" +yellow = "#836f4a" +blue = "#6693bf" +magenta = "#624c83" +cyan = "#5e857a" +white = "#43436c" + +[colors.selection] +background = '#c9cbd1' +foreground = '#dcd7ba' + +[[colors.indexed_colors]] +index = 16 +color = '#e98a00' + +[[colors.indexed_colors]] +index = 17 +color = '#e82424' diff --git a/home/.config/alacritty/themes/kanagawa_wave.toml b/home/.config/alacritty/themes/kanagawa_wave.toml new file mode 100644 index 0000000..8585305 --- /dev/null +++ b/home/.config/alacritty/themes/kanagawa_wave.toml @@ -0,0 +1,35 @@ +[[colors.indexed_colors]] +color = "0xffa066" +index = 16 + +[[colors.indexed_colors]] +color = "0xff5d62" +index = 17 + +[colors.bright] +black = "0x727169" +blue = "0x7fb4ca" +cyan = "0x7aa89f" +green = "0x98bb6c" +magenta = "0x938aa9" +red = "0xe82424" +white = "0xdcd7ba" +yellow = "0xe6c384" + +[colors.normal] +black = "0x090618" +blue = "0x7e9cd8" +cyan = "0x6a9589" +green = "0x76946a" +magenta = "0x957fb8" +red = "0xc34043" +white = "0xc8c093" +yellow = "0xc0a36e" + +[colors.primary] +background = "0x1f1f28" +foreground = "0xdcd7ba" + +[colors.selection] +background = "0x2d4f67" +foreground = "0xc8c093" diff --git a/home/.config/bat/config b/home/.config/bat/config new file mode 100644 index 0000000..b83e6e2 --- /dev/null +++ b/home/.config/bat/config @@ -0,0 +1 @@ +--theme gruvbox-dark diff --git a/home/.config/dotfiles/clone.sh b/home/.config/dotfiles/clone.sh new file mode 100644 index 0000000..bca0a85 --- /dev/null +++ b/home/.config/dotfiles/clone.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +DOTFILES_GIT_URL='git@git.sr.ht:~rpqt/dotfiles' + +# The first argument can be the destination folder +if [ $# -eq 1 ]; then + DOTFILES_DIR="$1" +else + DOTFILES_DIR="$HOME/.dotfiles" +fi + +echo "$DOTFILES_DIR" >> "$HOME/.gitignore" + +git clone --bare "$DOTFILES_GIT_URL" "$DOTFILES_DIR" + +alias dotfiles='/usr/bin/git --git-dir=$DOTFILES_DIR --work-tree=$HOME' + +dotfiles config --local status.showUntrackedFiles no + +dotfiles checkout + +tee "$HOME/.config/git/config" >/dev/null </dev/null; then + alias h='helix' +else + alias h='hx' +fi +if command -v eza >/dev/null; then + alias ls='eza' +else + alias ls='ls --color -h' +fi +alias lsa='ls -A' +alias ll='ls -l' +alias lla='ls -lA' +alias ..='cd ..' +alias ...='cd ../..' +alias bt='bluetoothctl' +alias go='GOPROXY=direct go' +alias ts='tree-sitter' +alias g='git' +alias c='cargo' +alias MAKE='make clean && make' +alias n='myrtle --notebook-dir=$HOME/notes' diff --git a/home/.config/sh/path.sh b/home/.config/sh/path.sh new file mode 100644 index 0000000..c41beec --- /dev/null +++ b/home/.config/sh/path.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +# Personnal scripts +export PATH="$PATH:$HOME/bin" diff --git a/home/.config/sway/config b/home/.config/sway/config new file mode 100644 index 0000000..c2ced1d --- /dev/null +++ b/home/.config/sway/config @@ -0,0 +1,2 @@ +include ~/.config/sway/config.d/* +include /etc/sway/config.d/* diff --git a/home/.config/sway/config.d/bar b/home/.config/sway/config.d/bar new file mode 100644 index 0000000..3999f33 --- /dev/null +++ b/home/.config/sway/config.d/bar @@ -0,0 +1,37 @@ +include ~/.config/sway/kanagawa.sway + +set $font "JetBrains Mono NF Bold 12" +set $background #000000 + +bar { + id top_bar + status_command i3status-rs + position top + height 24 + font $font + workspace_min_width 20 + status_padding 0 + status_edge_padding 0 + colors { + background $background + focused_workspace #000000 #000000 $fujiWhite + active_workspace #000000 #000000 $fujiGray + inactive_workspace #000000 #000000 $fujiGray + } +} + +bar { + id bottom_bar + status_command i3status-rs ~/.config/i3status-rust/bottom-config.toml + position bottom + height 24 + font $font + workspace_buttons no + binding_mode_indicator no + tray_output none + colors { + background $background + } +} + +# vim:ft=swayconfig diff --git a/home/.config/sway/config.d/bindings b/home/.config/sway/config.d/bindings new file mode 100644 index 0000000..4cdcfab --- /dev/null +++ b/home/.config/sway/config.d/bindings @@ -0,0 +1,169 @@ +set $mod Mod4 +set $left h +set $down j +set $up k +set $right l + +set $term alacritty msg create-window || alacritty +set $launcher tofi-drun | xargs swaymsg exec -- +set $lock swaylock + +set $screenshots $HOME/Pictures/Screenshots + +floating_modifier $mod normal + +bindsym { + # Start a terminal + $mod+Return exec $term + + # Kill focused window + $mod+Shift+q kill + $mod+w kill + + # Application launcher + $mod+d exec $launcher + + # Reload the configuration file + $mod+Shift+c reload + + # Exit sway / log out + $mod+Shift+e exec swaynag \ + -t warning \ + -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' \ + -B 'Yes, exit sway' 'swaymsg exit' \ + --dismiss-button 'Cancel' + + # Move focus + $mod+$left focus left + $mod+$down focus down + $mod+$up focus up + $mod+$right focus right + + $mod+Left focus left + $mod+Down focus down + $mod+Up focus up + $mod+Right focus right + + # Move the focused window + $mod+Shift+$left move left + $mod+Shift+$down move down + $mod+Shift+$up move up + $mod+Shift+$right move right + + $mod+Shift+Left move left + $mod+Shift+Down move down + $mod+Shift+Up move up + $mod+Shift+Right move right + + --to-code { + # Switch to workspace + $mod+ampersand workspace number 1 + $mod+eacute workspace number 2 + $mod+quotedbl workspace number 3 + $mod+apostrophe workspace number 4 + $mod+parenleft workspace number 5 + $mod+minus workspace number 6 + $mod+egrave workspace number 7 + $mod+underscore workspace number 8 + $mod+ccedilla workspace number 9 + $mod+agrave workspace number 10 + } + + # Move focused container to workspace + $mod+1 move container to workspace number 1 + $mod+2 move container to workspace number 2 + $mod+3 move container to workspace number 3 + $mod+4 move container to workspace number 4 + $mod+5 move container to workspace number 5 + $mod+6 move container to workspace number 6 + $mod+7 move container to workspace number 7 + $mod+8 move container to workspace number 8 + $mod+9 move container to workspace number 9 + $mod+0 move container to workspace number 10 + + + $mod+Shift+1 move container to workspace number 1 + $mod+Shift+2 move container to workspace number 2 + $mod+Shift+3 move container to workspace number 3 + $mod+Shift+4 move container to workspace number 4 + $mod+Shift+5 move container to workspace number 5 + $mod+Shift+6 move container to workspace number 6 + $mod+Shift+7 move container to workspace number 7 + $mod+Shift+8 move container to workspace number 8 + $mod+Shift+9 move container to workspace number 9 + $mod+Shift+0 move container to workspace number 10 + + # Split + $mod+b splith + $mod+v splitv + + # Switch the current container between different layout styles + $mod+s layout stacking + $mod+t layout tabbed + $mod+m layout toggle split + + # Toggle fullscreen on the current focus + $mod+f fullscreen + + # Toggle floating mode for current container + $mod+Shift+f floating toggle + + # Move focus to the parent container + $mod+a focus parent + + # Move the focused window to the scratchpad + $mod+Shift+equal move scratchpad + + # Cycle through scratchpad windows + $mod+equal scratchpad show + + # Volume + XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0 + XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.0 + XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + + # Media + XF86AudioPlay exec playerctl play-pause + XF86AudioNext exec playerctl next + XF86AudioPrev exec playerctl previous + XF86Search exec $launcher + + # Brightness + --locked { + XF86MonBrightnessDown exec brightnessctl set 5%- + XF86MonBrightnessUp exec brightnessctl set +5% + } + + # Lock + Ctrl+Mod4+L exec $lock + + # Screenshot + ## Full screen capture + Print exec grim "$screenshots/$(date +\"Screenshot from %Y-%m-%d %H-%M-%S.png\")" + + ## Select a zone and save + $mod+Shift+s exec grim -g "$(slurp -d)" "$screenshots/$(date +\"Screenshot from %Y-%m-%d %H-%M-%S.png\")" + + ## Select a zone and copy to clipboard + $mod+Shift+Ctrl+s exec grim -g "$(slurp -d)" - | wl-copy +} + +mode "resize" bindsym { + # Shrink or grow the container + $left resize shrink width 10px + $down resize grow height 10px + $up resize shrink height 10px + $right resize grow width 10px + + # Same with arrow keys + Left resize shrink width 10px + Down resize grow height 10px + Up resize shrink height 10px + Right resize grow width 10px + + # Return to default mode + Return mode "default" + Escape mode "default" +} +bindsym $mod+r mode "resize" diff --git a/home/.config/sway/config.d/input b/home/.config/sway/config.d/input new file mode 100644 index 0000000..0afda8f --- /dev/null +++ b/home/.config/sway/config.d/input @@ -0,0 +1,17 @@ +input "1267:12613:ASUE140C:00_04F3:3145_Keyboard" { + xkb_layout "fr,us(colemak_dh),us" + xkb_options grp:win_space_toggle +} + +input "1:1:AT_Translated_Set_2_keyboard" { + xkb_layout "fr,us(colemak_dh),us" + xkb_options grp:win_space_toggle +} + +input type:touchpad { + tap enabled + natural_scroll enabled +} + +bindgesture swipe:right workspace prev +bindgesture swipe:left workspace next diff --git a/home/.config/sway/config.d/programs b/home/.config/sway/config.d/programs new file mode 100644 index 0000000..2d92c3b --- /dev/null +++ b/home/.config/sway/config.d/programs @@ -0,0 +1,16 @@ +# Directory for received taildrop files +set $taildrop_inbox $HOME/Downloads + +# Screen temperature +exec wlsunset -l 45 -L 6 + +# Notifications +exec mako + +# Output management +exec kanshi + +# Auto receive taildrop files +exec tailscale file get --loop --conflict=rename $taildrop_inbox + +exec swayidle -w diff --git a/home/.config/sway/config.d/theme b/home/.config/sway/config.d/theme new file mode 100644 index 0000000..da1d540 --- /dev/null +++ b/home/.config/sway/config.d/theme @@ -0,0 +1,22 @@ +include ~/.config/sway/kanagawa.sway + +default_border pixel 3 +smart_borders on +titlebar_border_thickness 2 +font "JetBrains Mono NF 11" + +gaps outer 0 +gaps inner 0 + +set $waveBlue3 #3D5F77 +set $waveBlue4 #6D8FA7 + +# class border background text indicator child_border +client.focused_inactive $sumiInk2 $sumiInk1 $fujiWhite $sumiInk2 $sumiInk2 +client.unfocused $sumiInk2 $sumiInk1 $fujiWhite $sumiInk2 $sumiInk2 +client.focused $waveBlue3 $waveBlue2 $fujiWhite $waveBlue4 $waveBlue2 +client.focused_tab_title $waveBlue2 $waveBlue2 $fujiWhite + +for_window [app_id="firefox"] border none + +output * bg ~/.local/state/wallpaper fill diff --git a/home/.config/sway/kanagawa.sway b/home/.config/sway/kanagawa.sway new file mode 100644 index 0000000..4cb43d8 --- /dev/null +++ b/home/.config/sway/kanagawa.sway @@ -0,0 +1,110 @@ +# Default foreground +set $fujiWhite #DCD7BA + +# Dark foreground (statuslines) +set $oldWhite #C8C093 + +# Dark background (statuslines and floating windows) +set $sumiInk0 #16161D + +# Default background +set $sumiInk1 #1F1F28 + +# Lighter background (colorcolumn, folds) +set $sumiInk2 #2A2A37 + +# Lighter background (cursorline) +set $sumiInk3 #363646 + +# Darker foreground (line numbers, fold column, non-text characters), float borders +set $sumiInk4 #54546D + +# Popup background, visual selection background +set $waveBlue1 #223249 + +# Popup selection background, search background +set $waveBlue2 #2D4F67 + +# Diff Add (background) +set $winterGreen #2B3328 + +# Diff Change (background) +set $winterYellow #49443C + +# Diff Deleted (background) +set $winterRed #43242B + +# Diff Line (background) +set $winterBlue #252535 + +# Git Add +set $autumnGreen #76946A + +# Git Delete +set $autumnRed #C34043 + +# Git Change +set $autumnYellow #DCA561 + +# Diagnostic Error +set $samuraiRed #E82424 + +# Diagnostic Warning +set $roninYellow #FF9E3B + +# Diagnostic Info +set $waveAqua1 #6A9589 + +# Diagnostic Hint +set $dragonBlue #658594 + +# Comments +set $fujiGray #727169 + +# Light foreground +set $springViolet1 #938AA9 + +# Statements and Keywords +set $oniViolet #957FB8 + +# Functions and Titles +set $crystalBlue #7E9CD8 + +# Brackets and punctuation +set $springViolet2 #9CABCA + +# Specials and builtin functions +set $springBlue #7FB4CA + +# Not used +set $lightBlue #A3D4D5 + +# Types +set $waveAqua2 #7AA89F + +# Strings +set $springGreen #98BB6C + +# Not used +set $boatYellow1 #938056 + +# Operators, RegEx +set $boatYellow2 #C0A36E + +# Identifiers +set $carpYellow #E6C384 + +# Numbers +set $sakuraPink #D27E99 + +# Standout specials 1 (builtin variables) +set $waveRed #E46876 + +# Standout specials 2 (exception handling, return) +set $peachRed #FF5D62 + +# Constants, imports, booleans +set $surimiOrange #FFA066 + +# Deprecated +set $katanaGray #717C7C diff --git a/home/.config/swayidle/config b/home/.config/swayidle/config new file mode 100644 index 0000000..5e04ce4 --- /dev/null +++ b/home/.config/swayidle/config @@ -0,0 +1,10 @@ +# This will lock the screen after 300 seconds of inactivity. +timeout 300 "swaylock -f" + +# Turn off all displays after another 300 seconds. +# and turn them back on when resumed. +timeout 600 "swaymsg 'output * dpms off'" resume "swaymsg 'output * dpms on'" + +# Lock the screen before the computer goes to sleep. +before-sleep "playerctl pause" +before-sleep "swaylock -f" diff --git a/home/.config/swaylock/config b/home/.config/swaylock/config new file mode 100644 index 0000000..e922e9d --- /dev/null +++ b/home/.config/swaylock/config @@ -0,0 +1,29 @@ +daemonize +font=JetBrains Mono NF +font-size=22 +image=~/.local/state/wallpaper + +ring-color=FFFFFF55 +ring-clear-color=FFFFFF55 +ring-ver-color=1885d4 +ring-wrong-color=FF0000 + +key-hl-color=FFFFFF + +inside-color=00000000 +inside-clear-color=00000000 +inside-ver-color=00000000 +inside-wrong-color=00000000 + +line-uses-inside +separator-color=00000000 + +layout-bg-color=00000000 +layout-text-color=FFFFFF + +text-color=FFFFFF +text-clear-color=FFFFFF +text-ver-color=FFFFFF +text-wrong-color=FFFFFF + +indicator-radius=100 diff --git a/home/.config/task/taskrc b/home/.config/task/taskrc new file mode 100644 index 0000000..9185b14 --- /dev/null +++ b/home/.config/task/taskrc @@ -0,0 +1,4 @@ +data.location=~/.local/share/task +hooks.location=~/.config/task/hooks + +include ~/.config/task/sync diff --git a/home/.config/tofi/config b/home/.config/tofi/config new file mode 100644 index 0000000..565bb45 --- /dev/null +++ b/home/.config/tofi/config @@ -0,0 +1,176 @@ +# +### Fonts +# + # Font to use, either a path to a font file or a name. + # + # If a path is given, tofi will startup much quicker, but any + # characters not in the chosen font will fail to render. + # + # Otherwise, fonts are interpreted in Pango format. + font = "JetBrainsMono NF" + + # Point size of text. + font-size = 15 + + # Perform font hinting. Only applies when a path to a font has been + # specified via `font`. Disabling font hinting speeds up text + # rendering appreciably, but will likely look poor at small font pixel + # sizes. + hint-font = true + +# +### Colors +# + # Window background + background-color = #111111DD + + # Border outlines + outline-color = #080800 + + # Border + border-color = #0981E3 + + # Default text + text-color = #C5C9C7 + + # Selection text + selection-color = #0981E3 + + # Matching portion of selection text + selection-match-color = #44BBFF + + # Selection background + selection-background = #00000000 + +# +### Text layout +# + # Prompt to display. + prompt-text = "run: " + + # Extra horizontal padding between prompt and input. + prompt-padding = 0 + + # Maximum number of results to display. + # If 0, tofi will draw as many results as it can fit in the window. + num-results = 0 + + # Spacing between results in pixels. Can be negative. + result-spacing = 8 + + # List results horizontally. + horizontal = false + + # Minimum width of input in horizontal mode. + min-input-width = 0 + + # Extra horizontal padding of the selection background in pixels. + selection-background-padding = 0 + +# +### Window layout +# + # Width and height of the window. Can be pixels or a percentage. + width = 100% + height = 100% + + # Width of the border outlines in pixels. + outline-width = 0 + + # Width of the border in pixels. + border-width = 0 + + # Radius of window corners in pixels. + corner-radius = 0 + + # Padding between borders and text. Can be pixels or a percentage. + padding-top = 200 + padding-bottom = 0 + padding-left = 35% + padding-right = 0 + + # Whether to scale the window by the output's scale factor. + scale = true + +# +### Window positioning +# + # The name of the output to appear on. An empty string will use the + # default output chosen by the compositor. + output = "" + + # Location on screen to anchor the window to. + # + # Supported values: top-left, top, top-right, right, bottom-right, + # bottom, bottom-left, left, center. + anchor = center + + # Set the size of the exclusive zone. + # + # A value of -1 means ignore exclusive zones completely. + # A value of 0 will move tofi out of the way of other windows' zones. + # A value greater than 0 will set that much space as an exclusive zone. + # + # Values greater than 0 are only meaningful when tofi is anchored to a + # single edge. + exclusive-zone = -1 + + # Window offset from edge of screen. Only has an effect when anchored + # to the relevant edge. Can be pixels or a percentage. + margin-top = 0 + margin-bottom = 0 + margin-left = 0 + margin-right = 0 + +# +### Behaviour +# + # Hide the cursor. + hide-cursor = false + + # Sort results by number of usages in run and drun modes. + history = true + + # Use fuzzy matching for searches. + fuzzy-match = false + + # If true, require a match to allow a selection to be made. If false, + # making a selection with no matches will print input to stdout. + # In drun mode, this is always true. + require-match = true + + # If true, typed input will be hidden, and what is displayed (if + # anything) is determined by the hidden-character option. + hide-input = false + + # Replace displayed input characters with a character. If the empty + # string is given, input will be completely hidden. + # This option only has an effect when hide-input is set to true. + hidden-character = "*" + + # If true, directly launch applications on selection when in drun mode. + # Otherwise, just print the command line to stdout. + drun-launch = false + + # The terminal to run terminal programs in when in drun mode. + # This option has no effect if drun-launch is set to true. + # Defaults to the value of the TERMINAL environment variable. + # terminal = foot + + # Delay keyboard initialisation until after the first draw to screen. + # This option is experimental, and will cause tofi to miss keypresses + # for a short time after launch. The only reason to use this option is + # performance on slow systems. + late-keyboard-init = false + + # If true, allow multiple simultaneous processes. + # If false, create a lock file on startup to prevent multiple instances + # from running simultaneously. + multi-instance = false + +# +### Inclusion +# + # Configs can be split between multiple files, and then included + # within each other. + # include = /path/to/config diff --git a/home/.config/zsh/haze.zsh b/home/.config/zsh/haze.zsh new file mode 100644 index 0000000..e7e39ec --- /dev/null +++ b/home/.config/zsh/haze.zsh @@ -0,0 +1,2 @@ +# Highlight the executable in green if it is found +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh diff --git a/home/.config/zsh/hooks.sh b/home/.config/zsh/hooks.sh new file mode 100644 index 0000000..269dee6 --- /dev/null +++ b/home/.config/zsh/hooks.sh @@ -0,0 +1,30 @@ +# Hook direnv if present +if command -v direnv >/dev/null; then + eval "$(direnv hook zsh)" +fi + +# Prompt +if command -v starship >/dev/null; then + source <(starship init zsh) +fi + +# Load opam config if present +if [ -r ~/.opam/opam-init/init.zsh ]; then + source ~/.opam/opam-init/init.zsh > /dev/null 2> /dev/null +fi + +# Launch atuin if it is installed +if command -v atuin >/dev/null; then + eval "$(atuin init zsh)" +fi + +# Set ls/tree/fd theme using vivid if it is installed +if command -v vivid >/dev/null; then + export LS_COLORS="$(vivid generate gruvbox-dark-hard)" +fi + +# Init zoxide if present and alias cd to it +if command -v zoxide >/dev/null; then + eval "$(zoxide init zsh)" + alias cd=z +fi diff --git a/home/.zshrc b/home/.zshrc new file mode 100644 index 0000000..3e47f5e --- /dev/null +++ b/home/.zshrc @@ -0,0 +1,27 @@ +# Path +source ~/.config/sh/path.sh + +# Aliases +source ~/.config/sh/aliases.sh + +# Completion +autoload -Uz compinit +compinit +# sudo completion +zstyle ':completion::complete:*' gain-privileges 1 + +# Line movement with special keys +bindkey "^[[H" beginning-of-line +bindkey "^[[F" end-of-line +bindkey "^[[3~" delete-char + +source ~/.config/zsh/hooks.sh + +if [ -r ~/.profile ]; then + source ~/.profile +fi + +# Load machine-specific config +if [ -r ~/.config/zsh/$HOST.zsh ]; then + source ~/.config/zsh/$HOST.zsh +fi