commit e6b08b867f20b465f32593faf0722ed58c344c31 Author: Gu://em_ Date: Fri Apr 4 16:51:00 2025 +0200 First commit: Beta 25.04.04 diff --git a/README.md b/README.md new file mode 100644 index 0000000..14eab13 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Atlas Desktop installer + +This project is an automated installer for the Atlas Desktop. + +## Disclaimer + +### ⚠ This is still a WIP project. Use at your own risk. + +Some platforms may not yet be supported such as Nvidia graphic cards for which you'll have to install all the drivers yourself. Sadly I don't have any equipment to test that out. + +Also you will very probably miss some software you're used to. I'll strongly recommend you to check the [Additionnal packages](https://hedgedoc.oblic-parallels.fr/s/JSR33pjd_#Additional-packages) section to know about some open source utilities that fit perfectly within the desktop. +More generally give a look to the (Quick start guide)[https://hedgedoc.oblic-parallels.fr/s/JSR33pjd_] + +If something doesn't work or behaves anormally don't hesitate to contact me so that it will be fixed for future users. + + +## Requirements + +You'll just need an already functional (even basic) **Arch Linux** system with `sudo` installed. +Setup will take care of configuring AppArmor and Zram if it hasn't been done yet. + + +## Usage + +Very simple, clone the project (or download it directly from the web interface) +```sh= +git clone https://forge.oblic-parallels.fr/guillm/atlas-install +``` +Make `setup.sh` executable +```sh= +chmod u+x setup.sh +``` +And run it +```sh= +./setup.sh +``` + +That said I suggest you to give a look to the packages that will be installed on your system as it's important to know how things will work or to disable some things you wouldn't necessarely want. + +## Future improvements + +- Nvidia cards handling +- Cleaner way to enable/disable some packages / configuratuions \ No newline at end of file diff --git a/config/.config/albert/config b/config/.config/albert/config new file mode 100644 index 0000000..6398242 --- /dev/null +++ b/config/.config/albert/config @@ -0,0 +1,72 @@ +[General] +hotkey=Alt+Space +prioritizePerfectMatch=true +showTray=false +telemetry=false + +[albert] +global_handler_enabled=false +trigger=albert + +[applications] +enabled=true +fuzzy=true +terminal=kitty +use_generic_name=false +use_keywords=true + +[caffeine] +enabled=false + +[calculator_qalculate] +enabled=true + +[clipboard] +enabled=true +persistent=true + +[files] +enabled=false +paths=@Invalid() + +[hash] +enabled=true +trigger=# + +[mpris] +enabled=true +trigger=mp + +[path] +enabled=true + +[snippets] +enabled=false + +[ssh] +enabled=true + +[system] +command_lock=hyprlock +command_poweroff=poweroff +command_reboot=reboot +enabled=true +trigger=sys + +[triggers] +trigger=? + +[widgetsboxmodel] +alwaysOnTop=true +clearOnHide=false +clientShadow=false +darkTheme=Seventy Eight +displayScrollbar=false +followCursor=true +hideOnFocusLoss=true +historySearch=true +itemCount=5 +lightTheme=Seventy Eight +quitOnClose=false +showCentered=true +systemShadow=true diff --git a/config/.config/albert/schemes/Seventy Eight.qss b/config/.config/albert/schemes/Seventy Eight.qss new file mode 100644 index 0000000..183c39d --- /dev/null +++ b/config/.config/albert/schemes/Seventy Eight.qss @@ -0,0 +1,108 @@ +/* + * original author: Manuel Schneider + * modified by : Gu://em_ + * + * Check http://doc.qt.io/qt-5/stylesheet-syntax.html especially the subtopics: + * The Style Sheet Syntax (http://doc.qt.io/qt-5/stylesheet-syntax.html) + * Qt Style Sheets Reference (http://doc.qt.io/qt-5/stylesheet-reference.html) + */ + +* { + border: none; + color: #98C1D9; + background-color: #293241; +} + +#frame { + background-color: none; + border: none; + max-width:640px; + min-width:640px; + padding: 10px; /* to have a drag handle */ +} + + +#inputLine { + border-radius: 8px; + border: 1px solid #4C566A; + color: #EE6C4D; + font-size: 26px; + padding: 8px; + selection-background-color: #EE6C4D; + selection-color: #E0FBFC; +} + + +#settingsButton { + background-color: none; + color: #4C566A; + + max-height: 13px; + max-width: 13px; + min-height: 13px; + min-width: 13px; + + padding: 16px; +} + + +QListView { + border-radius: 8px; + border: 1px solid #4C566A; + color: #E0FBFC; + margin-top: 4px; + selection-background-color: #3D5A80; + selection-color: #E0FBFC; +} + +QListView::item { + border-radius: 6px; + padding: 4px; +} + +QListView::item:selected { + background-color: #3D5A80; +} + + +QListView#resultsList { + font-size: 20px; + icon-size: 34px; + padding: 4px 8px 4px 8px; +} + +QListView#resultsList::item { + margin: 4px 0px 4px 0px; + height: 44px; +} + + +QListView#actionList { + font-size: 16px; + padding: 6px 8px 6px 8px; +} + +QListView#actionList::item { + margin: 2px 0px 2px 0px; +} + + +QListView QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, +QListView QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, +QListView QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { + background: transparent; + border: 0px; + height: 0px; + width: 0px; +} + +QListView QScrollBar:vertical { + background: transparent; + margin: 8px 0px 8px 0px; + width: 2px; +} + +QListView QScrollBar::handle:vertical { + background: #4C566A; + min-height: 24px; +} diff --git a/config/.config/codium-flags.conf b/config/.config/codium-flags.conf new file mode 100644 index 0000000..1af1827 --- /dev/null +++ b/config/.config/codium-flags.conf @@ -0,0 +1 @@ +--enable-features=UseOzonePlatform --ozone-platform=wayland diff --git a/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/accent b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/accent new file mode 100644 index 0000000..d16adec --- /dev/null +++ b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/accent @@ -0,0 +1,5 @@ +Some(( + red: 0.93333334, + green: 0.4235294, + blue: 0.30196077, +)) \ No newline at end of file diff --git a/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/active_hint b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/active_hint new file mode 100644 index 0000000..e440e5c --- /dev/null +++ b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/active_hint @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/bg_color b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/bg_color new file mode 100644 index 0000000..a22968b --- /dev/null +++ b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/bg_color @@ -0,0 +1,6 @@ +Some(( + red: 0.11518643, + green: 0.14849715, + blue: 0.20401502, + alpha: 1.0, +)) \ No newline at end of file diff --git a/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/corner_radii b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/corner_radii new file mode 100644 index 0000000..7d52139 --- /dev/null +++ b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/corner_radii @@ -0,0 +1,8 @@ +( + radius_0: (0.0, 0.0, 0.0, 0.0), + radius_xs: (4.0, 4.0, 4.0, 4.0), + radius_s: (8.0, 8.0, 8.0, 8.0), + radius_m: (16.0, 16.0, 16.0, 16.0), + radius_l: (32.0, 32.0, 32.0, 32.0), + radius_xl: (160.0, 160.0, 160.0, 160.0), +) \ No newline at end of file diff --git a/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/gaps b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/gaps new file mode 100644 index 0000000..6fe974b --- /dev/null +++ b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/gaps @@ -0,0 +1 @@ +(0, 8) \ No newline at end of file diff --git a/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/spacing b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/spacing new file mode 100644 index 0000000..464b264 --- /dev/null +++ b/config/.config/cosmic/com.system76.CosmicTheme.Dark.Builder/v1/spacing @@ -0,0 +1,12 @@ +( + space_none: 0, + space_xxxs: 4, + space_xxs: 8, + space_xs: 12, + space_s: 16, + space_m: 24, + space_l: 32, + space_xl: 48, + space_xxl: 64, + space_xxxl: 128, +) \ No newline at end of file diff --git a/config/.config/cosmic/com.system76.CosmicTheme.Mode/v1/is_dark b/config/.config/cosmic/com.system76.CosmicTheme.Mode/v1/is_dark new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/config/.config/cosmic/com.system76.CosmicTheme.Mode/v1/is_dark @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/config/.config/electron-flags.conf b/config/.config/electron-flags.conf new file mode 100644 index 0000000..1af1827 --- /dev/null +++ b/config/.config/electron-flags.conf @@ -0,0 +1 @@ +--enable-features=UseOzonePlatform --ozone-platform=wayland diff --git a/config/.config/fnott/fnott.ini b/config/.config/fnott/fnott.ini new file mode 100644 index 0000000..56ecb0e --- /dev/null +++ b/config/.config/fnott/fnott.ini @@ -0,0 +1,66 @@ +# -*- conf -*- + +# For documentation on these options, see `man fnott.ini` + +# Global values +# output=# +min-width=200 +# max-width=0 +# max-height=0 +# stacking-order=bottom-up +anchor=top-right +edge-margin-vertical=10 +edge-margin-horizontal=10 +notification-margin=10 +icon-theme=Papirus +# max-icon-size=32 +# selection-helper=dmenu +# selection-helper-uses-null-separator=no +# play-sound=aplay ${filename} + +# Default values, may be overridden in 'urgency' specific sections +layer=top +background=293241FF + +border-color=EE6C4DFF +border-radius=0 +border-size=2 + +padding-vertical=20 +padding-horizontal=20 + +dpi-aware=yes + +title-font=monospace +title-color=ffffffff +title-format=%a%A + +summary-font=monospace +summary-color=ffffffff +summary-format=%s\n + +body-font=monospace +body-color=ffffffff +body-format=%b + +progress-bar-height=20 +progress-bar-color=ffffffff + +# sound-file= +# icon= + +# Timeout values are in seconds. 0 to disable +max-timeout=0 +default-timeout=0 +idle-timeout=0 + +# [low] +# background=2b2b2bff +# title-color=888888ff +# summary-color=888888ff +# body-color=888888ff + +# [normal] + +# [critical] +# background=6c3333ff diff --git a/config/.config/gtk-2.0/gtkfilechooser.ini b/config/.config/gtk-2.0/gtkfilechooser.ini new file mode 100644 index 0000000..47ec24f --- /dev/null +++ b/config/.config/gtk-2.0/gtkfilechooser.ini @@ -0,0 +1,11 @@ +[Filechooser Settings] +LocationMode=path-bar +ShowHidden=false +ShowSizeColumn=true +GeometryX=1183 +GeometryY=269 +GeometryWidth=537 +GeometryHeight=542 +SortColumn=name +SortOrder=ascending +StartupMode=recent diff --git a/config/.config/gtk-3.0/settings.ini b/config/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..2ee3c57 --- /dev/null +++ b/config/.config/gtk-3.0/settings.ini @@ -0,0 +1,17 @@ +[Settings] +gtk-theme-name=adw-gtk3-dark +gtk-icon-theme-name=Papirus-Dark +gtk-font-name=DejaVu Sans 10 +gtk-cursor-theme-name=VolantesCursors +gtk-cursor-theme-size=24 +gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=0 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=0 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintslight +gtk-xft-rgba=rgb +gtk-application-prefer-dark-theme=1 diff --git a/config/.config/hypr/application-style.conf b/config/.config/hypr/application-style.conf new file mode 100644 index 0000000..e69de29 diff --git a/config/.config/hypr/config/appearance.conf b/config/.config/hypr/config/appearance.conf new file mode 100644 index 0000000..5534445 --- /dev/null +++ b/config/.config/hypr/config/appearance.conf @@ -0,0 +1,166 @@ +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hyprland.org/Configuring/Variables/ + +$active_color = rgba(98C1D9FF) +$inactive_color = rgba(595959aa) + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + gaps_in = 1 + gaps_out = 0 + + border_size = 1 + + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + col.active_border = $active_color + col.inactive_border = $inactive_color + + # Resizing windows by clicking and dragging on borders and gaps + resize_on_border = true + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + rounding = 2 + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 1.0 + + shadow { + enabled = true + range = 4 + render_power = 3 + color = rgba(1a1a1aee) + } + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = true + size = 6 + passes = 3 + + vibrancy = 0.1696 + } + +} + +# Apply blur to waybar +layerrule = blur,waybar + + +# https://wiki.hyprland.org/Configuring/Variables/#animations +animations { + enabled = yes, please :) + + # See https://wiki.hyprland.org/Configuring/Animations/ for more + + # Bezier curves + bezier = easeOutQuint,0.23,1,0.32,1 + bezier = easeInOutCubic,0.65,0.05,0.36,1 + bezier = linear,0,0,1,1 + bezier = almostLinear,0.5,0.5,0.75,1.0 + bezier = quick,0.15,0,0.1,1 + + bezier = easeInOutExpo,0.87,0,0.13,1 + + # Animations + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + + animation = windows, 1, 3.79, easeOutQuint + animation = windowsIn, 1, 3.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 3, easeOutQuint, slide + animation = workspacesOut, 1, 3, easeOutQuint, slide + + #animation = workspacesIn, 1, 3, easeOutQuint, slidefade + #animation = workspacesOut, 1, 5, easeOutQuint, slidefade +} + +# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/ +# "Smart gaps" / "No gaps when only" +# uncomment all if you wish to use that. +# workspace = w[tv1], gapsout:0, gapsin:0 +# workspace = f[1], gapsout:0, gapsin:0 +# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1] +# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1] +# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1] +# windowrulev2 = rounding 0, floating:0, onworkspace:f[1] + +# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hyprland.org/Configuring/Variables/#misc +misc { + force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( + disable_splash_rendering = true # Disable default wallpapers rendering + vfr = true # Lower sent frames when idle +} + + +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ + +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + +# Ignore maximize requests from apps. You'll probably like this. +windowrule = suppressevent maximize, class:.* + +# Fix some dragging issues with XWayland +windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 + +# Albert +windowrule=noborder,class:^(albert)$ +windowrule=noblur,class:^(albert)$ +windowrule=noshadow,class:^(albert)$ +windowrule=float,class:^(albert)$ +windowrule=stayfocused,class:^(albert)$ +windowrule=nodim,class:^(albert)$ + +# Prism Launcher +windowrule=pseudo, class:(org.prismlauncher.PrismLauncher) +windowrule=size 65% 70%, class:(org.prismlauncher.PrismLauncher), title:^(Prism Launcher .*)$ + +# TODO Automatically fullscreen single apps +# - Seems impossible for now (try mixing with workspace rules) + +# Increase gaps for single apps +workspace=w[t1], gapsout:2 diff --git a/config/.config/hypr/config/environment.conf b/config/.config/hypr/config/environment.conf new file mode 100644 index 0000000..1889195 --- /dev/null +++ b/config/.config/hypr/config/environment.conf @@ -0,0 +1,63 @@ +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ + +# Set programs that you use +$terminal = kitty +#$fileManager = cosmic-files +$fileManager = nautilus +$menu = albert toggle +$notificationsManager = fnott + + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +exec-once = ~/.config/hypr/scripts/autostart.sh +# Or execute your favorite apps at launch like this: +# exec-once = firefox + + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hyprland.org/Configuring/Environment-variables/ + +# HyprCursor +env = HYPRCURSOR_THEME,VolantesCursors +env = XCURSOR_THEME,VolantesCursors +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 +# XDG Desktop Portal +env = XDG_SESSION_DESKTOP,Hyprland +env = XDG_CURRENT_DESKTOP,Hyprland + +# Experimental + +# GTK +# env = GTK_USE_PORTAL,1 +# env = GDK_SCALE,2 # Xwayland scale +# Qt +# env = QT_WAYLAND_DISABLE_WINDOWDECORATION, +# Firefox +# env = MOZ_ENABLE_WAYLAND,1 +# env = MOZ_USE_XINPUT2,1 +# WLRoots +# env = WLR_NO_HARDWARE_CURSORS,1 +# env = WLR_RENDERER,vulkan +# SDL +# env = SDL_VIDEODRIVER,wayland + +# Nvidia + +# GBM backend +# env = GBM_BACKEND,nvidia-drm +# env = __GLX_VENDOR_LIBRARY_NAME,nvidia +# Hardware acceleration +# env = LIBVA_DRIVER_NAME,nvidia +# env = NVD_BACKEND,direct diff --git a/config/.config/hypr/config/input-en.conf b/config/.config/hypr/config/input-en.conf new file mode 100644 index 0000000..9669207 --- /dev/null +++ b/config/.config/hypr/config/input-en.conf @@ -0,0 +1,150 @@ +############# +### INPUT ### +############# + +### English configuration (not finished yet) + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + numlock_by_default = true + + follow_mouse = 1 + + sensitivity = 0.1 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = true + disable_while_typing = false + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#gestures +gestures { + workspace_swipe = true +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + +# Main desktop controls +bind = $mainMod, Q, killactive, +bind = $mainMod, R, exec, $menu # Omnibar +bind = $mainMod, D, exec, $menu # Legacy menu shortcut +bind = $mainMod, L, exec, hyprlock # Lockscreen +bind = $mainMod, B, exec, ~/.config/hypr/scripts/toggle-waybar.sh # Toggle sidebar +bind = $mainMod SHIFT, R, exec, ~/.config/hypr/scripts/reload.sh # Reload desktop +bind = $mainMod, F11, exec, ~/.config/hypr/scripts/gamemode.sh # Gamemode +bind = $mainMod SHIFT, M, exit, # Exit desktop session + +# Shortcuts +bind = $mainMod, RETURN, exec, $terminal +bind = $mainMod, SPACE, exec, $terminal +bind = $mainMod, E, exec, $fileManager +bindel = , XF86Launch1, exec, kitty vim ~/.config/hypr/config + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Layout +bind = $mainMod, F, fullscreen, +bind = $mainMod, V, togglesplit, # Horizontal/vertical split +bind = $mainMod, T, togglefloating, +bind = $mainMod, H, pseudo, # Toggle pseudo-tiling + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, ampersand, workspace, 1 +bind = $mainMod, eacute, workspace, 2 +bind = $mainMod, quotedbl, workspace, 3 +bind = $mainMod, apostrophe, workspace, 4 +bind = $mainMod, parenleft, workspace, 5 +bind = $mainMod, minus, workspace, 6 +bind = $mainMod, egrave, workspace, 7 +bind = $mainMod, underscore, workspace, 8 +bind = $mainMod, ccedilla, workspace, 9 +bind = $mainMod, agrave, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, ampersand, movetoworkspace, 1 +bind = $mainMod SHIFT, eacute, movetoworkspace, 2 +bind = $mainMod SHIFT, quotedbl, movetoworkspace, 3 +bind = $mainMod SHIFT, apostrophe, movetoworkspace, 4 +bind = $mainMod SHIFT, parenleft, movetoworkspace, 5 +bind = $mainMod SHIFT, minus, movetoworkspace, 6 +bind = $mainMod SHIFT, egrave, movetoworkspace, 7 +bind = $mainMod SHIFT, underscore, movetoworkspace, 8 +bind = $mainMod SHIFT, ccedilla, movetoworkspace, 9 +bind = $mainMod SHIFT, agrave, movetoworkspace, 10 + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Minimize function (uses scratchpad) +# For testing, may be removed in future releases +bind = $mainMod, N, togglespecialworkspace, magic +bind = $mainMod, N, movetoworkspace, +0 +bind = $mainMod, N, togglespecialworkspace, magic +bind = $mainMod, N, movetoworkspace, special:magic +bind = $mainMod, N, togglespecialworkspace, magic + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + + +# Function keys + +## Volume +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + +## Brightness +bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 5%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 5%- +bindel = SHIFT, XF86MonBrightnessUp, exec, brightnessctl s 1%+ +bindel = SHIFT, XF86MonBrightnessDown, exec, brightnessctl s 1%- + +## Player controls +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous + +## Screenshot +bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh + +## Touchpad toggle +### On galaxy books, pressing the disable touchpad key also triggers SUPER and +### CONTROL keys, this is why there are present here +bind = SUPER CONTROL, XF86TouchpadToggle, exec, ~/.config/hypr/scripts/toggle-touchpad.sh + +## Testing +#bind = $mainMod, TAB, overview:toggle, toggle diff --git a/config/.config/hypr/config/input.conf b/config/.config/hypr/config/input.conf new file mode 100644 index 0000000..72d48d9 --- /dev/null +++ b/config/.config/hypr/config/input.conf @@ -0,0 +1,148 @@ +############# +### INPUT ### +############# + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = fr + kb_variant = + kb_model = + kb_options = + kb_rules = + numlock_by_default = true + + follow_mouse = 1 + + sensitivity = 0.1 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = true + disable_while_typing = false + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#gestures +gestures { + workspace_swipe = true +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + +# Main desktop controls +bind = $mainMod, Q, killactive, +bind = $mainMod, R, exec, $menu # Omnibar +bind = $mainMod, D, exec, $menu # Legacy menu shortcut +bind = $mainMod, L, exec, hyprlock # Lockscreen +bind = $mainMod, B, exec, ~/.config/hypr/scripts/toggle-waybar.sh # Toggle sidebar +bind = $mainMod SHIFT, R, exec, ~/.config/hypr/scripts/reload.sh # Reload desktop +bind = $mainMod, F11, exec, ~/.config/hypr/scripts/gamemode.sh # Gamemode +bind = $mainMod SHIFT, M, exit, # Exit desktop session + +# Shortcuts +bind = $mainMod, RETURN, exec, $terminal +bind = $mainMod, SPACE, exec, $terminal +bind = $mainMod, E, exec, $fileManager +bindel = , XF86Launch1, exec, kitty vim ~/.config/hypr/config + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Layout +bind = $mainMod, F, fullscreen, +bind = $mainMod, V, togglesplit, # Horizontal/vertical split +bind = $mainMod, T, togglefloating, +bind = $mainMod, H, pseudo, # Toggle pseudo-tiling + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, ampersand, workspace, 1 +bind = $mainMod, eacute, workspace, 2 +bind = $mainMod, quotedbl, workspace, 3 +bind = $mainMod, apostrophe, workspace, 4 +bind = $mainMod, parenleft, workspace, 5 +bind = $mainMod, minus, workspace, 6 +bind = $mainMod, egrave, workspace, 7 +bind = $mainMod, underscore, workspace, 8 +bind = $mainMod, ccedilla, workspace, 9 +bind = $mainMod, agrave, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, ampersand, movetoworkspace, 1 +bind = $mainMod SHIFT, eacute, movetoworkspace, 2 +bind = $mainMod SHIFT, quotedbl, movetoworkspace, 3 +bind = $mainMod SHIFT, apostrophe, movetoworkspace, 4 +bind = $mainMod SHIFT, parenleft, movetoworkspace, 5 +bind = $mainMod SHIFT, minus, movetoworkspace, 6 +bind = $mainMod SHIFT, egrave, movetoworkspace, 7 +bind = $mainMod SHIFT, underscore, movetoworkspace, 8 +bind = $mainMod SHIFT, ccedilla, movetoworkspace, 9 +bind = $mainMod SHIFT, agrave, movetoworkspace, 10 + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Minimize function (uses scratchpad) +# For testing, may be removed in future releases +bind = $mainMod, N, togglespecialworkspace, magic +bind = $mainMod, N, movetoworkspace, +0 +bind = $mainMod, N, togglespecialworkspace, magic +bind = $mainMod, N, movetoworkspace, special:magic +bind = $mainMod, N, togglespecialworkspace, magic + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + + +# Function keys + +## Volume +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + +## Brightness +bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 5%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 5%- +bindel = SHIFT, XF86MonBrightnessUp, exec, brightnessctl s 1%+ +bindel = SHIFT, XF86MonBrightnessDown, exec, brightnessctl s 1%- + +## Player controls +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous + +## Screenshot +bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh + +## Touchpad toggle +### On galaxy books, pressing the disable touchpad key also triggers SUPER and +### CONTROL keys, this is why there are present here +bind = SUPER CONTROL, XF86TouchpadToggle, exec, ~/.config/hypr/scripts/toggle-touchpad.sh + +## Testing +#bind = $mainMod, TAB, overview:toggle, toggle diff --git a/config/.config/hypr/config/minimalist-mod.conf b/config/.config/hypr/config/minimalist-mod.conf new file mode 100644 index 0000000..0b75108 --- /dev/null +++ b/config/.config/hypr/config/minimalist-mod.conf @@ -0,0 +1,20 @@ +# Mod config file to make the desktop more minimalist + +general { + gaps_in = 0 + gaps_out = 0 +} + +decoration { + rounding = 0 + + shadow { + enabled = false + } + +} + +animations { + enabled = false + +} diff --git a/config/.config/hypr/config/monitors.conf b/config/.config/hypr/config/monitors.conf new file mode 100644 index 0000000..bd5511c --- /dev/null +++ b/config/.config/hypr/config/monitors.conf @@ -0,0 +1,10 @@ +################ +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,auto +monitor=eDP-1,preferred,0x0,1 # Laptop screen +monitor=DP-1, preferred, 0x-1080, 1 # HP Home monitor +monitor=DP-2, preferred, 0x-1080, 1 # HP Home monitor +monitor=HDMI-A-1, preferred, 0x-1440, 1 # Dell monitor diff --git a/config/.config/hypr/config/monitors_default.conf b/config/.config/hypr/config/monitors_default.conf new file mode 100644 index 0000000..5f2c2d4 --- /dev/null +++ b/config/.config/hypr/config/monitors_default.conf @@ -0,0 +1,7 @@ +################ +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,auto +monitor=eDP-1,preferred,0x0,1 # Laptop screen diff --git a/config/.config/hypr/config/plugins.conf b/config/.config/hypr/config/plugins.conf new file mode 100644 index 0000000..c2d7b9f --- /dev/null +++ b/config/.config/hypr/config/plugins.conf @@ -0,0 +1,12 @@ +# Plugins settings + +plugin { + overview { +# disableGestures = true + reverseSwipe = true + + overrideGaps = true + gapsIn = 10 + gapsOut = 20 + } +} diff --git a/config/.config/hypr/hyprland.conf b/config/.config/hypr/hyprland.conf new file mode 100644 index 0000000..82cde83 --- /dev/null +++ b/config/.config/hypr/hyprland.conf @@ -0,0 +1,14 @@ +# Config is based on the example Hyprland config file provided on the project's repo. +# Refer to the wiki for more information. +# https://wiki.hyprland.org/Configuring/ + +# Please note not all available settings / options are set here. +# For a full list, see the wiki + +#source = ~/.config/hypr/config/monitors_default.conf +source = ~/.config/hypr/config/monitors.conf +source = ~/.config/hypr/config/environment.conf +source = ~/.config/hypr/config/input.conf +source = ~/.config/hypr/config/appearance.conf +source = ~/.config/hypr/config/plugins.conf +#source = ~/.config/hypr/config/minimalist-mod.conf diff --git a/config/.config/hypr/hyprlock.conf b/config/.config/hypr/hyprlock.conf new file mode 100644 index 0000000..0b875d0 --- /dev/null +++ b/config/.config/hypr/hyprlock.conf @@ -0,0 +1,107 @@ +# BACKGROUND +background { + monitor = + path = ~/.config/hypr/images/lockscreen.jpg + blur_passes = 0 + #contrast = 0.8916 + #brightness = 0.8172 + #vibrancy = 0.1696 + #vibrancy_darkness = 0.0 +} + +# GENERAL +general { + no_fade_in = false + grace = 0 + disable_loading_bar = false + no_cursor = true + enable_fingerprint = true +} + +# INPUT FIELD +input-field { + monitor = + size = 320, 55 + outline_thickness = -1 + dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = true + outer_color = rgba(200, 200, 200, 0.4) + inner_color = rgba(100, 114, 125, 0.4) + font_color = rgb(200, 200, 200) + fade_on_empty = false + font_family = DejaVu Sans + placeholder_text = Enter Pass + hide_input = false + position = 0, -350 + halign = center + valign = center +} + +# Time +label { + monitor = + #text = cmd[update:1000] echo "$(date +"%H:%M")" + text = $TIME + color = rgba(216, 222, 233, 1) + font_size = 130 + font_family = JetbrainsMonoNL NF Bold + position = 0, 280 + halign = center + valign = center + # TODO make shadowing work + #shadow_passes = 10 + #shadow_size = 3 +} + +# Day-Month-Date +label { + monitor = + text = cmd[update:1000] echo -e "$(date +"%A, %d %B")" + color = rgba(216, 222, 233, 1) + font_size = 26 + font_family = JetbrainsMonoNL NF + position = 0, 160 + halign = center + valign = center +} + +# Profie-Photo +#image { +# monitor = +# path = ~/.config/hypr/images/profile.png +# border_color = 0xffdddddd +# border_size = 0 +# size = 120 +# rounding = -1 +# rotate = 0 +# reload_time = -1 +# reload_cmd = +# position = 0, -100 +# halign = center +# valign = center +#} + +# USER +#label { +# monitor = +# text = Hi, Guillem #$USER +# color = rgba(216, 222, 233, 0.70) +# font_size = 20 +# font_family = DejaVu Sans +# position = 0, -200 +# halign = center +# valign = center +#} + +# CURRENT SONG +label { + monitor = + text = cmd[update:1000] echo "$(~/.config/hypr/scripts/songdetails.sh)" + color = rgba(255, 255, 255, 0.7) + font_size = 16 + font_family = DejaVu Sans + position = 0, 20 + halign = center + valign = bottom +} diff --git a/config/.config/hypr/hyprpaper.conf b/config/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..52de529 --- /dev/null +++ b/config/.config/hypr/hyprpaper.conf @@ -0,0 +1,2 @@ +preload = ~/.config/hypr/images/wallpaper.png +wallpaper = , ~/.config/hypr/images/wallpaper.png diff --git a/config/.config/hypr/images/lockscreen.jpg b/config/.config/hypr/images/lockscreen.jpg new file mode 100644 index 0000000..097599e Binary files /dev/null and b/config/.config/hypr/images/lockscreen.jpg differ diff --git a/config/.config/hypr/images/wallpaper.png b/config/.config/hypr/images/wallpaper.png new file mode 100755 index 0000000..7b13daf Binary files /dev/null and b/config/.config/hypr/images/wallpaper.png differ diff --git a/config/.config/hypr/scripts/autostart.sh b/config/.config/hypr/scripts/autostart.sh new file mode 100755 index 0000000..9c5e18a --- /dev/null +++ b/config/.config/hypr/scripts/autostart.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# This script is launched on every hyprland startup +# Please note that it is intended for desktop related programs ONLY, as it will be called every time you reload the desktop +# If you want to add your own applications you may rather want to use exec-once in the environment.conf file + +hyprpaper & +hyprpm reload -nn & +albert & +# mako & +systemctl --user start hyprpolkitagent & +~/.config/hypr/scripts/restore-waybar.sh diff --git a/config/.config/hypr/scripts/gamemode.sh b/config/.config/hypr/scripts/gamemode.sh new file mode 100755 index 0000000..b67ae03 --- /dev/null +++ b/config/.config/hypr/scripts/gamemode.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +# From Hyprland documentation - https://wiki.hyprland.org/0.41.2/Configuring/Uncommon-tips--tricks/#toggle-animationsbluretc-hotkey + +HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') +if [ "$HYPRGAMEMODE" = 1 ] ; then + hyprctl --batch "\ + keyword animations:enabled 0;\ + keyword decoration:drop_shadow 0;\ + keyword decoration:blur:enabled 0;\ + keyword general:gaps_in 0;\ + keyword general:gaps_out 0;\ + keyword general:border_size 1;\ + keyword decoration:rounding 0" + killall waybar + hyprctl notify 1 2000 0 "Enabled game mode" + exit +fi + +hyprctl reload +~/.config/hypr/scripts/restore-waybar.sh +hyprctl notify 1 2000 0 "Disabled game mode" diff --git a/config/.config/hypr/scripts/reload.sh b/config/.config/hypr/scripts/reload.sh new file mode 100755 index 0000000..d323893 --- /dev/null +++ b/config/.config/hypr/scripts/reload.sh @@ -0,0 +1,9 @@ +killall albert +killall hyprpaper +killall waybar + +hyprctl reload + +~/.config/hypr/scripts/autostart.sh + +hyprctl notify 1 2000 0 Desktop reloaded diff --git a/config/.config/hypr/scripts/restore-waybar.sh b/config/.config/hypr/scripts/restore-waybar.sh new file mode 100755 index 0000000..9456f42 --- /dev/null +++ b/config/.config/hypr/scripts/restore-waybar.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Launch waybar depending on the last status +waybar_status=~/.config/hypr/status/waybar +if [ "$(cat $waybar_status)" == "on" ]; then + killall waybar + waybar & +elif [ "$(cat $waybar_status)" != "off" ]; then + hyprctl notify 0 3000 0 Failed to retrieve waybar status +fi diff --git a/config/.config/hypr/scripts/screenshot.sh b/config/.config/hypr/scripts/screenshot.sh new file mode 100755 index 0000000..741ecf2 --- /dev/null +++ b/config/.config/hypr/scripts/screenshot.sh @@ -0,0 +1 @@ +grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%F_%T.png') && hyprctl notify 1 2000 0 Screenshot saved! diff --git a/config/.config/hypr/scripts/songdetails.sh b/config/.config/hypr/scripts/songdetails.sh new file mode 100755 index 0000000..e4c94cc --- /dev/null +++ b/config/.config/hypr/scripts/songdetails.sh @@ -0,0 +1,2 @@ +song_info=$(playerctl metadata --format '{{title}} 󰎆 {{artist}}') +echo "$song_info" diff --git a/config/.config/hypr/scripts/toggle-touchpad.sh b/config/.config/hypr/scripts/toggle-touchpad.sh new file mode 100755 index 0000000..12a8553 --- /dev/null +++ b/config/.config/hypr/scripts/toggle-touchpad.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +device=znt0001:00-14e5:650e-touchpad +toggle_variable="device[${device}]:enabled" + +hyprctl keyword "${toggle_variable}" true + +status_file="$HOME/.config/hypr/status/touchpad" + +enable_touchpad() { + printf "on" > "${status_file}" + + hyprctl notify 1 2000 0 "Enabled touchpad" + + hyprctl keyword "${toggle_variable}" true +} + +disable_touchpad() { + printf "off" > "${status_file}" + + hyprctl notify 0 2000 0 "Disabled Touchpad" + + hyprctl keyword "${toggle_variable}" false +} + +if ! [ -f "${status_file}" ]; then + hyprctl notify 3 3000 0 "Status file missing" + enable_touchpad +else + if [ $(cat "${status_file}") = "on" ]; then + disable_touchpad + elif [ $(cat "${status_file}") = "off" ]; then + enable_touchpad + fi +fi diff --git a/config/.config/hypr/scripts/toggle-waybar.sh b/config/.config/hypr/scripts/toggle-waybar.sh new file mode 100755 index 0000000..530fe93 --- /dev/null +++ b/config/.config/hypr/scripts/toggle-waybar.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +pidof waybar # Check if waybar is running + +if [ $? = 0 ]; then + # If running, stop it + killall waybar & echo "off" > ~/.config/hypr/status/waybar +else + # Else, run it + waybar & echo "on" > ~/.config/hypr/status/waybar +fi \ No newline at end of file diff --git a/config/.config/hypr/status/waybar b/config/.config/hypr/status/waybar new file mode 100644 index 0000000..b3d8640 --- /dev/null +++ b/config/.config/hypr/status/waybar @@ -0,0 +1 @@ +on diff --git a/config/.config/kitty/github-dark.conf b/config/.config/kitty/github-dark.conf new file mode 100644 index 0000000..27e21a0 --- /dev/null +++ b/config/.config/kitty/github-dark.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: GitHub Dark +## author: GitHub +## license: MIT + +#: The basic colors + +foreground #c9d1d9 +background #0d1117 +selection_foreground #0d1117 +selection_background #58a6ff + + +#: Cursor colors + +cursor #58a6ff + + +#: Tab bar colors + +tab_bar_background #010409 +active_tab_foreground #c9d1d9 +active_tab_background #0d1117 +inactive_tab_foreground #8b949e +inactive_tab_background #010409 + + +#: The basic 16 colors + +#: black +color0 #484f58 +color8 #6e7681 + +#: red +color1 #ff7b72 +color9 #ffa198 + +#: green +color2 #3fb950 +color10 #56d364 + +#: yellow +color3 #d29922 +color11 #e3b341 + +#: blue +color4 #58a6ff +color12 #79c0ff + +#: magenta +color5 #bc8cff +color13 #d2a8ff + +#: cyan +color6 #39c5cf +color14 #56d4dd + +#: white +color7 #b1bac4 +color15 #ffffff diff --git a/config/.config/kitty/kitty.conf b/config/.config/kitty/kitty.conf new file mode 100644 index 0000000..ab1a185 --- /dev/null +++ b/config/.config/kitty/kitty.conf @@ -0,0 +1,21 @@ +## Fonts +font_family family="JetBrainsMonoNL Nerd Font Mono" +font_size 13.0 +bold_font auto +italic_font auto +bold_italic_font auto + +## Theme + +## GitHub Dark +# include github-dark.conf +## Seventy Eight +include seventy-eight.conf +## Blurred background +# background_opacity 0.6 + +## Decent scrolling speed +touch_scroll_multiplier 5.0 + +## Annoying bell sound +enable_audio_bell no diff --git a/config/.config/kitty/seventy-eight.conf b/config/.config/kitty/seventy-eight.conf new file mode 100644 index 0000000..9a1c73c --- /dev/null +++ b/config/.config/kitty/seventy-eight.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: 78 +## author: Gu://em_ (forked from Github Dark) +## license: MIT + +#: The basic colors + +foreground #c9d1d9 +background #0f131a +selection_foreground #EE6C4D +selection_background #3D5A80 + + +#: Cursor colors + +cursor #E0FBFC + + +#: Tab bar colors + +tab_bar_background #010409 +active_tab_foreground #c9d1d9 +active_tab_background #0d1117 +inactive_tab_foreground #8b949e +inactive_tab_background #010409 + + +#: The basic 16 colors + +#: black +color0 #484f58 +color8 #6e7681 + +#: red +color1 #EE6C4D +color9 #F5877A + +#: green +color2 #3fb950 +color10 #56d364 + +#: yellow +color3 #d29922 +color11 #e3b341 + +#: blue +color4 #58a6ff +color12 #79c0ff + +#: magenta +color5 #bc8cff +color13 #d2a8ff + +#: cyan +color6 #39c5cf +color14 #56d4dd + +#: white +color7 #b1bac4 +color15 #ffffff diff --git a/config/.config/waybar/colors.css b/config/.config/waybar/colors.css new file mode 100644 index 0000000..07910df --- /dev/null +++ b/config/.config/waybar/colors.css @@ -0,0 +1,4 @@ +@define-color foreground #c5c5c5; +@define-color background #18191c; + +@define-color accentColor #b6c8d3; \ No newline at end of file diff --git a/config/.config/waybar/config.jsonc b/config/.config/waybar/config.jsonc new file mode 100644 index 0000000..16bfd27 --- /dev/null +++ b/config/.config/waybar/config.jsonc @@ -0,0 +1,478 @@ +{ + "layer": "top", + "position": "left", + "margin": "1 1 1 1", + "reload_style_on_change": true, + "modules-left": [ + //"custom/updates", + "hyprland/workspaces", + "hyprland/submap" + //"group/info", + //"hyprland/window" + ], + "hyprland/workspaces": { + "format": "{icon}", + "on-click": "activate", + "all-outputs": true, + "format-icons": { + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "10": "10" + } + }, + "hyprland/window": { + "format":"", + "spearate-outputs": true, + "icon": true + + }, + "hyprland/submap": { + "format": "󰇘", + "max-length": 8, + "tooltip": true + }, + "group/info": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "transition-left-to-right": false + }, + "modules": [ + "custom/dmark", + "group/gcpu", + "memory", + "disk" + ] + }, + "custom/dmark": { + "format": "", + "tooltip": false + }, + "group/gcpu": { + "orientation": "inherit", + "modules": [ + "custom/cpu-icon", + "custom/cputemp", + "cpu" + ] + }, + "custom/cpu-icon": { + "format": "󰻠", + "tooltip": false + }, + "custom/cputemp": { + "format": "{}", + "exec": "~/.config/waybar/bin/cputemp", + "interval": 10, + "return-type": "json" + }, + "cpu": { + "format": "{usage}󱉸", + "on-click": "foot btop" + }, + "memory": { + "format": "  \n{:2}󱉸" + }, + "disk": { + "interval": 600, + "format": " 󰋊 \n{percentage_used}󱉸", + "path": "/" + }, + "modules-right": [ + "custom/recorder", + "privacy", + "group/brightness", + "group/sound", + "group/connection", + "tray", + "group/together", + //"group/cnoti", + "group/power" + ], + "custom/recorder": { + "format": "{}", + "interval": "once", + "exec": "echo ''", + "tooltip": "false", + "exec-if": "pgrep 'wl-screenrec'", + "on-click": "recorder", + "signal": 4 + }, + "privacy": { + "orientation": "vertical", + "icon-spacing": 4, + "icon-size": 14, + "transition-duration": 250, + "modules": [ + { + "type": "screenshare", + "tooltip": true, + "tooltip-icon-size": 24 + } + ] + }, + "group/brightness": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "transition-left-to-right": false + }, + "modules": [ + "backlight" + //"backlight/slider" + ] + }, + "backlight": { + "device": "intel_backlight", + "format": "{icon}", + "format-icons": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "on-scroll-down": "brightnessctl s 5%-", + "on-scroll-up": "brightnessctl s +5%", + "tooltip": true, + "tooltip-format": "Brightness: {percent}% ", + "smooth-scrolling-threshold": 1 + }, + "backlight/slider": { + "min": 1, + "max": 100, + "orientation": "vertical", + "device": "intel_backlight" + }, + "group/sound": { + "orientation": "inherit", + "modules": [ + "group/audio", + "custom/notifications" + ] + }, + "group/audio": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "transition-left-to-right": false + }, + "modules": [ + "pulseaudio", + "pulseaudio#mic", + "pulseaudio/slider" + ] + }, + "group/cnoti": { + "orientation": "inherit", + "modules": [ + "custom/github" + ] + }, + "group/connection": { + "orientation": "inherit", + "modules": [ + //"custom/vpn", + "custom/hotspot", + "group/network" + //"group/bluetooth" + ] + }, + "group/together": { + "orientation": "inherit", + "modules": [ + "group/utils", + "clock" + ] + }, + "group/utils": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "transition-left-to-right": true + }, + "modules": [ + "custom/mark", + "custom/weather", + "custom/colorpicker", + "custom/hyprshade", + "idle_inhibitor", + "custom/hyprkill" + ] + }, + "group/network": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "transition-left-to-right": false + }, + "modules": [ + "network", + "network#speed" + ] + }, + "group/bluetooth": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "transition-left-to-right": true + }, + "modules": [ + "bluetooth", + "bluetooth#status" + ] + }, + "group/power": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "transition-left-to-right": false + }, + "modules": [ + "battery", + "power-profiles-daemon" + ] + }, + "tray": { + "icon-size": 18, + "spacing": 10 + }, + "pulseaudio": { + "format": "{icon}", + "format-bluetooth": "{icon}", + "tooltip-format": "{volume}% {icon} | {desc}", + "format-muted": "󰖁", + "format-icons": { + "headphones": "", + "handsfree": "󱡏", + "headset": "", + "phone": "", + "portable": "", + "car": " ", + "default": [ + "󰕿", + "󰖀", + "󰕾" + ] + }, + "on-click": "volume mute", + //"on-click-middle": "pavucontrol", + "on-scroll-up": "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+", + "on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ -5%", + "smooth-scrolling-threshold": 1 + }, + "pulseaudio#mic": { + "format": "{format_source}", + "format-source": "󰍬", + "format-source-muted": "󰍭", + "tooltip-format": "{volume}% {format_source} ", + "on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", + "on-scroll-down": "wpctl set-volume @DEFAULT_SOURCE@ 5%-", + "on-scroll-up": "wpctl set-volume -l 1 @DEFAULT_SOURCE@ 5%+" + }, + "pulseaudio/slider": { + "min": 0, + "max": 100, + "orientation": "vertical" + }, + "network": { + "format": "{icon}", + "format-icons": { + "wifi": [ + "󰤨" + ], + "ethernet": [ + "" + ], + "disconnected": [ + "󰤮" + ] + }, + "format-wifi": "󰤨", + "format-ethernet": "", + "format-disconnected": "󰤮", + "format-linked": "󰈁", + "tooltip": false, + //"on-click": "pgrep -x rofi &>/dev/null && notify-send rofi || networkmanager_dmenu" + "on-click": "kitty nmtui" + }, + "network#speed": { + "format": " {bandwidthDownBits} ", + "rotate": 90, + "interval": 5, + "tooltip-format": "{ipaddr}", + "tooltip-format-wifi": "{essid} ({signalStrength}%)  \n{ipaddr} | {frequency} MHz{icon} ", + "tooltip-format-ethernet": "{ifname} 󰈀 \n{ipaddr} | {frequency} MHz{icon} ", + "tooltip-format-disconnected": "Not Connected to any type of Network", + "tooltip": true, + "on-click": "pgrep -x rofi &>/dev/null && notify-send rofi || networkmanager_dmenu" + }, + "bluetooth": { + "format-on": "󰂯", + "format-off": "󰂲", + "format-disabled": "", + "format-connected": "󰂱", + "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", + "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", + "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", + "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%", + //"on-click": "rofi-bluetooth -config ~/.config/rofi/menu.d/network.rasi -i" + "on-click": "toggle-bluetooth" + }, + "bluetooth#status": { + "format-on": "", + "format-off": "", + "format-disabled": "", + "format-connected": "{num_connections}", + "format-connected-battery": "{device_battery_percentage}%", + "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", + "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", + "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", + "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%", + "on-click": "rofi-bluetooth -config ~/.config/rofi/menu.d/network.rasi -i" + }, + "battery": { + "rotate": 270, + "states": { + "good": 95, + "warning": 16, + "critical": 8 + }, + "format": "{icon}", + "interval": 1, + "format-charging": "{icon} ", + "format-full": "{icon}", + "format-icons": [ + "󰁻", + "󰁼", + "󰁾", + "󰂀", + "󰂂", + "󰁹" + ], + "tooltip-format": "{timeTo} {capacity} % | {power} W" + }, + "clock": { + "format": "{:%H\n%M}", + "tooltip-format": "{calendar}", + "calendar": { + "mode": "month", + "mode-mon-col": 3, + "weeks-pos": "right", + "on-scroll": 1, + "on-click-right": "mode", + "format": { + "today": "{}" + } + } + }, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "default": "", + "performance": "", + "balanced": "", + "power-saver": "" + + } + }, + "custom/hyprshade": { + "format": "{}", + "tooltip": true, + "signal": 11, + "exec": "toggle-hyprshade status", + "on-click": "toggle-hyprshade", + "return-type": "json" + }, + "custom/weather": { + "format": "{}", + "tooltip": true, + "interval": 3600, + "exec": "wttrbar --custom-indicator '{ICON}\n{temp_C}' --location noida", + "return-type": "json" + }, + "custom/updates": { + "format": "{}", + "interval": 10800, + "exec": "~/.config/waybar/bin/updatecheck", + "return-type": "json", + "exec-if": "exit 0", + "signal": 8 + }, + "custom/vpn": { + "format": "{} ", + "exec": "~/.config/waybar/bin/vpn", + "return-type": "json", + "interval": 5 + }, + "custom/hotspot": { + "format": "{} ", + "exec": "~/.config/waybar/bin/hotspot", + "return-type": "json", + "on-click": "hash wihotspot && wihotspot", + "interval": 5 + }, + "custom/mark": { + "format": "", + "tooltip": false + }, + "custom/colorpicker": { + "format": "{}", + "return-type": "json", + "interval": "once", + "exec": "colorpicker -j", + "on-click": "sleep 1 && colorpicker", + "signal": 1 + }, + "custom/hyprkill": { + "format": "{}", + "interval": "once", + "exec": "echo '󰱝\nKill clients using hyrpctl kill'", + "on-click": "sleep 1 && hyprctl kill" + }, + "custom/notifications": { + "format": "{} ", + "exec": "noti-cycle -j", + "on-click": "noti-cycle", + "on-click-right": "noti-cycle rofi", + "return-type": "json", + "interval": "once", + "signal": 2 + }, + "custom/github": { + "format": "{}", + "return-type": "json", + "interval": 3600, + "signal": 9, + "exec": "$HOME/.config/waybar/bin/github.sh", + "on-click": "xdg-open https://github.com/notifications;pkill -RTMIN+9 waybar" + }, + "idle_inhibitor": { + "format": "{icon}", + "tooltip-format-activated": "Idle Inhibitor is active", + "tooltip-format-deactivated": "Idle Inhibitor is not active", + "format-icons": { + "activated": "󰅶", + "deactivated": "󰾪" + } + } +} diff --git a/config/.config/waybar/style.css b/config/.config/waybar/style.css new file mode 100644 index 0000000..08aa44c --- /dev/null +++ b/config/.config/waybar/style.css @@ -0,0 +1,292 @@ +@import "colors.css"; +@define-color active @accentColor; + +* { + font-size: 16px; + font-family: "JetBrainsMono Nerd Font,JetBrainsMono NF"; + min-width: 8px; + min-height: 0px; + border: none; + border-radius: 0; + box-shadow: none; + text-shadow: none; + padding: 0px; + +} + +window#waybar { + transition-property: background-color; + transition-duration: 0.5s; + border-radius: 4px; + border: 1px solid alpha(@active, 0.2); + background: @background; + background: alpha(@background, 0.7); + color: lighter(@active); +} + +menu, +tooltip { + border-radius: 2px; + padding: 2px; + border: 1px solid @active; + background: @background; + + color: lighter(@active); +} + +menu label, +tooltip label { + font-size: 14px; + color: lighter(@active); +} + +#submap, +#tray>.needs-attention { + animation-name: blink-active; + animation-duration: 1s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +.modules-right { + margin: 0px 6px 4px 6px; + border-radius: 4px; + background: alpha(@background, 0); + color: lighter(@active); +} + +.modules-left { + transition-property: background-color; + transition-duration: 0.5s; + margin: 6px 5px 6px 5px; /* Testing with 5 pixels on left/right */ + border-radius: 4px; + background: alpha(@background, 0.5); + color: lighter(@active); + border: 1px solid alpha(@active, 0.1); +} + +#gcpu, +#custom-github, +#memory, +#disk, +#together, +#submap, +#custom-weather, +#custom-recorder, +#connection, +#cnoti, +#brightness, +#power, +#custom-updates, +#tray, +/*#audio,*/ /* Duplicate with #sound */ +#sound, +#privacy { /*Controls all the right modules for some reason*/ + border-radius: 2px; + margin: 2px 1px 3px 1px; + background: alpha(darker(@active), 0.3); + border: 1px solid alpha(darker(@active), 0.2); +} + +/* Override specific parameters*/ + +#brightness, +#sound { + padding: 1px 0px; +} + +#custom-notifications { + padding-left: 4px; +} + +#custom-hotspot, +#custom-github, +#custom-notifications { + font-size: 14px; +} + +#custom-hotspot { + padding-right: 2px; +} + +#custom-vpn, +#custom-hotspot { + background: alpha(darker(@active), 0.3); +} + +#privacy-item { + padding: 6px 0px 6px 6px; +} + +#gcpu { + padding: 8px 0px 8px 0px; +} + +#custom-cpu-icon { + font-size: 25px; +} + +#custom-cputemp, +#disk, +#memory, +#cpu { + font-size: 14px; + font-weight: bold; +} + +#custom-github { + padding-top: 2px; + padding-right: 4px; +} + +#custom-dmark { + color: alpha(@foreground, 0.3); +} + +#submap { + margin-bottom: 0px; +} + +#workspaces { + margin: 0px 2px; + padding: 2px 0px; + border-radius: 8px; +} + +#workspaces button { + transition-property: background-color; + transition-duration: 0.1s; + color: @foreground; + background: transparent; + border-radius: 4px; + color: alpha(@foreground, 0.3); + padding: 2px 0px; +} + +#workspaces button.urgent { + font-weight: bold; + color: @foreground; +} + +#workspaces button.active { + padding: 2px 0px; + background: alpha(@active, 0.4); + color: lighter(@active); + border-radius: 2px; +} + +#network.wifi { + padding-right: 5px; + margin: 2px 0px; +} + +#network.disconnected { + padding-right: 5px; + margin: 2px 0px; +} + +#network.ethernet { + padding-right: 3px; + margin: 2px 0px; +} + +#submap { + min-width: 0px; + margin: 4px 6px 4px 6px; +} + +#custom-weather, +#tray { + padding: 4px 0px 4px 0px; +} + +#bluetooth { + padding-top: 2px; +} + +#battery { + border-radius: 8px; + padding: 4px 0px; + margin: 4px 2px 4px 2px; +} + +#battery.discharging.warning { + animation-name: blink-yellow; + animation-duration: 1s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#battery.discharging.critical { + animation-name: blink-red; + animation-duration: 1s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#clock { + font-weight: bold; + padding: 4px 2px 2px 2px; +} + +#pulseaudio.mic { + border-radius: 4px; + color: lighter(@active); + padding-left: 2px; +} + +#backlight-slider slider, +#pulseaudio-slider slider { + background-color: transparent; + box-shadow: none; +} + +#backlight-slider trough, +#pulseaudio-slider trough { + margin-top: 4px; + min-width: 6px; + min-height: 60px; + border-radius: 8px; + background-color: alpha(@background, 0.6); +} + +#backlight-slider highlight, +#pulseaudio-slider highlight { + border-radius: 8px; + background-color: lighter(@active); +} + +#bluetooth.discoverable, +#bluetooth.discovering, +#bluetooth.pairable { + border-radius: 8px; + animation-name: blink-active; + animation-duration: 1s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +@keyframes blink-active { + to { + background-color: @active; + color: @foreground; + } +} + +@keyframes blink-red { + to { + background-color: #c64d4f; + color: @foreground; + } +} + +@keyframes blink-yellow { + to { + background-color: #cf9022; + color: @foreground; + } +} diff --git a/config/.local/bin/codium-patch.sh b/config/.local/bin/codium-patch.sh new file mode 100755 index 0000000..b6401d3 --- /dev/null +++ b/config/.local/bin/codium-patch.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ $(whoami) != root ]; then + echo "Please run this script as root" + echo "-> sudo $0" + echo + sudo $0 + exit $? +fi + +apps_path=/usr/share/applications + +rm $apps_path/codium.desktop +sed -i "s/Name=VSCodium - Wayland/Name=VSCodium/g" $apps_path/codium-wayland.desktop + +echo "- Done" +exit 0 diff --git a/config/.local/bin/set-lockscreen b/config/.local/bin/set-lockscreen new file mode 100755 index 0000000..530082d --- /dev/null +++ b/config/.local/bin/set-lockscreen @@ -0,0 +1,53 @@ +#!/bin/sh + +# Actually just a modified version of the set-wallpaper script, explaining some potential inconsistencies in variables naming or whatever else. + +print_help() { + echo "Usage: $0 [input-file]" + echo + echo "Changes your current lockscreen wallpaper" + echo "Please note that this script is made to be used with the Atlas Desktop and will probably not work on most other desktops." +} + +if [ $# -ne 1 ]; then + print_help + exit 1 +fi + +# Check if file exists +if [ -e "$1" ]; then + + # Variables declaration + wallpaper_config=~/.config/hypr/hyprlock.conf + wallpaper_path=~/.config/hypr/images/lockscreen # Doesn't contain file extension + file_extension="${1##*.}" + + # In case file has no extension + if [ "${file_extension}" == "$1" ]; then + echo "Error: please provide a file extension (ex: .jpg, .png...)" + exit 1 + fi + + # Remove old wallpaper + rm $wallpaper_path* + + # Copy file + cp "$1" "${wallpaper_path}.${file_extension}" + if [ $? != 0 ]; then + echo "Aborted." + exit 1 + fi + + # Update config + sed -i "s/lockscreen\.[^[:space:]]*/lockscreen.$file_extension/g" $wallpaper_config # Replace current extension by new extension + if [ $? != 0 ]; then + echo "Aborted." + exit 1 + fi + + echo "Done" + exit 0 +else + echo "Couldn't find '${1}': No such file or directory" + exit 1 +fi diff --git a/config/.local/bin/set-wallpaper b/config/.local/bin/set-wallpaper new file mode 100755 index 0000000..7eddfe9 --- /dev/null +++ b/config/.local/bin/set-wallpaper @@ -0,0 +1,57 @@ +#!/bin/sh + +print_help() { + echo "Usage: $0 [input-file]" + echo + echo "Changes your current wallpaper" + echo "Please note that this script is made to be used with the Atlas Desktop and will probably not work on most other desktops." +} + +if [ $# -ne 1 ]; then + print_help + exit 1 +fi + +# Check if file exists +if [ -e "$1" ]; then + + # Variables declaration + wallpaper_config=~/.config/hypr/hyprpaper.conf + wallpaper_path=~/.config/hypr/images/wallpaper # Doesn't contain file extension + file_extension="${1##*.}" + + # In case file has no extension + if [ "${file_extension}" == "$1" ]; then + echo "Error: please provide a file extension (ex: .jpg, .png...)" + exit 1 + fi + + # Remove old wallpaper + rm $wallpaper_path* + + # Copy file + cp "$1" "${wallpaper_path}.${file_extension}" + if [ $? != 0 ]; then + echo "Aborted." + exit 1 + fi + + # Update config + sed -i "s/wallpaper\.[^[:space:]]*/wallpaper.$file_extension/g" $wallpaper_config # Replace current extension by new extension + if [ $? != 0 ]; then + echo "Aborted." + exit 1 + fi + + # Reload Hyprpaper + pkill hyprpaper + hyprctl dispatch exec hyprpaper > /dev/null # Start hyprpaper and hide stdout output + # Or you can do the old fashioned way : + # nohup hyprpaper /dev/null 2>&1 & + + echo "Done" + exit 0 +else + echo "Couldn't find '${1}': No such file or directory" + exit 1 +fi diff --git a/config/.p10k.zsh b/config/.p10k.zsh new file mode 100644 index 0000000..fc78971 --- /dev/null +++ b/config/.p10k.zsh @@ -0,0 +1,1720 @@ +# Generated by Powerlevel10k configuration wizard on 2024-10-27 at 21:50 CET. +# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 37983. +# Wizard options: nerdfont-v3 + powerline, small icons, unicode, lean, 2 lines, +# disconnected, no frame, sparse, few icons, concise, transient_prompt, +# instant_prompt=verbose. +# Type `p10k configure` to generate another config. +# +# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate +# your own config based on it. +# +# Tip: Looking for a nice color? Here's a one-liner to print colormap. +# +# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh -o extended_glob + + # Unset all configuration options. This allows you to apply configuration changes without + # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. + unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' + + # Zsh >= 5.1 is required. + [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return + + # The list of segments shown on the left. Fill it with the most important segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + # os_icon # os identifier + dir # current directory + vcs # git status + # =========================[ Line #2 ]========================= + newline # \n + prompt_char # prompt symbol + ) + + # The list of segments shown on the right. Fill it with less important segments. + # Right prompt on the last prompt line (where you are typing your commands) gets + # automatically hidden when the input line reaches it. Right prompt above the + # last prompt line gets hidden if it would overlap with left prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + status # exit code of the last command + command_execution_time # duration of the last command + background_jobs # presence of background jobs + direnv # direnv status (https://direnv.net/) + asdf # asdf version manager (https://github.com/asdf-vm/asdf) + virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) + anaconda # conda environment (https://conda.io/) + pyenv # python environment (https://github.com/pyenv/pyenv) + goenv # go environment (https://github.com/syndbg/goenv) + nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) + nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) + nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) + # node_version # node.js version + # go_version # go version (https://golang.org) + # rust_version # rustc version (https://www.rust-lang.org) + # dotnet_version # .NET version (https://dotnet.microsoft.com) + # php_version # php version (https://www.php.net/) + # laravel_version # laravel php framework version (https://laravel.com/) + # java_version # java version (https://www.java.com/) + # package # name@version from package.json (https://docs.npmjs.com/files/package.json) + rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) + rvm # ruby version from rvm (https://rvm.io) + fvm # flutter version management (https://github.com/leoafarias/fvm) + luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) + jenv # java version from jenv (https://github.com/jenv/jenv) + plenv # perl version from plenv (https://github.com/tokuhirom/plenv) + perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew) + phpenv # php version from phpenv (https://github.com/phpenv/phpenv) + scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) + haskell_stack # haskell version from stack (https://haskellstack.org/) + kubecontext # current kubernetes context (https://kubernetes.io/) + terraform # terraform workspace (https://www.terraform.io) + # terraform_version # terraform version (https://www.terraform.io) + aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) + aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) + azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) + gcloud # google cloud cli account and project (https://cloud.google.com/) + google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) + toolbox # toolbox name (https://github.com/containers/toolbox) + context # user@hostname + nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) + ranger # ranger shell (https://github.com/ranger/ranger) + yazi # yazi shell (https://github.com/sxyazi/yazi) + nnn # nnn shell (https://github.com/jarun/nnn) + lf # lf shell (https://github.com/gokcehan/lf) + xplr # xplr shell (https://github.com/sayanarijit/xplr) + vim_shell # vim shell indicator (:sh) + midnight_commander # midnight commander shell (https://midnight-commander.org/) + nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) + chezmoi_shell # chezmoi shell (https://www.chezmoi.io/) + # vpn_ip # virtual private network indicator + # load # CPU load + # disk_usage # disk usage + # ram # free RAM + # swap # used swap + todo # todo items (https://github.com/todotxt/todo.txt-cli) + timewarrior # timewarrior tracking status (https://timewarrior.net/) + taskwarrior # taskwarrior task count (https://taskwarrior.org/) + per_directory_history # Oh My Zsh per-directory-history local/global indicator + # cpu_arch # CPU architecture + # time # current time + # =========================[ Line #2 ]========================= + newline + # ip # ip address and bandwidth usage for a specified network interface + # public_ip # public IP address + # proxy # system-wide http/https/ftp proxy + # battery # internal battery + # wifi # wifi speed + # example # example user-defined segment (see prompt_example function below) + ) + + # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. + typeset -g POWERLEVEL9K_MODE=nerdfont-v3 + # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid + # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. + typeset -g POWERLEVEL9K_ICON_PADDING=none + + # Basic style options that define the overall look of your prompt. You probably don't want to + # change them. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + + # When set to true, icons appear before content on both sides of the prompt. When set + # to false, icons go after content. If empty or not set, icons go before content in the left + # prompt and after content in the right prompt. + # + # You can also override it for a specific segment: + # + # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false + # + # Or for a specific segment in specific state: + # + # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true + + # Add an empty line before each prompt. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true + + # Connect left prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= + # Connect right prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= + + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll + # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and + # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. + typeset -g POWERLEVEL9K_SHOW_RULER=false + typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' + typeset -g POWERLEVEL9K_RULER_FOREGROUND=242 + + # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' + # to make it easier to see the alignment between left and right prompt and to separate prompt + # from command output. It serves the same purpose as ruler (see above) without increasing + # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false + # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact + # prompt. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' + if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then + # The color of the filler. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 + # Add a space between the end of left prompt and the filler. + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' + # Add a space between the filler and the start of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' + # Start filler from the edge of the screen if there are no left segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' + # End filler on the edge of the screen if there are no right segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' + fi + + #################################[ os_icon: os identifier ]################################## + # OS identifier color. + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= + # Custom icon. + # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' + + ################################[ prompt_char: prompt symbol ]################################ + # Green prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' + # Prompt symbol in overwrite vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true + # No line terminator if prompt_char is the last segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # No line introducer if prompt_char is the first segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + + ##################################[ dir: current directory ]################################## + # Default current directory color. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=31 + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Replace removed segment suffixes with this symbol. + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # Don't shorten directories that contain any of these files. They are anchors. + local anchor_files=( + .bzr + .citc + .git + .hg + .node-version + .python-version + .go-version + .ruby-version + .lua-version + .java-version + .perl-version + .php-version + .tool-versions + .mise.toml + .shorten_folder_marker + .svn + .terraform + CVS + Cargo.toml + composer.json + go.mod + package.json + stack.yaml + ) + typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" + # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains + # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is + # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) + # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers + # and other directories don't. + # + # Optionally, "first" and "last" can be followed by ":" where is an integer. + # This moves the truncation point to the right (positive offset) or to the left (negative offset) + # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" + # respectively. + typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false + # Don't shorten this many last directory segments. They are anchors. + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 + # Shorten directory if it's longer than this even if there is space for it. The value can + # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, + # directory will be shortened only when prompt doesn't fit or when other parameters demand it + # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). + # If set to `0`, directory will always be shortened to its minimum length. + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this + # many columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least + # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 + # If set to true, embed a hyperlink into the directory. Useful for quickly + # opening a directory in the file manager simply by clicking the link. + # Can also be handy when the directory is shortened, as it allows you to see + # the full directory that was used in previous commands. + typeset -g POWERLEVEL9K_DIR_HYPERLINK=false + + # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON + # and POWERLEVEL9K_DIR_CLASSES below. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 + + # The default icon shown next to non-writable and non-existent directories when + # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. + # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' + + # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different + # directories. It must be an array with 3 * N elements. Each triplet consists of: + # + # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with + # extended_glob option enabled. + # 2. Directory class for the purpose of styling. + # 3. An empty string. + # + # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. + # + # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories + # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=( + # '~/work(|/*)' WORK '' + # '~(|/*)' HOME '' + # '*' DEFAULT '') + # + # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one + # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or + # WORK_NON_EXISTENT. + # + # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an + # option to define custom colors and icons for different directory classes. + # + # # Styling for WORK. + # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NOT_WRITABLE. + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NON_EXISTENT. + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 + # + # If a styling parameter isn't explicitly defined for some class, it falls back to the classless + # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls + # back to POWERLEVEL9K_DIR_FOREGROUND. + # + typeset -g POWERLEVEL9K_DIR_CLASSES=() + + # Custom prefix. + # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' + + #####################################[ vcs: git status ]###################################### + # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= + + # Untracked files icon. It's really a question mark, your font isn't broken. + # Change the value of this parameter to show a different icon. + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' + + # Formatter for Git status. + # + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # + # You can edit the function to customize how Git status looks. + # + # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: + # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. + function my_git_formatter() { + emulate -L zsh + + if [[ -n $P9K_CONTENT ]]; then + # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from + # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. + typeset -g my_git_format=$P9K_CONTENT + return + fi + + if (( $1 )); then + # Styling for up-to-date Git status. + local meta='%f' # default foreground + local clean='%76F' # green foreground + local modified='%178F' # yellow foreground + local untracked='%39F' # blue foreground + local conflicted='%196F' # red foreground + else + # Styling for incomplete and stale Git status. + local meta='%244F' # grey foreground + local clean='%244F' # grey foreground + local modified='%244F' # grey foreground + local untracked='%244F' # grey foreground + local conflicted='%244F' # grey foreground + fi + + local res + + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then + local branch=${(V)VCS_STATUS_LOCAL_BRANCH} + # If local branch name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show local branch name in full without truncation, delete the next line. + (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line + res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" + fi + + if [[ -n $VCS_STATUS_TAG + # Show tag only if not on a branch. + # Tip: To always show tag, delete the next line. + && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line + ]]; then + local tag=${(V)VCS_STATUS_TAG} + # If tag name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show tag name in full without truncation, delete the next line. + (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line + res+="${meta}#${clean}${tag//\%/%%}" + fi + + # Display the current Git commit if there is no branch and no tag. + # Tip: To always display the current Git commit, delete the next line. + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line + res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + + # Show tracking branch name if it differs from local branch. + if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" + fi + + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + + if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" + fi + + # ⇠42 if behind the push remote. + (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" + (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " + # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # *42 if have stashes. + (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" + # 'merge' if the repo is in an unusual state. + [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" + # ~42 if have merge conflicts. + (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # +42 if have staged changes. + (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # !42 if have unstaged changes. + (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # ?42 if have untracked files. It's really a question mark, your font isn't broken. + # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. + # Remove the next line if you don't want to see untracked files at all. + (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + # "─" if the number of unstaged files is unknown. This can happen due to + # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower + # than the number of files in the Git index, or due to bash.showDirtyState being set to false + # in the repository config. The number of staged and untracked files may also be unknown + # in this case. + (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" + + typeset -g my_git_format=$res + } + functions -M my_git_formatter 2>/dev/null + + # Don't count the number of unstaged, untracked and conflicted files in Git repositories with + # more than this many files in the index. Negative value means infinity. + # + # If you are working in Git repositories with tens of millions of files and seeing performance + # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output + # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's + # config: `git config bash.showDirtyState false`. + typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + + # Disable the default Git status formatting. + typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true + # Install our own Git status formatter. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' + typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' + # Enable counters for staged, unstaged, etc. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 + + # Icon color. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 + typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 + # Custom icon. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' + + # Show status of repositories of these types. You can add svn and/or hg if you are + # using them. If you do, your prompt may become slow even when your current directory + # isn't in an svn or hg repository. + typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) + + # These settings are used for repositories other than Git or when gitstatusd fails and + # Powerlevel10k has to fall back to using vcs_info. + typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 + + ##########################[ status: exit code of the last command ]########################### + # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and + # style them independently from the regular OK and ERROR state. + typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true + + # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as + # it will signify success by turning green. + typeset -g POWERLEVEL9K_STATUS_OK=false + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when some part of a pipe command fails but the overall exit status is zero. It may look + # like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as + # it will signify error by turning red. + typeset -g POWERLEVEL9K_STATUS_ERROR=false + typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when the last command was terminated by a signal. + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 + # Use terse signal names: "INT" instead of "SIGINT(2)". + typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when some part of a pipe command fails and the overall exit status is also non-zero. + # It may look like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' + + ###################[ command_execution_time: duration of the last command ]################### + # Show duration of the last command if takes at least this many seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 + # Show this many fractional digits. Zero means round to seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Execution time color. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Custom icon. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' + + #######################[ background_jobs: presence of background jobs ]####################### + # Don't show the number of background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false + # Background jobs color. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ direnv: direnv status (https://direnv.net/) ]######################## + # Direnv color. + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### + # Default asdf color. Only used to display tools for which there is no color override (see below). + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. + typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 + + # There are four parameters that can be used to hide asdf tools. Each parameter describes + # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at + # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to + # hide a tool, it gets shown. + # + # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and + # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: + # + # asdf local python 3.8.1 + # asdf global python 3.8.1 + # + # After running both commands the current python version is 3.8.1 and its source is "local" as + # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, + # it'll hide python version in this case because 3.8.1 is the same as the global version. + # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't + # contain "local". + + # Hide tool versions that don't come from one of these sources. + # + # Available sources: + # + # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" + # - local `asdf current` says "set by /some/not/home/directory/file" + # - global `asdf current` says "set by /home/username/file" + # + # Note: If this parameter is set to (shell local global), it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. + typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) + + # If set to false, hide tool versions that are the same as global. + # + # Note: The name of this parameter doesn't reflect its meaning at all. + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. + typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false + + # If set to false, hide tool versions that are equal to "system". + # + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. + typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true + + # If set to non-empty value, hide tools unless there is a file matching the specified file pattern + # in the current directory, or its parent directory, or its grandparent directory, and so on. + # + # Note: If this parameter is set to empty value, it won't hide tools. + # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. + # + # Example: Hide nodejs version when there is no package.json and no *.js files in the current + # directory, in `..`, in `../..` and so on. + # + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' + typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= + + # Ruby version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 + # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Python version from asdf. + typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Go version from asdf. + typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Node.js version from asdf. + typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Rust version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' + + # .NET Core version from asdf. + typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Flutter version from asdf. + typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Lua version from asdf. + typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Java version from asdf. + typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Perl version from asdf. + typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 + # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Erlang version from asdf. + typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 + # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Elixir version from asdf. + typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Postgres version from asdf. + typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' + + # PHP version from asdf. + typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 + # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Haskell version from asdf. + typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 + # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Julia version from asdf. + typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' + + ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### + # NordVPN connection indicator color. + typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 + # Hide NordVPN connection indicator when not connected. + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= + # Custom icon. + # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## + # Ranger shell color. + typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### + # Yazi shell color. + typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### + # Nnn shell color. + typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]####################### + # lf shell color. + typeset -g POWERLEVEL9K_LF_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## + # xplr shell color. + typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### + # Vim shell indicator color. + typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 + # Custom icon. + # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### + # Midnight Commander shell color. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## + # Nix shell color. + typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 + + # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store. + # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false + + # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. + # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]################## + # chezmoi shell color. + typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33 + # Custom icon. + # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ disk_usage: disk usage ]################################## + # Colors for different levels of disk usage. + typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 + # Thresholds for different levels of disk usage (percentage points). + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 + # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. + typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false + # Custom icon. + # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ ram: free RAM ]####################################### + # RAM color. + typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 + # Custom icon. + # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################################[ swap: used swap ]###################################### + # Swap color. + typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 + # Custom icon. + # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ load: CPU load ]###################################### + # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + # Load color when load is under 50%. + typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 + # Load color when load is between 50% and 70%. + typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 + # Load color when load is over 70%. + typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 + # Custom icon. + # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ + # Todo color. + typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 + # Hide todo when the total number of tasks is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true + # Hide todo when the number of tasks after filtering is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false + + # Todo format. The following parameters are available within the expansion. + # + # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. + # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. + # + # These variables correspond to the last line of the output of `todo.sh -p ls`: + # + # TODO: 24 of 42 tasks shown + # + # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. + # + # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ + # Timewarrior color. + typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 + # If the tracked task is longer than 24 characters, truncate and append "…". + # Tip: To always display tasks without truncation, delete the following parameter. + # Tip: To hide task names and display just the icon when time tracking is enabled, set the + # value of the following parameter to "". + typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' + + # Custom icon. + # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## + # Taskwarrior color. + typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 + + # Taskwarrior segment format. The following parameters are available within the expansion. + # + # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. + # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. + # + # Zero values are represented as empty parameters. + # + # The default format: + # + # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' + # + # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]####### + # Color when using local/global history. + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130 + + # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION='' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION='' + + # Custom icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ cpu_arch: CPU architecture ]################################ + # CPU architecture color. + typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172 + + # Hide the segment when on a specific CPU architecture. + # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION= + # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ context: user@hostname ]################################## + # Context color when running with privileges. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 + # Context color in SSH without privileges. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 + # Default context color (no privileges, no SSH). + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 + + # Context format when running with privileges: bold user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' + # Context format when in SSH without privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' + # Default context format (no privileges, no SSH): user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' + + # Don't show context unless running with privileges or in SSH. + # Tip: Remove the next line to always show context. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' + + ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### + # Python virtual environment color. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 + # Don't show Python version next to the virtual environment name. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + # If set to "false", won't show virtualenv if pyenv is already shown. + # If set to "if-different", won't show virtualenv if it's the same as pyenv. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ anaconda: conda environment (https://conda.io/) ]###################### + # Anaconda environment color. + typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 + + # Anaconda segment format. The following parameters are available within the expansion. + # + # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. + # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. + # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). + # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). + # + # CONDA_PROMPT_MODIFIER can be configured with the following command: + # + # conda config --set env_prompt '({default_env}) ' + # + # The last argument is a Python format string that can use the following variables: + # + # - prefix The same as CONDA_PREFIX. + # - default_env The same as CONDA_DEFAULT_ENV. + # - name The last segment of CONDA_PREFIX. + # - stacked_env Comma-separated list of names in the environment stack. The first element is + # always the same as default_env. + # + # Note: '({default_env}) ' is the default value of env_prompt. + # + # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER + # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former + # is empty. + typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' + + # Custom icon. + # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ + # Pyenv color. + typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 + # Hide python version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) + # If set to false, hide python version if it's the same as global: + # $(pyenv version-name) == $(pyenv global). + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide python version if it's equal to "system". + typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + + # Pyenv segment format. The following parameters are available within the expansion. + # + # - P9K_CONTENT Current pyenv environment (pyenv version-name). + # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). + # + # The default format has the following logic: + # + # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or + # starts with "$P9K_PYENV_PYTHON_VERSION/". + # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". + typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' + + # Custom icon. + # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ + # Goenv color. + typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 + # Hide go version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) + # If set to false, hide go version if it's the same as global: + # $(goenv version-name) == $(goenv global). + typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide go version if it's equal to "system". + typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## + # Nodenv color. + typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 + # Hide node version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) + # If set to false, hide node version if it's the same as global: + # $(nodenv version-name) == $(nodenv global). + typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### + # Nvm color. + typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 + # If set to false, hide node version if it's the same as default: + # $(nvm version current) == $(nvm version default). + typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ + # Nodeenv color. + typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 + # Don't show Node version next to the environment name. + typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false + # Separate environment name from Node version only with a space. + typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############################[ node_version: node.js version ]############################### + # Node version color. + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 + # Show node version only when in a directory tree containing package.json. + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ go_version: go version (https://golang.org) ]######################## + # Go version color. + typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 + # Show go version only when in a go project subdirectory. + typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## + # Rust version color. + typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 + # Show rust version only when in a rust project subdirectory. + typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ + # .NET version color. + typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 + # Show .NET version only when in a .NET project subdirectory. + typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ php_version: php version (https://www.php.net/) ]###################### + # PHP version color. + typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 + # Show PHP version only when in a PHP project subdirectory. + typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### + # Laravel version color. + typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 + # Custom icon. + # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ####################[ java_version: java version (https://www.java.com/) ]#################### + # Java version color. + typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 + # Show java version only when in a java project subdirectory. + typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true + # Show brief version. + typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false + # Custom icon. + # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### + # Package color. + typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 + # Package format. The following parameters are available within the expansion. + # + # - P9K_PACKAGE_NAME The value of `name` field in package.json. + # - P9K_PACKAGE_VERSION The value of `version` field in package.json. + # + # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' + # Custom icon. + # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## + # Rbenv color. + typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 + # Hide ruby version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) + # If set to false, hide ruby version if it's the same as global: + # $(rbenv version-name) == $(rbenv global). + typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide ruby version if it's equal to "system". + typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## + # Rvm color. + typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 + # Don't show @gemset at the end. + typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false + # Don't show ruby- at the front. + typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ + # Fvm color. + typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### + # Lua color. + typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 + # Hide lua version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) + # If set to false, hide lua version if it's the same as global: + # $(luaenv version-name) == $(luaenv global). + typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide lua version if it's equal to "system". + typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ + # Java color. + typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 + # Hide java version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) + # If set to false, hide java version if it's the same as global: + # $(jenv version-name) == $(jenv global). + typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide java version if it's equal to "system". + typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ + # Perl color. + typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 + # Hide perl version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) + # If set to false, hide perl version if it's the same as global: + # $(plenv version-name) == $(plenv global). + typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide perl version if it's equal to "system". + typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############ + # Perlbrew color. + typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67 + # Show perlbrew version only when in a perl project subdirectory. + typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true + # Don't show "perl-" at the front. + typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ + # PHP color. + typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 + # Hide php version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) + # If set to false, hide php version if it's the same as global: + # $(phpenv version-name) == $(phpenv global). + typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide php version if it's equal to "system". + typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### + # Scala color. + typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 + # Hide scala version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) + # If set to false, hide scala version if it's the same as global: + # $(scalaenv version-name) == $(scalaenv global). + typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide scala version if it's equal to "system". + typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### + # Haskell color. + typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 + # Hide haskell version if it doesn't come from one of these sources. + # + # shell: version is set by STACK_YAML + # local: version is set by stack.yaml up the directory tree + # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) + typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) + # If set to false, hide haskell version if it's the same as in the implicit global project. + typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true + # Custom icon. + # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# + # Show kubecontext only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show kubecontext. + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl' + + # Kubernetes context classes for the purpose of using different colors, icons and expansions with + # different contexts. + # + # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current kubernetes context gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current kubernetes context is "deathray-testing/default", its class is TEST + # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 + # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext + # segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # Within the expansion the following parameters are always available: + # + # - P9K_CONTENT The content that would've been displayed if there was no content + # expansion defined. + # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE + # in the output of `kubectl config get-contexts`. If there is no + # namespace, the parameter is set to "default". + # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the + # output of `kubectl config get-contexts`. + # + # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), + # the following extra parameters are available: + # + # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. + # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. + # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. + # + # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, + # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=gke + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + # + # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=eks + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' + + # Custom prefix. + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # Don't show terraform workspace if it's literally "default". + typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false + # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current terraform workspace gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current terraform workspace is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ terraform_version: terraform version (https://www.terraform.io) ]############## + # Terraform version color. + typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# + # Show aws only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show aws. + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current AWS profile gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AWS profile is "company_test", its class is TEST + # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 + # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # AWS segment format. The following parameters are available within the expansion. + # + # - P9K_AWS_PROFILE The name of the current AWS profile. + # - P9K_AWS_REGION The region associated with the current AWS profile. + typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' + + #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# + # AWS Elastic Beanstalk environment color. + typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## + # Show azure only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show azure. + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current azure account name gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current azure account is "company_test", its class is TEST because "company_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + + # Azure account name color. + typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32 + # Custom icon. + # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### + # Show gcloud only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show gcloud. + typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil' + # Google cloud color. + typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 + + # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or + # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative + # enough. You can use the following parameters in the expansions. Each of them corresponds to the + # output of `gcloud` tool. + # + # Parameter | Source + # -------------------------|-------------------------------------------------------------------- + # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' + # P9K_GCLOUD_ACCOUNT | gcloud config get-value account + # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project + # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. + # + # Obtaining project name requires sending a request to Google servers. This can take a long time + # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud + # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets + # set and gcloud prompt segment transitions to state COMPLETE. + # + # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL + # and COMPLETE. You can also hide gcloud in state PARTIAL by setting + # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and + # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. + typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' + typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' + + # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name + # this often. Negative value disables periodic polling. In this mode project name is retrieved + # only when the current configuration, account or project id changes. + typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 + + # Custom icon. + # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# + # Show google_app_cred only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show google_app_cred. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + + # Google application credentials classes for the purpose of using different colors, icons and + # expansions with different credentials. + # + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first + # element in each pair defines a pattern against which the current kubernetes context gets + # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion + # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION + # parameters, you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. + # The first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD + # '*:*test*:*' TEST + # '*' DEFAULT) + # + # If your current Google application credentials is "service_account deathray-testing x@y.com", + # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD # These values are examples that are unlikely + # '*:*test*:*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by + # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # You can use the following parameters in the expansion. Each of them corresponds to one of the + # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. + # + # Parameter | JSON key file field + # ---------------------------------+--------------- + # P9K_GOOGLE_APP_CRED_TYPE | type + # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id + # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' + + ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]############### + # Toolbox color. + typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178 + # Don't display the name of the toolbox if it matches fedora-toolbox-*. + typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}' + # Custom icon. + # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin ' + + ###############################[ public_ip: public IP address ]############################### + # Public IP color. + typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 + # Custom icon. + # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ########################[ vpn_ip: virtual private network indicator ]######################### + # VPN IP color. + typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 + # When on VPN, show just an icon without the IP address. + # Tip: To display the private IP address when on VPN, remove the next line. + typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= + # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN + # to see the name of the interface. + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)' + # If set to true, show one segment per matching network interface. If set to false, show only + # one segment corresponding to the first matching network interface. + # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. + typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false + # Custom icon. + # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### + # IP color. + typeset -g POWERLEVEL9K_IP_FOREGROUND=38 + # The following parameters are accessible within the expansion: + # + # Parameter | Meaning + # ----------------------+------------------------------------------- + # P9K_IP_IP | IP address + # P9K_IP_INTERFACE | network interface + # P9K_IP_RX_BYTES | total number of bytes received + # P9K_IP_TX_BYTES | total number of bytes sent + # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt + # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt + # P9K_IP_RX_RATE | receive rate (since last prompt) + # P9K_IP_TX_RATE | send rate (since last prompt) + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}' + # Show information for the first network interface whose name matches this regular expression. + # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. + typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' + # Custom icon. + # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #########################[ proxy: system-wide http/https/ftp proxy ]########################## + # Proxy color. + typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ battery: internal battery ]################################# + # Show battery in red when it's below this level and not connected to power supply. + typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 + typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 + # Show battery in green when it's charging or fully charged. + typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 + # Show battery in yellow when it's discharging. + typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 + # Battery pictograms going from low to high level of charge. + typeset -g POWERLEVEL9K_BATTERY_STAGES='\UF008E\UF007A\UF007B\UF007C\UF007D\UF007E\UF007F\UF0080\UF0081\UF0082\UF0079' + # Don't show the remaining time to charge/discharge. + typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false + + #####################################[ wifi: wifi speed ]##################################### + # WiFi color. + typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). + # + # # Wifi colors and icons for different signal strength levels (low to high). + # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values + # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values + # + # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' + # + # The following parameters are accessible within the expansions: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_WIFI_SSID | service set identifier, a.k.a. network name + # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown + # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second + # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 + # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 + # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) + + ####################################[ time: current time ]#################################### + # Current time color. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands as opposed to the default + # behavior where they contain the end times of their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + # Custom icon. + typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' + + # Example of a user-defined prompt segment. Function prompt_example will be called on every + # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or + # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. + # + # Type `p10k help segment` for documentation and a more sophisticated example. + function prompt_example() { + p10k segment -f 208 -i '⭐' -t 'hello, %n' + } + + # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job + # is to generate the prompt segment for display in instant prompt. See + # https://github.com/romkatv/powerlevel10k#instant-prompt. + # + # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function + # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k + # will replay these calls without actually calling instant_prompt_*. It is imperative that + # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this + # rule is not observed, the content of instant prompt will be incorrect. + # + # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If + # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. + function instant_prompt_example() { + # Since prompt_example always makes the same `p10k segment` calls, we can call it from + # instant_prompt_example. This will give us the same `example` prompt segment in the instant + # and regular prompts. + prompt_example + } + + # User-defined prompt segments can be customized the same way as built-in segments. + # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 + # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/config/.vimrc b/config/.vimrc new file mode 100644 index 0000000..0d760b8 --- /dev/null +++ b/config/.vimrc @@ -0,0 +1,16 @@ +syntax on +filetype plugin indent on + +set autoindent +set smartindent +set shiftwidth=4 +set tabstop=4 +set expandtab +set softtabstop=4 + +set relativenumber +set number + +set showmatch + +set cindent diff --git a/config/.zshrc b/config/.zshrc new file mode 100644 index 0000000..d017fdd --- /dev/null +++ b/config/.zshrc @@ -0,0 +1,100 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# Set the directory where we want to store zinit and plugins +ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" + +# Download zinit if not present +if [ ! -d $ZINIT_HOME ]; then + mkdir -p "$(dirname $ZINIT_HOME)" + git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" +fi + +# Load zinit +source "${ZINIT_HOME}/zinit.zsh" + +# Add in Powerlevel10k +zinit ice depth=1; zinit light romkatv/powerlevel10k + +# Add in zsh plugins +zinit light zsh-users/zsh-syntax-highlighting +zinit light zsh-users/zsh-completions +zinit light zsh-users/zsh-autosuggestions +zinit light Aloxaf/fzf-tab + +# Add in snippets (omz plugins) +zinit snippet OMZP::git +zinit snippet OMZP::archlinux +zinit snippet OMZP::sudo +#zinit snippet OMZP::command-not-found + +#zinit snippet OMZP::kubectl +#zinit snippet OMZP::kubectx + +# Load completions +autoload -U compinit && compinit + +zinit cdreplay -q # Optimize cache (recommended by the zinit doc) + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +# Keybindings +bindkey -e # Use emacs keybindings +bindkey '^p' history-search-backward +bindkey '^n' history-search-forward +bindkey '^[[3~' delete-char # Makes the delete key work properly +bindkey '^[[3;5~' kill-word # Makes the delete key work properly +# Missing ctrl+delete +bindkey "^[[1;5C" forward-word # Same with M-arrows +bindkey "^[[1;5D" backward-word + +# History +HISTSIZE=5000 +HISTFILE=~/.zsh_hist +SAVEHIST=$HISTSIZE +setopt appendhistory +setopt sharehistory +setopt hist_ignore_space +# The following lines concerns history duplicates +# They're disabled as I prefer having a real history of my commands +#HISTDUP=erase +#setopt hist_ignore_all_dups +#setopt hist_ignore_dups +#setopt hist_find_no_dups + +# Completions styling +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # Makes completions case insensitive +zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Makes completions colored +zstyle ':completion:*' menu no # Hide the default completions menu (replaced by fzf) +zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath' +setopt correct # 'Did you mean' + +# Environment variables +export PATH=$PATH:~/.local/bin + +# Aliases +alias cl='clear' +alias hyprcfg='vim ~/.config/hypr/' +alias zcfg='vim ~/.zshrc' +alias icat='kitten icat' +# Power management +alias power-draw="cat /sys/class/power_supply/BAT1/current_now /sys/class/power_supply/BAT1/voltage_now | xargs | awk '{print \$1*\$2/1e12 \" W\"}\'" +alias battery='cat /sys/class/power_supply/BAT1/capacity' +# Override some default commands with more practical alternatives +alias ls='eza --icons=automatic --tree --level=1 --follow-symlinks --no-quotes' +alias lsa='ls -a' +alias lsl='eza --icons=automatic --long --header --group -M' +alias tree='ls --level=3' +# Keep default commands accessible +alias lsd='/usr/bin/ls --color' +# Random stuff +# ... + +# Shell integrations +eval "$(fzf --zsh)" +eval "$(zoxide init --cmd cd zsh)" # Override cd with zoxide diff --git a/packages/aur.pkgs b/packages/aur.pkgs new file mode 100644 index 0000000..eb1e246 --- /dev/null +++ b/packages/aur.pkgs @@ -0,0 +1 @@ +albert \ No newline at end of file diff --git a/packages/cli-dev-tools.pkgs b/packages/cli-dev-tools.pkgs new file mode 100644 index 0000000..fd90090 --- /dev/null +++ b/packages/cli-dev-tools.pkgs @@ -0,0 +1,8 @@ +base-devel +eza +fastfetch +fzf +git +gnome-keyring +openssh +zoxide \ No newline at end of file diff --git a/packages/core.pkgs b/packages/core.pkgs new file mode 100644 index 0000000..e11b0f5 --- /dev/null +++ b/packages/core.pkgs @@ -0,0 +1,16 @@ +apparmor +vim +ufw +intel-ucode +sudo +grub +efibootmgr +os-prober +networkmanager +iwd +mandoc +man-pages +sof-firmware +zsh +htop +zram-generator \ No newline at end of file diff --git a/packages/desktop.pkgs b/packages/desktop.pkgs new file mode 100644 index 0000000..7b5f36a --- /dev/null +++ b/packages/desktop.pkgs @@ -0,0 +1,16 @@ +pipewire-jack +pipewire +wireplumber +pipewire-pulse +greetd-tuigreet +hypridle +hyprland +hyprlock +hyprpaper +hypr-qtutils +hyprpolkitagent +xdg-desktop-portal-hyprland +waybar +power-profiles-daemon +fnott +kitty \ No newline at end of file diff --git a/packages/fonts.pkgs b/packages/fonts.pkgs new file mode 100644 index 0000000..f0d93cb --- /dev/null +++ b/packages/fonts.pkgs @@ -0,0 +1,4 @@ +ttf-dejavu +ttf-jetbrains-mono-nerd +noto-fonts +noto-fonts-emoji \ No newline at end of file diff --git a/packages/intel.pkgs b/packages/intel.pkgs new file mode 100644 index 0000000..2d9fee7 --- /dev/null +++ b/packages/intel.pkgs @@ -0,0 +1,2 @@ +intel-media-driver +intel-ucode \ No newline at end of file diff --git a/packages/theming.pkgs b/packages/theming.pkgs new file mode 100644 index 0000000..40044de --- /dev/null +++ b/packages/theming.pkgs @@ -0,0 +1,5 @@ +papirus-icon-theme +breeze +breeze5 +qt6ct +adw-gtk-theme \ No newline at end of file diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..040bef6 --- /dev/null +++ b/setup.sh @@ -0,0 +1,109 @@ +#!/bin/sh +version="Beta 25.04.04" + +echo "Atlas Desktop Installer - ${version}\n" + +# Definitions + +## Vars +script_path=$PWD +pkgs_path="${script_path}/packages" +config_path="${script_path}/config" +CPU_vendor=$(lscpu | grep Vendor | awk '{print $NF}') +dotfiles_path="~/.dotfiles" + + +## Functions +function install() { + echo "Downloading $1 packages" + # sudo pacman -Syu --noconfirm --color auto $(cat $pkgs_path/$1.pkgs) + echo "Done" +} +function install-aur() { + echo "Downloading $1 packages" + # paru -Syu --noconfirm $(cat $pkgs_path/$1.pkgs) + echo "Done" +} + + +# Checks + +## Sudo installed +pacman -Q sudo > /dev/null +if [ $? != 0 ]; then + echo "Please install 'sudo' first" + exit 1 +fi + +## Scripts presence +if [ ! -d $pkgs_path ]; then + echo "Couldn't find 'packages' folder inside ${script_path}" + exit 1 +fi + +if [ ! -d $config_path ]; then + echo "Couldn't find 'config' folder inside ${script_path}" + exit 1 +fi +# Install packages + +echo "--- Downloading packages ---" + +## +install core +install cli-dev-tools +install fonts +install desktop +install theming + +## Install vendor specific software +if [ $CPU_vendor == "Genuine Intel" ]; then + install intel +fi + +## Install paru +git clone https://aur.archlinux.org/paru.git /tmp/paru && +cd /tmp/paru && +makepkg -si +cd $script_path + +install-aur aur + +# Configuration + +## Dotfiles +cp $config_path $dotfiles_path && +cd $dotfiles_path && +stow . +cd $script_path + +## Swap (Zram) +is_zram_active=$(sudo systemctl is-active systemd-zram-setup@zram0.service) +if [ is_zram_active != "active" ]; then + ... +fi + +## Mandatory Access Control (Apparmor) +is_aa_active=$(sudo systemctl is-active apparmor.service) +if [ is_aa_active != "active" ]; then + echo "========================================" + echo "WARNING: you don't have apparmor enabled" + echo "Since this script is not yet capable to handle kernel parameters, you'll have to do it yourself" + echo "Please refer to https://wiki.archlinux.org/title/AppArmor" + echo "========================================" +fi + +## Display manager (Greetd) +sudo systemctl enable greetd + +## Firewall (UFW) +sudo systemctl enable ufw +sudo ufw enable + +# Finish + +fastfetch +echo +echo "Installation finished" +echo "Please check the previous outputs for warnings" +echo "You can make final adjustements before rebooting" \ No newline at end of file