tangled
alpha
login
or
join now
dekker.one
/
dotfiles
0
fork
atom
The general configuration of my development environment and many other general computer things.
0
fork
atom
overview
issues
pulls
pipelines
Add xonsh configuration as a trial
dekker.one
3 years ago
c4c1b9fc
7eda8260
+64
-2
4 changed files
expand all
collapse all
unified
split
dot_config
kitty
kitty.conf
xonsh
rc.d
env.xsh
plugins.xsh
private_Library
private_Application Support
private_Sublime Text
private_Packages
private_User
Package Control.sublime-settings
+1
-1
dot_config/kitty/kitty.conf
···
9
9
10
10
confirm_os_window_close 0
11
11
12
12
-
shell nu
12
12
+
shell xonsh
13
13
14
14
# BEGIN_KITTY_THEME
15
15
include current-theme.conf
+53
dot_config/xonsh/rc.d/env.xsh
···
1
1
+
# --- Detect Environment ---
2
2
+
3
3
+
try:
4
4
+
import warnings
5
5
+
with warnings.catch_warnings():
6
6
+
warnings.simplefilter("ignore")
7
7
+
import darkdetect
8
8
+
9
9
+
dark_mode = darkdetect.isDark()
10
10
+
except ImportError:
11
11
+
dark_mode = False
12
12
+
13
13
+
brew_prefix = $(brew --prefix).strip()
14
14
+
15
15
+
# --- Xonsh Configuration ---
16
16
+
17
17
+
$XONSH_COLOR_STYLE = "stata-dark" if dark_mode else "stata-light"
18
18
+
19
19
+
# --- Path Variables ---
20
20
+
#> Use MacOS path_helper executable
21
21
+
source-bash $(/usr/libexec/path_helper -s)
22
22
+
23
23
+
$PATH = [
24
24
+
brew_prefix + "/opt/bison/bin",
25
25
+
brew_prefix + "/opt/flex/bin",
26
26
+
brew_prefix + "/opt/llvm/bin",
27
27
+
] + $PATH + [
28
28
+
$HOME + "/.local/bin",
29
29
+
$HOME + "/.cargo/bin",
30
30
+
]
31
31
+
32
32
+
# --- General Environment ---
33
33
+
#> Default Editor
34
34
+
$EDITOR = "nvim"
35
35
+
$VISUAL = "subl"
36
36
+
#> Monash Cluster
37
37
+
$OPTCLUSTER = "compute.optimisation-2020.cloud.edu.au"
38
38
+
#> CMake settings
39
39
+
$CMAKE_EXPORT_COMPILE_COMMANDS = "1" # output compile-commands.json for clangd
40
40
+
$CMAKE_GENERATOR = "Sublime Text 2 - Ninja" # use Ninja generator by default
41
41
+
#> FZF
42
42
+
$FZF_DEFAULT_COMMAND = "fd --type f"
43
43
+
44
44
+
# --- Aliases ---
45
45
+
aliases["brew-backup"] = ("brew", "bundle", "dump", "--global", "--no-lock", "--cask", "--mas", "--tap", "--force")
46
46
+
aliases["brew-cleanup"] = ("brew", "bundle", "cleanup", "--global", "--no-lock", "--force", "--zap")
47
47
+
aliases["brew-restore"] = ("brew", "bundle", "install", "--global", "--no-lock")
48
48
+
aliases["edit"] = $VISUAL
49
49
+
aliases["less"] = "bat"
50
50
+
aliases["set-dark-theme"] = ("kitty", "+kitten", "themes", "Mariana")
51
51
+
aliases["set-light-theme"] = ("kitty", "+kitten", "themes", "Breakers")
52
52
+
aliases["ssh"] = ("kitty", "+kitten", "ssh")
53
53
+
aliases["start"] = "open"
+8
dot_config/xonsh/rc.d/plugins.xsh
···
1
1
+
#> Homebrew integration
2
2
+
source-bash $(brew shellenv)
3
3
+
#> Kitty integration
4
4
+
xontrib load kitty
5
5
+
#> Starship: smart prompt
6
6
+
execx($(starship init xonsh))
7
7
+
#> Zoxide: smart cd
8
8
+
execx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')
+2
-1
private_Library/private_Application Support/private_Sublime Text/private_Packages/private_User/Package Control.sublime-settings
···
11
11
"MiniZinc Language",
12
12
"Package Control",
13
13
"Svelte",
14
14
+
"xonsh",
14
15
],
15
15
-
}
16
16
+
}