ITADN

Trying to adapt a style to use Rofi as a clipboard manager but failing

#190OpenNicknamely 创建于 2025-05-03
N
Nicknamelycommented
I really liked the `type6 style 7` and wanted to adapt it for use as a clipboard manager. I removed unnecessary elements like the image box, but I am stuck at configuring the `configuration {}` block. No matter what changes I make, Rofi still behaves as an app launcher instead of a clipboard manager. #### Command I am using to launch Rofi: ```bash dir="$HOME/.config/rofi/clipboard-man/" theme='style-7' ## Run rofi \ -show drun \ -theme ${dir}/${theme}.rasi | cliphist decode | wl-copy ``` #### Current in-progress style configuration: ```css /*****----- Configuration -----*****/ configuration { /* leaving empty because dmenu mode is explicitly used */ } /*****----- Global Properties -----*****/ * { font: "JetBrains Mono Nerd Font 10"; background: #1E1E2E; background-alt: #181825; foreground: #CDD6F4; selected: #45475A; active: #A6ADC8; urgent: #F38BA8; highlight: #89B4FA; } /*****----- Main Window -----*****/ window { transparency: "real"; location: center; anchor: center; fullscreen: false; width: 800px; height: 600px; x-offset: 0px; y-offset: 0px; enabled: true; border-radius: 15px; cursor: "default"; background-color: @background; } /*****----- Main Box -----*****/ mainbox { enabled: true; spacing: 10px; padding: 20px; background-color: transparent; orientation: vertical; children: [ "listbox", "inputbar" ]; } /*****----- Listbox -----*****/ listbox { spacing: 15px; padding: 20px; background-color: transparent; orientation: vertical; children: [ "listview" ]; } /*****----- Input Bar -----*****/ inputbar { enabled: true; spacing: 10px; padding: 15px; border-radius: 8px; background-color: @background-alt; text-color: @foreground; children: [ "textbox-prompt-colon", "entry" ]; } textbox-prompt-colon { enabled: true; expand: false; str: ""; background-color: inherit; text-color: inherit; } entry { enabled: true; background-color: inherit; text-color: inherit; cursor: text; placeholder: "Search Clipboard Entries..."; placeholder-color: @foreground; } /*****----- Listview -----*****/ listview { enabled: true; columns: 1; lines: 10; cycle: true; dynamic: true; scrollbar: true; layout: vertical; reverse: false; fixed-height: true; spacing: 15px; background-color: transparent; text-color: @foreground; cursor: "pointer"; } /*****----- Elements -----*****/ element { enabled: true; spacing: 10px; padding: 15px; border-radius: 8px; background-color: @background-alt; text-color: @foreground; cursor: pointer; } element normal.normal { background-color: inherit; text-color: inherit; } element normal.urgent { background-color: @urgent; text-color: @foreground; } element normal.active { background-color: @active; text-color: @foreground; } element selected.normal { background-color: @selected; text-color: @highlight; } element selected.urgent { background-color: @urgent; text-color: @foreground; } element selected.active { background-color: @active; text-color: @foreground; } element-icon { background-color: transparent; text-color: inherit; size: 24px; cursor: inherit; } /*****----- Message -----*****/ message { background-color: transparent; } textbox { padding: 10px; border-radius: 8px; background-color: @background-alt; text-color: @foreground; vertical-align: 0.5; horizontal-align: 0.0; } error-message { padding: 10px; border-radius: 8px; background-color: @background; text-color: @urgent; } ``` I would appreciate any guidance on how to properly adapt this style to function as a clipboard manager.
1 条评论