From ca968c4e5040f1ff4b5b5e12d9312360d807dcc1 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 3 Jun 2024 19:56:39 +0800 Subject: added submodules, change . -> dot (see man stow --dotfiles) --- dot-config/rofi/askpass.rasi | 73 +++ dot-config/rofi/asroot.rasi | 147 ++++++ dot-config/rofi/bluetooth.rasi | 303 ++++++++++++ dot-config/rofi/clipboard.rasi | 302 ++++++++++++ dot-config/rofi/config.rasi | 176 +++++++ dot-config/rofi/configs.rasi | 288 ++++++++++++ dot-config/rofi/confirm.rasi | 144 ++++++ dot-config/rofi/custom_command.rasi | 73 +++ dot-config/rofi/emoji.rasi | 302 ++++++++++++ dot-config/rofi/file-browser | 1 + dot-config/rofi/filebrowser.rasi | 270 +++++++++++ dot-config/rofi/global/emoji.rasi | 68 +++ dot-config/rofi/global/history.txt | 0 dot-config/rofi/global/icons/ddg.svg | 615 ++++++++++++++++++++++++ dot-config/rofi/global/icons/google.svg | 365 +++++++++++++++ dot-config/rofi/global/icons/history.svg | 75 +++ dot-config/rofi/global/icons/result.svg | 57 +++ dot-config/rofi/global/icons/suggestion.svg | 1 + dot-config/rofi/global/rofi-spotlight.sh | 692 ++++++++++++++++++++++++++++ dot-config/rofi/global/rofi.rasi | 162 +++++++ dot-config/rofi/global/web-search.py | 167 +++++++ dot-config/rofi/launcher.rasi | 302 ++++++++++++ dot-config/rofi/music.rasi | 147 ++++++ dot-config/rofi/networkmenu.rasi | 302 ++++++++++++ dot-config/rofi/powermenu.rasi | 147 ++++++ dot-config/rofi/powermenu/powermenu.rasi | 93 ++++ dot-config/rofi/runner.rasi | 300 ++++++++++++ dot-config/rofi/screenshot.rasi | 147 ++++++ dot-config/rofi/scripts/emoji | 5 + dot-config/rofi/scripts/powermenu.sh | 98 ++++ dot-config/rofi/scripts/rofi_askpass | 12 + dot-config/rofi/scripts/rofi_asroot | 76 +++ dot-config/rofi/scripts/rofi_clip | 8 + dot-config/rofi/scripts/rofi_configs | 129 ++++++ dot-config/rofi/scripts/rofi_emoji | 10 + dot-config/rofi/scripts/rofi_filebrowser | 11 + dot-config/rofi/scripts/rofi_launcher | 10 + dot-config/rofi/scripts/rofi_music | 116 +++++ dot-config/rofi/scripts/rofi_powermenu | 244 ++++++++++ dot-config/rofi/scripts/rofi_runner | 11 + dot-config/rofi/scripts/rofi_screenshot | 139 ++++++ dot-config/rofi/scripts/rofi_shutdown | 51 ++ dot-config/rofi/scripts/rofi_shutdown_menu | 52 +++ dot-config/rofi/scripts/rofi_themes | 44 ++ dot-config/rofi/scripts/rofi_wallpaper | 21 + dot-config/rofi/scripts/rofi_windows | 10 + dot-config/rofi/scripts/screenshot-wl.sh | 31 ++ dot-config/rofi/scripts/screenshot.sh | 31 ++ dot-config/rofi/shared/colors.rasi | 13 + dot-config/rofi/shared/fonts.rasi | 5 + dot-config/rofi/themes.rasi | 303 ++++++++++++ dot-config/rofi/wallpaper.rasi | 300 ++++++++++++ dot-config/rofi/windows.rasi | 300 ++++++++++++ 53 files changed, 7749 insertions(+) create mode 100644 dot-config/rofi/askpass.rasi create mode 100644 dot-config/rofi/asroot.rasi create mode 100644 dot-config/rofi/bluetooth.rasi create mode 100644 dot-config/rofi/clipboard.rasi create mode 100644 dot-config/rofi/config.rasi create mode 100644 dot-config/rofi/configs.rasi create mode 100644 dot-config/rofi/confirm.rasi create mode 100644 dot-config/rofi/custom_command.rasi create mode 100644 dot-config/rofi/emoji.rasi create mode 100644 dot-config/rofi/file-browser create mode 100644 dot-config/rofi/filebrowser.rasi create mode 100644 dot-config/rofi/global/emoji.rasi create mode 100644 dot-config/rofi/global/history.txt create mode 100644 dot-config/rofi/global/icons/ddg.svg create mode 100644 dot-config/rofi/global/icons/google.svg create mode 100644 dot-config/rofi/global/icons/history.svg create mode 100644 dot-config/rofi/global/icons/result.svg create mode 100644 dot-config/rofi/global/icons/suggestion.svg create mode 100755 dot-config/rofi/global/rofi-spotlight.sh create mode 100644 dot-config/rofi/global/rofi.rasi create mode 100755 dot-config/rofi/global/web-search.py create mode 100644 dot-config/rofi/launcher.rasi create mode 100644 dot-config/rofi/music.rasi create mode 100644 dot-config/rofi/networkmenu.rasi create mode 100644 dot-config/rofi/powermenu.rasi create mode 100644 dot-config/rofi/powermenu/powermenu.rasi create mode 100644 dot-config/rofi/runner.rasi create mode 100644 dot-config/rofi/screenshot.rasi create mode 100755 dot-config/rofi/scripts/emoji create mode 100755 dot-config/rofi/scripts/powermenu.sh create mode 100755 dot-config/rofi/scripts/rofi_askpass create mode 100755 dot-config/rofi/scripts/rofi_asroot create mode 100755 dot-config/rofi/scripts/rofi_clip create mode 100755 dot-config/rofi/scripts/rofi_configs create mode 100755 dot-config/rofi/scripts/rofi_emoji create mode 100755 dot-config/rofi/scripts/rofi_filebrowser create mode 100755 dot-config/rofi/scripts/rofi_launcher create mode 100755 dot-config/rofi/scripts/rofi_music create mode 100755 dot-config/rofi/scripts/rofi_powermenu create mode 100755 dot-config/rofi/scripts/rofi_runner create mode 100755 dot-config/rofi/scripts/rofi_screenshot create mode 100755 dot-config/rofi/scripts/rofi_shutdown create mode 100755 dot-config/rofi/scripts/rofi_shutdown_menu create mode 100755 dot-config/rofi/scripts/rofi_themes create mode 100755 dot-config/rofi/scripts/rofi_wallpaper create mode 100755 dot-config/rofi/scripts/rofi_windows create mode 100755 dot-config/rofi/scripts/screenshot-wl.sh create mode 100755 dot-config/rofi/scripts/screenshot.sh create mode 100644 dot-config/rofi/shared/colors.rasi create mode 100644 dot-config/rofi/shared/fonts.rasi create mode 100644 dot-config/rofi/themes.rasi create mode 100644 dot-config/rofi/wallpaper.rasi create mode 100644 dot-config/rofi/windows.rasi (limited to 'dot-config/rofi') diff --git a/dot-config/rofi/askpass.rasi b/dot-config/rofi/askpass.rasi new file mode 100644 index 00000000..1db7faab --- /dev/null +++ b/dot-config/rofi/askpass.rasi @@ -0,0 +1,73 @@ +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.rasi" + +/*****----- Main Window -----*****/ +window { + location: center; + anchor: center; + fullscreen: false; + width: 350px; + x-offset: 0px; + y-offset: 0px; + padding: 20px; + border: 1px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background; + cursor: "default"; + children: [ "inputbar", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt", "entry" ]; +} + +dummy { + expand: false; + width: 10px; + background-color: transparent; +} +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + padding: 10px 13px; + border-radius: 0px; + background-color: @active; + text-color: @background; +} +prompt { + enabled: true; + padding: 10px; + border-radius: 0px; + background-color: @selected; + text-color: @background; +} +entry { + enabled: true; + padding: 10px; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: inherit; + cursor: text; + placeholder: "Password"; + placeholder-color: inherit; +} + +/*****----- Listview -----*****/ +listview { + enabled: false; +} diff --git a/dot-config/rofi/asroot.rasi b/dot-config/rofi/asroot.rasi new file mode 100644 index 00000000..bceac483 --- /dev/null +++ b/dot-config/rofi/asroot.rasi @@ -0,0 +1,147 @@ +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.rasi" + +/* +USE_ICON=YES +*/ + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 500px; + x-offset: 0px; + y-offset: 0px; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + border-color: @selected; + cursor: "default"; + background-color: @background; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 20px; + background-color: transparent; + children: [ "inputbar", "message", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + padding: 0px; + border: 0px; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt"]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + padding: 10px 12px; + border-radius: 0px; + background-color: @active; + text-color: @background; +} +prompt { + enabled: true; + padding: 10px; + border-radius: 0px; + background-color: @selected; + text-color: @background; +} + +/*****----- Message -----*****/ +message { + enabled: true; + margin: 0px; + padding: 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; +} +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 5; + lines: 1; + cycle: true; + scrollbar: false; + layout: vertical; + + spacing: 10px; + background-color: transparent; + cursor: "default"; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + padding: 22px 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element-text { + font: "feather 20"; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +element normal.normal, +element alternate.normal { + border: 1px solid; + border-radius: 0px; + border-color: @selected; + background-color: var(background); + text-color: var(foreground); +} +element normal.urgent, +element alternate.urgent, +element selected.active { + background-color: var(urgent); + text-color: var(background); +} +element normal.active, +element alternate.active, +element selected.urgent { + background-color: var(active); + text-color: var(background); +} +element selected.normal { + background-color: var(selected); + text-color: var(background); +} diff --git a/dot-config/rofi/bluetooth.rasi b/dot-config/rofi/bluetooth.rasi new file mode 100644 index 00000000..a704c27a --- /dev/null +++ b/dot-config/rofi/bluetooth.rasi @@ -0,0 +1,303 @@ +/** + * Copyright (C) 2020-2023 Aditya Shakya + **/ + +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- 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: 500px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + children: [ "textbox-prompt-colon", "prompt" ]; +} + +prompt { + enabled: true; + padding: 8px 12px; + border-radius: 0px; + background-color: @selected; + text-color: @background; +} +textbox-prompt-colon { + enabled: true; + padding: 8px 11.5px; + border-radius: 0px; + expand: false; + str: ""; + background-color: @active; + text-color: @background; +} +entry { + enabled: true; + padding: 8px 12px; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: inherit; + cursor: text; + placeholder: ""; + 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: 7; + 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: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 8px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 5px 10px; + border: 0px solid; + border-radius: 8px; + 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 10px; + border: 0px solid; + border-radius: 8px; + 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: 15px; + border: 0px solid; + border-radius: 10px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/clipboard.rasi b/dot-config/rofi/clipboard.rasi new file mode 100644 index 00000000..9a345f1a --- /dev/null +++ b/dot-config/rofi/clipboard.rasi @@ -0,0 +1,302 @@ + +/*****----- Configuration -----*****/ +configuration { + modi: "window"; + show-icons: true; + display-drun: " Apps"; + display-run: " Run"; + display-filebrowser: " Files"; + display-window: " Windows"; + drun-display-format: "{name}"; + window-format: "{c} · {t}"; +} + +/*****----- 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: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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: 0px; + 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: "Filter..."; + 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: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 6px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} + diff --git a/dot-config/rofi/config.rasi b/dot-config/rofi/config.rasi new file mode 100644 index 00000000..c43c7a90 --- /dev/null +++ b/dot-config/rofi/config.rasi @@ -0,0 +1,176 @@ +configuration { + /*---------- General setting ----------*/ + modi: "drun,run,filebrowser,window,emoji,calc"; + case-sensitive: false; + cycle: true; + filter: ""; + scroll-method: 0; + normalize-match: true; + show-icons: true; + icon-theme: "Arc-Circle"; +/* cache-dir: ;*/ + steal-focus: false; +/* dpi: -1;*/ + + /*---------- Matching setting ----------*/ + matching: "normal"; + tokenize: true; + + /*---------- SSH settings ----------*/ + ssh-client: "ssh"; + ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]"; + parse-hosts: true; + parse-known-hosts: true; + + /*---------- Drun settings ----------*/ + drun-categories: ""; + drun-match-fields: "name,generic,exec,categories,keywords"; + drun-display-format: "{name} [({generic})]"; + drun-show-actions: false; + drun-url-launcher: "xdg-open"; + drun-use-desktop-cache: false; + drun-reload-desktop-cache: false; + drun { + /** Parse user desktop files. */ + parse-user: true; + /** Parse system desktop files. */ + parse-system: true; + } + + /*---------- Run settings ----------*/ + run-command: "{cmd}"; + run-list-command: ""; + run-shell-command: "{terminal} -e {cmd}"; + + /*---------- Fallback Icon ----------*/ + run { + fallback-icon: "application-x-addon"; + } + drun { + fallback-icon: "application-x-addon"; + } + + /*---------- Window switcher settings ----------*/ + window-match-fields: "title,class,role,name,desktop"; + window-command: "wmctrl -i -R {window}"; + window-format: "{w} - {c} - {t:0}"; + window-thumbnail: false; + + /*---------- Combi settings ----------*/ +/* combi-modi: "window,run";*/ +/* combi-hide-mode-prefix: false;*/ +/* combi-display-format: "{mode} {text}";*/ + + /*---------- History and Sorting ----------*/ + disable-history: false; + sorting-method: "normal"; + max-history-size: 25; + + /*---------- Display setting ----------*/ + display-window: "Windows"; + display-windowcd: "Window CD"; + display-run: "Run"; + display-ssh: "SSH"; + display-drun: "Apps"; + display-combi: "Combi"; + display-keys: "Keys"; + display-filebrowser: "Files"; + + /*---------- Misc setting ----------*/ + terminal: "rofi-sensible-terminal"; + font: "Mono 12"; + sort: false; + threads: 0; + click-to-exit: true; +/* ignored-prefixes: "";*/ +/* pid: "/run/user/1000/rofi.pid";*/ + + /*---------- File browser settings ----------*/ + filebrowser { +/* directory: "/home";*/ + directories-first: true; + sorting-method: "name"; + } + + /*---------- Other settings ----------*/ + timeout { + action: "kb-cancel"; + delay: 0; + } + + /*---------- Keybindings ----------*/ +/* + kb-primary-paste: "Control+V,Shift+Insert"; + kb-secondary-paste: "Control+v,Insert"; + kb-clear-line: "Control+w"; + kb-move-front: "Control+a"; + kb-move-end: "Control+e"; + kb-move-word-back: "Alt+b,Control+Left"; + kb-move-word-forward: "Alt+f,Control+Right"; + kb-move-char-back: "Left,Control+b"; + kb-move-char-forward: "Right,Control+f"; + kb-remove-word-back: "Control+Alt+h,Control+BackSpace"; + kb-remove-word-forward: "Control+Alt+d"; + kb-remove-char-forward: "Delete,Control+d"; + kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h"; + kb-remove-to-eol: "Control+k"; + kb-remove-to-sol: "Control+u"; + kb-accept-entry: "Control+j,Control+m,Return,KP_Enter"; + kb-accept-custom: "Control+Return"; + kb-accept-custom-alt: "Control+Shift+Return"; + kb-accept-alt: "Shift+Return"; + kb-delete-entry: "Shift+Delete"; + kb-mode-next: "Shift+Right,Control+Tab"; + kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab"; + kb-mode-complete: "Control+l"; + kb-row-left: "Control+Page_Up"; + kb-row-right: "Control+Page_Down"; + kb-row-down: "Down,Control+n"; + kb-page-prev: "Page_Up"; + kb-page-next: "Page_Down"; + kb-row-first: "Home,KP_Home"; + kb-row-last: "End,KP_End"; + kb-row-select: "Control+space"; + kb-screenshot: "Alt+S"; + kb-ellipsize: "Alt+period"; + kb-toggle-case-sensitivity: "grave,dead_grave"; + kb-toggle-sort: "Alt+grave"; + kb-cancel: "Escape,Control+g,Control+bracketleft"; + kb-custom-1: "Alt+1"; + kb-custom-2: "Alt+2"; + kb-custom-3: "Alt+3"; + kb-custom-4: "Alt+4"; + kb-custom-5: "Alt+5"; + kb-custom-6: "Alt+6"; + kb-custom-7: "Alt+7"; + kb-custom-8: "Alt+8"; + kb-custom-9: "Alt+9"; + kb-custom-10: "Alt+0"; + kb-custom-11: "Alt+exclam"; + kb-custom-12: "Alt+at"; + kb-custom-13: "Alt+numbersign"; + kb-custom-14: "Alt+dollar"; + kb-custom-15: "Alt+percent"; + kb-custom-16: "Alt+dead_circumflex"; + kb-custom-17: "Alt+ampersand"; + kb-custom-18: "Alt+asterisk"; + kb-custom-19: "Alt+parenleft"; + kb-select-1: "Super+1"; + kb-select-2: "Super+2"; + kb-select-3: "Super+3"; + kb-select-4: "Super+4"; + kb-select-5: "Super+5"; + kb-select-6: "Super+6"; + kb-select-7: "Super+7"; + kb-select-8: "Super+8"; + kb-select-9: "Super+9"; + kb-select-10: "Super+0"; + ml-row-left: "ScrollLeft"; + ml-row-right: "ScrollRight"; + ml-row-up: "ScrollUp"; + ml-row-down: "ScrollDown"; + me-select-entry: "MousePrimary"; + me-accept-entry: "MouseDPrimary"; + me-accept-custom: "Control+MouseDPrimary"; +*/ +} diff --git a/dot-config/rofi/configs.rasi b/dot-config/rofi/configs.rasi new file mode 100644 index 00000000..048e3237 --- /dev/null +++ b/dot-config/rofi/configs.rasi @@ -0,0 +1,288 @@ +/*****----- 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: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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: 0px; + 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: "Filter..."; + 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: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 6px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/confirm.rasi b/dot-config/rofi/confirm.rasi new file mode 100644 index 00000000..531b98bb --- /dev/null +++ b/dot-config/rofi/confirm.rasi @@ -0,0 +1,144 @@ +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.rasi" + +/* +USE_ICON=YES +*/ + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 300px; + x-offset: 0px; + y-offset: 0px; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + border-color: @selected; + cursor: "default"; + background-color: @background; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 20px; + background-color: transparent; + children: [ "message", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + padding: 0px; + border: 0px; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt"]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + padding: 10px 14px; + border-radius: 0px; + background-color: @active; + text-color: @background; +} +prompt { + enabled: true; + padding: 10px; + border-radius: 0px; + background-color: @selected; + text-color: @background; +} + +/*****----- Message -----*****/ +message { + enabled: true; + margin: 0px; + padding: 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; +} +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 2; + lines: 1; + cycle: true; + scrollbar: false; + layout: vertical; + + spacing: 10px; + background-color: transparent; + cursor: "default"; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + padding: 5px 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element-text { + font: "feather 20"; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +element normal.normal, +element alternate.normal { + background-color: var(background-alt); + text-color: var(foreground); +} +element normal.urgent, +element alternate.urgent, +element selected.active { + background-color: var(urgent); + text-color: var(background); +} +element normal.active, +element alternate.active, +element selected.urgent { + background-color: var(active); + text-color: var(background); +} +element selected.normal { + background-color: var(selected); + text-color: var(background); +} diff --git a/dot-config/rofi/custom_command.rasi b/dot-config/rofi/custom_command.rasi new file mode 100644 index 00000000..645dd7e0 --- /dev/null +++ b/dot-config/rofi/custom_command.rasi @@ -0,0 +1,73 @@ +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.rasi" + +/*****----- Main Window -----*****/ +window { + location: center; + anchor: center; + fullscreen: false; + width: 350px; + x-offset: 0px; + y-offset: 0px; + padding: 20px; + border: 1px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background; + cursor: "default"; + children: [ "inputbar", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt", "entry" ]; +} + +dummy { + expand: false; + width: 10px; + background-color: transparent; +} +textbox-prompt-colon { + enabled: true; + expand: false; + str: "$"; + padding: 10px 13px; + border-radius: 0px; + background-color: @active; + text-color: @foreground; +} +prompt { + enabled: true; + padding: 10px; + border-radius: 0px; + background-color: @selected; + text-color: @foreground; +} +entry { + enabled: true; + padding: 10px; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: inherit; + cursor: text; + placeholder: "Command"; + placeholder-color: inherit; +} + +/*****----- Listview -----*****/ +listview { + enabled: false; +} diff --git a/dot-config/rofi/emoji.rasi b/dot-config/rofi/emoji.rasi new file mode 100644 index 00000000..e7f70ef8 --- /dev/null +++ b/dot-config/rofi/emoji.rasi @@ -0,0 +1,302 @@ + +/*****----- Configuration -----*****/ +configuration { + modi: "window,emoji"; + show-icons: true; + display-drun: " Apps"; + display-run: " Run"; + display-filebrowser: " Files"; + display-window: " Windows"; + drun-display-format: "{name}"; + window-format: "{c} · {t}"; +} + +/*****----- 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: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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: 0px; + 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: "Filter..."; + 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: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 6px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} + diff --git a/dot-config/rofi/file-browser b/dot-config/rofi/file-browser new file mode 100644 index 00000000..b67abcf0 --- /dev/null +++ b/dot-config/rofi/file-browser @@ -0,0 +1 @@ +cmd "exo-open --launch TerminalEmulator" diff --git a/dot-config/rofi/filebrowser.rasi b/dot-config/rofi/filebrowser.rasi new file mode 100644 index 00000000..27d9e146 --- /dev/null +++ b/dot-config/rofi/filebrowser.rasi @@ -0,0 +1,270 @@ +/*****----- Configuration -----*****/ +configuration { + modi: "file-browser-extended"; + show-icons: true; + display-filebrowser-extended: " Files"; + window-format: "{c} · {t}"; +} + +/*****----- 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: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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: 0px; + 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: 7; + 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: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 6px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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; +} + +/*****----- Message -----*****/ +message { + enabled: true; + margin: 0px; + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/global/emoji.rasi b/dot-config/rofi/global/emoji.rasi new file mode 100644 index 00000000..470179aa --- /dev/null +++ b/dot-config/rofi/global/emoji.rasi @@ -0,0 +1,68 @@ +configuration { + display-emoji: ""; + show-icons: false; + me-select-entry: ""; + me-accept-entry: "MousePrimary"; +} + +* { + font: "Noto Sans 11"; + text-color: #eff0eb; + background-color: #1917244D; + border-color: #00000000; + width: 684px; + height: 477px; + location: 0; +} + +inputbar { + border: 0 0 1px 0; + children: [prompt,entry]; +} + +prompt { + font: "Noto Sans 18"; + vertical-align: 0.5; + padding: 0px 9px 0px 9px; + border: 0 1px 0 0; +} + +entry { + padding: 12px; +} + +textbox { + background-color: #1917244D; + border-color: #1917244D; + padding: 13px 13px; +} + +listview { + cycle: false; + scrollbar: false; + columns: 9; + cycle: false; + dynamic: false; + layout: vertical; + padding: 8px 10px 10px 10px; +} + +element { + border-radius: 3px; + padding: 14px 0px 14px 0px; +} + +element-text { + font: "Noto Color Emoji 27"; + expand: false; + text-color: #333333; + horizontal-align: 1; + vertical-align: 0.5; + margin: 0px 0px 0px 13px; + width: 1px; + padding: 1px 0px 16px; +} + +element selected { + background-color: #191724; +} \ No newline at end of file diff --git a/dot-config/rofi/global/history.txt b/dot-config/rofi/global/history.txt new file mode 100644 index 00000000..e69de29b diff --git a/dot-config/rofi/global/icons/ddg.svg b/dot-config/rofi/global/icons/ddg.svg new file mode 100644 index 00000000..20ea387b --- /dev/null +++ b/dot-config/rofi/global/icons/ddg.svg @@ -0,0 +1,615 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/dot-config/rofi/global/icons/google.svg b/dot-config/rofi/global/icons/google.svg new file mode 100644 index 00000000..21e5bf37 --- /dev/null +++ b/dot-config/rofi/global/icons/google.svg @@ -0,0 +1,365 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/dot-config/rofi/global/icons/history.svg b/dot-config/rofi/global/icons/history.svg new file mode 100644 index 00000000..872bac83 --- /dev/null +++ b/dot-config/rofi/global/icons/history.svg @@ -0,0 +1,75 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/dot-config/rofi/global/icons/result.svg b/dot-config/rofi/global/icons/result.svg new file mode 100644 index 00000000..0f4d883e --- /dev/null +++ b/dot-config/rofi/global/icons/result.svg @@ -0,0 +1,57 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/dot-config/rofi/global/icons/suggestion.svg b/dot-config/rofi/global/icons/suggestion.svg new file mode 100644 index 00000000..bf673469 --- /dev/null +++ b/dot-config/rofi/global/icons/suggestion.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dot-config/rofi/global/rofi-spotlight.sh b/dot-config/rofi/global/rofi-spotlight.sh new file mode 100755 index 00000000..d9939496 --- /dev/null +++ b/dot-config/rofi/global/rofi-spotlight.sh @@ -0,0 +1,692 @@ +#!/usr/bin/env bash + +TMP_DIR="/tmp/rofi/${USER}/" + +PREV_LOC_FILE="${TMP_DIR}rofi_fb_prevloc" +CURRENT_FILE="${TMP_DIR}rofi_fb_current_file" + +MY_PATH="$(realpath "$0" | xargs dirname)" +HIST_FILE="${MY_PATH}/history.txt" + +OPENER=xdg-open +TERM_EMU=wezterm +TEXT_EDITOR=$EDITOR +FILE_MANAGER=xdg-open +BLUETOOTH_SEND=blueman-sendto + +CUR_DIR=$PWD +NEXT_DIR="" +FD_INSTALLED=$(command -v fd) + +SHOW_HIDDEN=false + +# Setup menu options +declare -a OPEN_FILE_LOCATION=( + "Open file location in ${TERM_EMU}" + "Open file location in ${FILE_MANAGER}" +) +declare -a RUN_COMMANDS=( + "Run" + "Execute in ${TERM_EMU}" +) +declare -a STANDARD_CONTROLS=( + "Move to trash" + "Delete" + "Back" +) +declare -a SHELL_NO_X_OPTIONS=( + "Edit" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a SHELL_OPTIONS=( + "${RUN_COMMANDS[@]}" + "${SHELL_NO_X_OPTIONS[@]}" +) +declare -a BIN_NO_X_OPTIONS=( + "${OPEN_FILE_LOCATION[@]}" + "Back" +) +declare -a BIN_OPTIONS=( + "${RUN_COMMANDS[@]}" + "${BIN_NO_X_OPTIONS[@]}" +) +declare -a TEXT_OPTIONS=("${SHELL_NO_X_OPTIONS[@]}") +declare -a HTML_OPTIONS=( + "Open" + "Edit" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a XCF_SVG_OPTIONS=( + "Open" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) +declare -a IMAGE_OPTIONS=( + "Open" + "Send via Bluetooth" + "${OPEN_FILE_LOCATION[@]}" + "${STANDARD_CONTROLS[@]}" +) + +declare -a ALL_OPTIONS=() + +# Combine all context menu +COMBINED_OPTIONS=( + "${SHELL_OPTIONS[@]}" + "${IMAGE_OPTIONS[@]}" +) + +# Remove duplicates +ALL_OPTIONS=("$(printf '%s\n' "${COMBINED_OPTIONS[@]}" | sort -u)") + +# Create tmp dir for rofi +[ ! -d "${TMP_DIR}" ] && mkdir -p "${TMP_DIR}"; + +# Create hist file if it doesn't exist +[ ! -f "${HIST_FILE}" ] && touch "${HIST_FILE}" + +# Help message +if [ -n "$*" ] && [[ "$*" = ":help" ]] +then + echo -en "Rofi Spotlight +A Rofi with file and web searching functionality + +Commands: +:help to print this help message +:h or :hidden to show hidden files/dirs +:sh or :show_hist to show search history +:ch or :clear_hist to clear search history +:xdg to jump to an xdg directory +Examples: + :xdg DOCUMENTS + :xdg DOWNLOADS +Also supports incomplete path: +Examples: + :xdg doc + :xdg down +For more info about XDG dirs, see: +\`man xdg-user-dir\` + +File search syntaxes: +! to search for a file and web suggestions +? to search parent directories +Examples: + !half-life 3 + ?portal 3 + +Web search syntaxes: +! to gets search suggestions +:web/:w to also to gets search suggestions +:webbro/:wb to search directly from your browser +Examples: + !how to install archlinux + :web how to install gentoo + :w how to make a nuclear fission + :webbro how to install wine in windowsxp +Back\0icon\x1fdraw-arrow-back\n" + + exit +fi + +# Return the icon string +function icon_file_type(){ + icon_name="" + mime_type=$(file --mime-type -b "${1}") + + case "${mime_type}" in + "inode/directory") + case "${1}" in + "Desktop/" ) + icon_name='folder-blue-desktop' + ;; + "Documents/" ) + icon_name='folder-blue-documents' + ;; + "Downloads/" ) + icon_name='folder-blue-downloads' + ;; + "Music/" ) + icon_name='folder-blue-music' + ;; + "Pictures/" ) + icon_name='folder-blue-pictures' + ;; + "Public/" ) + icon_name='folder-blue-public' + ;; + "Templates/" ) + icon_name='folder-blue-templates' + ;; + "Videos/" ) + icon_name='folder-blue-videos' + ;; + "root/" ) + icon_name='folder-root' + ;; + "home/" | "${USER}/") + icon_name='folder-home' + ;; + *"$" ) + icon_name='folder-blue' + ;; + *) + icon_name='folder-blue' + ;; + esac + ;; + "inode/symlink" ) + icon_name='inode-symlink' + ;; + "audio/flac" | "audio/mpeg" ) + icon_name='music' + ;; + "video/mp4" ) + icon_name='video-mp4' + ;; + "video/x-matroska" ) + icon_name=video-x-matroska + ;; + "image/x-xcf" ) + # notify-send '123' + icon_name='image-x-xcf' + ;; + "image/jpeg" | "image/png" | "image/svg+xml") + icon_name="${CUR_DIR}/${1}" + ;; + "image/gif" ) + icon_name='gif' + ;; + "image/vnd.adobe.photoshop" ) + icon_name='image-vnd.adobe.photoshop' + ;; + "image/webp" ) + icon_name='gif' + ;; + "application/x-pie-executable" ) + icon_name='binary' + ;; + "application/pdf" ) + icon_name='pdf' + ;; + "application/zip" ) + icon_name='application-zip' + ;; + "application/x-xz" ) + icon_name='application-x-xz-compressed-tar' + ;; + "application/x-7z-compressed" ) + icon_name='application-x-7zip' + ;; + "application/x-rar" ) + icon_name='application-x-rar' + ;; + "application/octet-stream" | "application/x-iso9660-image" ) + icon_name='application-x-iso' + ;; + "application/x-dosexec" ) + icon_name='application-x-ms-dos-executable' + ;; + "text/plain" ) + icon_name='application-text' + ;; + "text/x-shellscript" ) + icon_name='application-x-shellscript' + ;; + "text/html" ) + icon_name='text-html' + ;; + "font/sfnt" | "application/vnd.ms-opentype" ) + icon_name='application-x-font-ttf' + ;; + * ) + case "${1}" in + *."docx" | *".doc" ) + icon_name='application-msword' + ;; + *."apk" ) + icon_name='android-package-archive' + ;; + * ) + icon_name='unknown' + ;; + esac + ;; + esac + + echo -en "$1\0icon\x1f$icon_name\n" +} + +export -f icon_file_type + +# Pass the argument to python script +function web_search() { + # Pass the search query to web-search script + "${MY_PATH}/web-search.py" "${1}" + exit; +} + +# Handles the web search method +if [ ! -z "$@" ] && ([[ "$@" == ":webbro"* ]] || [[ "$@" == ":wb"* ]]) +then + remove='' + [[ "$*" = ":webbro"* ]] && remove=":webbro" || remove=":wb" + + # Search directly from your web browser + web_search "$(printf '%s\n' "${1//$remove/}")" + exit; + +elif [ ! -z "$@" ] && ([[ "$@" == ":web"* ]] || [[ "$@" == ":w"* ]]) +then + remove='' + [[ "$*" = ":web"* ]] && remove=":web" || remove=":w" + + # Get search suggestions + web_search "!$(printf '%s\n' "${1//$remove/}")" + exit; +fi + +function find_query() { + QUERY=${1} + if [[ ! "${QUERY}" =~ ( |\') ]] + then + if [ -z "$FD_INSTALLED" ]; + then + find "${HOME}" -iname *"${QUERY}"* | sed "s/\/home\/$USER/\~/" | + awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}' + else + fd -H ${QUERY} ${HOME} | sed "s/\/home\/$USER/\~/" | + awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}' + fi + fi +} + +# File and calls to the web search +if [ ! -z "$@" ] && ([[ "$@" == ?(\~)/* ]] || [[ "$@" == \?* ]] || [[ "$@" == \!* ]]) +then + QUERY=$@ + + echo "${QUERY}" >> "${HIST_FILE}" + + if [[ "$@" == ?(\~)/* ]] + then + [[ "$*" = \~* ]] && QUERY="${QUERY//"~"/"$HOME"}" + + coproc ${OPENER} "${QUERY}" > /dev/null 2>&1 + exec 1>&- + exit + + elif [[ "$@" == \?* ]] + then + find_query ${QUERY#\?} + + else + # Find the file + find_query ${QUERY#!} + + # Web search + web_search "! ${QUERY#!}" + fi + exit; +fi + +# Create notification if there's an error +function create_notification() { + case "${1}" in + "denied" ) + notify-send -a "Global Search" "Permission denied!" \ + 'You have no permission to access '"${CUR_DIR}!" + ;; + "deleted" ) + notify-send -a "Global Search" "Success!" \ + 'File deleted!' + ;; + "trashed" ) + notify-send -a "Global Search" "Success!" \ + 'The file has been moved to trash!' + ;; + "cleared" ) + notify-send -a "Global Search" "Success!" \ + 'Search history has been successfully cleared!' + ;; + * ) + notify-send -a "Global Search" "Somethings wrong I can feel it!" \ + 'This incident will be reported!' + ;; + esac +} + +# Show the files in the current directory +function navigate_to() { + # process current dir. + if [ -n "${CUR_DIR}" ] + then + CUR_DIR=$(readlink -e "${CUR_DIR}") + if [ ! -d "${CUR_DIR}" ] || [ ! -r "${CUR_DIR}" ] + then + create_notification "denied" + CUR_DIR=$(realpath ${CUR_DIR} | xargs dirname) + echo "${CUR_DIR}" > "${PREV_LOC_FILE}" + else + echo "${CUR_DIR}/" > "${PREV_LOC_FILE}" + fi + pushd "${CUR_DIR}" >/dev/null || exit + fi + + printf "..\0icon\x1fup\n" + + if [[ -z "$FD_INSTALLED" ]] + then + #Group directories + if [[ ${SHOW_HIDDEN} == true ]] + then + for i in .*/ + do + [[ -d "${i}" ]] && ([[ "${i}" != "./" ]] && [[ "${i}" != "../"* ]]) && icon_file_type "${i}" + done + fi + for i in */ + do + [[ -d "${i}" ]] && icon_file_type "${i}" + done + #Group files + if [[ ${SHOW_HIDDEN} = true ]] + then + for i in .* + do + [[ -f "${i}" ]] && icon_file_type "${i}" + done + fi + for i in * + do + [[ -f "${i}" ]] && icon_file_type "${i}" + done + else + THREADS=$(getconf _NPROCESSORS_ONLN) + export CUR_DIR + if [[ ${SHOW_HIDDEN} == true ]] + then + fd -Ht d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS + fd -Ht f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS + else + fd -t d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS + fd -t f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS + fi + fi +} + +# Set XDG dir +function return_xdg_dir() { + target_dir=${1^^} + + if [[ "HOME" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir) + + elif [[ "DESKTOP" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DESKTOP) + + elif [[ "DOCUMENTS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DOCUMENTS) + + elif [[ "DOWNLOADS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir DOWNLOAD) + + elif [[ "MUSIC" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir MUSIC) + + elif [[ "PICTURES" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir PICTURES) + + elif [[ "PUBLICSHARE" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir PUBLICSHARE) + + elif [[ "TEMPLATES" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir TEMPLATES) + + elif [[ "VIDEOS" == *"${target_dir}"* ]] + then + CUR_DIR=$(xdg-user-dir VIDEOS) + + elif [[ "ROOT" == *"${target_dir}"* ]] + then + CUR_DIR="/" + + else + CUR_DIR="${HOME}" + fi + navigate_to + exit; +} + +# Show and Clear History +if [ ! -z "$@" ] && ([[ "$@" == ":sh" ]] || [[ "$@" == ":show_hist" ]]) +then + hist=$(tac "${HIST_FILE}") + + echo -en "Back\0icon\x1fdraw-arrow-back\n" + [ -z "${hist}" ] && echo -en "No History Yet\0icon\x1ftext-plain\n" + + while IFS= read -r line; + do + echo -en "${line}\0icon\x1f${MY_PATH}/icons/history.svg\n"; + done <<< "${hist}" + + exit; +elif [ ! -z "$@" ] && ([[ "$@" == ":ch" ]] || [[ "$@" == ":clear_hist" ]]) +then + :> "${HIST_FILE}" + create_notification "cleared" + + CUR_DIR="${HOME}" + navigate_to + exit; +fi + +# Accepts XDG command +if [[ ! -z "$@" ]] && [[ "$@" == ":xdg"* ]] +then + NEXT_DIR=${*//":xdg "/} + + [[ -n "$NEXT_DIR" ]] && return_xdg_dir "${NEXT_DIR}" || return_xdg_dir "${HOME}" +fi + +# Read last location, otherwise we default to PWD. +[ -f "${PREV_LOC_FILE}" ] && CUR_DIR=$(< "${PREV_LOC_FILE}") + +if [[ ! -z "$@" ]] && ([[ "$@" == ":h" ]] || [[ "$@" == ":hidden" ]]) +then + SHOW_HIDDEN=true + navigate_to + exit; +fi + +# Handle argument. +[ -n "$*" ] && CUR_DIR="${CUR_DIR}/$*" + +# Context Menu +if [ -n "$*" ] && [[ "${ALL_OPTIONS[*]} " = *"$*"* ]] +then + case "${1}" in + "Run" ) + coproc ( eval "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Execute in ${TERM_EMU}" ) + coproc ( eval "${TERM_EMU} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open" ) + coproc ( eval "${OPENER} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open file location in ${TERM_EMU}" ) + file_path="$(< ${CURRENT_FILE})" + coproc ( ${TERM_EMU} bash -c "cd ${file_path%/*} ; ${SHELL}" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Open file location in ${FILE_MANAGER}" ) + file_path="$(< "${CURRENT_FILE}")" + coproc ( eval "${FILE_MANAGER} "${file_path%/*}"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Edit" ) + coproc ( eval "${TERM_EMU} ${TEXT_EDITOR} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) + kill -9 $(pgrep rofi) + ;; + "Move to trash" ) + coproc( gio trash "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 ) + create_notification "trashed" + CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")" + navigate_to + ;; + "Delete" ) + shred "$(< ${CURRENT_FILE})" + rm "$(< ${CURRENT_FILE})" + create_notification "deleted" + CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")" + navigate_to + ;; + "Send via Bluetooth" ) + rfkill unblock bluetooth && bluetoothctl power on + sleep 1 + blueman-sendto "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 + kill -9 $(pgrep rofi) + ;; + "Back" ) + CUR_DIR="$(< ${PREV_LOC_FILE})" + navigate_to + ;; + esac + exit; +fi + +function context_menu_icons() { + + if [[ "${1}" == "Run" ]] + then + echo '\0icon\x1fsystem-run\n' + + elif [[ "${1}" == "Execute in ${TERM_EMU}" ]] + then + echo "\0icon\x1f${TERM_EMU}\n" + + elif [[ "${1}" == "Open" ]] + then + echo "\0icon\x1futilities-x-terminal\n" + + elif [[ "${1}" == "Open file location in ${TERM_EMU}" ]] + then + echo "\0icon\x1f${TERM_EMU}\n" + + elif [[ "${1}" == "Open file location in ${FILE_MANAGER}" ]] + then + echo "\0icon\x1fblue-folder-open\n" + + elif [[ "${1}" == "Edit" ]] + then + echo "\0icon\x1faccessories-text-editor\n" + + elif [[ "${1}" == "Move to trash" ]] + then + echo "\0icon\x1fapplication-x-trash\n" + + elif [[ "${1}" == "Delete" ]] + then + echo "\0icon\x1findicator-trashindicator\n" + + elif [[ "${1}" == "Send via Bluetooth" ]] + then + echo "\0icon\x1fbluetooth\n" + + elif [[ "${1}" == "Back" ]] + then + echo "\0icon\x1fback\n" + fi +} + +function print_context_menu() { + declare -a arg_arr=("${!1}") + + for menu in "${arg_arr[@]}" + do + printf "$menu$(context_menu_icons "${menu}")\n" + done +} + +function context_menu() { + + type="$(file --mime-type -b "${CUR_DIR}")" + + if [ -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]] + then + if [ -x "${CUR_DIR}" ]; + then + print_context_menu SHELL_OPTIONS[@] + else + print_context_menu SHELL_NO_X_OPTIONS[@] + fi + + elif [[ "${type}" == "application/x-executable" ]] || [[ "${type}" == "application/x-pie-executable" ]] + then + if [ -x "${CUR_DIR}" ] + then + print_context_menu BIN_OPTIONS[@] + else + print_context_menu BIN_NO_X_OPTIONS[@] + fi + + elif [[ "${type}" == "text/plain" ]] + then + print_context_menu TEXT_OPTIONS[@] + + elif [[ "${type}" == "text/html" ]] + then + print_context_menu HTML_OPTIONS[@] + + elif [[ "${type}" == "image/jpeg" ]] || [[ "${type}" == "image/png" ]] + then + print_context_menu IMAGE_OPTIONS[@] + + elif [[ "${type}" == "image/x-xcf" ]] || [[ "${type}" == "image/svg+xml" ]] + then + print_context_menu XCF_SVG_OPTIONS[@] + + elif [ ! -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]] + then + coproc ( exec "${CUR_DIR}" & > /dev/null 2>&1 ) + + else + if [ ! -d "${CUR_DIR}" ] && [ ! -f "${CUR_DIR}" ] + then + QUERY="${CUR_DIR//*\/\//}" + + echo "${QUERY}" >> "${HIST_FILE}" + + find_query "${QUERY#!}" + + web_search "!${QUERY}" + else + coproc ( ${OPENER} "${CUR_DIR}" & > /dev/null 2>&1 ) + fi + fi + exit; +} + +# If argument is not a directory/folder +if [ ! -d "${CUR_DIR}" ] +then + echo "${CUR_DIR}" > "${CURRENT_FILE}" + context_menu + exit; +fi + +navigate_to diff --git a/dot-config/rofi/global/rofi.rasi b/dot-config/rofi/global/rofi.rasi new file mode 100644 index 00000000..819fc2b7 --- /dev/null +++ b/dot-config/rofi/global/rofi.rasi @@ -0,0 +1,162 @@ +configuration { + font: "Inter Regular 10"; + sidebar-mode: true; + show-icons: true; + icon-theme: "Nordzy"; + fullscreen: false; + threads: 0; + matching: "fuzzy"; + scroll-method: 0; + monitor: "primary"; +} + +* { + transparent: #00000000; + foreground: #F2F2F2EE; + background-selected: #F2F2F245; + background-active: #F2F2F230; + background-white: #F2F2F211; + background-black: #00000000; + urgent: #E91E6366; + urgent-selected: #E91E6377; +} + +window { + transparency: "real"; + background-color: #1917244D; + text-color: #6e6a86; + location: west; + anchor: west; + x-offset: 5px; + y-offset: -50px; + height: 70%; + width: 350px; + orientation: vertical; +} + +prompt { + enabled: false; +} + +button { + action: "ok"; + str: " "; + font: "FantasqueSansMono Nerd Font 16"; + expand: false; + text-color: #6e6a86; + background-color: @transparent; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +entry { + font: "Inter Regular 12"; + background-color: @transparent; + text-color: #6e6a86; + expand: true; + vertical-align: 0.5; + horizontal-align: 0; + placeholder: "Global Search"; + placeholder-color: @foreground; + blink: true; +} + +entry-wrapper { + orientation: horizontal; + margin: 0 12px 0 12px; + spacing: 24px; + vertical-align: 0.5; + background-color: @transparent; + children: [ button, entry ]; +} + +inputbar { + padding: 14px; + margin: 10px 10px 14px 10px; + background-color: #26233a; + text-color: @foreground; + expand: false; + border-radius: 9px; + position: north; + children: [ entry-wrapper ]; +} + +listview { + background-color: @transparent; + spacing: 0; + cycle: true; + dynamic: true; + scrollbar: true; +} + +mainbox { + width: 200px; + expand: true; + spacing: 12px; + padding: 5px; + background-color: @background-black; + children: [ inputbar, listview ]; +} + +scrollbar { + background-color: @background-white; + handle-width: 0; + margin: 0 0 5px 0; + border-radius: 9px; +} + +element { + background-color: @transparent; + text-color: @foreground; + orientation: horizontal; + border: 0; + border-color: @background-white; + border-radius: 6px; + spacing: 24px; + margin: 0px 12px 0px 12px; + padding: 10px 24px 10px 24px; +} + +element-icon { + size: 24px; + border: 0; + border-color: @transparent; + background-color: transparent; +} + +element-text { + font: "Inter Regular 11"; + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + color: #6e6a86; + background-color: transparent; +} + +element normal.urgent, +element alternate.urgent { + background-color: @urgent; + text-color: @foreground; + border-radius: 9px; +} + +element normal.active, +element alternate.active { + background-color: @background-active; + text-color: @foreground; +} + +element selected { + background-color: #403d5220; + text-color: @foreground; +} + +element selected.urgent { + background-color: @urgent-selected; + text-color: @foreground; +} + +element selected.active { + background-color: #403d5220; + color: @foreground-selected; +} \ No newline at end of file diff --git a/dot-config/rofi/global/web-search.py b/dot-config/rofi/global/web-search.py new file mode 100755 index 00000000..ba314d59 --- /dev/null +++ b/dot-config/rofi/global/web-search.py @@ -0,0 +1,167 @@ +#!/usr/bin/env python3 + +# MIT License + +# Copyright (c) 2019 Paolo Donadeo + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + +import json +import re +import urllib.parse +import urllib.request +import sys +import os +import datetime +import gzip + +import subprocess as sp + +import html + + +################################################################################ +##### C O N F I G U R A T I O N ###### +################################################################################ +SEARCH_ENGINE = 'google' # or 'duckduckgo' +BROWSER = 'firefox' # or 'firefox', 'chromium', 'brave', 'lynx' +TERMINAL = ['kitty', '--'] # or ['st', '-e'] or something like that +################################################################################ + +CONFIG = { + 'BROWSER_PATH' : { + 'chrome' : ['google-chrome-stable'], + 'firefox' : ['firefox'], + 'chromium' : ['chromium-browser'], + 'brave' : ['brave-browser'], + 'lynx' : TERMINAL + ['lynx'] + }, + 'USER_AGENT' : { + 'chrome' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + 'firefox' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0', + 'chromium' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36', + 'brave' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36', + 'lynx' : 'Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.1.1d' + }, + 'SEARCH_ENGINE_NAME' : { + 'google' : 'Google', + 'duckduckgo' : 'DuckDuckGo' + }, + 'SEARCH_URL' : { + 'google' : 'https://www.google.com/search?q=', + 'duckduckgo' : 'https://duckduckgo.com/?q=' + }, + 'SUGGESTION_URL' : { + 'google' : 'https://www.google.com/complete/search?', + 'duckduckgo' : 'https://duckduckgo.com/ac/?' + } +} + +def cleanhtml(txt): + return re.sub(r'<.*?>', '', txt) + +def fetch_suggestions(search_string): + if SEARCH_ENGINE == 'google': + r = { + 'q' : search_string, + 'cp' : '11', + 'client' : 'psy-ab', + 'xssi' : 't', + 'gs_ri' : 'gws-wiz', + 'hl' : 'en-IT', + 'authuser' : '0' + } + url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r) + headers = { + 'sec-fetch-mode' : 'cors', + 'dnt' : '1', + 'accept-encoding' : 'gzip', + 'accept-language' : 'en-US;q=0.9,en;q=0.8', + 'pragma' : 'no-cache', + 'user-agent' : CONFIG['USER_AGENT'][BROWSER], + 'accept' : '*/*', + 'cache-control' : 'no-cache', + 'authority' : 'www.google.com', + 'referer' : 'https://www.google.com/', + 'sec-fetch-site' : 'same-origin' + } + req = urllib.request.Request(url, headers=headers, method='GET') + + reply_data = gzip.decompress(urllib.request.urlopen(req).read()).split(b'\n')[1] + reply_data = json.loads(reply_data) + return [ cleanhtml(res[0]).strip() for res in reply_data[0] ] + else: # 'duckduckgo' + if search_string.startswith('!'): + bang_search = True + search_string = search_string.lstrip('!') + else: + bang_search = False + r = { + 'q' : search_string, + 'callback' : 'autocompleteCallback', + 'kl' : 'wt-wt', + '_' : str(int((datetime.datetime.now().timestamp())*1000)) + } + url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r) + if bang_search: + url = url.replace('?q=', '?q=!') + headers = { + 'pragma' : 'no-cache', + 'dnt' : '1', + 'accept-encoding' : 'gzip', + 'accept-language' : 'en-US;q=0.9,en;q=0.8', + 'user-agent' : CONFIG['USER_AGENT'][BROWSER], + 'sec-fetch-mode' : 'no-cors', + 'accept' : '*/*', + 'cache-control' : 'no-cache', + 'authority' : 'duckduckgo.com', + 'referer' : 'https://duckduckgo.com/', + 'sec-fetch-site' : 'same-origin', + } + req = urllib.request.Request(url, headers=headers, method='GET') + reply_data = gzip.decompress(urllib.request.urlopen(req).read()).decode('utf8') + reply_data = json.loads(re.match(r'autocompleteCallback\((.*)\);', reply_data).group(1)) + return [ cleanhtml(res['phrase']).strip() for res in reply_data ] + +def main(): + search_string = html.unescape((' '.join(sys.argv[1:])).strip()) + + path_str = os.path.dirname(os.path.realpath(__file__)) + '/' + icon_path_str = path_str + 'icons/' + icon_name = icon_path_str + + if SEARCH_ENGINE == 'google': + icon_name += 'google.svg' + else: + icon_name += 'ddg.svg' + + if search_string.startswith('!'): + search_string = search_string.rstrip('!').strip() + results = fetch_suggestions(search_string) + for r in results: + print(":wb " + html.unescape(r) + "\0icon\x1f"+icon_name+"\n") + else: + url = CONFIG['SEARCH_URL'][SEARCH_ENGINE] + urllib.parse.quote_plus(search_string) + sp.Popen(CONFIG['BROWSER_PATH'][BROWSER] + [url], stdout=sp.DEVNULL, stderr=sp.DEVNULL, shell=False) + +if __name__ == "__main__": + try: + main() + except Exception as e: + if e: + sys.exit(1) diff --git a/dot-config/rofi/launcher.rasi b/dot-config/rofi/launcher.rasi new file mode 100644 index 00000000..9dacccb2 --- /dev/null +++ b/dot-config/rofi/launcher.rasi @@ -0,0 +1,302 @@ +/*****----- Configuration -----*****/ +configuration { + modi: "drun,run,file-browser-extended,window"; + show-icons: true; + display-drun: " Apps"; + display-run: " Run"; + display-file-browser-extended: " Files"; + display-window: " Windows"; + drun-display-format: "{name}"; + window-format: "{c} · {t}"; +} + +/*****----- 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: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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", "mode-switcher" ]; +} + +/*****----- 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: 7; + 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: 0px; + 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 6px 6px 6px 6px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/music.rasi b/dot-config/rofi/music.rasi new file mode 100644 index 00000000..e62fc74e --- /dev/null +++ b/dot-config/rofi/music.rasi @@ -0,0 +1,147 @@ +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.rasi" + +/* +USE_ICON=YES +*/ + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 600px; + x-offset: 0px; + y-offset: 0px; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + border-color: @selected; + cursor: "default"; + background-color: @background; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 20px; + background-color: transparent; + children: [ "inputbar", "message", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + padding: 0px; + border: 0px; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt"]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + padding: 10px 14px; + border-radius: 0px; + background-color: @active; + text-color: @background; +} +prompt { + enabled: true; + padding: 10px; + border-radius: 0px; + background-color: @selected; + text-color: @background; +} + +/*****----- Message -----*****/ +message { + enabled: true; + margin: 0px; + padding: 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; +} +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 6; + lines: 1; + cycle: true; + scrollbar: false; + layout: vertical; + + spacing: 10px; + background-color: transparent; + cursor: "default"; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + padding: 22px 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element-text { + font: "feather 20"; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +element normal.normal, +element alternate.normal { + border: 1px solid; + border-radius: 0px; + border-color: @selected; + background-color: var(background); + text-color: var(foreground); +} +element normal.urgent, +element alternate.urgent, +element selected.active { + background-color: var(urgent); + text-color: var(background); +} +element normal.active, +element alternate.active, +element selected.urgent { + background-color: var(active); + text-color: var(background); +} +element selected.normal { + background-color: var(selected); + text-color: var(background); +} diff --git a/dot-config/rofi/networkmenu.rasi b/dot-config/rofi/networkmenu.rasi new file mode 100644 index 00000000..257b60c6 --- /dev/null +++ b/dot-config/rofi/networkmenu.rasi @@ -0,0 +1,302 @@ +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- 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: 500px; + height: 475px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + children: [ "textbox-prompt-colon", "prompt", "entry" ]; +} + +prompt { + enabled: true; + padding: 8px 12px; + border-radius: 0px; + background-color: @selected; + --text-color: @background; + text-color: @foreground-colour; +} +textbox-prompt-colon { + enabled: true; + padding: 8px 11.5px; + border-radius: 0px; + expand: false; + str: "直"; + background-color: @active; + --text-color: @background; + text-color: @foreground-colour; +} +entry { + enabled: true; + padding: 8px 12px; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: inherit; + cursor: text; + placeholder: ""; + 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: 6; + 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: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 8px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 5px 10px; + border: 0px solid; + border-radius: 8px; + 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 10px; + border: 0px solid; + border-radius: 8px; + 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: 15px; + border: 0px solid; + border-radius: 10px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/powermenu.rasi b/dot-config/rofi/powermenu.rasi new file mode 100644 index 00000000..0976836a --- /dev/null +++ b/dot-config/rofi/powermenu.rasi @@ -0,0 +1,147 @@ +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.rasi" + +/* +USE_ICON=YES +*/ + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 700px; + x-offset: 0px; + y-offset: 0px; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + border-color: @selected; + cursor: "default"; + background-color: @background; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 20px; + background-color: transparent; + children: [ "inputbar", "message", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + padding: 0px; + border: 0px; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt"]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + padding: 10px 14px; + border-radius: 0px; + background-color: @active; + text-color: @background; +} +prompt { + enabled: true; + padding: 10px; + border-radius: 0px; + background-color: @selected; + text-color: @background; +} + +/*****----- Message -----*****/ +message { + enabled: true; + margin: 0px; + padding: 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; +} +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 7; + lines: 1; + cycle: true; + scrollbar: false; + layout: vertical; + + spacing: 10px; + background-color: transparent; + cursor: "default"; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + padding: 22px 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element-text { + font: "feather 20"; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +element normal.normal, +element alternate.normal { + border: 1px solid; + border-radius: 0px; + border-color: @selected; + background-color: var(background); + text-color: var(foreground); +} +element normal.urgent, +element alternate.urgent, +element selected.active { + background-color: var(urgent); + text-color: var(background); +} +element normal.active, +element alternate.active, +element selected.urgent { + background-color: var(active); + text-color: var(background); +} +element selected.normal { + background-color: var(selected); + text-color: var(background); +} diff --git a/dot-config/rofi/powermenu/powermenu.rasi b/dot-config/rofi/powermenu/powermenu.rasi new file mode 100644 index 00000000..41fc9108 --- /dev/null +++ b/dot-config/rofi/powermenu/powermenu.rasi @@ -0,0 +1,93 @@ +configuration { + font: "JetBrainsMono Nerd Font 36"; + drun-display-format: "{name}"; + fullscreen: false; + threads: 0; + matching: "fuzzy"; + scroll-method: 0; + disable-history: false; + fullscreen: true; +} + +* { + transparent: #00000000; + foreground: #F2F2F2EE; + background-selected: #F2F2F245; + background-active: #F2F2F230; + background-white: #F2F2F211; + background-black: #00000066; + urgent: #E91E6366; + urgent-selected: #E91E6377; +} + +window { + transparency: "real"; + background-color: @transparent; + text-color: @foreground; + location: northwest; + anchor: northwest; +} + +inputbar { + margin: 0; + padding: 0; + children: [ entry-wrapper ]; +} + +listview { + background-color: @transparent; + lines: 6; + spacing: 5%; + cycle: false; + dynamic: true; + layout: horizontal; +} + +mainbox { + background-color: @background-black; + children: [ inputbar, listview ]; + padding: calc(50% - 70px) 0% 0% 15%; +} + +element { + background-color: @transparent; + text-color: @foreground; + orientation: horizontal; + border-radius: 10px; + padding: 30px; + vertical: 0.5; +} + +element-text { + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; +} + +element normal.urgent, +element alternate.urgent { + background-color: @urgent; + text-color: @foreground; + border-radius: 9px; +} + +element normal.active, +element alternate.active { + background-color: @background-active; + text-color: @foreground; +} + +element selected { + background-color: #29B6F6; + text-color: #212121; +} + +element selected.urgent { + background-color: @urgent-selected; + text-color: @foreground; +} + +element selected.active { + background-color: @background-active; + color: @foreground-selected; +} diff --git a/dot-config/rofi/runner.rasi b/dot-config/rofi/runner.rasi new file mode 100644 index 00000000..05a09f19 --- /dev/null +++ b/dot-config/rofi/runner.rasi @@ -0,0 +1,300 @@ +/*****----- Configuration -----*****/ +configuration { + modi: "run"; + show-icons: true; + display-drun: " Apps"; + display-run: " Run"; + display-filebrowser: " Files"; + display-window: " Windows"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; +} + +/*****----- 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: 500px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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: 0px; + 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: "Run..."; + 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: 6; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 6px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/screenshot.rasi b/dot-config/rofi/screenshot.rasi new file mode 100644 index 00000000..08f6b661 --- /dev/null +++ b/dot-config/rofi/screenshot.rasi @@ -0,0 +1,147 @@ +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.rasi" + +/* +USE_ICON=YES +*/ + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 500px; + x-offset: 0px; + y-offset: 0px; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + border-color: @selected; + cursor: "default"; + background-color: @background; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 20px; + background-color: transparent; + children: [ "inputbar", "message", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + padding: 0px; + border: 0px; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt"]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + padding: 10px 12px; + border-radius: 0px; + background-color: @active; + text-color: @background; +} +prompt { + enabled: true; + padding: 10px; + border-radius: 0px; + background-color: @selected; + text-color: @background; +} + +/*****----- Message -----*****/ +message { + enabled: true; + margin: 0px; + padding: 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; +} +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 5; + lines: 1; + cycle: true; + scrollbar: false; + layout: vertical; + + spacing: 10px; + background-color: transparent; + cursor: "default"; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + padding: 22px 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element-text { + font: "feather 20"; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +element normal.normal, +element alternate.normal { + border: 1px solid; + border-radius: 0px; + border-color: @selected; + background-color: var(background); + text-color: var(foreground); +} +element normal.urgent, +element alternate.urgent, +element selected.active { + background-color: var(urgent); + text-color: var(background); +} +element normal.active, +element alternate.active, +element selected.urgent { + background-color: var(active); + text-color: var(background); +} +element selected.normal { + background-color: var(selected); + text-color: var(background); +} diff --git a/dot-config/rofi/scripts/emoji b/dot-config/rofi/scripts/emoji new file mode 100755 index 00000000..dcc641ee --- /dev/null +++ b/dot-config/rofi/scripts/emoji @@ -0,0 +1,5 @@ +#!/bin/bash + +DIR="$HOME/.config" + +rofi -show emoji -modi emoji -theme $DIR/rofi/Themes/emojis.rasi diff --git a/dot-config/rofi/scripts/powermenu.sh b/dot-config/rofi/scripts/powermenu.sh new file mode 100755 index 00000000..ac311732 --- /dev/null +++ b/dot-config/rofi/scripts/powermenu.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/styles" +rofi_command="rofi -theme $dir/five.rasi" + +uptime=$(uptime -p | sed -e 's/up //g') + +# Options +shutdown="" +reboot="" +lock="" +suspend="" +logout="" + +# Confirmation +confirm_exit() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "Are You Sure? : "\ + -theme $dir/confirm.rasi +} + +# Message +msg() { + rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n" +} + +# Variable passed to rofi +options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" + +chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 2)" +case $chosen in + $shutdown) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + loginctl poweroff + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $reboot) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + loginctl reboot + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $lock) + if [[ -f /usr/bin/i3lock ]]; then + i3lock + elif [[ -f /usr/bin/betterlockscreen ]]; then + betterlockscreen -l + fi + ;; + $suspend) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + loginctl suspend + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $logout) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + if [[ "$DESKTOP_SESSION" == "/usr/share/xsessions/voidwm" ]]; then + pkill dwm + elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then + bspc quit + elif [[ "$DESKTOP_SESSION" == "/usr/share/xsessions/i3" ]]; then + i3-msg exit + elif [[ "$DESKTOP_SESSION" == "/usr/local/bin/dwm" ]]; then + pkill dwm + elif [[ "$DESKTOP_SESSION" == "awesome" ]]; then + pkill awesome + else + pkill Hyprland + fi + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; +esac diff --git a/dot-config/rofi/scripts/rofi_askpass b/dot-config/rofi/scripts/rofi_askpass new file mode 100755 index 00000000..69c9d115 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_askpass @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/askpass.rasi" + +# Rofi text dialog to get password +rofi -dmenu \ + -password \ + -i \ + -p "Root" \ + -theme ${RASI} diff --git a/dot-config/rofi/scripts/rofi_asroot b/dot-config/rofi/scripts/rofi_asroot new file mode 100755 index 00000000..1fe2a5b0 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_asroot @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/asroot.rasi" + +# Theme Elements +prompt='Root' +mesg="Run Applications As Root" +term='alacritty --class alacritty-float,alacritty-float --config-file /root/.config/bspwm/alacritty/alacritty.yml' + +# Options +layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2` +if [[ "$layout" == 'NO' ]]; then + option_1=" Alacritty" + option_2=" Thunar" + option_3=" Geany" + option_4=" Ranger" + option_5=" Vim" +else + option_1="" + option_2="" + option_3="" + option_4="" + option_5="" +fi + +# Rofi CMD +rofi_cmd() { + rofi -dmenu \ + -p "$prompt" \ + -mesg "$mesg" \ + -markup-rows \ + -theme ${RASI} +} + +# Pass variables to rofi dmenu +run_rofi() { + echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5" | rofi_cmd +} + +# Execute Command +run_cmd() { + if [[ "$1" == '--opt1' ]]; then + bspasroot "$term" + elif [[ "$1" == '--opt2' ]]; then + bspasroot 'dbus-run-session thunar' + elif [[ "$1" == '--opt3' ]]; then + bspasroot geany + #bspasroot code + elif [[ "$1" == '--opt4' ]]; then + bspasroot "$term -e ranger" + elif [[ "$1" == '--opt5' ]]; then + bspasroot "$term -e lvim" + fi +} + +# Actions +chosen="$(run_rofi)" +case ${chosen} in + $option_1) + run_cmd --opt1 + ;; + $option_2) + run_cmd --opt2 + ;; + $option_3) + run_cmd --opt3 + ;; + $option_4) + run_cmd --opt4 + ;; + $option_5) + run_cmd --opt5 + ;; +esac diff --git a/dot-config/rofi/scripts/rofi_clip b/dot-config/rofi/scripts/rofi_clip new file mode 100755 index 00000000..2cfd75e6 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_clip @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +#export CM_LAUNCHER=rofi +#export CM_DIR="$XDG_CONFIG_HOME" +DIR="$HOME/.config/rofi" +RASI="$DIR/clipboard.rasi" +mesg="Clipboard History" +clipmenu -i -fn Terminus:size=15 -nb '#002b36' -nf '#839496' -sb '#073642' -sf '#93a1a1' -theme ${RASI} -mesg $mesg diff --git a/dot-config/rofi/scripts/rofi_configs b/dot-config/rofi/scripts/rofi_configs new file mode 100755 index 00000000..995e8821 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_configs @@ -0,0 +1,129 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/configs.rasi" + +# Theme Elements +mesg="Select configs" + +# Options +option_1="ZSH profile(zshrc)" +option_2="ZSH environment(zshenv)" +option_3="BSPWM autostart(bspwmrc)" +option_4="BSPWM hotkey(sxhkdrc)" +option_5="Polybar config" +option_6="Polybar module" +option_7="Alacritty main config" +option_8="Picom config" +option_9="Directorys" +option_10=".config" +option_11=".local" +option_12="ZSH" +option_13="BSPWM" +option_14="Polybar" +option_15="BPWM-Scripts" +option_16="Scripts" +#option_17="Neovim(lvim)" + +# Rofi CMD +rofi_cmd() { + rofi -dmenu \ + -mesg "$mesg" \ + -case-sensitive \ + -i \ + -markup-rows \ + -theme ${RASI} +} + +# Pass variables to rofi dmenu +run_rofi() { + echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6\n$option_7\n$option_8\n$option_9\n$option_10\n$option_11\n$option_12\n$option_13\n$option_14\n$option_15\n$option_16" | rofi_cmd +} + +# Execute Command +run_cmd() { + if [[ "$1" == '--opt1' ]]; then + alacritty --class 'alacritty-float,alacritty-float' --command lvim $HOME/.zshrc + elif [[ "$1" == '--opt2' ]]; then + alacritty --class 'alacritty-float,alacritty-float' --command lvim $HOME/.zshenv + elif [[ "$1" == '--opt3' ]]; then + alacritty --class 'alacritty-float,alacritty-float' --command lvim $HOME/.config/bspwm/bspwmrc + elif [[ "$1" == '--opt4' ]]; then + alacritty --class 'alacritty-float,alacritty-float' --command lvim $HOME/.config/bspwm/sxhkdrc + elif [[ "$1" == '--opt5' ]]; then + alacritty --class 'alacritty-float,alacritty-float' --command lvim $HOME/.config/polybar/config.ini + elif [[ "$1" == '--opt6' ]]; then + alacritty --class 'alacritty-float,alacritty-float' --command lvim $HOME/.config/polybar/modules.ini + elif [[ "$1" == '--opt7' ]]; then + alacritty --class 'alacritty-float,alacritty-float' --command lvim $HOME/.config/alacritty/alacritty.toml + elif [[ "$1" == '--opt8' ]]; then + alacritty --class 'alacritty-float,alacritty-float' --command lvim $HOME/.config/picom.conf + elif [[ "$1" == '--opt10' ]]; then + rofi -show file-browser-extended -theme $HOME/.config/rofi/filebrowser.rasi -file-browser-dir $HOME/.config + elif [[ "$1" == '--opt11' ]]; then + rofi -show file-browser-extended -theme $HOME/.config/rofi/filebrowser.rasi -file-browser-dir $HOME/.local/share + elif [[ "$1" == '--opt12' ]]; then + rofi -show file-browser-extended -theme $HOME/.config/rofi/filebrowser.rasi -file-browser-dir $HOME/.config/zsh + elif [[ "$1" == '--opt13' ]]; then + rofi -show file-browser-extended -theme $HOME/.config/rofi/filebrowser.rasi -file-browser-dir $HOME/.config/bspwm + elif [[ "$1" == '--opt14' ]]; then + rofi -show file-browser-extended -theme $HOME/.config/rofi/filebrowser.rasi -file-browser-dir $HOME/.config/polybar + elif [[ "$1" == '--opt15' ]]; then + rofi -show file-browser-extended -theme $HOME/.config/rofi/filebrowser.rasi -file-browser-dir $HOME/.config/bspwm/scripts + elif [[ "$1" == '--opt16' ]]; then + rofi -show file-browser-extended -theme $HOME/.config/rofi/filebrowser.rasi -file-browser-dir $HOME/scripts + elif [[ "$1" == '--opt17' ]]; then + rofi -show file-browser-extended -theme $HOME/.config/rofi/filebrowser.rasi -file-browser-dir $HOME/.config/lvim + fi +} + +# Actions +chosen="$(run_rofi)" +case ${chosen} in + $option_1) + run_cmd --opt1 + ;; + $option_2) + run_cmd --opt2 + ;; + $option_3) + run_cmd --opt3 + ;; + $option_4) + run_cmd --opt4 + ;; + $option_5) + run_cmd --opt5 + ;; + $option_6) + run_cmd --opt6 + ;; + $option_7) + run_cmd --opt7 + ;; + $option_8) + run_cmd --opt8 + ;; + $option_10) + run_cmd --opt10 + ;; + $option_11) + run_cmd --opt11 + ;; + $option_12) + run_cmd --opt12 + ;; + $option_13) + run_cmd --opt13 + ;; + $option_14) + run_cmd --opt14 + ;; + $option_15) + run_cmd --opt15 + ;; + $option_16) + run_cmd --opt16 + ;; +esac diff --git a/dot-config/rofi/scripts/rofi_emoji b/dot-config/rofi/scripts/rofi_emoji new file mode 100755 index 00000000..60f03e0c --- /dev/null +++ b/dot-config/rofi/scripts/rofi_emoji @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/emoji.rasi" + +# Run +rofi \ + -show emoji \ + -theme ${RASI} diff --git a/dot-config/rofi/scripts/rofi_filebrowser b/dot-config/rofi/scripts/rofi_filebrowser new file mode 100755 index 00000000..a8faec9e --- /dev/null +++ b/dot-config/rofi/scripts/rofi_filebrowser @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/filebrowser.rasi" + +# Run +rofi \ + -show file-browser-extended \ + -theme ${RASI} \ + "$@" diff --git a/dot-config/rofi/scripts/rofi_launcher b/dot-config/rofi/scripts/rofi_launcher new file mode 100755 index 00000000..399c9419 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_launcher @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/launcher.rasi" + +# Run +rofi \ + -show drun \ + -theme ${RASI} diff --git a/dot-config/rofi/scripts/rofi_music b/dot-config/rofi/scripts/rofi_music new file mode 100755 index 00000000..9f71440b --- /dev/null +++ b/dot-config/rofi/scripts/rofi_music @@ -0,0 +1,116 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/music.rasi" + +# Theme Elements +status="`mpc status`" +if [[ -z "$status" ]]; then + prompt='Offline' + mesg="MPD is Offline" +else + prompt="`mpc -f "%artist%" current`" + mesg="`mpc -f "%title%" current` :: `mpc status | grep "#" | awk '{print $3}'`" +fi + +# Options +layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2` +if [[ "$layout" == 'NO' ]]; then + if [[ ${status} == *"[playing]"* ]]; then + option_1=" Pause" + else + option_1=" Play" + fi + option_2=" Stop" + option_3=" Previous" + option_4=" Next" + option_5=" Repeat" + option_6=" Random" +else + if [[ ${status} == *"[playing]"* ]]; then + option_1="" + else + option_1="" + fi + option_2="" + option_3="" + option_4="" + option_5="" + option_6="" +fi + +# Toggle Actions +active='' +urgent='' +# Repeat +if [[ ${status} == *"repeat: on"* ]]; then + active="-a 4" +elif [[ ${status} == *"repeat: off"* ]]; then + urgent="-u 4" +else + option_5=" Parsing Error" +fi +# Random +if [[ ${status} == *"random: on"* ]]; then + [ -n "$active" ] && active+=",5" || active="-a 5" +elif [[ ${status} == *"random: off"* ]]; then + [ -n "$urgent" ] && urgent+=",5" || urgent="-u 5" +else + option_6=" Parsing Error" +fi + +# Rofi CMD +rofi_cmd() { + rofi -dmenu \ + -p "$prompt" \ + -mesg "$mesg" \ + ${active} ${urgent} \ + -markup-rows \ + -theme ${RASI} +} + +# Pass variables to rofi dmenu +run_rofi() { + echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6" | rofi_cmd +} + +# Execute Command +run_cmd() { + if [[ "$1" == '--opt1' ]]; then + mpc -q toggle && kunst --size 60x60 --silent + elif [[ "$1" == '--opt2' ]]; then + mpc -q stop + elif [[ "$1" == '--opt3' ]]; then + mpc -q prev && kunst --size 60x60 --silent + elif [[ "$1" == '--opt4' ]]; then + mpc -q next && kunst --size 60x60 --silent + elif [[ "$1" == '--opt5' ]]; then + mpc -q repeat + elif [[ "$1" == '--opt6' ]]; then + mpc -q random + fi +} + +# Actions +chosen="$(run_rofi)" +case ${chosen} in + $option_1) + run_cmd --opt1 + ;; + $option_2) + run_cmd --opt2 + ;; + $option_3) + run_cmd --opt3 + ;; + $option_4) + run_cmd --opt4 + ;; + $option_5) + run_cmd --opt5 + ;; + $option_6) + run_cmd --opt6 + ;; +esac diff --git a/dot-config/rofi/scripts/rofi_powermenu b/dot-config/rofi/scripts/rofi_powermenu new file mode 100755 index 00000000..3fa27e93 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_powermenu @@ -0,0 +1,244 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/powermenu.rasi" +CNFR="$DIR/confirm.rasi" + +# Theme Elements +prompt="`hostname` (`echo $DESKTOP_SESSION`)" +mesg="Uptime : `uptime -p | sed -e 's/up //g'`" + +# Options +layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2` +if [[ "$layout" == 'NO' ]]; then + option_1=" Lock" + option_2=" Logout" + option_3=" Suspend" + option_4=" Hibernate" + option_5="🔳Hybrid-sleep" + option_6=" Reboot" + option_7=" Shutdown" +else + option_1="" + option_2="" + option_3="" + option_4="" + option_5="🔳" + option_6="" + option_7="" +fi +cnflayout=`cat ${CNFR} | grep 'USE_ICON' | cut -d'=' -f2` +if [[ "$cnflayout" == 'NO' ]]; then + yes=' Yes' + no=' No' +else + yes='' + no='' +fi + +# Rofi CMD +rofi_cmd() { + rofi -dmenu \ + -p "$prompt" \ + -mesg "$mesg" \ + -markup-rows \ + -theme ${RASI} +} + +# Pass variables to rofi dmenu +run_rofi() { + echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6\n$option_7" | rofi_cmd +} + +# Confirmation CMD +confirm_cmd() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg 'Are you Sure?' \ + -theme ${CNFR} +} + +confirm_cmd2() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg "Logout?" \ + -theme ${CNFR} +} + +confirm_cmd3() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg "Sleep/Suspend?" \ + -theme ${CNFR} +} + +confirm_cmd4() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg "Hibernate?" \ + -theme ${CNFR} +} + +confirm_cmd5() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg "Hybrid Sleep?" \ + -theme ${CNFR} +} + +confirm_cmd6() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg "Reboot?" \ + -theme ${CNFR} +} + +confirm_cmd7() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg "Shutdown?" \ + -theme ${CNFR} +} + + +# Ask for confirmation +confirm_exit() { + echo -e "$yes\n$no" | confirm_cmd +} + +confirm_exit2() { + echo -e "$yes\n$no" | confirm_cmd2 +} + +confirm_exit3() { + echo -e "$yes\n$no" | confirm_cmd3 +} + +confirm_exit4() { + echo -e "$yes\n$no" | confirm_cmd4 +} + +confirm_exit5() { + echo -e "$yes\n$no" | confirm_cmd5 +} + +confirm_exit6() { + echo -e "$yes\n$no" | confirm_cmd6 +} + +confirm_exit7() { + echo -e "$yes\n$no" | confirm_cmd7 +} + +# Confirm and execute +confirm_run () { + selected="$(confirm_exit)" + if [[ "$selected" == "$yes" ]]; then + ${1} && ${2} && ${3} + else + exit + fi +} + + +confirm_run2 () { + selected="$(confirm_exit2)" + if [[ "$selected" == "$yes" ]]; then + ${1} && ${2} && ${3} + else + exit + fi +} + +confirm_run3 () { + selected="$(confirm_exit3)" + if [[ "$selected" == "$yes" ]]; then + ${1} && ${2} && ${3} + else + exit + fi +} + +confirm_run4 () { + selected="$(confirm_exit4)" + if [[ "$selected" == "$yes" ]]; then + ${1} && ${2} && ${3} + else + exit + fi +} + +confirm_run5 () { + selected="$(confirm_exit5)" + if [[ "$selected" == "$yes" ]]; then + ${1} && ${2} && ${3} + else + exit + fi +} + +confirm_run6 () { + selected="$(confirm_exit6)" + if [[ "$selected" == "$yes" ]]; then + ${1} && ${2} && ${3} + else + exit + fi +} + + +confirm_run7 () { + selected="$(confirm_exit7)" + if [[ "$selected" == "$yes" ]]; then + ${1} && ${2} && ${3} + else + exit + fi +} + + +# Execute Command +run_cmd() { + if [[ "$1" == '--opt1' ]]; then + betterlockscreen --lock + elif [[ "$1" == '--opt2' ]]; then + confirm_run2 'bspc quit' + elif [[ "$1" == '--opt3' ]]; then + confirm_run3 'mpc -q pause' 'systemctl suspend' #'betterlockscreen --suspend' 'pulsemixer --unmute' # 'pulsemixer --mute' + elif [[ "$1" == '--opt4' ]]; then + confirm_run4 'systemctl hibernate' + elif [[ "$1" == '--opt5' ]]; then + confirm_run5 'systemctl hybrid-sleep' + elif [[ "$1" == '--opt6' ]]; then + confirm_run6 'systemctl reboot' + elif [[ "$1" == '--opt7' ]]; then + confirm_run7 'systemctl poweroff' + fi +} + +# Actions +chosen="$(run_rofi)" +case ${chosen} in + $option_1) + run_cmd --opt1 + ;; + $option_2) + run_cmd --opt2 + ;; + $option_3) + run_cmd --opt3 + ;; + $option_4) + run_cmd --opt4 + ;; + $option_5) + run_cmd --opt5 + ;; + $option_6) + run_cmd --opt6 + ;; + $option_7) + run_cmd --opt7 + ;; +esac diff --git a/dot-config/rofi/scripts/rofi_runner b/dot-config/rofi/scripts/rofi_runner new file mode 100755 index 00000000..0a4c4963 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_runner @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/custom_command.rasi" + +# Rofi text dialog to get password +sh -c "$(rofi -dmenu \ + -i \ + -p 'Command' \ + -theme ${RASI})" diff --git a/dot-config/rofi/scripts/rofi_screenshot b/dot-config/rofi/scripts/rofi_screenshot new file mode 100755 index 00000000..f5a1c3d7 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_screenshot @@ -0,0 +1,139 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/screenshot.rasi" + +# Theme Elements +prompt='Screenshot' +mesg="Directory :: `xdg-user-dir PICTURES`/Screenshots" + +# Options +layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2` +if [[ "$layout" == 'NO' ]]; then + option_1=" Capture Desktop" + option_2=" Capture Area" + option_3=" Capture Window" + option_4=" Capture in 5s" + option_5=" Capture in 10s" +else + option_1="" + option_2="" + option_3="" + option_4="" + option_5="" +fi + +# Rofi CMD +rofi_cmd() { + rofi -dmenu \ + -p "$prompt" \ + -mesg "$mesg" \ + -markup-rows \ + -theme ${RASI} +} + +# Pass variables to rofi dmenu +run_rofi() { + echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5" | rofi_cmd +} + +# Screenshot +time=`date +%Y-%m-%d-%H-%M-%S` +geometry=`xrandr | grep 'current' | head -n1 | cut -d',' -f2 | tr -d '[:blank:],current'` +dir="`xdg-user-dir PICTURES`/Screenshots" +file="Screenshot_${time}_${geometry}.png" + +# Directory +if [[ ! -d "$dir" ]]; then + mkdir -p "$dir" +fi + +# notify and view screenshot +notify_view() { + notify_cmd_shot='dunstify -u low -h string:x-dunst-stack-tag:obscreenshot -i /usr/share/archcraft/icons/dunst/picture.png' + ${notify_cmd_shot} "Copied to clipboard." + paplay /usr/share/sounds/freedesktop/stereo/screen-capture.oga &>/dev/null & + viewnior ${dir}/"$file" + if [[ -e "$dir/$file" ]]; then + ${notify_cmd_shot} "Screenshot Saved." + else + ${notify_cmd_shot} "Screenshot Deleted." + fi +} + +# Copy screenshot to clipboard +copy_shot () { + tee "$file" | xclip -selection clipboard -t image/png +} + +# countdown +countdown () { + for sec in `seq $1 -1 1`; do + dunstify -t 1000 -h string:x-dunst-stack-tag:screenshottimer -i /usr/share/archcraft/icons/dunst/timer.png "Taking shot in : $sec" + sleep 1 + done +} + +# take shots +shotnow () { + cd ${dir} && sleep 0.5 && maim -u -f png | copy_shot + notify_view +} + +shot5 () { + countdown '5' + sleep 1 && cd ${dir} && maim -u -f png | copy_shot + notify_view +} + +shot10 () { + countdown '10' + sleep 1 && cd ${dir} && maim -u -f png | copy_shot + notify_view +} + +shotwin () { + cd ${dir} && maim -u -f png -i `xdotool getactivewindow` | copy_shot + notify_view +} + +shotarea () { + cd ${dir} && maim -u -f png -s -b 2 -c 0.35,0.55,0.85,0.25 -l | copy_shot + notify_view +} + +# Execute Command +run_cmd() { + if [[ "$1" == '--opt1' ]]; then + shotnow + elif [[ "$1" == '--opt2' ]]; then + shotarea + elif [[ "$1" == '--opt3' ]]; then + shotwin + elif [[ "$1" == '--opt4' ]]; then + shot5 + elif [[ "$1" == '--opt5' ]]; then + shot10 + fi +} + +# Actions +chosen="$(run_rofi)" +case ${chosen} in + $option_1) + run_cmd --opt1 + ;; + $option_2) + run_cmd --opt2 + ;; + $option_3) + run_cmd --opt3 + ;; + $option_4) + run_cmd --opt4 + ;; + $option_5) + run_cmd --opt5 + ;; +esac diff --git a/dot-config/rofi/scripts/rofi_shutdown b/dot-config/rofi/scripts/rofi_shutdown new file mode 100755 index 00000000..b17f7667 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_shutdown @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +CNFR="$DIR/confirm.rasi" + +# Theme Elements +prompt="`hostname` (`echo $DESKTOP_SESSION`)" +mesg="Uptime : `uptime -p | sed -e 's/up //g'`" + +# Options +no='' + +# Confirmation CMD +confirm_cmd() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg 'Cancel?' \ + -theme ${CNFR} +} + +run_rofi() { + echo -e "$no" | confirm_cmd +} + +# Confirm and execute +confirm_run () { + selected="$(run_rofi)" + if [[ "$selected" || "$selected" == "" ]]; then + exit + else + echo "Error had occured" + exit 1 + fi +} + +confirm_run & +pid=$! +#pid=$(cat /run/user/$(id -u)/rofi.pid) +notify-send "Powering off system in 10 seconds" +for (( i = 9; i >= 0; --i )); do + if ! ps -p $pid > /dev/null; then + notify-send "Canceled shutdown process." + exit 0 + fi + notify-send "Powering off system in $i" + sleep 1 +done +if ps -p $pid > /dev/null; then + poweroff +fi diff --git a/dot-config/rofi/scripts/rofi_shutdown_menu b/dot-config/rofi/scripts/rofi_shutdown_menu new file mode 100755 index 00000000..a396189b --- /dev/null +++ b/dot-config/rofi/scripts/rofi_shutdown_menu @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +CNFR="$DIR/confirm.rasi" + +# Theme Elements +prompt="`hostname` (`echo $DESKTOP_SESSION`)" +mesg="Uptime : `uptime -p | sed -e 's/up //g'`" + +# Options +yes='' +no='' + +# Confirmation CMD +confirm_cmd() { + rofi -dmenu \ + -p 'Confirmation' \ + -mesg 'Confirmation?' \ + -theme ${CNFR} +} + +run_rofi() { + echo -e "$yes\n$no" | confirm_cmd +} + +# Confirm and execute +confirm_run () { + selected="$(run_rofi)" + if [[ "$selected" == "" || "$selected" == "$no" ]]; then + notify-send "Canceled shutdown process." + exit + elif [[ "$selected" == "$yes" ]]; then + poweroff + fi +} + +confirm_run & +pid=$! +#pid=$(cat /run/user/$(id -u)/rofi.pid) +notify-send "Powering off system in 10 seconds" +for (( i = 10; i > 0; --i )); do + if ! ps -p $pid > /dev/null; then + notify-send "Canceled shutdown process." + exit 0 + fi + notify-send "Powering off system in $i" + sleep 1 +done +if ps -p $pid > /dev/null; then + poweroff +fi diff --git a/dot-config/rofi/scripts/rofi_themes b/dot-config/rofi/scripts/rofi_themes new file mode 100755 index 00000000..854e8860 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_themes @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/themes.rasi" + +# List Available Themes +THEMES=(`cd $DIR/themes && ls -d */ | cut -d '/' -f1`) + +# Theme Elements +prompt="Themes" +mesg="Available Themes : `cd $DIR/themes && ls -d */ | cut -d '/' -f1 | wc -l`" + +# Rofi CMD +rofi_cmd() { + rofi -dmenu \ + -p "$prompt" \ + -mesg "$mesg" \ + -sep '|' \ + -markup-rows \ + -theme ${RASI} +} + +# Pass variables to rofi dmenu +run_rofi() { + echo ${THEMES[@]} | sed 's/ /|/g' | sed 's/$/|/' | rofi_cmd +} + +# Apply Theme +apply_theme() { + selected="`run_rofi`" + current="`cat $DIR/themes/.current`" + + for theme in "${THEMES[@]}"; do + if [[ -z "$selected" ]]; then + break + elif [[ "$selected" == "$theme" ]]; then + "$DIR"/themes/"$theme"/apply.sh + break + fi + done +} + +apply_theme && exit 0 diff --git a/dot-config/rofi/scripts/rofi_wallpaper b/dot-config/rofi/scripts/rofi_wallpaper new file mode 100755 index 00000000..b0be1000 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_wallpaper @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +#CM_LAUNCHER=rofi +DIR="$HOME/.config/rofi" +RASI="$DIR/wallpaper.rasi" +mesg="Please Select a Wallpaper" + +# Define the directory to list files from +directory="$HOME/Pictures/wallpapers" + +# Use `ls` to list the files in the directory +files=$(ls $directory) + +# Use rofi to display the list of files +chosen=$(echo $files | tr " " "\n" | rofi -dmenu -theme ${RASI} -separator-style plain) + +# Check if a file was selected +if [ -n "$chosen" ]; then + # Run a command with the selected file as an argument + feh $chosen +fi diff --git a/dot-config/rofi/scripts/rofi_windows b/dot-config/rofi/scripts/rofi_windows new file mode 100755 index 00000000..90010332 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_windows @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Import Current Theme +DIR="$HOME/.config/rofi" +RASI="$DIR/windows.rasi" + +# Run +rofi \ + -show window \ + -theme ${RASI} diff --git a/dot-config/rofi/scripts/screenshot-wl.sh b/dot-config/rofi/scripts/screenshot-wl.sh new file mode 100755 index 00000000..fcb907e3 --- /dev/null +++ b/dot-config/rofi/scripts/screenshot-wl.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/styles" +rofi_command="rofi -theme $dir/three.rasi" + +# Options +screen="" +area="" +window="" + +# Variable passed to rofi +options="$screen\n$area\n$window" + +chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)" +case $chosen in + $screen) + sleep 0.4; grim -t png - | wl-copy -t image/png + ;; + $area) + grim -g "$(slurp)" -t png - | wl-copy -t image/png + ;; + $window) + sleep 0.4; grim -g "$(hyprctl activewindow | grep at: | cut -d' ' -f2) $(hyprctl activewindow | grep size: | cut -d' ' -f2 | sed 's/,/x/g')" - | wl-copy + ;; +esac + diff --git a/dot-config/rofi/scripts/screenshot.sh b/dot-config/rofi/scripts/screenshot.sh new file mode 100755 index 00000000..0b268295 --- /dev/null +++ b/dot-config/rofi/scripts/screenshot.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="$HOME/.config/rofi/styles" +rofi_command="rofi -theme $dir/three.rasi" + +# Options +screen="" +area="" +window="" + +# Variable passed to rofi +options="$screen\n$area\n$window" + +chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)" +case $chosen in + $screen) + scrot -e 'xclip -selection clipboard -target image/png -i $f && rm $f' + ;; + $area) + scrot -s --line mode=edge -e 'xclip -selection clipboard -target image/png -i $f && rm $f' + ;; + $window) + scrot -u -e 'xclip -selection clipboard -target image/png -i $f && rm $f' + ;; +esac + diff --git a/dot-config/rofi/shared/colors.rasi b/dot-config/rofi/shared/colors.rasi new file mode 100644 index 00000000..3813247b --- /dev/null +++ b/dot-config/rofi/shared/colors.rasi @@ -0,0 +1,13 @@ +* { + --background: rgba ( 46, 52, 64, 25% ); + background: rgba ( 0, 0, 0, 25% ); + --background-alt: rgba ( 57, 64, 79, 25% ); + background-alt: rgba ( 0, 0, 0, 15% ); + foreground: rgba ( 216, 222, 233, 100% ); + --selected: rgba ( 129, 161, 193, 10% ); + selected: rgba ( 0, 0, 0, 40% ); + --active: rgba ( 163, 190, 140, 10% ); + active: rgba ( 0, 0, 0, 10% ); + --urgent: rgba ( 191, 97, 106, 75% ); + urgent: rgba ( 0, 0, 0, 75% ); +} diff --git a/dot-config/rofi/shared/fonts.rasi b/dot-config/rofi/shared/fonts.rasi new file mode 100644 index 00000000..3928237f --- /dev/null +++ b/dot-config/rofi/shared/fonts.rasi @@ -0,0 +1,5 @@ +/* Text Font */ + +* { + font: "Iosevka 10"; +} diff --git a/dot-config/rofi/themes.rasi b/dot-config/rofi/themes.rasi new file mode 100644 index 00000000..5b30062e --- /dev/null +++ b/dot-config/rofi/themes.rasi @@ -0,0 +1,303 @@ +/*****----- Configuration -----*****/ +configuration { + modi: "drun,run,filebrowser,window"; + show-icons: false; + display-drun: " Apps"; + display-run: " Run"; + display-filebrowser: " Files"; + display-window: " Windows"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; +} + +/*****----- 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: 400px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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; + border: 0px; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + children: [ "textbox-prompt-colon", "prompt" ]; +} + +prompt { + enabled: true; + padding: 8px 12px; + border-radius: 0px; + background-color: @selected; + text-color: @background; +} +textbox-prompt-colon { + enabled: true; + padding: 8px 12px; + border-radius: 0px; + expand: false; + str: ""; + background-color: @active; + text-color: @background; +} +entry { + enabled: true; + padding: 0px; + background-color: inherit; + text-color: inherit; + cursor: text; + placeholder: "Run..."; + 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: 6; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/wallpaper.rasi b/dot-config/rofi/wallpaper.rasi new file mode 100644 index 00000000..08e1818e --- /dev/null +++ b/dot-config/rofi/wallpaper.rasi @@ -0,0 +1,300 @@ +/*****----- Configuration -----*****/ +configuration { + modi: "window"; + show-icons: true; + display-drun: " Apps"; + display-run: " Run"; + display-filebrowser: " Files"; + display-window: " Windows"; + drun-display-format: "{name}"; + window-format: "{c} · {t}"; +} + +/*****----- 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: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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: 0px; + 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: "Filter..."; + 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: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 6px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/dot-config/rofi/windows.rasi b/dot-config/rofi/windows.rasi new file mode 100644 index 00000000..08e1818e --- /dev/null +++ b/dot-config/rofi/windows.rasi @@ -0,0 +1,300 @@ +/*****----- Configuration -----*****/ +configuration { + modi: "window"; + show-icons: true; + display-drun: " Apps"; + display-run: " Run"; + display-filebrowser: " Files"; + display-window: " Windows"; + drun-display-format: "{name}"; + window-format: "{c} · {t}"; +} + +/*****----- 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: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 1px solid; + border-radius: 0px; + 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: 0px; + 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: "Filter..."; + 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: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 0px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 6px; + border: 0px solid; + border-radius: 0px; + 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; + 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: 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 -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 8px 12px; + border: 0px solid; + border-radius: 0px; + 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: 0px; + 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: 0px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} -- cgit v1.2.3