aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2023-12-04 00:06:37 +0900
committerJaKooLit <jimmielovejay@gmail.com>2023-12-04 00:06:37 +0900
commit2ad7d3373353bc2440892f9bed9295066f93b4ae (patch)
tree74fd8b33e0029261fc19f3259c16c98c8260135a
parenta7847d0de3b53b84f39664f7dc6c3416213c762e (diff)
return of wlogout. rofi-power is just pain 2 theme
-rwxr-xr-xconfig/hypr/scripts/RofiPower.sh63
-rwxr-xr-xconfig/hypr/scripts/Wlogout.sh19
-rw-r--r--config/rofi/config-powermenu.rasi125
-rw-r--r--config/rofi/resolution/1080p/config-powermenu.rasi125
-rw-r--r--config/rofi/resolution/1440p/config-powermenu.rasi125
-rw-r--r--config/waybar/modules2
-rw-r--r--config/wlogout/layout30
-rw-r--r--config/wlogout/lock-hover.pngbin0 -> 5771 bytes
-rw-r--r--config/wlogout/lock.pngbin0 -> 5771 bytes
-rw-r--r--config/wlogout/logout-hover.pngbin0 -> 3784 bytes
-rw-r--r--config/wlogout/logout.pngbin0 -> 3784 bytes
-rw-r--r--config/wlogout/power-hover.pngbin0 -> 10841 bytes
-rw-r--r--config/wlogout/power.pngbin0 -> 10782 bytes
-rw-r--r--config/wlogout/restart-hover.pngbin0 -> 7810 bytes
-rw-r--r--config/wlogout/restart.pngbin0 -> 7810 bytes
-rw-r--r--config/wlogout/sleep-hover.pngbin0 -> 5721 bytes
-rw-r--r--config/wlogout/sleep.pngbin0 -> 5721 bytes
-rw-r--r--config/wlogout/style.css113
-rwxr-xr-xcopy.sh2
19 files changed, 164 insertions, 440 deletions
diff --git a/config/hypr/scripts/RofiPower.sh b/config/hypr/scripts/RofiPower.sh
deleted file mode 100755
index c4202f97..00000000
--- a/config/hypr/scripts/RofiPower.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-#### By default will not show the keyboard shortcuts as it looks Hideous :)
-
-SwayLock=$HOME/.config/hypr/scripts/LockScreen.sh
-
-# CMDs
-uptime_info=$(uptime -p | sed -e 's/up //g')
-host=$(hostnamectl hostname)
-
-# Options with Icons and Text
-options=("Lock" "Suspend" "Logout" "Reboot" "Shutdown" "Hibernate")
-icons=("" "" "󰿅" "󱄌" "" "󰒲")
-
-# Rofi CMD
-rofi_cmd() {
- options_with_icons=()
- for ((i = 0; i < ${#options[@]}; i++)); do
- options_with_icons+=("${icons[$i]} ${options[$i]}")
- done
-
- chosen_option=$(printf "%s\n" "${options_with_icons[@]}" | \
- rofi -dmenu -i -p " $USER@$host" -mesg " Uptime: $uptime_info" \
- -kb-select-1 "l" \
- -kb-select-2 "u" \
- -kb-select-3 "e" \
- -kb-select-4 "r" \
- -kb-select-5 "s" \
- -kb-select-6 "h" \
- -theme ~/.config/rofi/config-powermenu.rasi | awk '{print $1}')
- echo "$chosen_option"
-}
-
-# Execute Command
-run_cmd() {
- case $1 in
- "")
- $SwayLock &
- ;;
- "")
- systemctl suspend
- ;;
- "󰿅")
- hyprctl dispatch exit 0
- ;;
- "󱄌")
- systemctl reboot
- ;;
- "")
- systemctl poweroff
- ;;
- "󰒲")
- systemctl hibernate
- ;;
- *)
- echo "choose: $1"
- ;;
- esac
-}
-
-# Actions
-chosen_option=$(rofi_cmd)
-run_cmd "${chosen_option% *}"
diff --git a/config/hypr/scripts/Wlogout.sh b/config/hypr/scripts/Wlogout.sh
new file mode 100755
index 00000000..c8ce86c1
--- /dev/null
+++ b/config/hypr/scripts/Wlogout.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# If you have 1440p, better to use this
+#wlogout --protocol layer-shell -b 5 -T 600 -B 600 &
+
+# for 1080p
+wlogout --protocol layer-shell -b 5 -T 450 -B 450 &
+
+
+# Capture the PID of the wlogout process
+wlogout_pid=$!
+
+# Wait for up to 30 seconds for wlogout to exit gracefully
+timeout 30s tail --pid $wlogout_pid -f /dev/null
+
+# If wlogout is still running after the timeout, forcefully kill it
+if ps -p $wlogout_pid > /dev/null; then
+ kill -KILL $wlogout_pid
+fi
diff --git a/config/rofi/config-powermenu.rasi b/config/rofi/config-powermenu.rasi
deleted file mode 100644
index 520c09d3..00000000
--- a/config/rofi/config-powermenu.rasi
+++ /dev/null
@@ -1,125 +0,0 @@
-/* --- Configuration for Rofi Power ---- */
-
-/* ---- Configuration ---- */
-configuration {
- show-icons: false;
-}
-
-/* ---- Load pywal colors (custom wal template) ---- */
-@import "~/.config/rofi/pywal-color/pywal-theme.rasi"
-
-/* ---- Global Properties ---- */
-* {
- font: "Fira Code Medium 10";
-}
-
-/* ---- Main Window ---- */
-window {
- location: east;
- anchor: center;
- fullscreen: false;
- width: 280px;
- /*height: 500px;*/
- x-offset: -10px;
-/* Debian/Ubuntu users use this offset */
-/* x-offset: -130px; */
- y-offset: 0px;
- padding: 0px;
- border: 3px;
- border-radius: 10px;
- border-color: @active-background;
- cursor: "default";
- background-color: @background-color;
-}
-
-/* ---- Main Box ---- */
-mainbox {
- enabled: true;
- spacing: 0px;
- margin: 0px;
- padding: 0px;
- border: 0px solid;
- border-radius: 0px;
- background-image: url("~/.config/rofi/.current_wallpaper", height);
- border-color: @active-background;
- background-color: @background-color;
- children: [ "inputbar", "listview", "message" ];
-}
-
-/* ---- Inputbar ---- */
-inputbar {
- enabled: true;
- padding: 5px;
- background-color: transparent;
- orientation: horizontal;
- children: ["prompt"];
-}
-
-prompt {
- enabled: true;
- /*padding: 10px;*/
- border-radius: 10px;
- border-color: @foreground;
- background-color: @background;
- text-color: @foreground;
- cursor: text;
-
-}
-
-/* ---- Listview ---- */
-listview {
- enabled: true;
- columns: 1;
- lines: 7;
- cycle: true;
- dynamic: true;
- scrollbar: false;
- layout: vertical;
- reverse: false;
- fixed-height: false;
- fixed-columns: true;
- spacing: 20px;
- padding: 20px;
- background-color: transparent;
- cursor: "default";
- border: 0px;
- border-color: @active-background;
-}
-
-/* ---- Elements ---- */
-element {
- enabled: true;
- padding: 30px 40px 30px 40px;
- border-radius: 20px;
- background-color: transparent;
- text-color: @foreground;
- cursor: pointer;
-}
-element-text {
- font: "Fira Code SemiBold 16";
- background-color: transparent;
- text-color: inherit;
- cursor: inherit;
- vertical-align: 0.5;
- horizontal-align: 0.5;
-}
-element selected.normal {
- background-color: @selected-normal-background;
- text-color: @background;
-}
-
-/* ---- Message ---- */
-message {
- enabled: true;
- margin: 0px;
- background-color: transparent;
- text-color: @foreground;
- border: 0px;
-}
-textbox {
- font: "Fira Code SemiBold 8";
- background-color: @background;
- text-color: @foreground;
- vertical-align: 0.5;
- horizontal-align: 0.5;
-} \ No newline at end of file
diff --git a/config/rofi/resolution/1080p/config-powermenu.rasi b/config/rofi/resolution/1080p/config-powermenu.rasi
deleted file mode 100644
index 520c09d3..00000000
--- a/config/rofi/resolution/1080p/config-powermenu.rasi
+++ /dev/null
@@ -1,125 +0,0 @@
-/* --- Configuration for Rofi Power ---- */
-
-/* ---- Configuration ---- */
-configuration {
- show-icons: false;
-}
-
-/* ---- Load pywal colors (custom wal template) ---- */
-@import "~/.config/rofi/pywal-color/pywal-theme.rasi"
-
-/* ---- Global Properties ---- */
-* {
- font: "Fira Code Medium 10";
-}
-
-/* ---- Main Window ---- */
-window {
- location: east;
- anchor: center;
- fullscreen: false;
- width: 280px;
- /*height: 500px;*/
- x-offset: -10px;
-/* Debian/Ubuntu users use this offset */
-/* x-offset: -130px; */
- y-offset: 0px;
- padding: 0px;
- border: 3px;
- border-radius: 10px;
- border-color: @active-background;
- cursor: "default";
- background-color: @background-color;
-}
-
-/* ---- Main Box ---- */
-mainbox {
- enabled: true;
- spacing: 0px;
- margin: 0px;
- padding: 0px;
- border: 0px solid;
- border-radius: 0px;
- background-image: url("~/.config/rofi/.current_wallpaper", height);
- border-color: @active-background;
- background-color: @background-color;
- children: [ "inputbar", "listview", "message" ];
-}
-
-/* ---- Inputbar ---- */
-inputbar {
- enabled: true;
- padding: 5px;
- background-color: transparent;
- orientation: horizontal;
- children: ["prompt"];
-}
-
-prompt {
- enabled: true;
- /*padding: 10px;*/
- border-radius: 10px;
- border-color: @foreground;
- background-color: @background;
- text-color: @foreground;
- cursor: text;
-
-}
-
-/* ---- Listview ---- */
-listview {
- enabled: true;
- columns: 1;
- lines: 7;
- cycle: true;
- dynamic: true;
- scrollbar: false;
- layout: vertical;
- reverse: false;
- fixed-height: false;
- fixed-columns: true;
- spacing: 20px;
- padding: 20px;
- background-color: transparent;
- cursor: "default";
- border: 0px;
- border-color: @active-background;
-}
-
-/* ---- Elements ---- */
-element {
- enabled: true;
- padding: 30px 40px 30px 40px;
- border-radius: 20px;
- background-color: transparent;
- text-color: @foreground;
- cursor: pointer;
-}
-element-text {
- font: "Fira Code SemiBold 16";
- background-color: transparent;
- text-color: inherit;
- cursor: inherit;
- vertical-align: 0.5;
- horizontal-align: 0.5;
-}
-element selected.normal {
- background-color: @selected-normal-background;
- text-color: @background;
-}
-
-/* ---- Message ---- */
-message {
- enabled: true;
- margin: 0px;
- background-color: transparent;
- text-color: @foreground;
- border: 0px;
-}
-textbox {
- font: "Fira Code SemiBold 8";
- background-color: @background;
- text-color: @foreground;
- vertical-align: 0.5;
- horizontal-align: 0.5;
-} \ No newline at end of file
diff --git a/config/rofi/resolution/1440p/config-powermenu.rasi b/config/rofi/resolution/1440p/config-powermenu.rasi
deleted file mode 100644
index b032dc5b..00000000
--- a/config/rofi/resolution/1440p/config-powermenu.rasi
+++ /dev/null
@@ -1,125 +0,0 @@
-/* --- Configuration for Rofi Power ---- */
-
-/* ---- Configuration ---- */
-configuration {
- show-icons: false;
-}
-
-/* ---- Load pywal colors (custom wal template) ---- */
-@import "~/.config/rofi/pywal-color/pywal-theme.rasi"
-
-/* ---- Global Properties ---- */
-* {
- font: "Fira Code Medium 10";
-}
-
-/* ---- Main Window ---- */
-window {
- location: east;
- anchor: center;
- fullscreen: false;
- width: 300px;
- /*height: 500px;*/
- x-offset: -10px;
-/* Debian/Ubuntu users use this offset */
-/* x-offset: -130px; */
- y-offset: 0px;
- padding: 0px;
- border: 3px;
- border-radius: 10px;
- border-color: @active-background;
- cursor: "default";
- background-color: @background-color;
-}
-
-/* ---- Main Box ---- */
-mainbox {
- enabled: true;
- spacing: 0px;
- margin: 0px;
- padding: 0px;
- border: 0px solid;
- border-radius: 0px;
- background-image: url("~/.config/rofi/.current_wallpaper", height);
- border-color: @active-background;
- background-color: @background-color;
- children: [ "inputbar", "listview", "message" ];
-}
-
-/* ---- Inputbar ---- */
-inputbar {
- enabled: true;
- padding: 5px;
- background-color: transparent;
- orientation: horizontal;
- children: ["prompt"];
-}
-
-prompt {
- enabled: true;
- /*padding: 10px;*/
- border-radius: 10px;
- border-color: @foreground;
- background-color: @background;
- text-color: @foreground;
- cursor: text;
-
-}
-
-/* ---- Listview ---- */
-listview {
- enabled: true;
- columns: 1;
- lines: 7;
- cycle: true;
- dynamic: true;
- scrollbar: false;
- layout: vertical;
- reverse: false;
- fixed-height: false;
- fixed-columns: true;
- spacing: 20px;
- padding: 20px;
- background-color: transparent;
- cursor: "default";
- border: 0px;
- border-color: @active-background;
-}
-
-/* ---- Elements ---- */
-element {
- enabled: true;
- padding: 30px 40px 30px 40px;
- border-radius: 20px;
- background-color: transparent;
- text-color: @foreground;
- cursor: pointer;
-}
-element-text {
- font: "Fira Code SemiBold 18";
- background-color: transparent;
- text-color: inherit;
- cursor: inherit;
- vertical-align: 0.5;
- horizontal-align: 0.5;
-}
-element selected.normal {
- background-color: @selected-normal-background;
- text-color: @background;
-}
-
-/* ---- Message ---- */
-message {
- enabled: true;
- margin: 0px;
- background-color: transparent;
- text-color: @foreground;
- border: 0px;
-}
-textbox {
- font: "Fira Code SemiBold 8";
- background-color: @background;
- text-color: @foreground;
- vertical-align: 0.5;
- horizontal-align: 0.5;
-} \ No newline at end of file
diff --git a/config/waybar/modules b/config/waybar/modules
index aa92494e..a4567c08 100644
--- a/config/waybar/modules
+++ b/config/waybar/modules
@@ -497,7 +497,7 @@
"custom/power": {
"format": "⏻ ",
"tooltip": false,
- "on-click": "~/.config/hypr/scripts/RofiPower.sh",
+ "on-click": "~/.config/hypr/scripts/Wlogout.sh",
"on-click-right": "~/.config/hypr/scripts/ChangeBlur.sh",
},
diff --git a/config/wlogout/layout b/config/wlogout/layout
new file mode 100644
index 00000000..6d1c3975
--- /dev/null
+++ b/config/wlogout/layout
@@ -0,0 +1,30 @@
+{
+ "label" : "lock",
+ "action" : "$HOME/.config/hypr/scripts/LockScreen.sh",
+ "text" : "Lock",
+ "keybind" : "l"
+}
+{
+ "label" : "reboot",
+ "action" : "systemctl reboot",
+ "text" : "Reboot",
+ "keybind" : "r"
+}
+{
+ "label" : "shutdown",
+ "action" : "systemctl poweroff",
+ "text" : "Shutdown",
+ "keybind" : "s"
+}
+{
+ "label" : "logout",
+ "action" : "hyprctl dispatch exit 0",
+ "text" : "Logout",
+ "keybind" : "e"
+}
+{
+ "label" : "suspend",
+ "action" : "systemctl suspend",
+ "text" : "Suspend",
+ "keybind" : "u"
+}
diff --git a/config/wlogout/lock-hover.png b/config/wlogout/lock-hover.png
new file mode 100644
index 00000000..8fb86fe4
--- /dev/null
+++ b/config/wlogout/lock-hover.png
Binary files differ
diff --git a/config/wlogout/lock.png b/config/wlogout/lock.png
new file mode 100644
index 00000000..430451c8
--- /dev/null
+++ b/config/wlogout/lock.png
Binary files differ
diff --git a/config/wlogout/logout-hover.png b/config/wlogout/logout-hover.png
new file mode 100644
index 00000000..9e570a9e
--- /dev/null
+++ b/config/wlogout/logout-hover.png
Binary files differ
diff --git a/config/wlogout/logout.png b/config/wlogout/logout.png
new file mode 100644
index 00000000..128c9955
--- /dev/null
+++ b/config/wlogout/logout.png
Binary files differ
diff --git a/config/wlogout/power-hover.png b/config/wlogout/power-hover.png
new file mode 100644
index 00000000..122d3318
--- /dev/null
+++ b/config/wlogout/power-hover.png
Binary files differ
diff --git a/config/wlogout/power.png b/config/wlogout/power.png
new file mode 100644
index 00000000..ce561661
--- /dev/null
+++ b/config/wlogout/power.png
Binary files differ
diff --git a/config/wlogout/restart-hover.png b/config/wlogout/restart-hover.png
new file mode 100644
index 00000000..3e185360
--- /dev/null
+++ b/config/wlogout/restart-hover.png
Binary files differ
diff --git a/config/wlogout/restart.png b/config/wlogout/restart.png
new file mode 100644
index 00000000..7855d409
--- /dev/null
+++ b/config/wlogout/restart.png
Binary files differ
diff --git a/config/wlogout/sleep-hover.png b/config/wlogout/sleep-hover.png
new file mode 100644
index 00000000..0fd3bade
--- /dev/null
+++ b/config/wlogout/sleep-hover.png
Binary files differ
diff --git a/config/wlogout/sleep.png b/config/wlogout/sleep.png
new file mode 100644
index 00000000..6a3d607f
--- /dev/null
+++ b/config/wlogout/sleep.png
Binary files differ
diff --git a/config/wlogout/style.css b/config/wlogout/style.css
new file mode 100644
index 00000000..57c9ede2
--- /dev/null
+++ b/config/wlogout/style.css
@@ -0,0 +1,113 @@
+window {
+ font-family: monospace;
+ font-size: 14pt;
+ color: #cdd6f4; /* text */
+ background-color: rgba(30, 30, 46, 0.5);
+}
+
+button {
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: 25%;
+ border: none;
+ background-color: rgba(30, 30, 46, 0);
+ margin: 5px;
+ animation: gradient_f 20s ease-in infinite;
+ transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
+}
+
+button:hover#lock {
+ /*background-color: rgba(49, 50, 68, 0.2);*/
+ background-size: 25%;
+ margin-right : 30px;
+ margin-bottom : 30px;
+ border-radius: 20px;
+ animation: gradient_f 20s ease-in infinite;
+ transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
+}
+
+button:hover#logout {
+ /*background-color: rgba(49, 50, 68, 0.2);*/
+ background-size: 25%;
+ margin-right : 30px;
+ margin-top : 30px;
+ border-radius: 20px;
+ animation: gradient_f 20s ease-in infinite;
+ transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
+}
+
+button:hover#shutdown {
+ /*background-color: rgba(49, 50, 68, 0.2);*/
+ background-size: 25%;
+ margin-left : 20px;
+ margin-bottom : 30px;
+ border-radius: 20px;
+ animation: gradient_f 20s ease-in infinite;
+ transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
+}
+
+button:hover#reboot {
+ /*background-color: rgba(49, 50, 68, 0.2);*/
+ background-size: 25%;
+ margin-left : 30px;
+ margin-top : 30px;
+ border-radius: 20px;
+ animation: gradient_f 20s ease-in infinite;
+ transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
+}
+
+button:hover#suspend {
+ /*background-color: rgba(49, 50, 68, 0.2);*/
+ background-size: 25%;
+ margin-left : 30px;
+ margin-top : 30px;
+ border-radius: 20px;
+ animation: gradient_f 20s ease-in infinite;
+ transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
+}
+
+button:focus {
+ background-color: rgba(180, 190, 254, 0.3);
+ color: #1e1e2e;
+ background-size: 25%;
+ margin-left : 30px;
+ margin-top : 30px;
+ border-radius: 20px;
+ animation: gradient_f 20s ease-in infinite;
+ transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
+}
+
+#lock {
+ background-image: image(url("./lock.png"));
+}
+#lock:focus {
+ background-image: image(url("./lock-hover.png"));
+}
+
+#logout {
+ background-image: image(url("./logout.png"));
+}
+#logout:focus {
+ background-image: image(url("./logout-hover.png"));
+}
+
+#suspend {
+ background-image: image(url("./sleep.png"));
+}
+#suspend:focus {
+ background-image: image(url("./sleep-hover.png"));
+}
+
+#shutdown {
+ background-image: image(url("./power.png"));
+}
+#shutdown:focus {
+ background-image: image(url("./power-hover.png"));
+}
+
+#reboot {
+ background-image: image(url("./restart.png"));
+}
+#reboot:focus {
+ background-image: image(url("./restart-hover.png"));
+}
diff --git a/copy.sh b/copy.sh
index 032fef4d..6883c243 100755
--- a/copy.sh
+++ b/copy.sh
@@ -146,7 +146,7 @@ fi
set -e # Exit immediately if a command exits with a non-zero status.
printf "${NOTE} - copying dotfiles\n"
- for DIR in btop cava dunst hypr kitty Kvantum qt5ct rofi swappy swaylock wal waybar; do
+ for DIR in btop cava dunst hypr kitty Kvantum qt5ct rofi swappy swaylock wal waybar wlogout; do
DIRPATH=~/.config/$DIR
if [ -d "$DIRPATH" ]; then
echo -e "${NOTE} - Config for $DIR found, attempting to back up."
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage