This commit is contained in:
2023-10-22 06:12:10 +02:00
commit 314ff2f75d
69 changed files with 6951 additions and 0 deletions

7
.config/hypr/env.conf Executable file
View File

@@ -0,0 +1,7 @@
## Environment
env = XCURSOR_SIZE,24
env = XDG_SESSION_TYPE,wayland
env = WLR_NO_HARDWARE_CURSORS,1
env = QT_QPA_PLATFORMTHEME,qt5ct
#env = QT_QPA_PLATFORM,wayland
env = QT_STYLE_OVERRIDE,kvantum

105
.config/hypr/hyprland.conf Executable file
View File

@@ -0,0 +1,105 @@
## Environment
source = ~/.config/hypr/env.conf
# Nvidia
# source = ~/.config/hypr/nvidia.conf
## Keybinds
source = ~/.config/hypr/keybinds.conf
## Monitors/Workspaces
source = ~/.config/hypr/windowrule.conf
## Startup
source = ~/.config/hypr/startup.conf
## Input
input {
kb_layout = de
kb_variant =
kb_model =
kb_options =
kb_rules =
numlock_by_default = 1
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
## General
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 5
border_size = 2
col.active_border = rgba(7dc4e4ee) rgba(7dc4e4ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
}
## Decoration
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 0
blur {
enabled = true
size = 3
passes = 1
}
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
## Animations
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
## Dwindle
dwindle {
pseudotile = yes
preserve_split = yes # you probably want thisr
}
## Master
master {
new_is_master = true
}
## Gestures
gestures {
workspace_swipe = on
}
## Misc
misc {
#mouse_move_enables_dpms = true
key_press_enables_dpms = true
}
## Devices
device:roccat-roccat-kone-emp-mouse {
sensitivity = 0.5
}

8
.config/hypr/hyprshade.toml Executable file
View File

@@ -0,0 +1,8 @@
# [[shades]]
# name = "vibrance"
# default = true # shader to use during times when there is no other shader scheduled
[[shades]]
name = "blue-light-filter"
start_time = 19:00:00
end_time = 08:00:00 # optional if you have more than one shade with start_time

96
.config/hypr/keybinds.conf Executable file
View File

@@ -0,0 +1,96 @@
## Keybindings
$mainMod = SUPER
# General
bind = $mainMod, P, pseudo,
bind = $mainMod, DELETE, exit,
bind = $mainMod, C, killactive,
bind = $mainMod, M, fullscreen,
bind = $mainMod, S, togglesplit,
bind = $mainMod, F4, exec, wlogout
bind = $mainMod, F, togglefloating,
bind = $mainMod, N, exec, swaync-client -t -sw
bind = $mainMod, O, exec, ~/.config/hypr/scripts/lock.sh
bind = $mainMod, B, exec, ~/.config/hypr/scripts/game_mode.sh
bind = $mainMod, V, exec, pkill rofi || ~/.config/hypr/scripts/clipboard.sh c
bind = $mainMod, TAB, exec, pkill rofi || ~/.config/hypr/scripts/app_launcher.sh w
bind = $mainMod, COMMA, exec, pkill rofi || ~/.config/hypr/scripts/app_launcher.sh e
bindr = $mainMod, SUPER_L, exec, pkill rofi || ~/.config/hypr/scripts/app_launcher.sh d
bind = $mainMod SHIFT, S, exec, grimblast --freeze copy area
bind = $mainMod CTRL, S, exec, grimblast --freeze copysave area ~/Pictures/Screenshots/"$(date --rfc-3339=seconds)".png
# Media keys
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous
bind = , XF86AudioPlay, exec, playerctl play
bind = , XF86AudioPause, exec, playerctl pause
bind = , XF86AudioMute, exec, ~/.config/eww/scripts/audio.sh mutesink @DEFAULT_SINK@
bind = , XF86AudioMicMute, exec, ~/.config/eww/scripts/audio.sh mutesource @DEFAULT_SOURCE@
binde = , XF86AudioRaiseVolume, exec, ~/.config/eww/scripts/audio.sh vol up
binde = , XF86AudioLowerVolume, exec, ~/.config/eww/scripts/audio.sh vol down
# Applications
bind = $mainMod, T, exec, kitty
bind = $mainMod, E, exec, thunar || dolphin
bind = $mainMod, G, exec, ~/.config/hypr/scripts/app_launcher.sh c
bind = CTRL SHIFT, ESCAPE, exec, gnome-system-monitor
# Move focus
bind = $mainMod, left, movefocus, l
bind = $mainMod, H, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, L, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, K, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, J, movefocus, d
# Move window
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
bind = $mainMod SHIFT, J, movewindow, d
bindm = $mainMod, mouse:272, movewindow
# Resize windows
binde = $mainMod CTRL, left, resizeactive, -10 0
binde = $mainMod CTRL, h, resizeactive, -10 0
binde = $mainMod CTRL, right, resizeactive, 10 0
binde = $mainMod CTRL, l, resizeactive, 10 0
binde = $mainMod CTRL, up, resizeactive, 0 -10
binde = $mainMod CTRL, k, resizeactive, 0 -10
binde = $mainMod CTRL, down, resizeactive, 0 10
binde = $mainMod CTRL, j, resizeactive, 0 10
bindm = $mainMod, mouse:273, resizewindow
# Move active window to a workspace
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Switch workspaces
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Scroll through existing workspaces
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

7
.config/hypr/nvidia.conf Executable file
View File

@@ -0,0 +1,7 @@
## Nvidia env
env = GBM_BACKEND,nvidia-drm
env = LIBVA_DRIVER_NAME,nvidia
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = __GL_VRR_ALLOWED,1
env = WLR_NO_HARDWARE_CURSORS,1
env = WLR_DRM_NO_ATOMIC,1

View File

@@ -0,0 +1,36 @@
#!/bin/bash
rofi_conf="~/.config/rofi/main.rasi"
# Rofi action
case $1 in
d) mode="drun" ;;
w) mode="window" ;;
f) mode="filebrowser" ;;
e) mode="emoji"
action=(-a copy)
;;
c) mode="calc"
action=(-calc-command "wl-copy {result}")
children="\"message\", "
;;
h) echo -e "$0 [action]"
echo "d : drun mode"
echo "w : window mode"
echo "f : filebrowser mode"
exit 0 ;;
*) mode="drun" ;;
esac
# Get font
font=`gsettings get org.gnome.desktop.interface font-name`
fnt_override="configuration {font: \"${font//\'}\";}"
# Get icon theme
icon_override=`gsettings get org.gnome.desktop.interface icon-theme | sed "s/'//g"`
icon_override="configuration {icon-theme: \"${icon_override}\";}"
# Children
children_ovr="mainbox {children: [\"inputbar\", $children \"listbox\"];}"
# Launch rofi
rofi -show $mode ${action[0]} "${action[1]}" -theme-str "$children_ovr" -theme-str "$fnt_override" -theme-str "$icon_override" -config "$rofi_conf"

