From f3bc5595987f6f58dbc2df80d3c742ca472bfe77 Mon Sep 17 00:00:00 2001 From: Nigel Date: Tue, 9 Apr 2024 23:01:57 +0200 Subject: [PATCH] FEAT: Added rofi, i3status and starhip configuration FIX: Deactivate and activate script now put things in the right spot --- activate.sh | 8 ++- deactivate.sh | 8 +++ i3status/config | 41 ++++++++++++ rofi/config | 6 ++ rofi/config.rasi | 148 +++++++++++++++++++++++++++++++++++++++++ starship/starship.toml | 65 ++++++++++++++++++ 6 files changed, 275 insertions(+), 1 deletion(-) create mode 100755 deactivate.sh create mode 100644 i3status/config create mode 100644 rofi/config create mode 100644 rofi/config.rasi create mode 100644 starship/starship.toml diff --git a/activate.sh b/activate.sh index 1494ef5..a9c2d5f 100755 --- a/activate.sh +++ b/activate.sh @@ -1,2 +1,8 @@ #!/bin/zsh -stow --restow --dotfiles bash alacritty i3 nvim zsh tmux git +stow --dotfiles bash zsh tmux git +mkdir -p $HOME/.config/nvim && stow --dotfiles nvim -t $HOME/.config/nvim +mkdir -p $HOME/.config/alacritty && stow --dotfiles alacritty -t $HOME/.config/alacritty +mkdir -p $HOME/.config/i3 && stow --dotfiles i3 -t $HOME/.config/i3 +mkdir -p $HOME/.config/i3status && stow --dotfiles i3status -t $HOME/.config/i3status +mkdir -p $HOME/.config/rofi && stow --dotfiles rofi -t $HOME/.config/rofi +stow --dotfiles starship -t $HOME/.config diff --git a/deactivate.sh b/deactivate.sh new file mode 100755 index 0000000..9f307ce --- /dev/null +++ b/deactivate.sh @@ -0,0 +1,8 @@ +#!/bin/zsh +stow -D --dotfiles bash zsh tmux git +stow -D --dotfiles alacritty -t $HOME/.config/alacritty +stow -D --dotfiles nvim -t $HOME/.config/nvim +stow -D --dotfiles i3 -t $HOME/.config/i3 +stow -D --dotfiles i3status -t $HOME/.config/i3status +stow -D --dotfiles rofi -t $HOME/.config/rofi +stow -D --dotfiles starship -t $HOME/.config diff --git a/i3status/config b/i3status/config new file mode 100644 index 0000000..351d0b9 --- /dev/null +++ b/i3status/config @@ -0,0 +1,41 @@ +general { + output_format = "i3bar" + colors = true + interval = 10 +} + +order += "cpu_usage" +order += "memory" +order += "disk /" +order += "ethernet enp4s0" +order += "tztime local" + + +tztime local { + format = "%d/%m/%Y - %H:%M" +} + +ethernet enp4s0 { + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +disk "/" { + format = "Disk free: %free" +} + +load { + format = "Load: %5min" +} + +cpu_usage { + max_threshold = 95 + degraded_threshold = 80 + format = "CPU (total: %usage) 0: %cpu0 1: %cpu1 2: %cpu2" +} + +memory { + format= "MEM: %percentage_used used, %percentage_free free, (%used/%total)" + threshold_degraded= 10% + threshold_critical= 3% +} diff --git a/rofi/config b/rofi/config new file mode 100644 index 0000000..36e3c7c --- /dev/null +++ b/rofi/config @@ -0,0 +1,6 @@ +rofi.modes: "window, run, ssh, drun" +rofi.color-enabled: true + +rofi.lines: 15 + +rofi.theme: /usr/share/rofi/themes/Monokai.rasi diff --git a/rofi/config.rasi b/rofi/config.rasi new file mode 100644 index 0000000..a14fb1e --- /dev/null +++ b/rofi/config.rasi @@ -0,0 +1,148 @@ +configuration { +/* modi: "window,run,ssh";*/ +/* font: "mono 12";*/ +/* location: 0;*/ +/* yoffset: 0;*/ +/* xoffset: 0;*/ +/* fixed-num-lines: true;*/ +/* show-icons: false;*/ +/* terminal: "rofi-sensible-terminal";*/ +/* ssh-client: "ssh";*/ +/* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/ +/* run-command: "{cmd}";*/ +/* run-list-command: "";*/ +/* run-shell-command: "{terminal} -e {cmd}";*/ +/* window-command: "wmctrl -i -R {window}";*/ +/* window-match-fields: "all";*/ +/* icon-theme: ;*/ +/* drun-match-fields: "name,generic,exec,categories,keywords";*/ +/* drun-categories: ;*/ +/* drun-show-actions: false;*/ +/* drun-display-format: "{name} [({generic})]";*/ +/* drun-url-launcher: "xdg-open";*/ +/* disable-history: false;*/ +/* ignored-prefixes: "";*/ +/* sort: false;*/ +/* sorting-method: "normal";*/ +/* case-sensitive: false;*/ +/* cycle: true;*/ +/* sidebar-mode: false;*/ +/* hover-select: false;*/ +/* eh: 1;*/ +/* auto-select: false;*/ +/* parse-hosts: false;*/ +/* parse-known-hosts: true;*/ +/* combi-modi: "window,run";*/ +/* matching: "normal";*/ +/* tokenize: true;*/ +/* m: "-5";*/ +/* filter: ;*/ +/* dpi: -1;*/ +/* threads: 0;*/ +/* scroll-method: 0;*/ +/* window-format: "{w} {c} {t}";*/ +/* click-to-exit: true;*/ +/* max-history-size: 25;*/ +/* combi-hide-mode-prefix: false;*/ +/* combi-display-format: "{mode} {text}";*/ +/* matching-negate-char: '-' /* unsupported */;*/ +/* cache-dir: ;*/ +/* window-thumbnail: false;*/ +/* drun-use-desktop-cache: false;*/ +/* drun-reload-desktop-cache: false;*/ +/* normalize-match: false;*/ +/* steal-focus: false;*/ +/* application-fallback-icon: ;*/ +/* pid: "/run/user/1000/rofi.pid";*/ +/* display-window: ;*/ +/* display-windowcd: ;*/ +/* display-run: ;*/ +/* display-ssh: ;*/ +/* display-drun: ;*/ +/* display-combi: ;*/ +/* display-keys: ;*/ +/* display-filebrowser: ;*/ +/* kb-primary-paste: "Control+V,Shift+Insert";*/ +/* kb-secondary-paste: "Control+v,Insert";*/ +/* kb-clear-line: "Control+w";*/ +/* kb-move-front: "Control+a";*/ +/* kb-move-end: "Control+e";*/ +/* kb-move-word-back: "Alt+b,Control+Left";*/ +/* kb-move-word-forward: "Alt+f,Control+Right";*/ +/* kb-move-char-back: "Left,Control+b";*/ +/* kb-move-char-forward: "Right,Control+f";*/ +/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/ +/* kb-remove-word-forward: "Control+Alt+d";*/ +/* kb-remove-char-forward: "Delete,Control+d";*/ +/* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/ +/* kb-remove-to-eol: "Control+k";*/ +/* kb-remove-to-sol: "Control+u";*/ +/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/ +/* kb-accept-custom: "Control+Return";*/ +/* kb-accept-custom-alt: "Control+Shift+Return";*/ +/* kb-accept-alt: "Shift+Return";*/ +/* kb-delete-entry: "Shift+Delete";*/ +/* kb-mode-next: "Shift+Right,Control+Tab";*/ +/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/ +/* kb-mode-complete: "Control+l";*/ +/* kb-row-left: "Control+Page_Up";*/ +/* kb-row-right: "Control+Page_Down";*/ +/* kb-row-up: "Up,Control+p,ISO_Left_Tab";*/ +/* kb-row-down: "Down,Control+n";*/ +/* kb-row-tab: "Tab";*/ +/* kb-page-prev: "Page_Up";*/ +/* kb-page-next: "Page_Down";*/ +/* kb-row-first: "Home,KP_Home";*/ +/* kb-row-last: "End,KP_End";*/ +/* kb-row-select: "Control+space";*/ +/* kb-screenshot: "Alt+S";*/ +/* kb-ellipsize: "Alt+period";*/ +/* kb-toggle-case-sensitivity: "grave,dead_grave";*/ +/* kb-toggle-sort: "Alt+grave";*/ +/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/ +/* kb-custom-1: "Alt+1";*/ +/* kb-custom-2: "Alt+2";*/ +/* kb-custom-3: "Alt+3";*/ +/* kb-custom-4: "Alt+4";*/ +/* kb-custom-5: "Alt+5";*/ +/* kb-custom-6: "Alt+6";*/ +/* kb-custom-7: "Alt+7";*/ +/* kb-custom-8: "Alt+8";*/ +/* kb-custom-9: "Alt+9";*/ +/* kb-custom-10: "Alt+0";*/ +/* kb-custom-11: "Alt+exclam";*/ +/* kb-custom-12: "Alt+at";*/ +/* kb-custom-13: "Alt+numbersign";*/ +/* kb-custom-14: "Alt+dollar";*/ +/* kb-custom-15: "Alt+percent";*/ +/* kb-custom-16: "Alt+dead_circumflex";*/ +/* kb-custom-17: "Alt+ampersand";*/ +/* kb-custom-18: "Alt+asterisk";*/ +/* kb-custom-19: "Alt+parenleft";*/ +/* kb-select-1: "Super+1";*/ +/* kb-select-2: "Super+2";*/ +/* kb-select-3: "Super+3";*/ +/* kb-select-4: "Super+4";*/ +/* kb-select-5: "Super+5";*/ +/* kb-select-6: "Super+6";*/ +/* kb-select-7: "Super+7";*/ +/* kb-select-8: "Super+8";*/ +/* kb-select-9: "Super+9";*/ +/* kb-select-10: "Super+0";*/ +/* ml-row-left: "ScrollLeft";*/ +/* ml-row-right: "ScrollRight";*/ +/* ml-row-up: "ScrollUp";*/ +/* ml-row-down: "ScrollDown";*/ +/* me-select-entry: "MousePrimary";*/ +/* me-accept-entry: "MouseDPrimary";*/ +/* me-accept-custom: "Control+MouseDPrimary";*/ + timeout { + action: "kb-cancel"; + delay: 0; + } + filebrowser { + directories-first: true; + sorting-method: "name"; + } +} +@theme "arthur" diff --git a/starship/starship.toml b/starship/starship.toml new file mode 100644 index 0000000..644720a --- /dev/null +++ b/starship/starship.toml @@ -0,0 +1,65 @@ +format = """ +[░▒▓](#a3aed2)\ +[ \ue712 ](bg:#a3aed2 fg:#090c0c)\ +[](bg:#769ff0 fg:#a3aed2)\ +$directory\ +[](fg:#769ff0 bg:#394260)\ +$git_branch\ +$git_status\ +[](fg:#394260 bg:#212736)\ +$python\ +$rust\ +$golang\ +$c\ +[](fg:#212736 bg:#1d2230)\ +$time\ +[ ](fg:#1d2230)\ +\n$character +""" +[username] +style_root="green bold" +format= "[$user]($style) " +disabled= false +show_always = true + +[directory] +style = "fg:#e3e5e5 bg:#769ff0" +format = "[ $path ]($style)" +truncation_length = 3 +truncation_symbol = ".../" + + +[git_branch] +symbol = "" +style = "bg:#394260" +format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)' + +[git_status] +style = "bg:#394260" +format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)' + +[rust] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[c] +symbol = "\ue61e" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[golang] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[python] + +format = '[[ $symbol ($version) (\($virtualenv\)) ](fg:#769ff0 bg:#212736)]($style)' + + +[time] +disabled = false +time_format = "%R" # Hour:Minute Format +style = "bg:#1d2230" +format = '[[  $time ](fg:#a0a9cb bg:#1d2230)]($style)'