Skip to content
Snippets Groups Projects
Verified Commit 1bded9d3 authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

Merge remote-tracking branch 'origin/nix-home-manager' into nix-home-manager

parents a55f7ee9 e96bdd75
No related branches found
No related tags found
No related merge requests found
const CONFIG = ($nu.home-path | path join ".config" "alacritty")
const SHARE = ($nu.home-path | path join ".local" "share" "alacritty")
const CONFIG = $nu.home-path | path join ".config" "alacritty"
const SHARE = $nu.home-path | path join ".local" "share" "alacritty"
const REMOTE = "https://github.com/alacritty/alacritty-theme"
const LOCAL = ($SHARE | path join "themes")
const THEMES = ($LOCAL | path join "themes")
const LOCAL = $SHARE | path join "themes"
const THEMES = $LOCAL | path join "themes"
const THEME = ($SHARE | path join "theme.toml")
const THEME_NAME = ($CONFIG | path join "theme.txt")
const THEME = $SHARE | path join "theme.toml"
const THEME_NAME = $CONFIG | path join "theme.txt"
def is_downloaded []: nothing -> bool {
$THEMES | path exists
......@@ -20,24 +20,36 @@ def is_theme_name_set []: nothing -> bool {
$THEME_NAME | path exists
}
export def "alacritty theme install" [] {
export def "alacritty theme install" [--verbose] {
if (is_downloaded) {
error make --unspanned { msg: "themes are already installed" }
}
print --no-newline "installing themes... "
git clone --depth 1 $REMOTE ($THEMES | path dirname) out+err> /dev/null
let options = [ --depth 1 $REMOTE ($THEMES | path dirname) ]
if $verbose {
print ""
git clone ...$options
} else {
git clone ...$options out+err> /dev/null
}
print "done"
}
export def "alacritty theme update" [] {
export def "alacritty theme update" [--verbose] {
if not (is_downloaded) {
error make --unspanned { msg: "themes are not installed" }
}
print --no-newline "updating themes... "
if $verbose {
print ""
git -C $LOCAL fetch origin master
git -C $LOCAL rebase origin/master
} else {
git -C $LOCAL fetch origin master out+err> /dev/null
git -C $LOCAL rebase origin/master out> /dev/null
git -C $LOCAL rebase origin/master out+err> /dev/null
}
print "done"
}
......@@ -112,3 +124,36 @@ export def "alacritty theme current" []: [
colors: (open $THEME).colors,
}
}
export def "alacritty theme sync" []: {
if not (is_downloaded) {
error make --unspanned { msg: "themes are not installed" }
}
if not (is_theme_set) {
error make --unspanned { msg: "theme is not set" }
}
if not (is_theme_name_set) {
error make --unspanned { msg: "unexpected: theme name could not be found" }
}
let theme_name = open $THEME_NAME | lines | first | str trim
let theme = $THEMES
| path join $theme_name
| path parse
| update extension toml
| path join
if not ($theme | path exists) {
let themes_list = mktemp --tmpdir XXXXXXX.txt
ls $THEMES | get name | path parse | get stem | sort | to text | save --force $themes_list
error make --unspanned {
msg: $"unknown theme ($theme_name)",
help: $"see the complete list of available themes in (ansi purple)($themes_list)(ansi reset)",
}
}
print --no-newline $"switching theme to '($theme_name)'... "
cp $theme $THEME
print "done"
}
xterm
\ No newline at end of file
rose-pine
......@@ -7,10 +7,13 @@ $env.config = ($env.config? | default {} | merge {
always_trash: true
}
history: {
max_size: 100000,
sync_on_enter: true,
file_format: "sqlite"
isolation: false
}
cursor_shape: {
emacs: inherit,
vi_insert: line
vi_normal: block
}
......@@ -20,6 +23,12 @@ $env.config = ($env.config? | default {} | merge {
show_empty: true
padding: { left: 0, right: 0 }
header_on_separator: true
trim: {
methodology: wrapping,
wrapping_try_keep_words: true
},
abbreviated_row_count: null,
footer_inheritance: false
}
footer_mode: 25
edit_mode: vi
......@@ -32,10 +41,19 @@ $env.config = ($env.config? | default {} | merge {
algorithm: "prefix"
case_sensitive: true
use_ls_colors: true
sort: smart,
quick: true,
partial: true,
external: {
enable: true,
max_results: 100,
completer: null
},
}
bracketed_paste: true
filesize: {
metric: true
format: auto
}
plugins: {
explore: {
......
default_toolchain = "1.77-x86_64-unknown-linux-gnu"
default_toolchain = "stable-x86_64-unknown-linux-gnu"
profile = "default"
version = "12"
......
[Desktop Entry]
Name=ArduinoIDE
StartupWMClass=arduino
Exec=/home/amtoine/.local/bin/arduino-ide
Icon=arduino
Type=Application
Path=/usr/bin
[Desktop Entry]
Name=Discord
StartupWMClass=discord
Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
GenericName=Internet Messenger
Exec=/home/amtoine/.local/share/Discord/Discord
Icon=discord
Type=Application
Categories=Network;InstantMessaging;
Path=/usr/bin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment