diff --git a/README.md b/README.md index 60d933f..f5c2ac1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,23 @@ -# rofi +# Rofi -Custom rofi menu and powermenu \ No newline at end of file +## Application menu + +### Rounded +![rounded] (/screenshot/rounded.png) + +### Slate +![slate](/screenshot/slate.png) + +### Black +![black](/screenshot/black.png) + +## Powermenu +Using [logout.sh](/powermenu/logout.sh) script rofi can be used as powermenu and more. + +### Rounded +![rounded-powermenu](/screenshot/rounded-powermenu.png) +![rounded-powerconfirm](/screenshot/rounded-powerconfirm.png) + +### Slate +![slate-powermenu](/screenshot/slate-powermenu.png) +![slate-powerconfirm](/screenshot/slate-powerconfirm.png) diff --git a/appmenu/black.rasi b/appmenu/black.rasi new file mode 100644 index 0000000..6dc61be --- /dev/null +++ b/appmenu/black.rasi @@ -0,0 +1,147 @@ +configuration { + /* Override config */ + modi: "drun,window"; + scroll-method: 0; + window-format: "{c} {t}"; + show-icons: true; + font: "Envy Code R 14"; +} + +* { + transparency: "real"; +background-color: transparent; + window-border: #676E7D; + foreground: #ffb25a; + selected-normal-background: #5294e290; + spacing: 0; + text: #dfdfdf; + text-alt: #b2b2b2; + text-color: @text; +} + +window { + background-color: rgba(0, 0, 0, 90%); + width: 100%; + height: 100%; + fullscreen: true; + position: center; + font: "Envy Code R 12"; +} + +mainbox { + margin: 15% 25%; + children: [ inputbar, message, listview, wrapper-prompt ]; +} + +inputbar { + margin: 0 0 1em 0; + children: [ icon-search, entry, case-indicator]; +} + +icon-search { + expand: false; + size: 25; + filename: "edit-find-symbolic"; +} + +entry { + expand: true; + font: inherit; + margin: 0 1em; +} + +case-indicator { + font: inherit; +} + +message { + text-color: @foreground; +} + +listview { + expand: true; + layout: vertical; + columns: 3; + lines: 4; + cycle: true; + spacing: 0.1em; + scrollbar: false; +} + +/* Elements */ +element { + orientation: vertical; + padding: 1em; +} + +element-icon { + size: 10; +} + +element-text { + expand: false; + horizontal-align: 0.5; +} + +element selected { + background-color: @background; + border: 1px; + border-radius: 0.2em; +} + +/* Element normal */ +element normal.normal, element alternate.normal { + background-color: @background; + text-color: @foreground; +} +element selected.normal { + border-color: @foreground; + text-color: @foreground; +} + +/* Element active */ +element normal.active, element alternate.active { + text-color: @secondary; +} +element selected.active { + border-color: @secondary; + text-color: @secondary; +} + +/* Element urgent */ +element normal.urgent, element alternate.urgent { + text-color: @urgency; +} +element selected.urgent { + border-color: @urgency; + text-color: @urgency; +} + +wrapper-prompt { + expand: false; + orientation: horizontal; + children: [ dummy, mode-switcher ]; +} + +dummy { + expand: true; +} + +mode-switcher { + expand: false; +} + +button { + width: 6em; + padding: 0.2em 0; + margin: 0 0.5em; +} + +button selected { + border: 0 0 1px 0; + border-color: @primary; +} + +prompt { + highlight: italic; +} diff --git a/appmenu/rounded.rasi b/appmenu/rounded.rasi new file mode 100644 index 0000000..87ce54e --- /dev/null +++ b/appmenu/rounded.rasi @@ -0,0 +1,162 @@ +configuration { + /* Override config */ + modi: "combi,drun,window"; + scroll-method: 0; + window-format: "{c} {t}"; + show-icons: true; + //font: "DejavuSansMono NF 16"; + font: "Iosevka Nerd Font 16"; +} + +* { + color0: #252030; + color1: #4B6EBB; + color2: #4B73C1; + color3: #8F718E; + color4: #817EC0; + color5: #7582BE; + color6: #A58997; + color7: #e7cbbf; + color8: #a18e85; + color9: #4B6EBB; + color10: #4B73C1; + color11: #8F718E; + color12: #817EC0; + color13: #7582BE; + color14: #A58997; + color15: #e7cbbf; + transparency: "real"; + background-color: #00000000; + background: #0c0f10aa; + background2: #0c0f10aa; + window-border: #676E7D00; + foreground: #E0846E; + spacing: 0; + text: #dfdfdf; + text-alt: #b2b2b2; + text-color: @text; +} + +window { + background-color: #222222aa; + fullscreen: true; + position: center; + font: "Iosevka 13"; +} + +mainbox { + text-color: #ffffff44; + background-color: #00000000; + margin: 25% 25%; + children: [ inputbar,listview, wrapper-prompt ]; +} + +inputbar { + text-color: #ffffff; + margin: 0 0 1em 0; + children: [ entry, case-indicator]; +} + + +entry { + expand: false; + font: inherit; + margin: 0 1em; +} + +case-indicator { + font: inherit; +} + +message { + text-color: @color15; +} + +listview { + expand: false; + layout: vertical; + lines: 5; + cycle: true; + spacing: 5px; + scrollbar: false; +} + +/* Elements */ +element { + orientation: vertical; + padding: 1em; + border-radius: 3%; +} + +element-icon { + size: 12; +} + +element-text { + expand: false; +} + +element selected { + background-color: @background-color; + border: 4px; + border-radius: 3%; +} + +/* Element normal */ +element normal.normal, element alternate.normal { + background-color: @color0; + text-color: @color15; +} +element selected.normal { + border-color: @color5; + text-color: @color10 ; + background-color: @color15; +} + +/* Element active */ +element normal.active, element alternate.active { + text-color: @secondary; +} +element selected.active { + border-color: @secondary; + text-color: @secondary; +} + +/* Element urgent */ +element normal.urgent, element alternate.urgent { + text-color: @urgency; +} +element selected.urgent { + border-color: @urgency; + text-color: @urgency; +} + +wrapper-prompt { + expand: false; + orientation: horizontal; + children: [ dummy, mode-switcher ]; +} + +dummy { + expand: true; +} + +mode-switcher { + expand: false; +} + +button { + width: 6em; + padding: 0.2em 0; + margin: 0 0.5em; +} + +button selected { + border: 0 0 1px 0; + border-color: @primary; +} + +prompt { + location: 0; + highlight: italic; +} diff --git a/appmenu/slate.rasi b/appmenu/slate.rasi new file mode 100644 index 0000000..4706ee4 --- /dev/null +++ b/appmenu/slate.rasi @@ -0,0 +1,51 @@ +configuration { + show-icons: true; + location: 0; + lines:8; + display-run: "Search"; +} + +* { + background-color: #282C33; + border-color: #2e343f; + text-color: #ffb25a; + spacing: 0; + width: 40%; +} + +inputbar { + border: 0 0 1px 0; + children: [entry]; +} + +prompt { + padding: 16px; + border: 0 1px 0 0; +} + +textbox { + background-color: #2e343f; + border: 0 0 1px 0; + border-color: #282C33; + padding: 8px 16px; +} + +entry { + padding: 16px; +} + + +listview { + cycle: false; + margin: 0 0 -1px 0; + scrollbar: false; +} + +element { + border: 0 0 1px 0; + padding: 16px; +} + +element selected { + background-color: #2e343f; +} diff --git a/powermenu/logout.sh b/powermenu/logout.sh new file mode 100755 index 0000000..22ca377 --- /dev/null +++ b/powermenu/logout.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash: +o0="﫼" +o1="" +o2="" +o3="" +o4="" +a1="1" +a2="0" +option="$o4\n$o1\n$o3\n$o2\n$o0" +answer="$a2\n$a1" +chosen="$(echo -e "$option" | rofi -theme ~/.config/rofi/powermenu/powermenu.rasi -lines 5 -dmenu)" +if [ -z "$chosen" ]; then + exit +else + sure="$(echo -e "$answer" | rofi -theme ~/.config/rofi/powermenu/powermenu-confirm.rasi -lines 2 -dmenu)" + case $chosen$sure in + $o0$a1) + i3-msg exit;; + $o1$a1) + systemctl suspend;; + $o2$a1) + reboot;; + $o3$a1) + poweroff;; + $o4$a1) + exec bash ~/.config/i3/lock/lock.sh;; + esac +fi diff --git a/powermenu/round/powermenu-confirm.rasi b/powermenu/round/powermenu-confirm.rasi new file mode 100644 index 0000000..4f2de70 --- /dev/null +++ b/powermenu/round/powermenu-confirm.rasi @@ -0,0 +1,75 @@ +configuration { + //drun-icon-theme: "Papirus"; + //show-icons: true; + font: "Envy Code R 50"; +} + +* { + transparency: "real"; + background-color: #22222244; + background: #0c0f10aa; + text-color: #ffb25a; + selected-normal-background: #5294e290; + window-border: #676E7D; + foreground: #E0846E; + +} + +window { + background-color: #22222244; + fullscreen: true; + position: center; + anchor: center; +} + +mainbox { + children: [listview]; +} + +listview { + cycle: true; + spacing: 0.2em; + padding: 32% 40% 32% 40%; + layout: horizontal; +} + +element { + orientation: horizontal; + padding: 0.5em; + border-radius: 50%; +} + + +element selected { + background-color: @color10; + text-color: @color0; + border-radius: 50%; +} + +/* Element normal */ +element normal.normal, element alternate.normal { + background-color: @color0; + text-color: @color15; +} +element selected.normal { + border-color: @color10; + text-color: @color0; +} + +/* Element active */ +element normal.active, element alternate.active { + text-color: @secondary; +} +element selected.active { + border-color: @secondary; + text-color: @secondary; +} + +/* Element urgent */ +element normal.urgent, element alternate.urgent { + text-color: @urgency; +} +element selected.urgent { + border-color: @urgency; + text-color: @urgency; +} diff --git a/powermenu/round/powermenu.rasi b/powermenu/round/powermenu.rasi new file mode 100644 index 0000000..5236f5a --- /dev/null +++ b/powermenu/round/powermenu.rasi @@ -0,0 +1,74 @@ +configuration { + //drun-icon-theme: "Papirus"; + //show-icons: true; + font: "DejavuSansMono NF 50"; +} + +* { + transparency: "real"; + background-color: #22222244; + background: #0c0f10aa; + text-color: #ffb25a; + selected-normal-background: #5294e290; + window-border: #676E7D; + foreground: #E0846E; + +} +window { + background-color: #22222244; + fullscreen: true; + position: center; + anchor: center; +} + +mainbox { + children: [listview]; +} + +listview { + cycle: true; + spacing: 0.1em; + padding: 32% 14% 32% 27%; + layout: horizontal; +} + +element { + orientation: horizontal; + padding: 0.5em; + border-radius: 50%; +} + + +element selected { + background-color: @color10; + text-color: @color0; + border-radius: 50%; +} + +/* Element normal */ +element normal.normal, element alternate.normal { + background-color: @color0; + text-color: @color15; +} +element selected.normal { + border-color: @color15; + text-color: @color0; +} + +/* Element active */ +element normal.active, element alternate.active { + text-color: @secondary; +} +element selected.active { + border-color: @secondary; + text-color: @secondary; +} + +/* Element urgent */ +element normal.urgent, element alternate.urgent { + text-color: @urgency; +} +element selected.urgent { + border-color: @urgency; + text-color: @urgency; +} diff --git a/powermenu/slate.rasi b/powermenu/slate.rasi new file mode 100644 index 0000000..85682a9 --- /dev/null +++ b/powermenu/slate.rasi @@ -0,0 +1,52 @@ +configuration { + modi: "window,run,ssh,combi"; + show-icons: true; + location: 5; + display-run: ""; + font: "Envy Code R 14"; +} + +* { + background-color: #282C33; + border-color: #2e343f; + text-color: #ffb25a; + spacing: 0; + width: 17%; + show-icons: true; +} + +inputbar { + border: 0 0 1px 0; + children: []; +} + +prompt { + padding: 16px; + border: 0 1px 0 0; +} + +textbox { + background-color: #2e343f; + border: 0 0 1px 0; + border-color: #282C33; + padding: 8px 16px; +} + +entry { + padding: 16px; +} + +listview { + cycle: true; + margin: 0 0 -1px 0; + scrollbar: false; +} + +element { + border: 0 0 1px 0; + padding: 16px; +} + +element selected { + background-color: #2e343f; +} diff --git a/screenshot/black.png b/screenshot/black.png new file mode 100644 index 0000000..d0200ee Binary files /dev/null and b/screenshot/black.png differ diff --git a/screenshot/rounded-powerconfirm.png b/screenshot/rounded-powerconfirm.png new file mode 100644 index 0000000..bc7554c Binary files /dev/null and b/screenshot/rounded-powerconfirm.png differ diff --git a/screenshot/rounded-powermenu.png b/screenshot/rounded-powermenu.png new file mode 100644 index 0000000..d3461ce Binary files /dev/null and b/screenshot/rounded-powermenu.png differ diff --git a/screenshot/rounded.png b/screenshot/rounded.png new file mode 100644 index 0000000..183e3af Binary files /dev/null and b/screenshot/rounded.png differ diff --git a/screenshot/slate-powerconfirm.png b/screenshot/slate-powerconfirm.png new file mode 100644 index 0000000..6ddf3e4 Binary files /dev/null and b/screenshot/slate-powerconfirm.png differ diff --git a/screenshot/slate-powermenu.png b/screenshot/slate-powermenu.png new file mode 100644 index 0000000..9167c13 Binary files /dev/null and b/screenshot/slate-powermenu.png differ diff --git a/screenshot/slate.png b/screenshot/slate.png new file mode 100644 index 0000000..fa793c7 Binary files /dev/null and b/screenshot/slate.png differ