From e0e2ae33a4d0fb053b12eb57b4f7684dfcaa0a56 Mon Sep 17 00:00:00 2001 From: Alexander Bell Date: Sat, 17 May 2025 01:56:29 +0200 Subject: [PATCH] starship --- .bashrc | 4 ++ .config/fastfetch/config.jsonc | 2 +- .config/hypr/hyprlock.conf | 14 +++-- .config/starship.toml | 111 +++++++++++++++++++++++++++++++++ install.bash | 19 ++++++ 5 files changed, 143 insertions(+), 7 deletions(-) create mode 100644 .config/starship.toml diff --git a/.bashrc b/.bashrc index eff22f6..6b33745 100644 --- a/.bashrc +++ b/.bashrc @@ -185,3 +185,7 @@ else alias grep="/usr/bin/grep $GREP_OPTIONS" fi unset GREP_OPTIONS + +# HAS TO BE AT THE END!!!! +# Starship bash prompt bar +eval "$(starship init bash)" diff --git a/.config/fastfetch/config.jsonc b/.config/fastfetch/config.jsonc index 0ee62fb..865c571 100644 --- a/.config/fastfetch/config.jsonc +++ b/.config/fastfetch/config.jsonc @@ -27,7 +27,7 @@ } }, "color": { - "keys": "yellow", // Key color + "keys": "#f2b065", // Key color "title": "red" // Title color }, }, diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf index 2c166d3..7c1941a 100644 --- a/.config/hypr/hyprlock.conf +++ b/.config/hypr/hyprlock.conf @@ -68,7 +68,7 @@ input-field { # uncomment to use an input indicator that does not show the password length (similar to swaylock's input indicator) # hide_input = true - position = 0, -200 + position = 0, -155 halign = center valign = center } @@ -80,12 +80,12 @@ label { font_size = 90 font_family = $font_dune - shadow_size = 10 + shadow_size = 8 shadow_passes = 3 - #color = rgba(fc9e07ff) + color = rgba(fce4b8ff) - position = 0, 400 + position = 0, 370 halign = center valign = center } @@ -97,10 +97,12 @@ label { font_size = 25 font_family = $font - shadow_size = 5 + shadow_size = 3 shadow_passes = 2 - position = 0, -300 + color = rgba(fce4b8ff) + + position = 0, -280 halign = center valign = center } diff --git a/.config/starship.toml b/.config/starship.toml new file mode 100644 index 0000000..d549c6b --- /dev/null +++ b/.config/starship.toml @@ -0,0 +1,111 @@ +format = """ + $battery $username $localip$hostname 󰍴 $directory$git_branch$git_metrics$git_status$docker_context$python$java$package + $cmd_duration $character +""" + +palette = 'dune' + +[palettes.dune] +white = '#edc190' +bright_orange = '#f2b065' +orange = '#f49b35' +red = '#ea4504' +brown = '#a02401' + +# NOT USED RIGHT NOW +[time] +disabled = false +format = '[](yellow) [\[ $time \]](yellow) ' +time_format = '%T' +utc_time_offset = '+2' +#time_range = '10:00:00-14:00:00' + +[battery] +charging_symbol = '󰂄' +full_symbol = '󰁹' +discharging_symbol = '󰂃' +format = '[$symbol]($style)' +[[battery.display]] +threshold = 100 +style = 'green' +[[battery.display]] +threshold = 50 +style = 'yellow' +[[battery.display]] +threshold = 30 +style = 'red' + +[hostname] +ssh_only = true +format = ' [$ssh_symbol$hostname]($style)' +style = 'orange' +ssh_symbol = "󰇧" +disabled = false + +[localip] +ssh_only = false +format = '[$localipv4](#6ac5cc)' +disabled = false + +[username] +style_user = "blue bold" +style_root = "red bold" +format = "[]($style)" +disabled = false +show_always = true + +[character] +success_symbol = "[](bold white)" +error_symbol = "[✗](bold red)" + +[directory] +read_only = " " +truncation_length = 10 +truncate_to_repo = true # truncates directory to root folder if in github repo +style = "bold italic bright_orange" + +[cmd_duration] +min_time = 4 +show_milliseconds = true +format = '[$duration]($style)' +disabled = false +style = "bold italic red" + +[docker_context] +symbol = " " +format = "via [$symbol$context]($style) " +style = "blue bold" +only_with_files = true +detect_files = ["docker-compose.yml", "docker-compose.yaml", "Dockerfile"] +detect_folders = [] +disabled = false + +[git_branch] +symbol = " " + +[git_status] +diverged = '⇕⇡${ahead_count}⇣${behind_count}' +format = "[${ahead_behind}$staged$untracked$conflicted](purple) " +disabled = false + +[git_metrics] +added_style = 'green' +deleted_style = 'red' +format = '[+$added]($added_style)[ / ](purple)[-$deleted]($deleted_style) ' +disabled = false + +[java] +symbol = " " + +[package] +symbol = "󰏗 " + +[python] +symbol = " " +#pyenv_version_name = true +format = 'via [${symbol}python (${version} )(\($virtualenv\) )]($style)' +style = "bold yellow" +pyenv_prefix = "venv " +python_binary = ["./venv/bin/python", "python", "python3", "python2"] +detect_extensions = ["py"] +version_format = "v${raw}" diff --git a/install.bash b/install.bash index 9f59030..cb2bd61 100644 --- a/install.bash +++ b/install.bash @@ -3,6 +3,10 @@ # Run as root # Kitty tab bar: https://github.com/kovidgoyal/kitty/discussions/4447#discussioncomment-3240635 +################################################################### +# SYMBOLIC LINKS +################################################################### + ln -s ~/dotfiles/.conf/hypr ~/.config/hypr ln -s ~/dotfiles/.conf/hyprpaper ~/.config/hyprpaper ln -s ~/dotfiles/.conf/fastfetch ~/.config/fastfetch @@ -10,10 +14,18 @@ ln -s ~/dotfiles/.conf/mimeapps.list ~/.config/mimeapps.list ln -s ~/dotfiles/wallpapers ~/wallpapers ln -s ~/dotfiles/.fonts ~/.fonts +# Starship config +ln -s ~/dotfiles/.config/starship.toml ~/.config/starship.toml +ln -s ~/dotfiles/.config/starship.toml /root/.config/starship.toml + # Fix Electron Apps Wayland scaling issue: # If app doesn't work, add "--no-sandbox" to app in /usr/share/applications/ ln -s ~/dotfiles/.conf/environment.d ~/.config/environment.d +################################################################### +# PACKAGES +################################################################### + # Hyperland stuff # uwsm needed for launching hypr on boot pacman -S uwsm hyprland xdg-desktop-portal-hyprland hyprpaper @@ -28,12 +40,19 @@ pacman -S yazi ffmpeg poppler fd p7zip # Use amdctl for undervolting pacman -S btop ripgrep bat neovim nano grim slurp dust fastfetch imv wl-clipboard amdctl +# Bash prompt bar +pacman -S starship + # Networking # For connecting to eduroam install config with this script: https://cat.eduroam.org/ # wpa_supplicant is dependency of networkmanager that was not installed for some reason. # Run networkmanager with "nmcli dev wifi connect 'ssid' password 'password'" pacman -S networkmanager wpa_supplicant +################################################################### +# TINKERING +################################################################### + # Launch directly into hyprlock and skipping login echo '[Service]\nExecStart=\nExecStart=-/sbin/agetty --noreset --noclear --autologin alex %I $TERM' | sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf > /dev/null && sudo systemctl enable getty@tty1