summaryrefslogtreecommitdiff
path: root/config/rofi/powermenu/type-5
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2024-05-19 14:54:41 +0700
committeraltaf-creator <dev@altafcreator.com>2024-05-19 14:54:41 +0700
commit3ec8d42fbf6eed78c24de2caca63d91a2604ff50 (patch)
tree985517bcce150969a050f7f408bea6670177bbb7 /config/rofi/powermenu/type-5
Diffstat (limited to 'config/rofi/powermenu/type-5')
-rwxr-xr-xconfig/rofi/powermenu/type-5/powermenu.sh117
-rw-r--r--config/rofi/powermenu/type-5/style-1.rasi147
-rw-r--r--config/rofi/powermenu/type-5/style-2.rasi147
-rw-r--r--config/rofi/powermenu/type-5/style-3.rasi147
-rw-r--r--config/rofi/powermenu/type-5/style-4.rasi153
-rw-r--r--config/rofi/powermenu/type-5/style-5.rasi151
6 files changed, 862 insertions, 0 deletions
diff --git a/config/rofi/powermenu/type-5/powermenu.sh b/config/rofi/powermenu/type-5/powermenu.sh
new file mode 100755
index 0000000..561e30c
--- /dev/null
+++ b/config/rofi/powermenu/type-5/powermenu.sh
@@ -0,0 +1,117 @@
+#!/usr/bin/env bash
+
+## Author : Aditya Shakya (adi1090x)
+## Github : @adi1090x
+#
+## Rofi : Power Menu
+#
+## Available Styles
+#
+## style-1 style-2 style-3 style-4 style-5
+
+# Current Theme
+dir="$HOME/.config/rofi/powermenu/type-5"
+theme='style-1'
+
+# CMDs
+lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`"
+uptime="`uptime -p | sed -e 's/up //g'`"
+host=`hostname`
+
+# Options
+hibernate=''
+shutdown=''
+reboot=''
+lock=''
+suspend=''
+logout=''
+yes=''
+no=''
+
+# Rofi CMD
+rofi_cmd() {
+ rofi -dmenu \
+ -p " $USER@$host" \
+ -mesg " Last Login: $lastlogin |  Uptime: $uptime" \
+ -theme ${dir}/${theme}.rasi
+}
+
+# Confirmation CMD
+confirm_cmd() {
+ rofi -theme-str 'window {location: center; anchor: center; fullscreen: false; width: 350px;}' \
+ -theme-str 'mainbox {children: [ "message", "listview" ];}' \
+ -theme-str 'listview {columns: 2; lines: 1;}' \
+ -theme-str 'element-text {horizontal-align: 0.5;}' \
+ -theme-str 'textbox {horizontal-align: 0.5;}' \
+ -dmenu \
+ -p 'Confirmation' \
+ -mesg 'Are you Sure?' \
+ -theme ${dir}/${theme}.rasi
+}
+
+# Ask for confirmation
+confirm_exit() {
+ echo -e "$yes\n$no" | confirm_cmd
+}
+
+# Pass variables to rofi dmenu
+run_rofi() {
+ echo -e "$lock\n$suspend\n$logout\n$hibernate\n$reboot\n$shutdown" | rofi_cmd
+}
+
+# Execute Command
+run_cmd() {
+ selected="$(confirm_exit)"
+ if [[ "$selected" == "$yes" ]]; then
+ if [[ $1 == '--shutdown' ]]; then
+ systemctl poweroff
+ elif [[ $1 == '--reboot' ]]; then
+ systemctl reboot
+ elif [[ $1 == '--hibernate' ]]; then
+ systemctl hibernate
+ elif [[ $1 == '--suspend' ]]; then
+ mpc -q pause
+ amixer set Master mute
+ systemctl suspend
+ elif [[ $1 == '--logout' ]]; then
+ if [[ "$DESKTOP_SESSION" == 'openbox' ]]; then
+ openbox --exit
+ elif [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then
+ bspc quit
+ elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then
+ i3-msg exit
+ elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then
+ qdbus org.kde.ksmserver /KSMServer logout 0 0 0
+ fi
+ fi
+ else
+ exit 0
+ fi
+}
+
+# Actions
+chosen="$(run_rofi)"
+case ${chosen} in
+ $shutdown)
+ run_cmd --shutdown
+ ;;
+ $reboot)
+ run_cmd --reboot
+ ;;
+ $hibernate)
+ run_cmd --hibernate
+ ;;
+ $lock)
+ if [[ -x '/usr/bin/betterlockscreen' ]]; then
+ betterlockscreen -l
+ elif [[ -x '/usr/bin/i3lock' ]]; then
+ i3lock
+ fi
+ ;;
+ $suspend)
+ run_cmd --suspend
+ ;;
+ $logout)
+ run_cmd --logout
+ ;;
+esac
diff --git a/config/rofi/powermenu/type-5/style-1.rasi b/config/rofi/powermenu/type-5/style-1.rasi
new file mode 100644
index 0000000..ed3633c
--- /dev/null
+++ b/config/rofi/powermenu/type-5/style-1.rasi
@@ -0,0 +1,147 @@
+/**
+ *
+ * Author : Aditya Shakya (adi1090x)
+ * Github : @adi1090x
+ *
+ * Rofi Theme File
+ * Rofi Version: 1.7.3
+ **/
+
+/*****----- Configuration -----*****/
+configuration {
+ show-icons: false;
+}
+
+/*****----- Global Properties -----*****/
+* {
+ font: "JetBrains Mono Nerd Font 10";
+ background: #11092D;
+ background-alt: #281657;
+ foreground: #FFFFFF;
+ selected: #DF5296;
+ active: #6E77FF;
+ urgent: #8E3596;
+}
+
+/*
+USE_BUTTONS=YES
+*/
+
+/*****----- Main Window -----*****/
+window {
+ transparency: "real";
+ location: center;
+ anchor: center;
+ fullscreen: false;
+ width: 800px;
+ x-offset: 0px;
+ y-offset: 0px;
+
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 20px;
+ border-color: @selected;
+ cursor: "default";
+ background-color: @background;
+}
+
+/*****----- Main Box -----*****/
+mainbox {
+ enabled: true;
+ spacing: 0px;
+ margin: 0px;
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 0px;
+ border-color: @selected;
+ background-color: transparent;
+ children: [ "inputbar", "listview", "message" ];
+}
+
+/*****----- Inputbar -----*****/
+inputbar {
+ enabled: true;
+ spacing: 0px;
+ padding: 100px 80px;
+ background-color: transparent;
+ background-image: url("~/.config/rofi/images/a.png", width);
+ children: [ "textbox-prompt-colon", "dummy","prompt"];
+}
+
+dummy {
+ background-color: transparent;
+}
+
+textbox-prompt-colon {
+ enabled: true;
+ expand: false;
+ str: " System";
+ padding: 12px;
+ border-radius: 12px;
+ background-color: @urgent;
+ text-color: @background;
+}
+prompt {
+ enabled: true;
+ padding: 12px;
+ border-radius: 12px;
+ background-color: @active;
+ text-color: @background;
+}
+
+/*****----- Listview -----*****/
+listview {
+ enabled: true;
+ columns: 6;
+ lines: 1;
+ cycle: true;
+ dynamic: true;
+ scrollbar: false;
+ layout: vertical;
+ reverse: false;
+ fixed-height: true;
+ fixed-columns: true;
+
+ spacing: 15px;
+ margin: 15px;
+ background-color: transparent;
+ cursor: "default";
+}
+
+/*****----- Elements -----*****/
+element {
+ enabled: true;
+ padding: 30px 10px;
+ border-radius: 12px;
+ background-color: @background-alt;
+ text-color: @foreground;
+ cursor: pointer;
+}
+element-text {
+ font: "feather bold 32";
+ background-color: transparent;
+ text-color: inherit;
+ cursor: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
+element selected.normal {
+ background-color: var(selected);
+ text-color: var(background);
+}
+
+/*****----- Message -----*****/
+message {
+ enabled: true;
+ margin: 0px;
+ padding: 15px;
+ border-radius: 0px;
+ background-color: @background-alt;
+ text-color: @foreground;
+}
+textbox {
+ background-color: inherit;
+ text-color: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
diff --git a/config/rofi/powermenu/type-5/style-2.rasi b/config/rofi/powermenu/type-5/style-2.rasi
new file mode 100644
index 0000000..ae737ca
--- /dev/null
+++ b/config/rofi/powermenu/type-5/style-2.rasi
@@ -0,0 +1,147 @@
+/**
+ *
+ * Author : Aditya Shakya (adi1090x)
+ * Github : @adi1090x
+ *
+ * Rofi Theme File
+ * Rofi Version: 1.7.3
+ **/
+
+/*****----- Configuration -----*****/
+configuration {
+ show-icons: false;
+}
+
+/*****----- Global Properties -----*****/
+* {
+ font: "JetBrains Mono Nerd Font 10";
+ background: #2D1B14;
+ background-alt: #462D23;
+ foreground: #FFFFFF;
+ selected: #E25F3E;
+ active: #716251;
+ urgent: #934A1C;
+}
+
+/*
+USE_BUTTONS=YES
+*/
+
+/*****----- Main Window -----*****/
+window {
+ transparency: "real";
+ location: center;
+ anchor: center;
+ fullscreen: false;
+ width: 800px;
+ x-offset: 0px;
+ y-offset: 0px;
+
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 20px;
+ border-color: @selected;
+ cursor: "default";
+ background-color: @background;
+}
+
+/*****----- Main Box -----*****/
+mainbox {
+ enabled: true;
+ spacing: 0px;
+ margin: 0px;
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 0px;
+ border-color: @selected;
+ background-color: transparent;
+ children: [ "inputbar", "listview", "message" ];
+}
+
+/*****----- Inputbar -----*****/
+inputbar {
+ enabled: true;
+ spacing: 0px;
+ padding: 100px 80px;
+ background-color: transparent;
+ background-image: url("~/.config/rofi/images/d.png", width);
+ children: [ "textbox-prompt-colon", "dummy","prompt"];
+}
+
+dummy {
+ background-color: transparent;
+}
+
+textbox-prompt-colon {
+ enabled: true;
+ expand: false;
+ str: " System";
+ padding: 12px;
+ border-radius: 100%;
+ background-color: @urgent;
+ text-color: @foreground;
+}
+prompt {
+ enabled: true;
+ padding: 12px;
+ border-radius: 100%;
+ background-color: @active;
+ text-color: @foreground;
+}
+
+/*****----- Listview -----*****/
+listview {
+ enabled: true;
+ columns: 6;
+ lines: 1;
+ cycle: true;
+ dynamic: true;
+ scrollbar: false;
+ layout: vertical;
+ reverse: false;
+ fixed-height: true;
+ fixed-columns: true;
+
+ spacing: 15px;
+ margin: 15px;
+ background-color: transparent;
+ cursor: "default";
+}
+
+/*****----- Elements -----*****/
+element {
+ enabled: true;
+ padding: 28px 10px;
+ border-radius: 100%;
+ background-color: @background-alt;
+ text-color: @foreground;
+ cursor: pointer;
+}
+element-text {
+ font: "feather bold 32";
+ background-color: transparent;
+ text-color: inherit;
+ cursor: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
+element selected.normal {
+ background-color: var(selected);
+ text-color: var(background);
+}
+
+/*****----- Message -----*****/
+message {
+ enabled: true;
+ margin: 0px 15px 15px 15px;
+ padding: 15px;
+ border-radius: 100%;
+ background-color: @background-alt;
+ text-color: @foreground;
+}
+textbox {
+ background-color: inherit;
+ text-color: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
diff --git a/config/rofi/powermenu/type-5/style-3.rasi b/config/rofi/powermenu/type-5/style-3.rasi
new file mode 100644
index 0000000..6f80ee1
--- /dev/null
+++ b/config/rofi/powermenu/type-5/style-3.rasi
@@ -0,0 +1,147 @@
+/**
+ *
+ * Author : Aditya Shakya (adi1090x)
+ * Github : @adi1090x
+ *
+ * Rofi Theme File
+ * Rofi Version: 1.7.3
+ **/
+
+/*****----- Configuration -----*****/
+configuration {
+ show-icons: false;
+}
+
+/*****----- Global Properties -----*****/
+* {
+ font: "JetBrains Mono Nerd Font 10";
+ background: #231419;
+ background-alt: #2D1E23;
+ foreground: #FFFFFF;
+ selected: #426647;
+ active: #2E3F34;
+ urgent: #D08261;
+}
+
+/*
+USE_BUTTONS=YES
+*/
+
+/*****----- Main Window -----*****/
+window {
+ transparency: "real";
+ location: center;
+ anchor: center;
+ fullscreen: false;
+ width: 550px;
+ x-offset: 0px;
+ y-offset: 0px;
+
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 10px;
+ border-color: @selected;
+ cursor: "default";
+ background-color: @background;
+}
+
+/*****----- Main Box -----*****/
+mainbox {
+ enabled: true;
+ spacing: 0px;
+ margin: 0px;
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 0px;
+ border-color: @selected;
+ background-color: transparent;
+ children: [ "inputbar", "listview", "message" ];
+}
+
+/*****----- Inputbar -----*****/
+inputbar {
+ enabled: true;
+ spacing: 0px;
+ padding: 100px 40px;
+ background-color: transparent;
+ background-image: url("~/.config/rofi/images/e.jpg", width);
+ children: [ "textbox-prompt-colon", "dummy","prompt"];
+}
+
+dummy {
+ background-color: transparent;
+}
+
+textbox-prompt-colon {
+ enabled: true;
+ expand: false;
+ str: " System";
+ padding: 12px;
+ border-radius: 5px;
+ background-color: @urgent;
+ text-color: @background;
+}
+prompt {
+ enabled: true;
+ padding: 12px;
+ border-radius: 5px;
+ background-color: @active;
+ text-color: @foreground;
+}
+
+/*****----- Listview -----*****/
+listview {
+ enabled: true;
+ columns: 3;
+ lines: 2;
+ cycle: true;
+ dynamic: true;
+ scrollbar: false;
+ layout: vertical;
+ reverse: false;
+ fixed-height: true;
+ fixed-columns: true;
+
+ spacing: 15px;
+ margin: 15px;
+ background-color: transparent;
+ cursor: "default";
+}
+
+/*****----- Elements -----*****/
+element {
+ enabled: true;
+ padding: 30px 10px;
+ border-radius: 10px;
+ background-color: @background-alt;
+ text-color: @foreground;
+ cursor: pointer;
+}
+element-text {
+ font: "feather bold 32";
+ background-color: transparent;
+ text-color: inherit;
+ cursor: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
+element selected.normal {
+ background-color: var(selected);
+ text-color: var(background);
+}
+
+/*****----- Message -----*****/
+message {
+ enabled: true;
+ margin: 0px;
+ padding: 15px;
+ border-radius: 0px;
+ background-color: @background-alt;
+ text-color: @foreground;
+}
+textbox {
+ background-color: inherit;
+ text-color: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
diff --git a/config/rofi/powermenu/type-5/style-4.rasi b/config/rofi/powermenu/type-5/style-4.rasi
new file mode 100644
index 0000000..247693a
--- /dev/null
+++ b/config/rofi/powermenu/type-5/style-4.rasi
@@ -0,0 +1,153 @@
+/**
+ *
+ * Author : Aditya Shakya (adi1090x)
+ * Github : @adi1090x
+ *
+ * Rofi Theme File
+ * Rofi Version: 1.7.3
+ **/
+
+/*****----- Configuration -----*****/
+configuration {
+ show-icons: false;
+}
+
+/*****----- Global Properties -----*****/
+* {
+ font: "JetBrains Mono Nerd Font 10";
+ background: #131D1F;
+ background-alt: #183A43;
+ foreground: #FFFFFF;
+ selected: #649094;
+ active: #E9CC9D;
+ urgent: #FEA861;
+}
+
+/*
+USE_BUTTONS=YES
+*/
+
+/*****----- Main Window -----*****/
+window {
+ transparency: "real";
+ location: center;
+ anchor: center;
+ fullscreen: false;
+ width: 1000px;
+ x-offset: 0px;
+ y-offset: 0px;
+
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 10px;
+ border-color: @selected;
+ cursor: "default";
+ background-color: @background;
+}
+
+/*****----- Main Box -----*****/
+mainbox {
+ enabled: true;
+ spacing: 0px;
+ margin: 0px;
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 0px;
+ border-color: @selected;
+ background-color: transparent;
+ children: [ "inputbar", "listview", "message" ];
+}
+
+/*****----- Inputbar -----*****/
+inputbar {
+ enabled: true;
+ spacing: 0px;
+ padding: 150px 40px;
+ background-color: transparent;
+ background-image: url("~/.config/rofi/images/i.jpg", width);
+ children: [ "textbox-prompt-colon", "dummy","prompt"];
+}
+
+dummy {
+ background-color: transparent;
+}
+
+textbox-prompt-colon {
+ enabled: true;
+ expand: false;
+ str: " System";
+ padding: 15px;
+ border: 0px 5px 5px 0px;
+ border-radius: 15px 5px 15px 5px;
+ border-color: @selected;
+ background-color: @urgent;
+ text-color: @background;
+}
+prompt {
+ enabled: true;
+ padding: 15px;
+ border: 0px 0px 5px 5px;
+ border-radius: 5px 15px 5px 15px;
+ border-color: @selected;
+ background-color: @active;
+ text-color: @background;
+}
+
+/*****----- Listview -----*****/
+listview {
+ enabled: true;
+ columns: 6;
+ lines: 1;
+ cycle: true;
+ dynamic: true;
+ scrollbar: false;
+ layout: vertical;
+ reverse: false;
+ fixed-height: true;
+ fixed-columns: true;
+
+ spacing: 25px;
+ margin: 25px;
+ background-color: transparent;
+ cursor: "default";
+}
+
+/*****----- Elements -----*****/
+element {
+ enabled: true;
+ padding: 40px 10px;
+ border-radius: 15px 30px 15px 30px;
+ background-color: @background-alt;
+ text-color: @foreground;
+ cursor: pointer;
+}
+element-text {
+ font: "feather bold 32";
+ background-color: transparent;
+ text-color: inherit;
+ cursor: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
+element selected.normal {
+ border: 0px 0px 5px 5px;
+ border-color: @urgent;
+ background-color: var(background-alt);
+ text-color: var(urgent);
+}
+
+/*****----- Message -----*****/
+message {
+ enabled: true;
+ margin: 0px;
+ padding: 15px;
+ border-radius: 0px;
+ background-color: @background-alt;
+ text-color: @foreground;
+}
+textbox {
+ background-color: inherit;
+ text-color: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
diff --git a/config/rofi/powermenu/type-5/style-5.rasi b/config/rofi/powermenu/type-5/style-5.rasi
new file mode 100644
index 0000000..4492512
--- /dev/null
+++ b/config/rofi/powermenu/type-5/style-5.rasi
@@ -0,0 +1,151 @@
+/**
+ *
+ * Author : Aditya Shakya (adi1090x)
+ * Github : @adi1090x
+ *
+ * Rofi Theme File
+ * Rofi Version: 1.7.3
+ **/
+
+/*****----- Configuration -----*****/
+configuration {
+ show-icons: false;
+}
+
+/*****----- Global Properties -----*****/
+* {
+ font: "JetBrains Mono Nerd Font 10";
+ background: #11092D;
+ background-alt: #281657;
+ foreground: #FFFFFF;
+ selected: #DF5296;
+ active: #6E77FF;
+ urgent: #8E3596;
+}
+
+/*
+USE_BUTTONS=YES
+*/
+
+/*****----- Main Window -----*****/
+window {
+ transparency: "real";
+ location: center;
+ anchor: center;
+ fullscreen: false;
+ width: 1000px;
+ x-offset: 0px;
+ y-offset: 0px;
+
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 20px;
+ border-color: @selected;
+ cursor: "default";
+ background-color: @background;
+}
+
+/*****----- Main Box -----*****/
+mainbox {
+ enabled: true;
+ spacing: 0px;
+ margin: 0px;
+ padding: 0px;
+ border: 0px solid;
+ border-radius: 0px;
+ border-color: @selected;
+ background-color: transparent;
+ children: [ "inputbar", "listview", "message" ];
+}
+
+/*****----- Inputbar -----*****/
+inputbar {
+ enabled: true;
+ spacing: 20px;
+ padding: 100px 40px;
+ background-color: transparent;
+ background-image: url("~/.config/rofi/images/j.jpg", width);
+ children: [ "textbox-prompt-colon", "prompt"];
+}
+
+dummy {
+ background-color: transparent;
+}
+
+textbox-prompt-colon {
+ enabled: true;
+ expand: false;
+ str: " System";
+ padding: 15px;
+ border: 0px 0px 0px 10px;
+ border-radius: 100% 100% 0px 100%;
+ border-color: @selected;
+ background-color: @urgent;
+ text-color: @foreground;
+}
+prompt {
+ enabled: true;
+ padding: 15px;
+ border: 0px;
+ border-radius: 0px 100% 100% 100%;
+ border-color: @selected;
+ background-color: @active;
+ text-color: @background;
+}
+
+/*****----- Listview -----*****/
+listview {
+ enabled: true;
+ columns: 6;
+ lines: 1;
+ cycle: true;
+ dynamic: true;
+ scrollbar: false;
+ layout: vertical;
+ reverse: false;
+ fixed-height: true;
+ fixed-columns: true;
+
+ spacing: 30px;
+ margin: 30px;
+ background-color: transparent;
+ cursor: "default";
+}
+
+/*****----- Elements -----*****/
+element {
+ enabled: true;
+ padding: 35px 10px;
+ border-radius: 55px;
+ background-color: @background-alt;
+ text-color: @foreground;
+ cursor: pointer;
+}
+element-text {
+ font: "feather bold 32";
+ background-color: transparent;
+ text-color: inherit;
+ cursor: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
+element selected.normal {
+ background-color: var(selected);
+ text-color: var(background);
+}
+
+/*****----- Message -----*****/
+message {
+ enabled: true;
+ margin: 0px;
+ padding: 15px;
+ border-radius: 0px;
+ background-color: @background-alt;
+ text-color: @foreground;
+}
+textbox {
+ background-color: inherit;
+ text-color: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}