From 8f48b9965096ece8d7e512e86a3b7f57acc08737 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Sun, 1 Oct 2023 18:32:19 +0200 Subject: [PATCH] Update Launcher Style --- rofi/config.rasi | 289 ++++++++++++++++++++------- wal/templates/colors-rofi-pywal.rasi | 20 ++ 2 files changed, 238 insertions(+), 71 deletions(-) create mode 100644 wal/templates/colors-rofi-pywal.rasi diff --git a/rofi/config.rasi b/rofi/config.rasi index be80627..24d6c74 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -9,94 +9,241 @@ # ----------------------------------------------------- */ +/* ---- Configuration ---- */ configuration { - display-drun: "Applications"; - display-window: "Windows"; - drun-display-format: "{name}"; - font: "Fira Sans Bold 12"; - modi: "window,run,drun"; - show-icons: true; - icon-theme: "kora"; + modi: "drun,run"; + font: "Fira Sans Bold 12"; + show-icons: true; + icon-theme: "kora"; + display-drun: "APPS"; + display-run: "RUN"; + display-filebrowser: "FILES"; + display-window: "WINDOW"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; + } -/* Dark theme. */ -@import "~/.cache/wal/colors-rofi-dark" +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.cache/wal/colors-rofi-pywal" +/* ---- Window ---- */ window { - width:900px; - height:556px; - spacing:0px; - padding:0px; - margin:0px; - - border: 3px; - border-color:#FFFFFF; - border-radius:15px; - - cursor: "default"; - transparency: "real"; - fullscreen: "false"; - background-color: transparent; + width: 900px; + x-offset: 0px; + y-offset: 0px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: #FFFFFF; + border: 3px; + border-color: #FFFFFF; + cursor: "default"; + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + enabled: true; + border-radius: 10px; + background-color: transparent; } +/* ---- Mainbox ---- */ mainbox { - spacing:0px; - margin:0px; - padding: 0px 0px 0px 500px; - background-image: url("~/.cache/current_wallpaper.jpg", height); + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: @background; + background-image: url("~/.cache/current_wallpaper.jpg", height); + children: ["imagebox","listbox"]; } -inputbar { - spacing: 0px; - enabled:false; - hidden:true; - backgound-color: transparent; +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; } -listview { - spacing:0px; - padding: 10px; - margin:0px; - background-color:transparent; - scrollbar: false; - dynamic: true; -} - -// Elements // -element { - enabled: true; - padding: 10px; - margin: 3px; - cursor: pointer; - background-color: transparent; - border-radius: 10px; -} - -element selected { - border:3px; - border-color: #FFFFFF; - background: #CCFFFFFF; -} - -element-icon { - size:40px; - padding: 0px 10px 0px 0px; -} - -element-text { - vertical-align: 0.5; - horizontal-align: 0.0; - cursor: inherit; +/* ---- Listbox ---- */ +listbox { + spacing: 20px; background-color: transparent; - text-color: inherit; + orientation: vertical; + children: [ "message", "listview" ]; } -prompt { - text-color:#ffffff; +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 10px; + border-color: @foreground; + background-color: @background; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + background-color: transparent; + text-color: inherit; } entry { - text-color:#ffffff; + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; } -/* vim: ft=sass +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @color11; + text-color: @foreground; +} + +/* ---- 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; + padding: 10px; + margin: 0px; + background-color: @background; + border:0px; +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 10px; + margin: 5px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: 2px; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @color11; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border:0px; + margin:20px 0px 0px 0px; + padding:0px; + spacing:0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/wal/templates/colors-rofi-pywal.rasi b/wal/templates/colors-rofi-pywal.rasi new file mode 100644 index 0000000..8dbafcc --- /dev/null +++ b/wal/templates/colors-rofi-pywal.rasi @@ -0,0 +1,20 @@ +* {{ + background: rgba(0,0,1,0.5); + foreground: {foreground}; + color0: {color0}; + color1: {color1}; + color2: {color2}; + color3: {color3}; + color4: {color4}; + color5: {color5}; + color6: {color6}; + color7: {color7}; + color8: {color8}; + color9: {color9}; + color10: {color10}; + color11: {color11}; + color12: {color12}; + color13: {color13}; + color14: {color14}; + color15: {color15}; +}}