From 4ce449ef3781d2e9887bf0577fb8b82b410377bb Mon Sep 17 00:00:00 2001 From: js0ny Date: Wed, 9 Apr 2025 10:07:14 +0100 Subject: [PATCH] feat(rofi): As launcher --- Justfile | 13 +- platforms/linux/rofi/catppuccin-mocha.rasi | 29 ++++ platforms/linux/rofi/config.rasi | 172 +++++++++++++++++++++ platforms/linux/rofi/rosepine-dawn.rasi | 37 +++++ 4 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 platforms/linux/rofi/catppuccin-mocha.rasi create mode 100644 platforms/linux/rofi/config.rasi create mode 100644 platforms/linux/rofi/rosepine-dawn.rasi diff --git a/Justfile b/Justfile index 5da1fca..70cdb76 100644 --- a/Justfile +++ b/Justfile @@ -209,13 +209,22 @@ swaylock: [linux] dunst: mkdir -p {{XDG_CONFIG_HOME}}/dunst - {{LN}} {{DOTFILES}}/platforms/linux/dunst {{XDG_CONFIG_HOME}}/dunst/dunstrc + {{LN}} {{DOTFILES}}/platforms/linux/dunstrc {{XDG_CONFIG_HOME}}/dunst/dunstrc + +[linux] +hypr: + {{LN}} {{DOTFILES}}/platforms/linux/hypr {{XDG_CONFIG_HOME}}/hypr + +[linux] +rofi: + {{LN}} {{DOTFILES}}/platforms/linux/rofi {{XDG_CONFIG_HOME}}/rofi [linux] hyprland: - {{LN}} {{DOTFILES}}/platforms/linux/hypr {{XDG_CONFIG_HOME}}/hypr + @just hypr @just dunst @just swaylock + @just rofi [private] pull: diff --git a/platforms/linux/rofi/catppuccin-mocha.rasi b/platforms/linux/rofi/catppuccin-mocha.rasi new file mode 100644 index 0000000..e364663 --- /dev/null +++ b/platforms/linux/rofi/catppuccin-mocha.rasi @@ -0,0 +1,29 @@ +* { + rosewater: #f5e0dc; + flamingo: #f2cdcd; + pink: #f5c2e7; + mauve: #cba6f7; + red: #f38ba8; + maroon: #eba0ac; + peach: #fab387; + yellow: #f9e2af; + green: #a6e3a1; + teal: #94e2d5; + sky: #89dceb; + sapphire: #74c7ec; + blue: #89b4fa; + lavender: #b4befe; + text: #cdd6f4; + subtext1: #bac2de; + subtext0: #a6adc8; + overlay2: #9399b2; + overlay1: #7f849c; + overlay0: #6c7086; + surface2: #585b70; + surface1: #45475a; + surface0: #313244; + base: #1e1e2e; + mantle: #181825; + crust: #11111b; + accent: @lavender; + } diff --git a/platforms/linux/rofi/config.rasi b/platforms/linux/rofi/config.rasi new file mode 100644 index 0000000..db6065f --- /dev/null +++ b/platforms/linux/rofi/config.rasi @@ -0,0 +1,172 @@ +@import "catppuccin-mocha" + +* { + selected-active-foreground: @background; + lightfg: @text; + separatorcolor: @foreground; + urgent-foreground: @red; + alternate-urgent-background: @lightbg; + lightbg: @mantle; + background-color: transparent; + border-color: @foreground; + normal-background: @background; + selected-urgent-background: @red; + alternate-active-background: @lightbg; + spacing: 2; + alternate-normal-foreground: @foreground; + urgent-background: @background; + selected-normal-foreground: @lightbg; + active-foreground: @blue; + background: @base; + selected-active-background: @blue; + active-background: @background; + selected-normal-background: @pink; + alternate-normal-background: @lightbg; + foreground: @text; + selected-urgent-foreground: @background; + normal-foreground: @foreground; + alternate-urgent-foreground: @red; + alternate-active-foreground: @blue; + +} +element { + padding: 1px ; + cursor: pointer; + spacing: 5px ; + border: 0; +} +element normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +element normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +element normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +element selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +element selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +element selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +element alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +element alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +element alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +element-text { + background-color: transparent; + cursor: inherit; + highlight: inherit; + text-color: inherit; +} +element-icon { + background-color: transparent; + size: 1.0000em ; + cursor: inherit; + text-color: inherit; +} +window { + location: center; + border-radius: 10px; + padding: 5; + background-color: @background; + border: 1; +} +mainbox { + padding: 0; + border: 0; +} +message { + padding: 1px ; + border-color: @separatorcolor; + border: 2px dash 0px 0px ; +} +textbox { + text-color: @foreground; +} +listview { + padding: 2px 0px 0px ; + scrollbar: true; + border-color: @separatorcolor; + spacing: 2px ; + fixed-height: 0; + border: 2px dash 0px 0px ; +} +scrollbar { + width: 4px ; + padding: 0; + handle-width: 8px ; + border: 0; + handle-color: @normal-foreground; +} +sidebar { + border-color: @separatorcolor; + border: 2px dash 0px 0px ; +} +button { + cursor: pointer; + spacing: 0; + text-color: @normal-foreground; +} +button selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +num-filtered-rows { + expand: false; + text-color: Gray; +} +num-rows { + expand: false; + text-color: Gray; +} +textbox-num-sep { + expand: false; + str: "/"; + text-color: Gray; +} +inputbar { + padding: 1px ; + spacing: 0px ; + text-color: @normal-foreground; + children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ]; +} +case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +entry { + text-color: @normal-foreground; + cursor: text; + spacing: 0; + placeholder-color: Gray; + placeholder: "搜索..."; +} +prompt { + spacing: 0; + text-color: @accent; +} +textbox-prompt-colon { + margin: 0px 0.3000em 0.0000em 0.0000em ; + expand: false; + str: ">"; + text-color: inherit; +} diff --git a/platforms/linux/rofi/rosepine-dawn.rasi b/platforms/linux/rofi/rosepine-dawn.rasi new file mode 100644 index 0000000..f63c3a9 --- /dev/null +++ b/platforms/linux/rofi/rosepine-dawn.rasi @@ -0,0 +1,37 @@ +* { + bg: #faf4ed; + cur: #fffaf3; + fgd: #575279; + cmt: #9893a5; + cya: #56949f; + grn: #286983; + ora: #d7827e; + pur: #907aa9; + red: #b4637a; + yel: #ea9d34; + + alt-fgd: #faf4ed; + + font: "Cartograph CF 12"; + + foreground: @fgd; + background: @bg; + + active-background: @grn; + active-foreground: @alt-fgd; + + urgent-background: @red; + urgent-foreground: @alt-fgd; + + selected-background: @active-background; + selected-foreground: @active-foreground; + + selected-urgent-background: @urgent-background; + selected-urgent-foreground: @urgent-foreground; + + selected-active-background: @active-background; + selected-active-foreground: @active-foreground; + + separatorcolor: @active-background; + bordercolor: @ora; +}