diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-01-19 16:24:32 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-01-19 16:24:32 +0800 |
| commit | 3675a406b44cf511f0d2c369d53a013fa4edba99 (patch) | |
| tree | fd6f70b5413227017e4c1a70d7fb4404af816290 | |
| parent | 29c6c90752b87ffb90487ec2de4f188ceab659c2 (diff) | |
rofi: calc
| -rw-r--r-- | dot-config/rofi/calc.rasi | 279 | ||||
| -rw-r--r-- | dot-config/rofi/launcher.rasi | 3 | ||||
| -rwxr-xr-x | dot-config/rofi/scripts/rofi_calc | 11 | ||||
| -rw-r--r-- | dot-config/rofi/shared/colors.rasi | 14 |
4 files changed, 299 insertions, 8 deletions
diff --git a/dot-config/rofi/calc.rasi b/dot-config/rofi/calc.rasi new file mode 100644 index 00000000..ecf82f26 --- /dev/null +++ b/dot-config/rofi/calc.rasi @@ -0,0 +1,279 @@ +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.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(foreground); + selected-urgent-background: var(active); + selected-urgent-foreground: var(foreground); + selected-active-background: var(urgent); + selected-active-foreground: var(foreground); + 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: 1000px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 16px; + border-color: @border-colour; + cursor: "default"; + /* Backgroud Colors */ + background-color: @background-colour; + /* Backgroud Image */ + //background-image: url("/path/to/image.png", none); + /* Simple Linear Gradient */ + //background-image: linear-gradient(red, orange, pink, purple); + /* Directional Linear Gradient */ + //background-image: linear-gradient(to bottom, pink, yellow, magenta); + /* Angle Linear Gradient */ + //background-image: linear-gradient(45, cyan, purple, indigo); +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 20px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @border-colour; + background-color: transparent; + children: [ "inputbar", "message", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px 0px 8px 0px; + border: 0px 0px 1px 0px; + border-radius: 2px 2px 2px 2px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + children: [ "textbox-prompt-colon", "entry" ]; +} + +prompt { + enabled: true; + background-color: inherit; + text-color: inherit; +} +textbox-prompt-colon { + enabled: true; + padding: 0px; + expand: false; + str: ""; + background-color: inherit; + text-color: inherit; +} +entry { + enabled: true; + padding: 0px; + background-color: inherit; + text-color: inherit; + cursor: text; + placeholder: "Search..."; + placeholder-color: inherit; +} +num-filtered-rows { + enabled: true; + expand: false; + background-color: inherit; + text-color: inherit; +} +textbox-num-sep { + enabled: true; + expand: false; + str: "/"; + background-color: inherit; + text-color: inherit; +} +num-rows { + enabled: true; + expand: false; + background-color: inherit; + text-color: inherit; +} +case-indicator { + enabled: true; + background-color: inherit; + text-color: inherit; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 1; + lines: 14; + cycle: true; + dynamic: true; + scrollbar: true; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 6px 6px 6px 6px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 16px 16px 16px 16px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 6px; + border: 0px solid; + border-radius: 16px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: pointer; +} +element normal.normal { + ----background-color: var(normal-background); + background-color: @alternate-background; + background-color: @alternate-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(selected-normal-background); + text-color: var(selected-normal-foreground); +} +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: @alternate-background; + --background-color: @alternate-background; + --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: 24px; + cursor: inherit; +} +element-text { + background-color: transparent; + text-color: inherit; + highlight: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Mode Switcher -----*****/ +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 16px; + 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: 8px 12px; + border: 0px solid; + border-radius: 16px; + border-color: @border-colour; + background-color: @alternate-background; + text-color: @foreground-colour; +} +textbox { + border: 0px solid; + border-color: @border-colour; + background-color: transparent; + 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: 20px; + border: 0px solid; + border-radius: 16px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/launcher.rasi b/dot-config/rofi/launcher.rasi index c0da5921..02a5393e 100644 --- a/dot-config/rofi/launcher.rasi +++ b/dot-config/rofi/launcher.rasi @@ -1,11 +1,12 @@ /*****----- Configuration -----*****/ configuration { - modi: "drun,run,filebrowser,window"; + modi: "drun,calc,run,filebrowser,window"; show-icons: true; display-drun: " Apps"; display-run: " Run"; display-filebrowser: " Files"; display-window: " Windows"; + display-calc: " Calculator"; drun-display-format: "{name}"; window-format: "{c} · {t}"; } diff --git a/dot-config/rofi/scripts/rofi_calc b/dot-config/rofi/scripts/rofi_calc new file mode 100755 index 00000000..c5946b25 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_calc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/calc.rasi" + +# Run +rofi \ + -show calc \ + -modi calc \ + -theme ${RASI} diff --git a/dot-config/rofi/shared/colors.rasi b/dot-config/rofi/shared/colors.rasi index 028ab6c4..d79218d8 100644 --- a/dot-config/rofi/shared/colors.rasi +++ b/dot-config/rofi/shared/colors.rasi @@ -1,9 +1,9 @@ * { - background: #120E1925; - background-alt: #8576B625; - foreground: #F9F9FE; - selected: #ADADC740; - active: #0D064010; - urgent: #857AB375; - Prompt: #120E19; + background: #18191A25; + background-alt: #907F4E25; + foreground: #D7DDDF; + selected: #8B97BE40; + active: #131A1F10; + urgent: #79819575; + Prompt: #18191A; } |
