Browse Source

Merge branch 'development' into rofi

pull/160/head
Ja.KooLit 2 years ago committed by GitHub
parent
commit
89f31f00e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      config/wlogout/layout
  2. 56
      copy.sh

6
config/wlogout/layout

@ -24,13 +24,15 @@
} }
{ {
"label" : "suspend", "label" : "suspend",
"action" : "swaylock -f && systemctl suspend", // "action" : "swaylock -f && systemctl suspend",
"action" : "hyprlock --immediate && systemctl suspend",
"text" : "Suspend", "text" : "Suspend",
"keybind" : "u" "keybind" : "u"
} }
{ {
"label" : "hibernate", "label" : "hibernate",
"action" : "swaylock -f && systemctl hibernate", // "action" : "swaylock -f && systemctl hibernate",
"action" : "hyprlock --immediate && systemctl hibernate",
"text" : "Hibernate", "text" : "Hibernate",
"keybind" : "h" "keybind" : "h"
} }

56
copy.sh

@ -115,31 +115,39 @@ printf "\n"
# Ask whether to change to 12hr format # Ask whether to change to 12hr format
while true; do while true; do
# Ask whether to change to 12hr format echo -e "$ORANGE By default, configs are in 24H format."
echo -e "$ORANGE By default, configs are in 24H format." read -p "$CAT Do you want to change to 12H format (AM/PM)? (y/n): " answer
read -p "$CAT Do you want to change to 12H format (AM/PM)? (y/n): " answer
# Convert the answer to lowercase for comparison
# Convert the answer to lowercase for comparison answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]')
answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]')
# Check if the answer is valid
# Check if the answer is valid if [[ "$answer" == "y" ]]; then
if [[ "$answer" == "y" ]]; then # Modify waybar config if 12hr is selected
# Modify waybar config if 12hr is selected sed -i 's/^ \/\/"format": " {:%I:%M %p}"/ "format": " {:%I:%M %p}"/' ./config/waybar/modules
# waybar sed -i 's/^ "format": " {:%H:%M:%S}"/ \/\/"format": " {:%H:%M:%S}"/' ./config/waybar/modules
sed -i 's/^ \/\/"format": " {:%I:%M %p}"/ "format": " {:%I:%M %p}"/' ./config/waybar/modules
sed -i 's/^ "format": " {:%H:%M:%S}"/ \/\/"format": " {:%H:%M:%S}"/' ./config/waybar/modules # for hyprlock
sed -i 's|^# text = cmd\[update:1000\] echo "<b><big> $(date +"%I:%M:%S %p") </big></b>" # AM/PM|text = cmd\[update:1000\] echo "<b><big> $(date +"%I:%M:%S %p") </big></b>" # AM/PM|' ./config/hypr/hyprlock.conf
# for hyprlock sed -i 's|^text = cmd\[update:1000\] echo "<b><big> $(date +"%H:%M:%S") </big></b>" # 24H|# text = cmd\[update:1000\] echo "<b><big> $(date +"%H:%M:%S") </big></b>" # 24H|' ./config/hypr/hyprlock.conf
sed -i 's|^# text = cmd\[update:1000\] echo "<b><big> $(date +"%I:%M:%S %p") </big></b>" # AM/PM|text = cmd\[update:1000\] echo "<b><big> $(date +"%I:%M:%S %p") </big></b>" # AM/PM|' ./config/hypr/hyprlock.conf
sed -i 's|^text = cmd\[update:1000\] echo "<b><big> $(date +"%H:%M:%S") </big></b>" # 24H|# text = cmd\[update:1000\] echo "<b><big> $(date +"%H:%M:%S") </big></b>" # 24H|' ./config/hypr/hyprlock.conf # for SDDM (custom theme)
sddm_folder="/usr/share/sddm/themes/simple-sddm"
break if [ -d "$sddm_folder" ]; then
elif [[ "$answer" == "n" ]]; then echo "Simple sddm exists. Editing to 12H format"
echo "You chose not to change to 12H format."
break sudo sed -i 's|^## HourFormat="hh:mm AP"|HourFormat="hh:mm AP"|' "$sddm_folder/theme.conf"
else sudo sed -i 's|^HourFormat="HH:mm"|## HourFormat="HH:mm"|' "$sddm_folder/theme.conf"
echo "Invalid choice. Please enter y for yes or n for no."
echo "12H format set to SDDM theme successfully."
fi fi
break
elif [[ "$answer" == "n" ]]; then
echo "You chose not to change to 12H format."
break
else
echo "Invalid choice. Please enter y for yes or n for no."
fi
done done
printf "\n" printf "\n"

Loading…
Cancel
Save