Skip to content

Commit 1773108

Browse files
committed
Vim and fish configs
1 parent e789e34 commit 1773108

File tree

9 files changed

+324
-147
lines changed

9 files changed

+324
-147
lines changed

build_files/hypercube/01-hypercube-packages.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ dnf5 -y install \
2929
### CLI Tools (skip packages already in bluefin-dx)
3030
dnf5 -y install \
3131
fd-find \
32-
qt6ct
32+
qt6ct \
33+
starship
3334

3435
### Lazygit from COPR
3536
dnf5 -y copr enable atim/lazygit

build_files/hypercube/03-hypercube-configs.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ cp -r "${CONFIG_DIR}/fish/conf.d" /etc/fish/
1818
cp -r "${CONFIG_DIR}/fish/functions" /etc/fish/ 2>/dev/null || true
1919
cp -r "${CONFIG_DIR}/fish/completions" /etc/fish/ 2>/dev/null || true
2020

21+
### Set fish as the default shell for all users
22+
# Add fish to /etc/shells if not present
23+
grep -qxF '/usr/bin/fish' /etc/shells || echo '/usr/bin/fish' >> /etc/shells
24+
# Set fish as default shell in /etc/skel for new users (via useradd defaults)
25+
sed -i 's|^SHELL=.*|SHELL=/usr/bin/fish|' /etc/default/useradd 2>/dev/null || \
26+
echo 'SHELL=/usr/bin/fish' >> /etc/default/useradd
27+
28+
### Starship prompt configuration
29+
# Starship config is read from STARSHIP_CONFIG env var set in fish config
30+
# Config lives at /usr/share/hypercube/config/starship/starship.toml (read-only)
31+
2132
### Wezterm configs
2233
# Wezterm doesn't support XDG_CONFIG_DIRS for system defaults
2334
install -Dm644 "${CONFIG_DIR}/wezterm/wezterm.lua" /etc/skel/.config/wezterm/wezterm.lua

build_files/hypercube/99-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ REQUIRED_PACKAGES=(
1616
"ghostty"
1717
"neovim"
1818
"lazygit"
19+
"starship"
1920
)
2021

2122
for pkg in "${REQUIRED_PACKAGES[@]}"; do
@@ -32,6 +33,7 @@ REQUIRED_FILES=(
3233
"/usr/lib/environment.d/60-hypercube-xdg.conf"
3334
"/usr/bin/nvimd"
3435
"/etc/fish/config.fish"
36+
"/usr/share/hypercube/config/starship/starship.toml"
3537
"/usr/share/themes/Tokyonight-Dark/gtk-3.0/gtk.css"
3638
"/usr/share/icons/Tokyonight-Dark/index.theme"
3739
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Hypercube Fish Setup
2+
# Ensures user has a writable fish config directory for fish_variables
3+
# Fish writes universal variables to $__fish_config_dir/fish_variables
4+
# Since system config is in /etc/fish, users need ~/.config/fish for writes
5+
6+
if status is-interactive
7+
# Create user's fish config directory if it doesn't exist
8+
set -l user_fish_dir "$HOME/.config/fish"
9+
if not test -d "$user_fish_dir"
10+
mkdir -p "$user_fish_dir"
11+
end
12+
end

dot_files/fish/conf.d/hydro.fish

Lines changed: 0 additions & 137 deletions
This file was deleted.

dot_files/fish/config.fish

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,12 @@ if status is-interactive
77
# Editor
88
set -gx EDITOR nvim
99

10-
# Prompt
11-
set --global hydro_multiline true
12-
set --global fish_prompt_pwd_dir_length 100
13-
set --global hydro_color_pwd $fish_color_comment
14-
set --global hydro_color_git $fish_color_operator
15-
set --global hydro_color_error $fish_color_error
16-
set --global hydro_color_prompt $fish_color_command
17-
set --global hydro_color_duration $fish_color_param
10+
# Prompt - Starship
11+
set -gx STARSHIP_CONFIG /usr/share/hypercube/config/starship/starship.toml
12+
starship init fish | source
1813

1914
# Env Variables
20-
set -Ux GOOGLE_CLOUD_PROJECT ibexio-src
15+
set -gx GOOGLE_CLOUD_PROJECT ibexio-src
2116

2217
# Path
2318
fish_add_path $HOME/.local/bin

dot_files/nvim/init.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
-- Store lazyvim.json in data dir so config can remain read-only
2+
-- Must be set before loading lazy.nvim
3+
vim.g.lazyvim_json = vim.fn.stdpath("data") .. "/lazyvim.json"
4+
15
-- bootstrap lazy.nvim, LazyVim and your plugins
26
require("config.lazy")

dot_files/nvim/lua/config/lazy.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ require("lazy").setup({
2121
-- import/override with your plugins
2222
{ import = "plugins" },
2323
},
24+
-- Store lockfile in data dir so config can remain read-only
25+
lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json",
2426
defaults = {
2527
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
2628
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.

0 commit comments

Comments
 (0)