Browse Source

Merge pull request #33 from JaKooLit/main

Add recent changes to v2.1.9
pull/34/head
Ja.KooLit 2 years ago committed by GitHub
parent
commit
e96d2b933a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      README.md
  2. 2
      config/hypr/configs/Keybinds.conf
  3. 67
      config/hypr/scripts/RofiPower.sh
  4. 123
      config/rofi/config-powermenu.rasi
  5. 6
      config/waybar/modules

3
README.md

@ -7,6 +7,9 @@
<br/>
</div>
### Some preview
https://github.com/JaKooLit/Hyprland-Dots/assets/85185940/4c98fa74-0190-4a1d-96d6-2df304ed1aa2
## 👁🗨 My Hyprland install Scripts 👁🗨
- You can install Hyprland using Scripts below:

2
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

67
config/hypr/scripts/RofiPower.sh

@ -0,0 +1,67 @@
#!/usr/bin/env bash
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(l)" "Suspend(u)" "Logout(e)" "Reboot(r)" "Shutdown(s)" "Hibernate(h)")
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"
}
# Pass variables to rofi dmenu
run_rofi() {
chosen_option=$(rofi_cmd)
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=$(run_rofi)
run_cmd "${chosen_option% *}"

123
config/rofi/config-powermenu.rasi

@ -0,0 +1,123 @@
/* --- 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 12";
}
/* ---- Main Window ---- */
window {
location: center;
anchor: center;
fullscreen: false;
width: 900px;
height: 400px;
x-offset: 0px;
y-offset: 0px;
padding: 0px;
border: 2px;
border-radius: 15px;
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", width);
border-color: @active-background;
background-color: @background-color;
children: [ "inputbar", "listview", "message" ];
}
/* ---- Inputbar ---- */
inputbar {
enabled: true;
padding: 20px;
background-color: transparent;
orientation: horizontal;
children: ["prompt"];
}
prompt {
enabled: true;
padding: 10px;
border-radius: 15px;
border-color: @foreground;
background-color: @background-color;
text-color: @foreground;
cursor: text;
}
/* ---- Listview ---- */
listview {
enabled: true;
columns: 3;
lines: 2;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: false;
fixed-columns: true;
spacing: 40px;
padding: 4% 40px;
background-color: transparent;
cursor: "default";
border: 0px;
border-color: @active-background;
}
/* ---- Elements ---- */
element {
enabled: true;
padding: 20px;
border-radius: 30px;
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;
}

6
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",
},

Loading…
Cancel
Save