hyprland: add custom config sourcing

This commit is contained in:
end-4 2024-03-02 22:35:43 +07:00
parent f89cde569b
commit 4302840735
10 changed files with 46 additions and 25 deletions

View file

@ -0,0 +1,2 @@
## You can put extra environment variables here
## https://wiki.hyprland.org/Configuring/Environment-variables/

View file

@ -0,0 +1,2 @@
# You can make apps auto-start here
# Relevant Hyprland wiki section: https://wiki.hyprland.org/Configuring/Keywords/#executing

View file

@ -0,0 +1,2 @@
## Put general config stuff here
## Here's a list of every variable: https://wiki.hyprland.org/Configuring/Variables/

View file

@ -0,0 +1,2 @@
## You can put your preferred keybinds here
## https://wiki.hyprland.org/Configuring/Binds/

View file

@ -0,0 +1,3 @@
## You can put custom rules here
## Window/layer rules: https://wiki.hyprland.org/Configuring/Window-Rules/
## Workspace rules: https://wiki.hyprland.org/Configuring/Workspace-Rules/

View file

@ -1,12 +1,24 @@
# General customization options
source=~/.config/hypr/hyprland/general.conf
# Environment variables
# This file sources other files in `hyprland` and `custom` folders
# You wanna add your stuff in file in `custom`
# Defaults
source=~/.config/hypr/hyprland/env.conf
# Startup executions, Auto-run stuff
source=~/.config/hypr/hyprland/execs.conf
# Window and layer rules
source=~/.config/hypr/hyprland/general.conf
source=~/.config/hypr/hyprland/rules.conf
# Dynamic colors
source=~/.config/hypr/hyprland/colors.conf
# Keybinds variables
source=~/.config/hypr/hyprland/keybinds.conf
# Custom
source=~/.config/hypr/custom/env.conf
source=~/.config/hypr/custom/execs.conf
source=~/.config/hypr/custom/general.conf
source=~/.config/hypr/custom/rules.conf
source=~/.config/hypr/custom/keybinds.conf
# Why is this even here?? cuz 🤓
debug {
# overlay = true # Show fps n stuff
# damage_tracking = 0
# damage_blink = yes
}

View file

@ -1,7 +1,8 @@
# MONITOR CONFIG
monitor=,preferred,auto,1
monitor=,addreserved, 0, 0, 0, 0
# monitor=,addreserved, 0, 0, 0, 0 # Custom reserved area
# HDMI port: mirror display. To see device name, use `hyprctl monitors`
# monitor=HDMI-A-1,1920x1080@60,1920x0,1,mirror,eDP-1
input {
@ -138,13 +139,3 @@ misc {
new_window_takes_over_fullscreen = 2
}
debug {
# overlay = true
# damage_tracking = 0
# damage_blink = yes
}
# Window and layer rules
layerrule = noanim, selection
windowrulev2=rounding 20, onworkspace:1

View file

@ -37,7 +37,7 @@ bind = Control+Shift+Alt, Delete, exec, pkill wlogout || wlogout -p layer-shell
bind = Control+Shift+Alt+Super, Delete, exec, systemctl poweroff
# Screenshot, Record, OCR, Color picker, Clipboard history
bind = Super+Shift+Alt, S, exec, grim -g $(slurp $SLURP_ARGS) - | swappy -f -
bind = Super+Shift+Alt, S, exec, grim -g $(slurp) - | swappy -f -
bindl=,Print,exec,grim - | wl-copy
bind = Super+Shift, S, exec, ~/.config/ags/scripts/grimblast.sh --freeze copy area
bind = Super+Alt, R, exec, ~/.config/ags/scripts/record-script.sh
@ -99,9 +99,8 @@ bind = Control+Super, O, exec, hyprctl plugin unload "~/.config/hypr/plugins/dro
## Testing
# bind = SuperAlt, f12, exec, notify-send "Hyprland version: $(hyprctl version | head -2 | tail -1 | cut -f2 -d ' ')" "owo" -a 'Hyprland keybind'
# bind = Super+Alt, f12, exec, notify-send "Millis since epoch" "$(date +%s%N | cut -b1-13)" -a 'Hyprland keybind'
bind = Super+Alt, f12, exec, notify-send 'Test notification' "Here's a really long message to test truncation and wrapping\nYou can middle click or flick this notification to dismiss it!" -a 'Shell' -A "Test1=I got it!" -A "Test2=Another action"
# bind = Super+Alt, Equal, exec, notify-send "Urgent notification" "Ah hell no" -u critical -a 'Hyprland keybind'
bind = Super+Alt, Equal, exec, notify-send 'hmm' ${SLURP_ARGS}
bind = Super+Alt, f12, exec, notify-send 'Test notification' "Here's a really long message to test truncation and wrapping\nYou can middle click or flick this notification to dismiss it!" -a 'Shell' -A "Test1=I got it!" -A "Test2=Another action" -t 5000
bind = Super+Alt, Equal, exec, notify-send "Urgent notification" "Ah hell no" -u critical -a 'Hyprland keybind'
############################ Keybinds for Hyprland ############################
# Swap windows

View file

@ -1,5 +1,6 @@
######## Window rules ########
windowrule = noblur,.* # Disables blur for windows. Substantially improves performance.
layerrule = noanim, selection
# windowrule = opacity 0.89 override 0.89 override, .* # Applies transparency to EVERY WINDOW
windowrule = float, ^(steam)$

View file

@ -2,21 +2,28 @@
############ Variables ############
enable_battery=false
battery_charging=false
####### Check availability ########
for battery in /sys/class/power_supply/*BAT*; do
if [[ -f "$battery/uevent" ]]; then
enable_battery=true
if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then
battery_charging=true
fi
break
fi
done
############# Output #############
if [[ $enable_battery == true ]]; then
if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then
if [[ $battery_charging == true ]]; then
echo -n "(+) "
fi
echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"% remaining
fi
echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"%
if [[ $battery_charging == false ]]; then
echo -n " remaining"
fi
fi
echo ''