Dev
This commit is contained in:
23
hypr/scripts/disabledm.sh
Executable file
23
hypr/scripts/disabledm.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
clear
|
||||
echo "Hyprland recommends the start with the tty login."
|
||||
echo "You can deactivate the current display manager (if exists)."
|
||||
echo ""
|
||||
echo "-> Do you really want to deactivate the display manager?"
|
||||
while true; do
|
||||
read -p "Do you want to enable the sddm display manager and setup theme? (Yy/Nn): " yn
|
||||
case $yn in
|
||||
[Yy]* )
|
||||
if [ -f /etc/systemd/system/display-manager.service ]; then
|
||||
sudo rm /etc/systemd/system/display-manager.service
|
||||
echo "Current display manager removed."
|
||||
else
|
||||
echo "No active display manager found."
|
||||
fi
|
||||
break;;
|
||||
[Nn]* )
|
||||
exit
|
||||
break;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
25
hypr/scripts/keybindings.sh
Executable file
25
hypr/scripts/keybindings.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# _ _ _ _ _
|
||||
# | | _____ _ _| |__ (_)_ __ __| (_)_ __ __ _ ___
|
||||
# | |/ / _ \ | | | '_ \| | '_ \ / _` | | '_ \ / _` / __|
|
||||
# | < __/ |_| | |_) | | | | | (_| | | | | | (_| \__ \
|
||||
# |_|\_\___|\__, |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___/
|
||||
# |___/ |___/
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Define keybindings.conf location
|
||||
# -----------------------------------------------------
|
||||
config_file=~/dotfiles/hypr/conf/keybindings.conf
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Parse keybindings
|
||||
# -----------------------------------------------------
|
||||
keybinds=$(grep -oP '(?<=bind = ).*' $config_file)
|
||||
keybinds=$(echo "$keybinds" | sed 's/$mainMod/SUPER/g'| sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Show keybindings in rofi
|
||||
# -----------------------------------------------------
|
||||
rofi -dmenu -p "Keybinds" -config ~/dotfiles/rofi/config-compact.rasi <<< "$keybinds"
|
||||
5
hypr/scripts/loadconfig.sh
Executable file
5
hypr/scripts/loadconfig.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
if [ -f ~/.hyprland.sh ]; then
|
||||
sleep 1
|
||||
~/.hyprland.sh
|
||||
fi
|
||||
20
hypr/scripts/lockscreentime.sh
Normal file
20
hypr/scripts/lockscreentime.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#/bin/sh
|
||||
# ___ _ _ _ _
|
||||
# |_ _|__| | | ___| |_(_)_ __ ___ ___
|
||||
# | |/ _` | |/ _ \ __| | '_ ` _ \ / _ \
|
||||
# | | (_| | | __/ |_| | | | | | | __/
|
||||
# |___\__,_|_|\___|\__|_|_| |_| |_|\___|
|
||||
#
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
timeswaylock=600
|
||||
timeoff=660
|
||||
|
||||
if [ -f "/usr/bin/swayidle" ]; then
|
||||
echo "swayidle is installed."
|
||||
swayidle -w timeout $timeswaylock 'swaylock -f' timeout $timeoff 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
|
||||
else
|
||||
echo "swayidle not installed."
|
||||
fi;
|
||||
32
hypr/scripts/screenshot.sh
Executable file
32
hypr/scripts/screenshot.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# ____ _ _
|
||||
# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_
|
||||
# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __|
|
||||
# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_
|
||||
# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__|
|
||||
#
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
DIR="$HOME/Pictures/screenshots/"
|
||||
NAME="screenshot_$(date +%d%m%Y_%H%M%S).png"
|
||||
|
||||
option2="Selected area"
|
||||
option3="Fullscreen (delay 3 sec)"
|
||||
|
||||
options="$option2\n$option3"
|
||||
|
||||
choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot")
|
||||
|
||||
case $choice in
|
||||
$option2)
|
||||
grim -g "$(slurp)" - | swappy -f -
|
||||
notify-send "Screenshot created" "Mode: Selected area"
|
||||
;;
|
||||
$option3)
|
||||
sleep 3
|
||||
grim - | swappy -f -
|
||||
notify-send "Screenshot created" "Mode: Fullscreen"
|
||||
;;
|
||||
esac
|
||||
11
hypr/scripts/toggleallfloat.sh
Executable file
11
hypr/scripts/toggleallfloat.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# _ _ _ __ _ _
|
||||
# / \ | | |/ _| | ___ __ _| |_
|
||||
# / _ \ | | | |_| |/ _ \ / _` | __|
|
||||
# / ___ \| | | _| | (_) | (_| | |_
|
||||
# /_/ \_\_|_|_| |_|\___/ \__,_|\__|
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
hyprctl dispatch workspaceopt allfloat
|
||||
81
hypr/scripts/wallpaper.sh
Executable file
81
hypr/scripts/wallpaper.sh
Executable file
@@ -0,0 +1,81 @@
|
||||
#!/bin/bash
|
||||
# _ _
|
||||
# __ ____ _| | |_ __ __ _ _ __ ___ _ __
|
||||
# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__|
|
||||
# \ V V / (_| | | | |_) | (_| | |_) | __/ |
|
||||
# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_|
|
||||
# |_| |_|
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
case $1 in
|
||||
|
||||
# Load wallpaper from .cache of last session
|
||||
"init")
|
||||
if [ -f ~/.cache/current_wallpaper.jpg ]; then
|
||||
wal -q -i ~/.cache/current_wallpaper.jpg
|
||||
else
|
||||
wal -q -i ~/wallpaper/
|
||||
fi
|
||||
;;
|
||||
|
||||
# Select wallpaper with rofi
|
||||
"select")
|
||||
selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi)
|
||||
if [ ! "$selected" ]; then
|
||||
echo "No wallpaper selected"
|
||||
exit
|
||||
fi
|
||||
wal -q -i ~/wallpaper/$selected
|
||||
;;
|
||||
|
||||
# Randomly select wallpaper
|
||||
*)
|
||||
wal -q -i ~/wallpaper/
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Load current pywal color scheme
|
||||
# -----------------------------------------------------
|
||||
source "$HOME/.cache/wal/colors.sh"
|
||||
echo "Wallpaper: $wallpaper"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Copy selected wallpaper into .cache folder
|
||||
# -----------------------------------------------------
|
||||
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
||||
|
||||
# -----------------------------------------------------
|
||||
# get wallpaper iamge name
|
||||
# -----------------------------------------------------
|
||||
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Reload waybar with new colors
|
||||
# -----------------------------------------------------
|
||||
~/dotfiles/waybar/launch.sh
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Set the new wallpaper
|
||||
# -----------------------------------------------------
|
||||
transition_type="wipe"
|
||||
# transition_type="outer"
|
||||
# transition_type="random"
|
||||
|
||||
swww img $wallpaper \
|
||||
--transition-bezier .43,1.19,1,.4 \
|
||||
--transition-fps=60 \
|
||||
--transition-type=$transition_type \
|
||||
--transition-duration=0.7 \
|
||||
--transition-pos "$( hyprctl cursorpos )"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Send notification
|
||||
# -----------------------------------------------------
|
||||
sleep 1
|
||||
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
||||
|
||||
echo "DONE!"
|
||||
Reference in New Issue
Block a user