View File

@@ -0,0 +1,53 @@
#!/bin/bash
#set -e # Exit immediately if a command exits with a non-zero status. (deprecated) -> [CMD] || exit 1
if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then
echo "Usage:
$0 <dir containing images> [interval(seconds)]"
exit 1
fi
## Check running
running=$(ps -ef | grep "$0" | grep -v grep | wc -l)
if [ ${running} -gt 2 ]; then
echo "Script already running! Killing others (TODO)..."
exit 1
# CRASHES EVERYTHING \/ !!!!!!!!!!
script_pids=$(ps aux | grep -E "$script_name" | grep -v "grep" | awk -v pid="$current_pid" '$2 != pid {print $2}')
# Loop through the PIDs and kill the processes
for pid in $script_pids; do
echo "Killing process $pid"
kill "$pid"
done
fi
## Start swww
swww init &> /dev/null
## Settings for swww
export SWWW_TRANSITION_FPS=60
export SWWW_TRANSITION_STEP=2
INTERVAL=300
if [ ! -z $2 ]; then
INTERVAL=$2
fi
## Main loop
while true; do
find "$1" \
| while read -r img; do
echo "$((RANDOM % 1000)):$img"
done \
| sort -n | cut -d':' -f2- \
| while read -r img; do
img=${img/\~/$HOME}
if [ -d $img ]; then
continue
fi
swww img "$img" --transition-type wipe --resize=fit
ln -sf "$img" ~/.config/hypr/theme/current_background.jpg
sleep $INTERVAL
done
done

17
.config/hypr/scripts/bar.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
eww open bar1
eww open bar2
eww open bar3
indicator-mic-cam & disown
## Waybar auto update (requires inotifytools)
# CONFIG_FILES="$HOME/.config/waybar/config $HOME/.config/waybar/style.css"
#
# trap "killall waybar" EXIT
#
# while true; do
# waybar &
# inotifywait -e create,modify $CONFIG_FILES
# killall waybar
# done

View File

@@ -0,0 +1,19 @@
#!/bin/bash
bat=$(upower -e | grep BAT)
if [ -z $bat ]; then
echo "No battery available!"
exit 1
fi
while true; do
per=$(upower -i $bat | grep percentage | awk '{print $2}')
per="${per%\%}"
if "$per" -lt 15 #&& ! is_charging
eww open battery_warning
fi
sleep 120
done

View File

@@ -0,0 +1,24 @@
#!/bin/bash
roconf="~/.config/rofi/clipboard.rasi"
# Read font
font=`gsettings get org.gnome.desktop.interface font-name`
fnt_override="configuration {font: \"${font//\'}\";}"
# Clipboard action
case $1 in
c) cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Copy...\";}" -theme-str "$fnt_override" -config $roconf | cliphist decode | wl-copy
;;
d) cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Delete...\";}" -theme-str "$fnt_override" -config $roconf | cliphist delete
;;
w) if [ `echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear Clipboard History?\";}" -theme-str "$fnt_override" -config $roconf` == "Yes" ] ; then
cliphist wipe
fi
;;
*) echo -e "$0 [action]"
echo "c : cliphist list and copy selected"
echo "d : cliphist list and delete selected"
echo "w : cliphist wipe database"
exit 1
;;
esac

View File

@@ -0,0 +1,3 @@
#!/bin/bash
eww close bar1 || eww open bar1 & disown

21
.config/hypr/scripts/idle.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
isplayingvideo(){
if pactl list | grep -q RUNNING; then
exit 1
else
exit 0
fi
}
if ! [ -z $1 ]; then
isplayingvideo
fi
timeout_lock=900
timeout_DPMS=1080
swayidle -w \
timeout ${timeout_lock} "$0 isplayinfvideo || ~/.config/hypr/scripts/lock.sh" \
#timeout ${timeout_DPMS} 'hyprctl dispatch dpms off'
#resume 'hyprctl dispatch dpms on' # Crashes all apps -> Hyprland config set misc/mouse_move_enables_dpms=true

10
.config/hypr/scripts/lock.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
dnd=$(swaync-client -D)
swaync-client -dn
swaylock -C ~/.config/swaylock/swaylock.conf
if [ "$dnd" == "false" ]; then
swaync-client -df
fi

22
.config/hypr/startup.conf Executable file
View File

@@ -0,0 +1,22 @@
## Programms
exec-once = discord
exec-once = youtube-music
exec-once = swaync
exec = hyprshade auto
exec-once = nm-applet
exec-once = blueman-applet
exec-once = playerctld daemon
exec-once = ~/.config/hypr/scripts/bar.sh
exec-once = ~/.config/hypr/scripts/idle.sh
exec-once = ~/.config/hypr/scripts/battery_check.sh
## Clipboard
exec-once = wl-paste --type text --watch cliphist store #Stores only text data
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
## Background
exec-once = ~/.config/hypr/scripts/background.sh ~/Data/Pictures/Backgrounds/Desktop/
## Misc
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

View File

@@ -0,0 +1 @@
link for lock and rofi

33
.config/hypr/windowrule.conf Executable file
View File

@@ -0,0 +1,33 @@
## Monitors
$monitorOne = HDMI-A-1
$monitorTwo = DP-2
$monitorThree = HDMI-A-2
monitor = $monitorOne,1920x1080@144.001007,0x0,1
monitor = $monitorTwo,2560x1440@143.912003,1920x0,1
monitor = $monitorThree,1920x1080@60.000000,4480x0,1
monitor = ,preferred,auto,1
## Window Rules - (hyprctl -j clients | grep class)
windowrule = workspace 2,^(YouTube Music)$
windowrule = workspace 4,^(explorer.exe)$
windowrule = workspace 4, ^(league of legends.exe)$
windowrule = workspace 4,^(lutris)$
windowrule = workspace 5,^(discord)$
windowrule = workspace 5,^(de.keule.client.ui.JavaFX)$
windowrule = float,^(lutris)$
windowrule = size 965 545, ^(lutris)$
windowrule = float,title:^.*culator.*$
## Workspace
workspace = 1, monitor:$monitorOne, default:true
workspace = 2, monitor:$monitorOne
workspace = 3, monitor:$monitorTwo, default:true
workspace = 4, monitor:$monitorTwo
workspace = 5, monitor:$monitorThree, default:true
workspace = 6, monitor:$monitorThree