mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
chezmoi: reorganise repo
This commit is contained in:
parent
b391e03c87
commit
67a78879db
278 changed files with 102 additions and 182 deletions
|
|
@ -1,34 +0,0 @@
|
|||
# .chezmoiignore
|
||||
|
||||
|
||||
# macOS only
|
||||
{{ if ne .chezmoi.os "darwin" -}}
|
||||
{{ end -}}
|
||||
|
||||
# Linux only
|
||||
{{ if ne .chezmoi.os "linux" -}}
|
||||
dot_config/awesome
|
||||
dot_config/dunst
|
||||
dot_config/fcitx5
|
||||
dot_config/hypr
|
||||
dot_config/keyd
|
||||
dot_config/mako
|
||||
dot_config/readline
|
||||
dot_config/rofi
|
||||
dot_config/swaylock
|
||||
dot_config/waybar
|
||||
dot_config/wlogout
|
||||
dot_config/krunnerrc
|
||||
dot_config/user-dirs.dirs
|
||||
dot_config/user-dirs.locale
|
||||
{{ end -}}
|
||||
|
||||
# Windows only
|
||||
{{ if ne .chezmoi.os "windows" -}}
|
||||
{{ end -}}
|
||||
|
||||
# ArchLinux only
|
||||
{{ if ne .chezmoi.osRelease.id "arch" -}}
|
||||
chromium-flags.conf
|
||||
electron-flags.conf
|
||||
{{ end -}}
|
||||
1
.chezmoiroot
Normal file
1
.chezmoiroot
Normal file
|
|
@ -0,0 +1 @@
|
|||
home
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:3800
|
||||
SETUVAR fish_color_autosuggestion:brblack
|
||||
SETUVAR fish_color_cancel:\x2dr
|
||||
SETUVAR fish_color_command:normal
|
||||
SETUVAR fish_color_comment:red
|
||||
SETUVAR fish_color_cwd:green
|
||||
SETUVAR fish_color_cwd_root:red
|
||||
SETUVAR fish_color_end:green
|
||||
SETUVAR fish_color_error:brred
|
||||
SETUVAR fish_color_escape:brcyan
|
||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||
SETUVAR fish_color_host:normal
|
||||
SETUVAR fish_color_host_remote:yellow
|
||||
SETUVAR fish_color_normal:normal
|
||||
SETUVAR fish_color_operator:brcyan
|
||||
SETUVAR fish_color_param:cyan
|
||||
SETUVAR fish_color_quote:yellow
|
||||
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack\x1e\x2d\x2dbold
|
||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbackground\x3dbrblack\x1e\x2d\x2dbold
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:brgreen
|
||||
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_background:\x1d
|
||||
SETUVAR fish_pager_color_completion:normal
|
||||
SETUVAR fish_pager_color_description:yellow\x1e\x2di
|
||||
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan\x1e\x2d\x2dbold
|
||||
SETUVAR fish_pager_color_secondary_background:\x1d
|
||||
SETUVAR fish_pager_color_secondary_completion:\x1d
|
||||
SETUVAR fish_pager_color_secondary_description:\x1d
|
||||
SETUVAR fish_pager_color_secondary_prefix:\x1d
|
||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
||||
SETUVAR fish_pager_color_selected_completion:\x1d
|
||||
SETUVAR fish_pager_color_selected_description:\x1d
|
||||
SETUVAR fish_pager_color_selected_prefix:\x1d
|
||||
SETUVAR fish_user_paths:/home/js0ny/\x2elocal/bin\x1e/home/js0ny/\x2elocal/build\x1e/usr/bin\x1e/usr/local/bin
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" },
|
||||
"auto-session": { "branch": "main", "commit": "7d37d1cae7a39ff57da9a452d21b5dbfc5636c18" },
|
||||
"avante.nvim": { "branch": "main", "commit": "2791db9984d01674c3a507cc1a522ad7234f400a" },
|
||||
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"bullets.vim": { "branch": "master", "commit": "1c13e510e11d08b0259e8e627f128359c5521962" },
|
||||
"catppuccin": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" },
|
||||
"conform.nvim": { "branch": "master", "commit": "a0ab60ed666c56b37fd7ed1847d2ac52f2482ce0" },
|
||||
"copilot.lua": { "branch": "master", "commit": "f0c0d981de2737abc50bd7b5bb034ae440826827" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
|
||||
"fzf-lua": { "branch": "main", "commit": "7d66cd81cf485fb17c22d82021cc166ce332a14c" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "385d1949dc21d0c39e7a74b4f4a25da18817bc86" },
|
||||
"image.nvim": { "branch": "master", "commit": "5cbb891eb8dde53f350dde69e23106d4e85d898b" },
|
||||
"img-clip.nvim": { "branch": "main", "commit": "d8b6b030672f9f551a0e3526347699985a779d93" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||
"leetcode.nvim": { "branch": "master", "commit": "422b6beb4a64eca0524fbff94edd9550c156afc5" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||
"luasnip-latex-snippets.nvim": { "branch": "main", "commit": "d3dd5223ef37a99c4adf3b5c7844fc760751b397" },
|
||||
"multiple-cursors.nvim": { "branch": "main", "commit": "1ac15d047a4b265cc2389957bcc56ee561b29e02" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-dap": { "branch": "master", "commit": "968f89f8aac11b6bdbfc942c71d3436658c1435f" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "bd771691da93846b0fc7e095512146a150218bfd" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-surround": { "branch": "main", "commit": "d56752df477ebd808cb82cea2fc68cf7455abb21" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "dca8726fea2c14e1ce6adbaa76a04816fbfaff61" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "705cc9b4f66eca1e54040ac819102e80a32896d3" },
|
||||
"org-bullets.nvim": { "branch": "main", "commit": "21437cfa99c70f2c18977bffd423f912a7b832ea" },
|
||||
"orgmode": { "branch": "master", "commit": "b924cbb7e9c5f2c34f84d92e49dc76e01f32cad9" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "8074a9cc9a6f737320b7a0d76b2c4c3485155688" },
|
||||
"rose-pine": { "branch": "main", "commit": "72befaffeac38db7bdd49e0549eaa2c4806dd878" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"typst-preview.nvim": { "branch": "master", "commit": "dea4525d5420b7c32eebda7de15a6beb9d6574fa" },
|
||||
"vim-beancount": { "branch": "master", "commit": "589a4f06f3b2fd7cd2356c2ef1dafadf6b7a97cf" },
|
||||
"vim-just": { "branch": "main", "commit": "04b0f122f14c83f55a0f8bb2a087754dc98cdccc" },
|
||||
"vim-wakatime": { "branch": "master", "commit": "3403495670f0ee08887401a28f8430dc4ac67429" },
|
||||
"vimtex": { "branch": "master", "commit": "dc90feacb86f7b85b0b791d8073eefc769a23725" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
||||
27
home/.chezmoiignore.tmpl
Normal file
27
home/.chezmoiignore.tmpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
scripts
|
||||
|
||||
|
||||
{{ if ne .chezmoi.os "linux" }}
|
||||
.config/awesome
|
||||
.config/dunst
|
||||
.config/fcitx5
|
||||
.config/hypr
|
||||
.config/keyd
|
||||
.config/mako
|
||||
.config/readline
|
||||
.config/rofi
|
||||
.config/swaylock
|
||||
.config/waybar
|
||||
.config/wlogout
|
||||
.config/krunnerrc
|
||||
.config/user-dirs.dirs
|
||||
.config/user-dirs.locale
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if ne .chezmoi.osRelease.id "arch" }}
|
||||
.config/*-flags.conf
|
||||
{{ end }}
|
||||
|
||||
|
||||
73
home/dot_config/fish/functions/dotenv.fish
Normal file
73
home/dot_config/fish/functions/dotenv.fish
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
function dotenv
|
||||
# Parses commend-line arguments and sets _flag_[xuh] variables. Complains if the user tries to use both -x and -u.
|
||||
argparse --name=dotenv -x 'u,x' 'u/unset' 'h/help' 'x/export' 'q/quiet' -- $argv
|
||||
|
||||
# If the h or --help flags are set (both can be checked using _flag_h), display help, and ignore everything else.
|
||||
if test $_flag_h
|
||||
__help_dotenv
|
||||
else
|
||||
# Any non-option command-line arguments are assumed to be .env files, so we check to see if any are present.
|
||||
if set -q argv; and test (count $argv) -gt 0
|
||||
set env_files $argv
|
||||
# If no environment files are specified on the command-line, we default to .env
|
||||
else
|
||||
set env_files .env
|
||||
end
|
||||
# Loop through all of the specified environment variable files and set any variables found within
|
||||
for env_file in $env_files
|
||||
if test -r $env_file
|
||||
while read -l line
|
||||
# Set variables to be global, otherwise they will not be available in your shell once this script
|
||||
# has finished running.
|
||||
set set_args "-g"
|
||||
|
||||
# Remove the "export" directive from the line if present, and set a variable indicating whether or
|
||||
# not it was found. Negate the return value of "string replace" so that 1/true means we found the
|
||||
# export directive. This makes its usage easier to follow in subsequent lines.
|
||||
set trimmed_line (not string replace -r '^\s*export\s+' '' -- $line)
|
||||
set export $status
|
||||
|
||||
# If we found the export directive in the previous step, or if -x/--export was specified on the
|
||||
# command-line, set the export flag for the upcoming 'set' command.
|
||||
if test $export -eq 1; or begin; set -q _flag_x; and test "$_flag_x" = "-x"; end;
|
||||
set set_args "$set_args"x
|
||||
end
|
||||
|
||||
# Check to see if the line we are processing is basically sane. The fish set command will ignore
|
||||
# leading white space on the variable name, so we allow it in our check.
|
||||
if string match -q --regex -- '^\s*[a-zA-Z0-9_]+=' "$trimmed_line"
|
||||
# Split the current line into name and value, and store them in $kv. We use -m1 because we only
|
||||
# want to split on the first "=" we encounter. Everything after that, including additional "="
|
||||
# characters, is part of the value.
|
||||
set kv (string split -m 1 = -- $trimmed_line)
|
||||
# If -u/--unset has been specified, erase the variable.
|
||||
if set -q _flag_u; and test "$_flag_u" = "-u"
|
||||
set -e $kv[1]
|
||||
# Otherwise, set the shell variable. The variable $kv contains both the name and the value we
|
||||
# want to set.
|
||||
else
|
||||
set $set_args $kv
|
||||
end
|
||||
end
|
||||
# Combined with the `while` keyword, this reads $env_file one line at a time.
|
||||
end <$env_file
|
||||
else
|
||||
if not set -q _flag_q; or test "$_flag_q" != '-q'
|
||||
echo "Unable to locate file $env_file"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# This function will be available to be called directly from the shell, even though it is defined inside of dotenv.
|
||||
# I put it into its own function because I think it looks a little cleaner than having a big blob of echoes inside
|
||||
# the "if" statement near the top of this function.
|
||||
function __help_dotenv
|
||||
echo "Usage: dotenv [-u] [files]"
|
||||
echo "-h/--help: Display this help message."
|
||||
echo "-u/--unset: Read [files] and unset the variables found therein."
|
||||
echo "-x/--export: Force variables to be exported, regardless of whether or not they are preceded by 'export' in the env file."
|
||||
echo "[files]: One or more files containing name=value pairs to be read into the environment. Defaults to .env."
|
||||
echo ""
|
||||
end
|
||||
end
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue