From b228e8713b000979235abd3c0f0876a6e8fa2f97 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Mon, 27 Jun 2022 21:30:18 -0400 Subject: [PATCH] Starship Config Update - Update starship config to follow pastel powerline preset with dracula color scheme and some small personal tweaks - Update doom-emacs, dracula-gtk, and dracula-vortex submodules - Remove fish shell notification as this is now handled by starship - Add whitespace and toml src code block type to README.org --- .config/doom-emacs | 2 +- .config/fish/conf.d/notification.fish | 18 --- .config/starship.toml | 178 ++++++++++++++-------- .themes/dracula-gtk | 2 +- .themes/dracula-vortex | 2 +- README.org | 204 +++++++++++++++----------- 6 files changed, 245 insertions(+), 161 deletions(-) delete mode 100644 .config/fish/conf.d/notification.fish diff --git a/.config/doom-emacs b/.config/doom-emacs index 4071d27..bc32e2e 160000 --- a/.config/doom-emacs +++ b/.config/doom-emacs @@ -1 +1 @@ -Subproject commit 4071d27263f31c240d33732a782979140dd0866b +Subproject commit bc32e2ec4c51c04da13db3523b19141bcb5883ba diff --git a/.config/fish/conf.d/notification.fish b/.config/fish/conf.d/notification.fish deleted file mode 100644 index 13755af..0000000 --- a/.config/fish/conf.d/notification.fish +++ /dev/null @@ -1,18 +0,0 @@ -# This function allows you to switch to a different task -# when an interactive command takes too long -# by notifying you when it is finished. -# -# It is invoked by the fish shell automatically using its event system. -function __postexec_notify_on_long_running_commands --on-event fish_postexec - set --function interactive_commands 'vim' 'vlc' 'zathura' 'gitk' 'man' 'less' - set --function command (string split ' ' $argv[1]) - if contains $command $interactive_commands - # We quit interactive commands manually, - # no need for a notification. - return - end - - if test $CMD_DURATION -gt 5000 - notify-send 'command finished' "$argv" - end -end diff --git a/.config/starship.toml b/.config/starship.toml index 3fb11e2..5a780b2 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -1,96 +1,158 @@ -# Don't print a new line at the start of the prompt +format = """ +[](#44475A)\ +$directory\ +[](fg:#44475A bg:#6272a4)\ +$git_branch\ +$git_status\ +[](fg:#6272a4 bg:#BD93F9)\ +$c\ +$elixir\ +$elm\ +$golang\ +$haskell\ +$java\ +$julia\ +$nodejs\ +$nim\ +$rust\ +[](fg:#BD93F9 bg:#FF79C6)\ +$docker_context\ +[](fg:#FF79C6 bg:#FF5555)\ +$cmd_duration\ +[ ](fg:#FF5555)\ +\n$character +""" + +# Enable/disable the blank line at the start of the prompt add_newline = false -format = "[◆](bold green) $all" - -[aws] -symbol = " " - -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [character] format = "$symbol" -success_symbol = "[❯](bold purple)[❯](bold cyan)[❯](bold green) " -error_symbol = "[❯❯❯](bold red) " +success_symbol = "[ ﬌ ❯❯❯](bold green) " +error_symbol = "[ ﬌ ❯❯❯](bold red) " -[cmd_duration] -min_time = 10_000 - -[conda] -symbol = " " - -[dart] -symbol = " " +# You can also replace your username with a neat symbol like  to save some space +[username] +show_always = true +style_user = "bg:#44475A" +style_root = "bg:#44475A" +format = '[ ]($style)' [directory] -format = "[$path]($style)[$read_only]($read_only_style) " +style = "bg:#44475A" +format = "[ $path ]($style)" truncation_length = 4 -truncate_to_repo = false +truncate_to_repo = true truncation_symbol = "…/" read_only = "" +# Here is how you can shorten some long paths by text replacement +# similar to mapped_locations in Oh My Posh: +[directory.substitutions] +"~" = " " +".config" = "  " +"config" = "  " +"Config" = "  " +"Calibre_Library" = "  " +"Calibre Library" = "  " +"Desktop" = "  " +"Documents" = "  " +"Finances" = " ﴝ " +"Downloads" = "  " +"Games" = "  " +"PolyMC" = "  " +"Steam" = "  " +"ISOs" = " 﫭 " +"Music" = "  " +"Spotify" = "  " +"Pictures" = "  " +"Projects" = "  " +"Personal" = "  " +"System" = "  " +"Videos" = "  " +"dropbox" = "  " +"google-drive" = "  " +"onedrive" = "  " +"Attachments" = "  " +# Keep in mind that the order matters. For example: +# "Important Documents" = "  " +# will not be replaced, because "Documents" was already substituted before. +# So either put "Important Documents" before "Documents" or use the substituted version: +# "Important  " = "  " + +[c] +symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' + +[cmd_duration] +min_time = 0 +style = "bg:#FF5555" +format = '[[ 祥 $duration ](bg:#FF5555)]($style)' +show_notifications = true +min_time_to_notify = 5_000 + [docker_context] symbol = " " +style = "bg:#FF79C6" +format = '[[ $symbol $context ](bg:#FF79C6)]($style) $path' [elixir] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [elm] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [git_branch] -symbol = " " +symbol = "" +style = "bg:#6272a4" +format = '[[ $symbol $branch ](bg:#6272a4)]($style)' + +[git_status] +style = "bg:#6272a4" +format = '[[($all_status$ahead_behind )](bg:#6272a4)]($style)' [golang] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' -# [haskell] -# symbol = " " - -[hg_branch] -symbol = " " +[haskell] +symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [java] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [julia] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' -[line_break] -disabled = false - -[memory_usage] -symbol = " " +[nodejs] +symbol = "" +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [nim] symbol = " " - -[nix_shell] -symbol = " " - -[nodejs] -symbol = " " - -[package] -symbol = " " - -[perl] -symbol = " " - -[php] -symbol = " " - -[python] -symbol = " " - -[ruby] -symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [rust] -symbol = " " +symbol = "" +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' -[swift] -symbol = "ﯣ " +[time] +disabled = false +time_format = "%X" # Hour:Minute Format +style = "bg:#FFB86C" +format = '[[  $time ](bg:#FFB86C)]($style)' diff --git a/.themes/dracula-gtk b/.themes/dracula-gtk index f5314f2..87d2e6e 160000 --- a/.themes/dracula-gtk +++ b/.themes/dracula-gtk @@ -1 +1 @@ -Subproject commit f5314f28495ac665a151a0c5de6b864247e22c39 +Subproject commit 87d2e6e5c4c80d131f2b61254d0b5e3dcd3a6772 diff --git a/.themes/dracula-vortex b/.themes/dracula-vortex index 480777e..2388c9e 160000 --- a/.themes/dracula-vortex +++ b/.themes/dracula-vortex @@ -1 +1 @@ -Subproject commit 480777e8c9370643686c0afd1a085fd73a1d4eff +Subproject commit 2388c9ed0e76f4e6b99eea5a3d20a07868ef31bf diff --git a/README.org b/README.org index 77ddac7..3f95519 100644 --- a/README.org +++ b/README.org @@ -3074,105 +3074,168 @@ postlock() { * Terminal & Shell ** Prompt + *** Starship -#+BEGIN_SRC conf :tangle .config/starship.toml -# Don't print a new line at the start of the prompt +#+BEGIN_SRC toml :tangle .config/starship.toml +format = """ +[](#44475A)\ +$directory\ +[](fg:#44475A bg:#6272a4)\ +$git_branch\ +$git_status\ +[](fg:#6272a4 bg:#BD93F9)\ +$c\ +$elixir\ +$elm\ +$golang\ +$haskell\ +$java\ +$julia\ +$nodejs\ +$nim\ +$rust\ +[](fg:#BD93F9 bg:#FF79C6)\ +$docker_context\ +[](fg:#FF79C6 bg:#FF5555)\ +$cmd_duration\ +[ ](fg:#FF5555)\ +\n$character +""" + +# Enable/disable the blank line at the start of the prompt add_newline = false -format = "[◆](bold green) $all" - -[aws] -symbol = " " - -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - [character] format = "$symbol" -success_symbol = "[❯](bold purple)[❯](bold cyan)[❯](bold green) " -error_symbol = "[❯❯❯](bold red) " +success_symbol = "[ ﬌ ❯❯❯](bold green) " +error_symbol = "[ ﬌ ❯❯❯](bold red) " -[cmd_duration] -min_time = 10_000 - -[conda] -symbol = " " - -[dart] -symbol = " " +# You can also replace your username with a neat symbol like  to save some space +[username] +show_always = true +style_user = "bg:#44475A" +style_root = "bg:#44475A" +format = '[ ]($style)' [directory] -format = "[$path]($style)[$read_only]($read_only_style) " +style = "bg:#44475A" +format = "[ $path ]($style)" truncation_length = 4 -truncate_to_repo = false +truncate_to_repo = true truncation_symbol = "…/" read_only = "" +# Here is how you can shorten some long paths by text replacement +# similar to mapped_locations in Oh My Posh: +[directory.substitutions] +"~" = " " +".config" = "  " +"config" = "  " +"Config" = "  " +"Calibre_Library" = "  " +"Calibre Library" = "  " +"Desktop" = "  " +"Documents" = "  " +"Finances" = " ﴝ " +"Downloads" = "  " +"Games" = "  " +"PolyMC" = "  " +"Steam" = "  " +"ISOs" = " 﫭 " +"Music" = "  " +"Spotify" = "  " +"Pictures" = "  " +"Projects" = "  " +"Personal" = "  " +"System" = "  " +"Videos" = "  " +"dropbox" = "  " +"google-drive" = "  " +"onedrive" = "  " +"Attachments" = "  " +# Keep in mind that the order matters. For example: +# "Important Documents" = "  " +# will not be replaced, because "Documents" was already substituted before. +# So either put "Important Documents" before "Documents" or use the substituted version: +# "Important  " = "  " + +[c] +symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' + +[cmd_duration] +min_time = 0 +style = "bg:#FF5555" +format = '[[ 祥 $duration ](bg:#FF5555)]($style)' +show_notifications = true +min_time_to_notify = 5_000 + [docker_context] symbol = " " +style = "bg:#FF79C6" +format = '[[ $symbol $context ](bg:#FF79C6)]($style) $path' [elixir] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [elm] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [git_branch] -symbol = " " +symbol = "" +style = "bg:#6272a4" +format = '[[ $symbol $branch ](bg:#6272a4)]($style)' + +[git_status] +style = "bg:#6272a4" +format = '[[($all_status$ahead_behind )](bg:#6272a4)]($style)' [golang] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' -# [haskell] -# symbol = " " - -[hg_branch] -symbol = " " +[haskell] +symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [java] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [julia] symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' -[line_break] -disabled = false - -[memory_usage] -symbol = " " +[nodejs] +symbol = "" +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [nim] symbol = " " - -[nix_shell] -symbol = " " - -[nodejs] -symbol = " " - -[package] -symbol = " " - -[perl] -symbol = " " - -[php] -symbol = " " - -[python] -symbol = " " - -[ruby] -symbol = " " +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' [rust] -symbol = " " +symbol = "" +style = "bg:#BD93F9" +format = '[[ $symbol ($version) ](bg:#BD93F9)]($style)' -[swift] -symbol = "ﯣ " +[time] +disabled = false +time_format = "%X" # Hour:Minute Format +style = "bg:#FFB86C" +format = '[[  $time ](bg:#FFB86C)]($style)' #+END_SRC *** Neofetch @@ -4484,29 +4547,6 @@ set -g fish_pager_color_completion $foreground set -g fish_pager_color_description $comment #+END_SRC -**** Notification - -#+BEGIN_SRC fish :tangle .config/fish/conf.d/notification.fish -# This function allows you to switch to a different task -# when an interactive command takes too long -# by notifying you when it is finished. -# -# It is invoked by the fish shell automatically using its event system. -function __postexec_notify_on_long_running_commands --on-event fish_postexec - set --function interactive_commands 'vim' 'vlc' 'zathura' 'gitk' 'man' 'less' - set --function command (string split ' ' $argv[1]) - if contains $command $interactive_commands - # We quit interactive commands manually, - # no need for a notification. - return - end - - if test $CMD_DURATION -gt 5000 - notify-send 'command finished' "$argv" - end -end -#+END_SRC - ** Terminal *** Kitty