From 58b8e5d5cfa35cb1cd23c69c9c43def3dc42ae1a Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 15 Feb 2024 05:50:27 +0545 Subject: [PATCH] script(wallpaper selector): some tweaks in rasi & script --- config/hypr/scripts/Ui_cmd.sh | 2 +- config/rofi/bak.config-wallpaper.rasi | 249 ++++++++++++++++++++++++ config/rofi/config-wallpaper.rasi | 260 ++++++++++++-------------- 3 files changed, 366 insertions(+), 145 deletions(-) create mode 100644 config/rofi/bak.config-wallpaper.rasi diff --git a/config/hypr/scripts/Ui_cmd.sh b/config/hypr/scripts/Ui_cmd.sh index f4961b79..01265f5d 100755 --- a/config/hypr/scripts/Ui_cmd.sh +++ b/config/hypr/scripts/Ui_cmd.sh @@ -135,7 +135,7 @@ auto_wall() { select_wall() { build_theme() { - rows="$1" + rows="$2" cols="$1" icon_size="$3" echo "element{orientation:vertical;}element-text{horizontal-align:0.5;}element-icon{size:${icon_size}.0000em;}listview{lines:${rows};columns:${cols};}" diff --git a/config/rofi/bak.config-wallpaper.rasi b/config/rofi/bak.config-wallpaper.rasi new file mode 100644 index 00000000..8c71a917 --- /dev/null +++ b/config/rofi/bak.config-wallpaper.rasi @@ -0,0 +1,249 @@ +/* ---- Configuration ---- */ +configuration { + modi: "drun,run,filebrowser"; + font: "Fira Code SemiBold 12"; + show-icons: true; + display-drun: "๐Ÿง"; + display-run: "๐Ÿ“ฆ"; + display-filebrowser: "๐Ÿ“‚"; + display-window: "๐Ÿ—„๏ธ"; + display-calc: "calc"; + drun-display-format: "{name}"; + hover-select: true; + me-select-entry: "MouseSecondary"; + me-accept-entry: "MousePrimary"; + window-format: "{w} ยท {c} ยท {t}"; + icon-theme: "Tokyonight-Dark"; + dpi: 1; +} + + +* { + background: #11111be6; + foreground: #cdd6f4ff; +} + + +/* ---- Window ---- */ +window { + width: 750px; + x-offset: 0px; + y-offset: 0px; + spacing: 0px; + padding: 0px; + margin: 0px; + border: 2px; + border-color: #7aa2f7; + cursor: "default"; + location: center; + anchor: center; + fullscreen: false; + border-radius: 12px; + enabled: true; + background-color: rgba(0, 0, 0, 0.6); +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: vertical; + padding: 8px; + children: [ "inputbar", "imagebox", "mode-switcher" ]; + border-radius: 12px; + background-image: url("~/.config/rofi/.current_wallpaper", height); + +} + +/* ---- Imagebox ---- */ +imagebox { + background-color: transparent; + orientation: horizontal; + children: [ "listbox"]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 4px; + orientation: vertical; + children: ["listview" ]; + padding: 0px; + border-radius: 12px; + border-color: #7aa2f7; + background-color: rgba(0, 0, 0, 0.6); +} + +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + padding: 2px; + text-color: @foreground; + spacing: 10px; + background-color: rgba(0, 0, 0, 0.6); + children: [ "textbox-prompt-colon","entry" ]; + border: 0px 0px 2px 0px; + border-radius: 12px; + border-color: #7aa2f7; + +} + +textbox-prompt-colon { + enabled: true; + padding: 6px 0px 6px 10px; + expand: false; + str: "๓ฐธ‰ "; + text-color: inherit; + background-color: transparent; +} + +entry { + enabled: true; + padding: 6px 6px 6px 6px; + text-color: inherit; + cursor: text; + placeholder: "Choose Wallpaper"; + placeholder-color: inherit; + background-color: transparent; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + orientation: horizontal; + enabled: true; + spacing: 20px; + padding: 2px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 5px 5px 5px 5px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px 0px 2px 0px; + border-color: #7aa2f7; +} + +button selected { + background-color: rgb(92, 107, 192, 0.8); + text-color: @foreground; + border: 1px; + border-color: @background; + +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 2; + lines: 6; + spacing: 4px; + padding: 4px; + dynamic: true; + cycle: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + background-color: transparent; + border-radius: 15px; + border: 0px; +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 5px; + margin: 2px; + cursor: pointer; + background-color: transparent; + border-radius: 10px; + border: 0px; +} + +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: rgb(92, 107, 192, 0.7); + 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: 37px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: #e6ede8; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0; +} + +/*****----- Message -----*****/ +message { + background-color: @background; + margin: 20px 0px 0px 0px; + border-radius: 12px; +} + +textbox { + padding: 10px; + background-color: @background; + text-color: @foreground; +} + +error-message { + padding: 15px; + border-radius: 12px; + background-color: @background; + text-color: @foreground; +} diff --git a/config/rofi/config-wallpaper.rasi b/config/rofi/config-wallpaper.rasi index 8c71a917..b5832e43 100644 --- a/config/rofi/config-wallpaper.rasi +++ b/config/rofi/config-wallpaper.rasi @@ -17,233 +17,205 @@ configuration { dpi: 1; } - * { background: #11111be6; foreground: #cdd6f4ff; } + /* ---- Window ---- */ window { - width: 750px; - x-offset: 0px; - y-offset: 0px; - spacing: 0px; - padding: 0px; - margin: 0px; - border: 2px; - border-color: #7aa2f7; - cursor: "default"; - location: center; - anchor: center; - fullscreen: false; - border-radius: 12px; - enabled: true; - background-color: rgba(0, 0, 0, 0.6); + width: 761px; + x-offset: 0px; + y-offset: 65px; + spacing: 0px; + padding: 0px; + margin: 0px; + border: 3px; + border-color: #7aa2f7; + cursor: "default"; + transparency: "real"; + location: north; + anchor: north; + fullscreen: false; + enabled: true; + border-radius: 10px; + background-color: rgba(0, 0, 0, 0.6); } /* ---- Mainbox ---- */ mainbox { - enabled: true; - orientation: vertical; - padding: 8px; - children: [ "inputbar", "imagebox", "mode-switcher" ]; - border-radius: 12px; - background-image: url("~/.config/rofi/.current_wallpaper", height); - + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + children: ["listbox"]; + background-image: url("~/.config/rofi/.current_wallpaper", width); } /* ---- Imagebox ---- */ imagebox { - background-color: transparent; - orientation: horizontal; - children: [ "listbox"]; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; } /* ---- Listbox ---- */ listbox { - spacing: 4px; - orientation: vertical; - children: ["listview" ]; - padding: 0px; - border-radius: 12px; - border-color: #7aa2f7; - background-color: rgba(0, 0, 0, 0.6); + spacing: 0px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "message", "listview" ]; } /* ---- Dummy ---- */ dummy { - background-color: transparent; + background-color: transparent; } /* ---- Inputbar ---- */ inputbar { - enabled: true; - padding: 2px; - text-color: @foreground; - spacing: 10px; - background-color: rgba(0, 0, 0, 0.6); - children: [ "textbox-prompt-colon","entry" ]; - border: 0px 0px 2px 0px; - border-radius: 12px; - border-color: #7aa2f7; - + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 0px; + border-color: #7aa2f7; + background-color: rgba(0, 0, 0, 0.6); + children: [ "textbox-prompt-colon", "entry" ]; } textbox-prompt-colon { - enabled: true; - padding: 6px 0px 6px 10px; - expand: false; - str: "๓ฐธ‰ "; - text-color: inherit; - background-color: transparent; + enabled: true; + expand: false; + str: "๐Ÿ”Ž"; + background-color: transparent; + text-color: inherit; } entry { - enabled: true; - padding: 6px 6px 6px 6px; - text-color: inherit; - cursor: text; - placeholder: "Choose Wallpaper"; - placeholder-color: inherit; - background-color: transparent; -} - -/* ---- Mode Switcher ---- */ -mode-switcher{ - orientation: horizontal; - enabled: true; - spacing: 20px; - padding: 2px; - background-color: transparent; - text-color: @foreground; -} - -button { - padding: 5px 5px 5px 5px; - border-radius: 10px; - background-color: @background; - text-color: inherit; - cursor: pointer; - border: 0px 0px 2px 0px; - border-color: #7aa2f7; -} - -button selected { - background-color: rgb(92, 107, 192, 0.8); - text-color: @foreground; - border: 1px; - border-color: @background; - + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; } /* ---- Listview ---- */ listview { - enabled: true; - columns: 2; - lines: 6; - spacing: 4px; - padding: 4px; - dynamic: true; - cycle: true; - scrollbar: false; - layout: vertical; - reverse: false; - fixed-height: true; - fixed-columns: true; - background-color: transparent; - border-radius: 15px; - border: 0px; + enabled: true; + columns: 1; + cycle: true; + dynamic: false; + scrollbar: true; + layout: horizontal; + reverse: false; + spacing: 10px; + padding: 10px; + margin: 0px; + background-color: rgb(0, 0, 0, 0.6); + border: 0px; } /* ---- Element ---- */ element { - enabled: true; - padding: 5px; - margin: 2px; - cursor: pointer; - background-color: transparent; - border-radius: 10px; - border: 0px; + enabled: true; + padding: 0px; + margin: 5px; + cursor: pointer; + background-color: transparent; + border-radius: 10px; + border: 2px; + layout: vertical; } element normal.normal { - background-color: inherit; - text-color: @foreground; + background-color: inherit; + text-color: @foreground; } element normal.urgent { - background-color: inherit; - text-color: @foreground; + background-color: inherit; + text-color: @foreground; } element normal.active { - background-color: inherit; - text-color: @foreground; + background-color: inherit; + text-color: @foreground; } element selected.normal { - background-color: rgb(92, 107, 192, 0.7); - text-color: @foreground; + background-color: rgb(92, 107, 192, 0.7); + text-color: @foreground; } element selected.urgent { - background-color: inherit; - text-color: @foreground; + background-color: inherit; + text-color: @foreground; } element selected.active { - background-color: inherit; - text-color: @foreground; + background-color: inherit; + text-color: @foreground; } element alternate.normal { - background-color: inherit; - text-color: @foreground; + background-color: inherit; + text-color: @foreground; } element alternate.urgent { - background-color: inherit; - text-color: @foreground; + background-color: inherit; + text-color: @foreground; } element alternate.active { - background-color: inherit; - text-color: @foreground; + background-color: inherit; + text-color: @foreground; } element-icon { - background-color: transparent; - text-color: inherit; - size: 37px; - cursor: inherit; + background-color: transparent; + text-color: inherit; + size: 100px; + cursor: inherit; + horizontal-align: 0.5; } element-text { - background-color: transparent; - text-color: #e6ede8; - cursor: inherit; - vertical-align: 0.5; - horizontal-align: 0; + background-color: transparent; + text-color: #e6ede8; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.1; + enabled: false; } /*****----- Message -----*****/ message { - background-color: @background; - margin: 20px 0px 0px 0px; - border-radius: 12px; + background-color: @background; + border:0px; + margin:20px 0px 0px 0px; + padding:0px; + spacing:0px; + border-radius: 10px; } textbox { - padding: 10px; - background-color: @background; - text-color: @foreground; + 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: 12px; - background-color: @background; - text-color: @foreground; + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; }