aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordarkeddie <lyttle.daniel@gmail.com>2023-11-25 09:26:40 +1100
committerdarkeddie <lyttle.daniel@gmail.com>2023-11-25 09:26:40 +1100
commitd5b06a4c6301befd1e5e4e9efa189a71aee51e27 (patch)
tree9d80c5bff17593c4413937b7fab22ea1a676d239
parent61bbe3b7d94387ede06353e626465f2987932afe (diff)
Implementation of Rofipower
-rw-r--r--config/hypr/configs/Keybinds.conf2
-rwxr-xr-x[-rw-r--r--]config/hypr/scripts/rofipower.sh (renamed from rofipower.sh)20
-rw-r--r--config/rofi/config-powermenu.rasi (renamed from config-powermenu.rasi)24
-rw-r--r--config/waybar/modules6
4 files changed, 29 insertions, 23 deletions
diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf
index c072b4d7..8ad56515 100644
--- a/config/hypr/configs/Keybinds.conf
+++ b/config/hypr/configs/Keybinds.conf
@@ -30,7 +30,7 @@ bind = $mainMod, Q, killactive,
bind = $mainMod, Return, exec, $term
bind = $mainMod, T, exec, $files
bind = CTRL ALT, L, exec, $scriptsDir/LockScreen.sh
-bind = CTRL ALT, P, exec, $scriptsDir/Wlogout.sh
+bind = CTRL ALT, P, exec, $scriptsDir/rofipower.sh
bind = $mainMod CTRL, S, exec, $scriptsDir/RofiBeats.sh
bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh
bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh
diff --git a/rofipower.sh b/config/hypr/scripts/rofipower.sh
index 435f1eeb..7bb70e9c 100644..100755
--- a/rofipower.sh
+++ b/config/hypr/scripts/rofipower.sh
@@ -8,20 +8,21 @@ uptime="`uptime -p | sed -e 's/up //g'`"
host=`hostnamectl hostname`
# Options
-shutdown=''
-reboot=''
-lock=''
-suspend=''
-logout=''
+shutdown=' Shutdown'
+reboot=' Reboot'
+lock=' Lock'
+suspend=' Suspend'
+logout=' Logout'
+hibernate=' Hibernate'
# Rofi CMD
rofi_cmd() {
- rofi -dmenu -p " $USER@$host" -mesg " Uptime: $uptime" -theme ~/.config/rofi/config-powermenu.rasi
+ rofi -dmenu -p " $USER@$host" -mesg " Uptime: $uptime" -sep '|' -eh 2 -theme ~/.config/rofi/config-powermenu.rasi
}
# Pass variables to rofi dmenu
run_rofi() {
- echo -e "$lock\0meta\x1fl\n$suspend\0meta\x1fu\n$logout\0meta\x1fe\n$reboot\0meta\x1fr\n$shutdown\0meta\x1fs" | rofi_cmd
+ echo -e "$lock\0meta\x1fl|$suspend\0meta\x1fu|$logout\0meta\x1fe|$reboot\0meta\x1fr|$shutdown\0meta\x1fs|$hibernate\0meta\x1fh" | rofi_cmd
}
# Execute Command
@@ -34,6 +35,8 @@ run_cmd() {
systemctl suspend
elif [[ $1 == '--logout' ]]; then
hyprctl dispatch exit 0
+ elif [[ $1 == '--hibernate' ]]; then
+ systemctl hibernate
fi
}
@@ -58,4 +61,7 @@ case ${chosen} in
$logout)
run_cmd --logout
;;
+ $hibernate)
+ run_cmd --hibernate
+ ;;
esac \ No newline at end of file
diff --git a/config-powermenu.rasi b/config/rofi/config-powermenu.rasi
index 9126a32e..61d7262d 100644
--- a/config-powermenu.rasi
+++ b/config/rofi/config-powermenu.rasi
@@ -2,7 +2,7 @@
/* ---- Configuration ---- */
configuration {
- show-icons: false;
+ show-icons: false;
}
/* ---- Load pywal colors (custom wal template) ---- */
@@ -10,7 +10,7 @@ configuration {
/* ---- Global Properties ---- */
* {
- font: "JetBrains Mono Nerd Font 14";
+ font: "JetBrains Mono Nerd Font 14";
}
/* ---- Main Window ---- */
@@ -24,7 +24,7 @@ window {
x-offset: 0px;
y-offset: 0px;
padding: 0px;
- border: 1px solid;
+ border: 2px solid;
border-radius: 15px;
border-color: @active-background;
cursor: "default";
@@ -48,7 +48,7 @@ mainbox {
/* ---- Inputbar ---- */
inputbar {
enabled: true;
- padding: 2px 4%;
+ padding: 10px 6.5%;
background-color: transparent;
orientation: vertical;
children: ["prompt"];
@@ -56,7 +56,7 @@ inputbar {
prompt {
enabled: true;
- padding: 2% 5%;
+ padding: 1% 2.5%;
border-radius: 100% 100% 100% 100%;
border-color: @foreground;
background-color: @background-color;
@@ -67,8 +67,8 @@ prompt {
/* ---- Listview ---- */
listview {
enabled: true;
- columns: 5;
- lines: 1;
+ columns: 3;
+ lines: 2;
cycle: true;
dynamic: true;
scrollbar: false;
@@ -76,8 +76,8 @@ listview {
reverse: false;
fixed-height: true;
fixed-columns: true;
- spacing: 30px;
- padding: 4% 30px;
+ spacing: 20px;
+ padding: 1% 30px;
background-color: transparent;
cursor: "default";
border: 0px;
@@ -86,14 +86,14 @@ listview {
/* ---- Elements ---- */
element {
enabled: true;
- padding: 20px;
- border-radius: 40px;
+ padding: 10px;
+ border-radius: 30px;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element-text {
- font: "JetBrains Mono Nerd Font 32";
+ font: "JetBrains Mono Nerd Font 18";
background-color: transparent;
text-color: inherit;
cursor: inherit;
diff --git a/config/waybar/modules b/config/waybar/modules
index b7b41d74..45668c3a 100644
--- a/config/waybar/modules
+++ b/config/waybar/modules
@@ -199,7 +199,7 @@
"tooltip": true,
"tooltip-format": "{timeTo} {power}w",
"on-click-middle": "~/.config/hypr/scripts/ChangeBlur.sh",
- "on-click-right": "~/.config/hypr/scripts/Wlogout.sh",
+ "on-click-right": "~/.config/hypr/scripts/rofipower.sh",
},
"bluetooth": {
@@ -497,7 +497,7 @@
"custom/power": {
"format": "⏻ ",
"tooltip": false,
- "on-click": "~/.config/hypr/scripts/Wlogout.sh",
+ "on-click": "~/.config/hypr/scripts/rofipower.sh",
"on-click-right": "~/.config/hypr/scripts/ChangeBlur.sh",
},
@@ -652,7 +652,7 @@
"custom/power_vertical": {
"format": "⏻",
"tooltip": false,
- "on-click": "~/.config/hypr/scripts/Wlogout.sh",
+ "on-click": "~/.config/hypr/scripts/rofipower.sh",
"on-click-right": "~/.config/hypr/scripts/ChangeBlur.sh",
},
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage