From b9c9e4a45d59c6df1a794cc24b473e394633effb Mon Sep 17 00:00:00 2001 From: brustybee Date: Sat, 7 Mar 2026 03:47:19 +0530 Subject: Add btop fish rofi and tmux --- common/programs/btop.nix | 13 ++ common/programs/fish.nix | 30 ++++ common/programs/rofi.nix | 377 +++++++++++++++++++++++++++++++++++++++++++++++ common/programs/tmux.nix | 18 +++ 4 files changed, 438 insertions(+) create mode 100644 common/programs/btop.nix create mode 100644 common/programs/fish.nix create mode 100644 common/programs/rofi.nix create mode 100644 common/programs/tmux.nix (limited to 'common/programs') diff --git a/common/programs/btop.nix b/common/programs/btop.nix new file mode 100644 index 0000000..aa548e9 --- /dev/null +++ b/common/programs/btop.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +{ + programs.btop = { + enable = true; + settings = { + color_theme = lib.optionals config.beeMods.matugen.enable "matugen"; + theme_background = false; + truecolor = true; + vim_keys = true; + rounded_corners = false; + }; + }; +} diff --git a/common/programs/fish.nix b/common/programs/fish.nix new file mode 100644 index 0000000..8814a12 --- /dev/null +++ b/common/programs/fish.nix @@ -0,0 +1,30 @@ +{ + pkgs, + ... +}: +{ + programs.fish.enable = true; + + home.packages = with pkgs; [ + fzf + pay-respects + ]; + + programs.fish = { + interactiveShellInit = + #fish + '' + function fish_mode_prompt + end + set -g fish_greeting "" + fish_vi_key_bindings + set -U fish_color_user blue + set -U fish_color_host normal + set -U fish_color_cwd blue + + pay-respects fish | source + + alias fuck='f' + ''; + }; +} diff --git a/common/programs/rofi.nix b/common/programs/rofi.nix new file mode 100644 index 0000000..ea55259 --- /dev/null +++ b/common/programs/rofi.nix @@ -0,0 +1,377 @@ +{ + config, + pkgs, + lib, + ... +}: +{ + programs.rofi = { + enable = true; + font = "Lilex Nerd Font"; + plugins = with pkgs; [ rofi-emoji ]; + theme = "~/.config/rofi/themes/config.rasi"; + }; + + # custom scripts + home.packages = [ + pkgs.rofi-power-menu + (pkgs.writeShellScriptBin "wall-picker" '' + WALL_DIR="$HOME/Pictures/Wallpapers" + + list_wallpapers() { + for wall in "$WALL_DIR"/*.{jpg,jpeg,png,webp}; do + if [ -f "$wall" ]; then + echo -en "$(basename "$wall")\0icon\x1f$wall\n" + fi + done + } + + SELECTED=$(list_wallpapers | rofi -dmenu -i -p "Wallpaper" \ + -show-icons \ + -theme-str 'element { orientation: vertical; padding: 15px; }' \ + -theme-str 'element-icon { size: 10em; horizontal-align: 0.5; }' \ + -theme-str 'element-text { horizontal-align: 0.5; }' \ + -theme-str 'listview { columns: 3; lines: 2; }' \ + -theme-str 'window { width: 50%; }') + + if [ -n "$SELECTED" ]; then + FULL_PATH="$WALL_DIR/$SELECTED" + + if [ -n "$WAYLAND_DISPLAY" ]; then + if command -v swaybg >/dev/null 2>&1; then + pkill swaybg + echo "swaybg -i \"$FULL_PATH\" -m fill &" > "$HOME/.swaybg" + sh "$HOME/.swaybg" + elif command -v swww >/dev/null 2>&1; then + swww img "$FULL_PATH" --transition-type grow + else + dunstify "Error: No Wayland wallpaper tool found" + fi + echo "feh --no-fehbg --bg-fill '$FULL_PATH'" > ~/.fehbg + else + feh --bg-fill "$FULL_PATH" + echo "swaybg -i \"$FULL_PATH\" -m fill &" > "$HOME/.swaybg" + fi + + matugen image "$FULL_PATH" --source-color-index 0 2>/dev/null && wallust -q -s run "$FULL_PATH" 2>/dev/null + + if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$DISPLAY" ]; then + xrdb -merge "$HOME/.Xresources" + fi + fi + '') + ]; + + xdg.configFile = { + "rofi/shared/default-colors.rasi" = { + enable = !config.beeModes.matugen.enable; + text = + # rasi + '' + * { + background: #000000FF; + background-alt: #101010FF; + foreground: #FFFFFFFF; + selected: #62AEEFFF; + active: #98C379FF; + urgent: #E06B74FF; + } + ''; + }; + }; + + # Dont scroll its just rofi theme + xdg.configFile = { + "rofi/themes/config.rasi" = { + enable = true; + text = + # rasi + '' + /** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + + /*****----- Configuration -----*****/ + configuration { + modi: "drun"; + show-icons: true; + display-drun: "drun"; + display-run: ""; + display-filebrowser: ""; + display-window: ""; + font: "monospace 12"; + drun-display-format: "{name} [({generic})]"; + window-format: "{w} · {c} · {t}"; + } + + /*****----- Global Properties -----*****/ + ${ + if config.beeModes.matugen.enable then + ''@import "shared/colors.rasi"'' + else + ''@import "shared/default-colors.rasi"'' + } + + * { + border-colour: var(selected); + handle-colour: var(selected); + background-colour: var(background); + foreground-colour: var(foreground); + alternate-background: var(background-alt); + normal-background: var(background); + normal-foreground: var(foreground); + urgent-background: var(urgent); + urgent-foreground: var(background); + active-background: var(active); + active-foreground: var(background); + selected-normal-background: var(selected); + selected-normal-foreground: var(background); + selected-urgent-background: var(active); + selected-urgent-foreground: var(background); + selected-active-background: var(urgent); + selected-active-foreground: var(background); + alternate-normal-background: var(background); + alternate-normal-foreground: var(foreground); + alternate-urgent-background: var(urgent); + alternate-urgent-foreground: var(background); + alternate-active-background: var(active); + alternate-active-foreground: var(background); + } + + /*****----- Main Window -----*****/ + window { + /* properties for window widget */ + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + cursor: "default"; + background-color: @background-colour; + } + + /*****----- Main Box -----*****/ + mainbox { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @border-colour; + background-color: transparent; + children: [ "inputbar", "listview" ]; + } + + /*****----- Inputbar -----*****/ + inputbar { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 0px; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @alternate-background; + background-color: @background-colour; + text-color: @foreground-colour; + children: [ "prompt", "entry" ]; + } + + prompt { + enabled: true; + padding: 15px; + border: 0px 1px 0px 0px; + border-radius: 0px; + border-color: @alternate-background; + background-color: inherit; + text-color: inherit; + } + textbox-prompt-colon { + enabled: true; + expand: false; + str: "::"; + background-color: inherit; + text-color: inherit; + } + entry { + enabled: true; + padding: 15px; + background-color: inherit; + text-color: inherit; + cursor: text; + placeholder: ""; + placeholder-color: inherit; + } + + /*****----- Listview -----*****/ + listview { + enabled: true; + columns: 1; + lines: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 0px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; + } + scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; + } + + /*****----- Elements -----*****/ + element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 8px 15px; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @alternate-background; + background-color: transparent; + text-color: @foreground-colour; + cursor: pointer; + } + element normal.normal { + background-color: var(normal-background); + text-color: var(normal-foreground); + } + element normal.urgent { + background-color: var(urgent-background); + text-color: var(urgent-foreground); + } + element normal.active { + background-color: var(active-background); + text-color: var(active-foreground); + } + element selected.normal { + background-color: var(alternate-background); + text-color: var(foreground-colour); + } + element selected.urgent { + background-color: var(selected-urgent-background); + text-color: var(selected-urgent-foreground); + } + element selected.active { + background-color: var(selected-active-background); + text-color: var(selected-active-foreground); + } + element alternate.normal { + background-color: var(alternate-normal-background); + text-color: var(alternate-normal-foreground); + } + element alternate.urgent { + background-color: var(alternate-urgent-background); + text-color: var(alternate-urgent-foreground); + } + element alternate.active { + background-color: var(alternate-active-background); + text-color: var(alternate-active-foreground); + } + element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; + } + element-text { + background-color: transparent; + text-color: inherit; + highlight: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; + } + + /*****----- Mode Switcher -----*****/ + mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + } + button { + padding: 10px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: @alternate-background; + text-color: inherit; + cursor: pointer; + } + button selected { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); + } + + /*****----- Message -----*****/ + message { + enabled: true; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + } + textbox { + padding: 10px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: @alternate-background; + text-color: @foreground-colour; + vertical-align: 0.5; + horizontal-align: 0.0; + highlight: none; + placeholder-color: @foreground-colour; + blink: true; + markup: true; + } + error-message { + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; + } + ''; + }; + }; +} diff --git a/common/programs/tmux.nix b/common/programs/tmux.nix new file mode 100644 index 0000000..906fa82 --- /dev/null +++ b/common/programs/tmux.nix @@ -0,0 +1,18 @@ +{ + programs.tmux = { + enable = true; + extraConfig = '' + set -g status-position top + set -g status-justify absolute-centre + set -g status-right "" + set -g status-left "#S" + set -g base-index 1 + set -g renumber-windows on + set -g mode-key vi + set -sg escape-time 0 + set-option -g status-style bg=default + set-option -g window-status-current-style "fg=blue bold" + set -g prefix C-SPACE + ''; + }; +} -- cgit v1.3.1