commit a07d19b8a87b708af521d3034d6424e6feb03e95 Author: Pepe44DEV Date: Tue Mar 17 00:30:35 2026 +0100 Inital Comit Upload Config Files diff --git a/hypridle.conf b/hypridle.conf new file mode 100644 index 0000000..1e8d88b --- /dev/null +++ b/hypridle.conf @@ -0,0 +1,17 @@ +general { + lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session + after_sleep_cmd = hyprctl dispatch dpms on +} + +listener { + timeout = 300 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +listener { + timeout = 600 + on-timeout = pidof hyprlock || hyprlock +} + diff --git a/hyprland.conf b/hyprland.conf new file mode 100644 index 0000000..346d18f --- /dev/null +++ b/hyprland.conf @@ -0,0 +1,348 @@ +# ####################################################################################### +# AUTOGENERATED HYPRLAND CONFIG. +# EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS. +# ####################################################################################### + +#autogenerated = 1 # remove this line to remove the warning + +# This is an example Hyprland config file. +# Refer to the wiki for more information. +# https://wiki.hypr.land/Configuring/ + +# Please note not all available settings / options are set here. +# For a full list, see the wiki + +# You can split this configuration into multiple files +# Create your files separately and then link them to this file like this: +# source = ~/.config/hypr/myColors.conf + + +################ +### MONITORS ### +################ + +# See https://wiki.hypr.land/Configuring/Monitors/ +monitor=,preferred,auto,auto +monitor = DP-1, 1920x1080@144, auto, 1 + + +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hypr.land/Configuring/Keywords/ + +# Set programs that you use +$terminal = kitty +$fileManager = nautilus +$menu = ~/.config/hypr/scripts/launcher.sh + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +exec-once = waybar +exec-once = hyprpaper -c /home/pascal/.config/hypr/hyprpaper.conf +exec-once = wl-paste --type text --watch cliphist store +exec-once = wl-paste --type image --watch cliphist store +exec-once = hypridle +#exec-once = lxqt-policykit-agent +exec-once = systemctl --user start hyprpolkitagent +exec-once = swaync + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hypr.land/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 + +env = QT_QPA_PLATFORMTHEME,qt6ct + + +##################### +### LOOK AND FEEL ### +##################### + +#Window Rules +windowrule = match:class ^(kitty)$, opacity 0.90 0.82 + +general { + gaps_in = 5 + gaps_out = 20 + + border_size = 2 + + # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors + + col.active_border = rgb(00ff88) + col.inactive_border = rgba(444444aa) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false + + # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hypr.land/Configuring/Variables/#decoration +decoration { + rounding = 12 + rounding_power = 2 + + active_opacity = 1.0 + inactive_opacity = 0.95 + + shadow { + enabled = true + range = 18 + render_power = 3 + color = rgba(00ff8840) + } + + blur { + enabled = true + size = 6 + passes = 2 + vibrancy = 0.22 + } +} +# https://wiki.hypr.land/Configuring/Variables/#animations +animations { + enabled = yes, please :) + + # Curves + bezier = easeOutQuint, 0.23, 1, 0.32, 1 + bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 + bezier = linear, 0, 0, 1, 1 + bezier = almostLinear, 0.5, 0.5, 0.75, 1 + bezier = quick, 0.15, 0, 0.1, 1 + + # Extra spice + bezier = overshot, 0.05, 0.9, 0.1, 1.08 + bezier = smoothOut, 0.36, 1, 0.3, 1 + bezier = softBounce, 0.22, 1.12, 0.35, 1 + + # Core + animation = global, 1, 8, default + animation = border, 1, 6, easeOutQuint + animation = windows, 1, 7, overshot, popin 82% + animation = windowsIn, 1, 7, softBounce, popin 82% + animation = windowsOut, 1, 5, smoothOut, popin 88% + animation = windowsMove, 1, 6, easeOutQuint + + animation = fade, 1, 5, quick + animation = fadeIn, 1, 4, almostLinear + animation = fadeOut, 1, 4, almostLinear + animation = fadeSwitch, 1, 5, easeInOutCubic + animation = fadeShadow, 1, 4, easeOutQuint + animation = fadeDim, 1, 4, easeInOutCubic + + animation = layers, 1, 6, easeOutQuint, slide top + animation = layersIn, 1, 5, easeOutQuint, slide top + animation = layersOut, 1, 4, quick, fade + animation = fadeLayersIn, 1, 4, almostLinear + animation = fadeLayersOut, 1, 3, almostLinear + + animation = workspaces, 1, 7, easeInOutCubic, slidefade 15% + animation = workspacesIn, 1, 6, easeOutQuint, slidefade 15% + animation = workspacesOut, 1, 5, easeInOutCubic, slidefade 15% + + animation = specialWorkspace, 1, 6, easeOutQuint, slidefadevert 20% + animation = specialWorkspaceIn, 1, 6, easeOutQuint, slidefadevert 20% + animation = specialWorkspaceOut, 1, 5, quick, slidefadevert 20% + + animation = zoomFactor, 1, 7, quick +} + + + +# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hypr.land/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hypr.land/Configuring/Variables/#misc +misc { + force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hypr.land/Configuring/Variables/#input +input { + kb_layout = de + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = false + } +} + +# See https://wiki.hypr.land/Configuring/Gestures +gesture = 3, horizontal, workspace + +# Example per-device config +# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hypr.land/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +#Basic Keybinds +bind = $mainMod, T, exec, $terminal +bind = $mainMod, Q, killactive, +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, F, togglefloating, +bind = $mainMod, SPACE, exec, $menu +bind = $mainMod, J, layoutmsg, togglesplit # dwindle +bind = $mainMod, L, exec, hyprlock +bind = $mainMod, B, exec, brave + + +#Clipboard Manager +bind = $mainMod, V, exec, ~/.config/hypr/scripts/clipboard.sh + +#Menus +bind = $mainMod, P, exec, wlogout +bind = $mainMod, O, exec, ~/.config/hypr/scripts/settingsmenu.sh +bind = $mainMod, M, exec, ~/.config/hypr/scripts/mainmenu.sh +bind = $mainMod, N, exec, swaync-client -t + +#Move Focused Window +bind = $mainMod SHIFT, left, movewindow, l +bind = $mainMod SHIFT, right, movewindow, r +bind = $mainMod SHIFT, up, movewindow, u +bind = $mainMod SHIFT, down, movewindow, d + +#Resize Window +bind = $mainMod CTRL, left, resizeactive, -60 0 +bind = $mainMod CTRL, right, resizeactive, 60 0 +bind = $mainMod CTRL, up, resizeactive, 0 -60 +bind = $mainMod CTRL, down, resizeactive, 0 60 + + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +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 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +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 +bind = $mainMod, S, exec, ~/.config/hypr/scripts/screenshot.sh + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize wind ows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Volume +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -h string:x-canonical-private-synchronous:volume -h int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100)}') "Volume" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100) "%"}')" +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -h string:x-canonical-private-synchronous:volume -h int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100)}') "Volume" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100) "%"}')" +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -h string:x-canonical-private-synchronous:volume "Volume" "Mute toggled" +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && notify-send -h string:x-canonical-private-synchronous:mic "Microphone" "Mute toggled" + +# Brightness +bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ && notify-send -h string:x-canonical-private-synchronous:brightness -h int:value:$(brightnessctl -m | awk -F, '{print int(substr($4, 1, length($4)-1))}') "Brightness" "$(brightnessctl -m | awk -F, '{print $4}')" +bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- && notify-send -h string:x-canonical-private-synchronous:brightness -h int:value:$(brightnessctl -m | awk -F, '{print int(substr($4, 1, length($4)-1))}') "Brightness" "$(brightnessctl -m | awk -F, '{print $4}')" +# Requires playerctl +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hypr.land/Configuring/Window-Rules/ for more +# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrules that are useful + +windowrule { + # Ignore maximize requests from all apps. You'll probably like this. + name = suppress-maximize-events + match:class = .* + + suppress_event = maximize +} + +windowrule { + # Fix some dragging issues with XWayland + name = fix-xwayland-drags + match:class = ^$ + match:title = ^$ + match:xwayland = true + match:float = true + match:fullscreen = false + match:pin = false + + no_focus = true +} + +# Hyprland-run windowrule +windowrule { + name = move-hyprland-run + + match:class = hyprland-run + + move = 20 monitor_h-120 + float = yes +} diff --git a/hyprland.conf.save b/hyprland.conf.save new file mode 100644 index 0000000..bd31a20 --- /dev/null +++ b/hyprland.conf.save @@ -0,0 +1,322 @@ +9;9u ####################################################################################### +# AUTOGENERATED HYPRLAND CONFIG. +# EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS. +# ####################################################################################### + +#autogenerated = 1 # remove this line to remove the warning + +# This is an example Hyprland config file. +# Refer to the wiki for more information. +# https://wiki.hypr.land/Configuring/ + +# Please note not all available settings / options are set here. +# For a full list, see the wiki + +# You can split this configuration into multiple files +# Create your files separately and then link them to this file like this: +# source = ~/.config/hypr/myColors.conf + + +################ +### MONITORS ### +################ + +# See https://wiki.hypr.land/Configuring/Monitors/ +monitor=,preferred,auto,auto +monitor = DP-1, 1920x1080@144, auto, 1 + + +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hypr.land/Configuring/Keywords/ + +# Set programs that you use +$terminal = kitty +$fileManager = nautilus +$menu = ~/.config/hypr/scripts/launcher.sh + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +exec-once = waybar +exec-once = hyprpaper -c /home/pascal/.config/hypr/hyprpaper.conf +exec-once = wl-paste --type text --watch cliphist store +exec-once = wl-paste --type image --watch cliphist store +exec-once = hypridle +exec-once = lxqt-policykit-agent +exec-once = swaync + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hypr.land/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 + +env = QT_QPA_PLATFORMTHEME,qt6ct + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hypr.land/Configuring/Variables/ + +# https://wiki.hypr.land/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 20 + + border_size = 2 + + # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors + + col.active_border = rgb(00ff88) + col.inactive_border = rgba(444444aa) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false + + # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hypr.land/Configuring/Variables/#decoration +decoration { + rounding = 12 + rounding_power = 2 + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 0.95 + + shadow { + enabled = true + range = 15 + render_power = 3 + color = rgba(00ff8855) + } + + # https://wiki.hypr.land/Configuring/Variables/#blur + blur { + enabled = true + size = 3 + passes = 1 + + vibrancy = 0.1696 + } +} + +# https://wiki.hypr.land/Configuring/Variables/#animations +animations { + enabled = yes, please :) + + # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves + # NAME, X0, Y0, X1, Y1 + bezier = easeOutQuint, 0.23, 1, 0.32, 1 + bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 + bezier = linear, 0, 0, 1, 1 + bezier = almostLinear, 0.5, 0.5, 0.75, 1 + bezier = quick, 0.15, 0, 0.1, 1 + + # Default animations, see https://wiki.hypr.land/Configuring/Animations/ + # NAME, ONOFF, SPEED, CURVE, [STYLE] + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade + animation = zoomFactor, 1, 7, quick +} + + + +# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hypr.land/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hypr.land/Configuring/Variables/#misc +misc { + force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hypr.land/Configuring/Variables/#input +input { + kb_layout = de + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = false + } +} + +# See https://wiki.hypr.land/Configuring/Gestures +gesture = 3, horizontal, workspace + +# Example per-device config +# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hypr.land/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more +bind = $mainMod, T, exec, $terminal +bind = $mainMod, Q, killactive, +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, F, togglefloating, +bind = $mainMod, SPACE, exec, $menu +bind = $mainMod, J, layoutmsg, togglesplit # dwindle +bind = $mainMod, L, exec, hyprlock + +#Clipboard Manager +bind = $mainMod, V, exec, ~/.config/hypr/scripts/clipboard.sh + +#Menus +bind = $mainMod, P, exec, ~/.config/hypr/scripts/powermenu.sh +bind = $mainMod, O, exec, ~/.config/hypr/scripts/settingsmenu.sh +bind = $mainMod, M, exec, ~/.config/hypr/scripts/mainmenu.sh +bind = $mainMod, N, exec, swaync-client -t + + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +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 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +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 +bind = $mainMod, S, exec, ~/.config/hypr/scripts/screenshot.sh + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize wind ows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Volume +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -h string:x-canonical-private-synchronous:volume -h int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100)}') "Volume" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100) "%"}')" +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -h string:x-canonical-private-synchronous:volume -h int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100)}') "Volume" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100) "%"}')" +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -h string:x-canonical-private-synchronous:volume "Volume" "Mute toggled" +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && notify-send -h string:x-canonical-private-synchronous:mic "Microphone" "Mute toggled" + +# Brightness +bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ && notify-send -h string:x-canonical-private-synchronous:brightness -h int:value:$(brightnessctl -m | awk -F, '{print int(substr($4, 1, length($4)-1))}') "Brightness" "$(brightnessctl -m | awk -F, '{print $4}')" +bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- && notify-send -h string:x-canonical-private-synchronous:brightness -h int:value:$(brightnessctl -m | awk -F, '{print int(substr($4, 1, length($4)-1))}') "Brightness" "$(brightnessctl -m | awk -F, '{print $4}')" +# Requires playerctl +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hypr.land/Configuring/Window-Rules/ for more +# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrules that are useful + +windowrule { + # Ignore maximize requests from all apps. You'll probably like this. + name = suppress-maximize-events + match:class = .* + + suppress_event = maximize +} + +windowrule { + # Fix some dragging issues with XWayland + name = fix-xwayland-drags + match:class = ^$ + match:title = ^$ + match:xwayland = true + match:float = true + match:fullscreen = false + match:pin = false + + no_focus = true +} + +# Hyprland-run windowrule +windowrule { + name = move-hyprland-run + + match:class = hyprland-run + + move = 20 monitor_h-120 + float = yes +} diff --git a/hyprlock.conf b/hyprlock.conf new file mode 100644 index 0000000..c61464e --- /dev/null +++ b/hyprlock.conf @@ -0,0 +1,87 @@ +general { + hide_cursor = true + ignore_empty_input = false + immediate_render = true +} + +background { + monitor = + color = rgba(15,15,20,1.0) + blur_passes = 3 + blur_size = 8 + noise = 0.0117 + contrast = 1.2 + brightness = 0.85 + vibrancy = 0.18 + vibrancy_darkness = 0.0 +} + +label { + monitor = + text = cmd[update:1000] echo "$(date +'%H:%M')" + color = rgba(00ff88ff) + font_size = 86 + font_family = JetBrainsMono Nerd Font + position = 0, 140 + halign = center + valign = center +} + +label { + monitor = + text = cmd[update:1000] echo "$(date +'%A, %d. %B %Y')" + color = rgba(c8ffe1dd) + font_size = 20 + font_family = JetBrainsMono Nerd Font + position = 0, 78 + halign = center + valign = center +} + +label { + monitor = + text = Pascal + color = rgba(ffffffff) + font_size = 22 + font_family = JetBrainsMono Nerd Font + position = 0, 20 + halign = center + valign = center +} + +label { + monitor = + text = 󰌾 Locked + color = rgba(8be9b3cc) + font_size = 16 + font_family = JetBrainsMono Nerd Font + position = 0, -128 + halign = center + valign = center +} + +input-field { + monitor = + size = 320, 58 + outline_thickness = 2 + dots_size = 0.18 + dots_spacing = 0.32 + dots_center = true + fade_on_empty = false + + font_color = rgba(ffffffff) + inner_color = rgba(15,15,20,0.80) + outer_color = rgba(00ff88ff) + check_color = rgba(00cc66ff) + fail_color = rgba(ff5555ff) + capslock_color = rgba(ffb86cff) + + placeholder_text = Password... + fail_text = Authentication failed + + rounding = 14 + + position = 0, -70 + halign = center + valign = center +} \ No newline at end of file diff --git a/hyprpaper.conf b/hyprpaper.conf new file mode 100644 index 0000000..c3a4303 --- /dev/null +++ b/hyprpaper.conf @@ -0,0 +1,5 @@ +wallpaper { + monitor = + path = /home/pascal/Pictures/Wallpapers/blätter2.png + fit_mode = cover +} diff --git a/scripts/ai-stuff/ai-chat.sh b/scripts/ai-stuff/ai-chat.sh new file mode 100755 index 0000000..239effc --- /dev/null +++ b/scripts/ai-stuff/ai-chat.sh @@ -0,0 +1,24 @@ +#!/bin/bash +source "$HOME/.config/hypr/scripts/ai-stuff/ollama-common.sh" + +clear +echo "╔══════════════════════════════════════╗" +echo "║ Ollama AI Chat ║" +echo "║ 'exit' eingeben zum Beenden ║" +echo "╚══════════════════════════════════════╝" +echo + +while true; do + read -rp "Du > " PROMPT + + [ -z "$PROMPT" ] && continue + + if [[ "$PROMPT" == "exit" ]]; then + break + fi + + echo + echo "AI >" + ask_ollama "$PROMPT" + echo +done \ No newline at end of file diff --git a/scripts/ai-stuff/ai-clipboard.sh b/scripts/ai-stuff/ai-clipboard.sh new file mode 100755 index 0000000..b8928b7 --- /dev/null +++ b/scripts/ai-stuff/ai-clipboard.sh @@ -0,0 +1,17 @@ +#!/bin/bash +source "$HOME/.config/hypr/scripts/ai-stuff/ollama-common.sh" + +TEXT=$(wl-paste 2>/dev/null) +[ -z "$TEXT" ] && exit 0 + +PROMPT="Erkläre mir folgenden Text auf Deutsch verständlich und strukturiert: + +$TEXT" + +RESPONSE=$(ask_ollama "$PROMPT") + +kitty --title "Clipboard AI" bash -lc "cat <<'EOF' +$RESPONSE +EOF +echo +read -n 1 -s -r -p 'Taste drücken zum Schließen...'" \ No newline at end of file diff --git a/scripts/ai-stuff/ai-code.sh b/scripts/ai-stuff/ai-code.sh new file mode 100755 index 0000000..4f00fad --- /dev/null +++ b/scripts/ai-stuff/ai-code.sh @@ -0,0 +1,17 @@ +#!/bin/bash +source "$HOME/.config/hypr/scripts/ai-stuff/ollama-common.sh" + +PROMPT=$(wofi --dmenu --prompt "Generate Code") +[ -z "$PROMPT" ] && exit 0 + +FULL_PROMPT="Erzeuge passenden Code für folgende Anfrage. Gib zuerst den Code aus, danach kurz eine Erklärung auf Deutsch: + +$PROMPT" + +RESPONSE=$(ask_ollama "$FULL_PROMPT") + +kitty --title "AI Code Helper" bash -lc "cat <<'EOF' +$RESPONSE +EOF +echo +read -n 1 -s -r -p 'Taste drücken zum Schließen...'" \ No newline at end of file diff --git a/scripts/ai-stuff/ai-command.sh b/scripts/ai-stuff/ai-command.sh new file mode 100755 index 0000000..9aa77fe --- /dev/null +++ b/scripts/ai-stuff/ai-command.sh @@ -0,0 +1,14 @@ +#!/bin/bash +source "$HOME/.config/hypr/scripts/ai-stuff/ollama-common.sh" + +PROMPT=$(wofi --dmenu --prompt "Linux Command") +[ -z "$PROMPT" ] && exit 0 + +FULL_PROMPT="Gib ausschließlich genau einen Linux-Befehl zurück, ohne Erklärungen, ohne Markdown, ohne Codeblock. Aufgabe: $PROMPT" +CMD=$(ask_ollama "$FULL_PROMPT" | head -n 1) + +kitty --title "AI Command" bash -lc "cat <<'EOF' +$CMD +EOF +echo +read -n 1 -s -r -p 'Taste drücken zum Schließen...'" \ No newline at end of file diff --git a/scripts/ai-stuff/ai-launcher.sh b/scripts/ai-stuff/ai-launcher.sh new file mode 100755 index 0000000..5c5ce91 --- /dev/null +++ b/scripts/ai-stuff/ai-launcher.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +choice=$(printf "󰚩 Ask AI\n󰌌 Generate Command\n󰧑 Explain Clipboard\n󰒓 Analyze Logs\n󰊄 Generate Code\n󰆍 AI Shell" | wofi --dmenu --prompt "AI Tools") + +case "$choice" in + "󰚩 Ask AI") + ~/.config/hypr/scripts/ai-stuff/ai-prompt.sh + ;; + "󰌌 Generate Command") + ~/.config/hypr/scripts/ai-stuff/ai-command.sh + ;; + "󰧑 Explain Clipboard") + ~/.config/hypr/scripts/ai-stuff/ai-clipboard.sh + ;; + "󰒓 Analyze Logs") + ~/.config/hypr/scripts/ai-stuff/ai-logs.sh + ;; + "󰊄 Generate Code") + ~/.config/hypr/scripts/ai-stuff/ai-code.sh + ;; + "󰆍 AI Shell") + ~/.config/hypr/scripts/ai-stuff/ai-shell.sh + ;; +esac \ No newline at end of file diff --git a/scripts/ai-stuff/ai-logs.sh b/scripts/ai-stuff/ai-logs.sh new file mode 100755 index 0000000..f93082f --- /dev/null +++ b/scripts/ai-stuff/ai-logs.sh @@ -0,0 +1,21 @@ +#!/bin/bash +source "$HOME/.config/hypr/scripts/ai-stuff/ollama-common.sh" + +LOGS=$(journalctl -p 3 -n 50 --no-pager 2>/dev/null) +[ -z "$LOGS" ] && LOGS="Keine Fehlerlogs gefunden." + +PROMPT="Analysiere diese Linux-Fehlerlogs. Erkläre auf Deutsch: +1. Was ist wahrscheinlich das Problem? +2. Wie kritisch ist es? +3. Welche konkreten Schritte zur Behebung soll ich probieren? + +Logs: +$LOGS" + +RESPONSE=$(ask_ollama "$PROMPT") + +kitty --title "AI Log Analysis" bash -lc "cat <<'EOF' +$RESPONSE +EOF +echo +read -n 1 -s -r -p 'Taste drücken zum Schließen...'" \ No newline at end of file diff --git a/scripts/ai-stuff/ai-prompt.sh b/scripts/ai-stuff/ai-prompt.sh new file mode 100755 index 0000000..b655a3d --- /dev/null +++ b/scripts/ai-stuff/ai-prompt.sh @@ -0,0 +1,51 @@ +#!/bin/bash +source "$HOME/.config/hypr/scripts/ai-stuff/ollama-common.sh" + +FIRST_PROMPT=$(wofi --dmenu --prompt "Ask AI") +[ -z "$FIRST_PROMPT" ] && exit 0 + +kitty --title "AI Chat" bash -lc " +source \"$HOME/.config/hypr/scripts/ai-stuff/ollama-common.sh\" + +clear +echo '╔══════════════════════════════════════╗' +echo '║ AI Chat ║' +echo '║ exit = beenden | clear = leeren ║' +echo '╚══════════════════════════════════════╝' +echo +echo 'Modell: $OLLAMA_MODEL' +echo +echo 'Du > $FIRST_PROMPT' +echo +echo 'AI >' +ask_ollama \"$FIRST_PROMPT\" +echo + +while true; do + read -rp 'Du > ' PROMPT + + [ -z \"\$PROMPT\" ] && continue + + case \"\$PROMPT\" in + exit) + break + ;; + clear) + clear + echo '╔══════════════════════════════════════╗' + echo '║ AI Chat ║' + echo '║ exit = beenden | clear = leeren ║' + echo '╚══════════════════════════════════════╝' + echo + echo 'Modell: $OLLAMA_MODEL' + echo + continue + ;; + esac + + echo + echo 'AI >' + ask_ollama \"\$PROMPT\" + echo +done +" \ No newline at end of file diff --git a/scripts/ai-stuff/ai-shell.sh b/scripts/ai-stuff/ai-shell.sh new file mode 100755 index 0000000..fb1b99f --- /dev/null +++ b/scripts/ai-stuff/ai-shell.sh @@ -0,0 +1,21 @@ +#!/bin/bash +source "$HOME/.config/hypr/scripts/ai-stuff/ollama-common.sh" + +PROMPT=$(wofi --dmenu --prompt "AI Shell") +[ -z "$PROMPT" ] && exit 0 + +FULL_PROMPT="Gib ausschließlich genau einen Linux-Befehl zurück, ohne Erklärungen, ohne Markdown, ohne Codeblock. Aufgabe: $PROMPT" +CMD=$(ask_ollama "$FULL_PROMPT" | head -n 1) + +kitty --title "AI Shell" bash -lc " +echo 'Generierter Befehl:' +echo +printf '%s\n' \"$CMD\" +echo +read -p 'Ausführen? [y/N]: ' CONFIRM +if [[ \$CONFIRM =~ ^[Yy]$ ]]; then + echo + bash -c \"$CMD\" + echo +fi +read -n 1 -s -r -p 'Taste drücken zum Schließen...'" \ No newline at end of file diff --git a/scripts/ai-stuff/ollama-common.sh b/scripts/ai-stuff/ollama-common.sh new file mode 100755 index 0000000..7067fd3 --- /dev/null +++ b/scripts/ai-stuff/ollama-common.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +OLLAMA_URL="http://10.0.0.15:11434" +OLLAMA_MODEL="llama3.1" + +ask_ollama() { + local PROMPT="$1" + + local RAW + RAW=$(curl -s "$OLLAMA_URL/api/generate" \ + -H "Content-Type: application/json" \ + -d "$(jq -n \ + --arg model "$OLLAMA_MODEL" \ + --arg prompt "$PROMPT" \ + '{model:$model,prompt:$prompt,stream:false}')") + + echo "$RAW" | jq -r '.response // .error // "Fehler: Ungültige Antwort vom Ollama-Server."' +} \ No newline at end of file diff --git a/scripts/audiomenu.sh b/scripts/audiomenu.sh new file mode 100755 index 0000000..8b7cd18 --- /dev/null +++ b/scripts/audiomenu.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +choice=$(printf "󰕾 Open Mixer\n󰝟 Mute Output\n󰋋 Increase Volume\n󰕿 Decrease Volume\n󰍬 Audio Devices" | wofi --dmenu --prompt "Audio") + +case "$choice" in + "󰕾 Open Mixer") + pavucontrol + ;; + "󰝟 Mute Output") + wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + ;; + "󰋋 Increase Volume") + wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ + ;; + "󰕿 Decrease Volume") + wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- + ;; + "󰍬 Audio Devices") + kitty -e bash -lc 'wpctl status; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' + ;; +esac diff --git a/scripts/clipboard.sh b/scripts/clipboard.sh new file mode 100755 index 0000000..5b81cbc --- /dev/null +++ b/scripts/clipboard.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cliphist list | wofi --dmenu | cliphist decode | wl-copy + diff --git a/scripts/configmenu.sh b/scripts/configmenu.sh new file mode 100755 index 0000000..ec94c55 --- /dev/null +++ b/scripts/configmenu.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +choice=$(printf "󰒓 Edit Hyprland\n󰖲 Edit Waybar\n󰈙 Edit Wofi\n󰛖 Edit Dunst\n󰸉 Edit Hyprlock\n󰣇 Edit Hyprpaper\n󰍉 Edit Clipboard Script\n󰕾 Edit Audio Menu" | wofi --dmenu --prompt "Config") + +case "$choice" in + "󰒓 Edit Hyprland") + kitty -e bash -lc 'nano ~/.config/hypr/hyprland.conf' + ;; + "󰖲 Edit Waybar") + kitty -e bash -lc 'nano ~/.config/waybar/config.jsonc' + ;; + "󰈙 Edit Wofi") + kitty -e bash -lc 'nano ~/.config/wofi/style.css' + ;; + "󰛖 Edit Dunst") + kitty -e bash -lc 'nano ~/.config/dunst/dunstrc' + ;; + "󰸉 Edit Hyprlock") + kitty -e bash -lc 'nano ~/.config/hypr/hyprlock.conf' + ;; + "󰣇 Edit Hyprpaper") + kitty -e bash -lc 'nano ~/.config/hypr/hyprpaper.conf' + ;; + "󰍉 Edit Clipboard Script") + kitty -e bash -lc 'nano ~/.config/hypr/scripts/clipboard.sh' + ;; + "󰕾 Edit Audio Menu") + kitty -e bash -lc 'nano ~/.config/hypr/scripts/audiomenu.sh' + ;; +esac diff --git a/scripts/dev/mysql-menu.sh b/scripts/dev/mysql-menu.sh new file mode 100755 index 0000000..98551dd --- /dev/null +++ b/scripts/dev/mysql-menu.sh @@ -0,0 +1,164 @@ +#!/bin/bash + +CONTAINER_NAME="local-mysql-dev" +MYSQL_ROOT_PASSWORD="root" +MYSQL_PORT="3307" +MYSQL_IMAGE="mysql:8.4" + +choice=$(printf "󰆼 MySQL starten\n󰅖 MySQL stoppen\n󰑓 MySQL neustarten\n󰍉 MySQL Status\n󰌑 MySQL Logs\n󰒓 MySQL erstellen (neu)" | wofi --dmenu --prompt "Local MySQL") + +docker_service_running() { + systemctl is-active --quiet docker +} + +docker_usable() { + docker version >/dev/null 2>&1 +} + +ensure_docker_ready() { + if ! docker_service_running; then + notify-send "MySQL" "Docker-Service läuft nicht" + return 1 + fi + + if ! docker_usable; then + notify-send "MySQL" "Docker läuft, aber dein User hat keinen Zugriff oder Docker ist noch nicht bereit" + return 1 + fi + + return 0 +} + +container_exists() { + docker ps -a --format '{{.Names}}' | grep -qx "$CONTAINER_NAME" +} + +case "$choice" in + "󰆼 MySQL starten") + if ! ensure_docker_ready; then + exit 1 + fi + + if container_exists; then + docker start "$CONTAINER_NAME" >/dev/null 2>&1 \ + && notify-send "MySQL" "Container gestartet: localhost:$MYSQL_PORT" \ + || notify-send "MySQL" "Start fehlgeschlagen" + else + notify-send "MySQL" "Container existiert nicht. Bitte erst erstellen." + fi + ;; + + "󰅖 MySQL stoppen") + if ! ensure_docker_ready; then + exit 1 + fi + + docker stop "$CONTAINER_NAME" >/dev/null 2>&1 \ + && notify-send "MySQL" "Container gestoppt" \ + || notify-send "MySQL" "Stop fehlgeschlagen oder Container nicht vorhanden" + ;; + + "󰑓 MySQL neustarten") + if ! ensure_docker_ready; then + exit 1 + fi + + docker restart "$CONTAINER_NAME" >/dev/null 2>&1 \ + && notify-send "MySQL" "Container neugestartet: localhost:$MYSQL_PORT" \ + || notify-send "MySQL" "Restart fehlgeschlagen oder Container nicht vorhanden" + ;; + + "󰍉 MySQL Status") + kitty -e bash -lc " + echo '=== MySQL Container Status ===' + echo + docker ps -a --filter name=$CONTAINER_NAME + echo + echo 'Verbindung:' + echo 'Host: localhost' + echo 'Port: $MYSQL_PORT' + echo 'User: root' + echo 'Passwort: $MYSQL_ROOT_PASSWORD' + echo + read -n 1 -s -r -p 'Taste drücken zum Schließen...' + " + ;; + + "󰌑 MySQL Logs") + kitty -e bash -lc " + docker logs --tail 100 $CONTAINER_NAME + echo + read -n 1 -s -r -p 'Taste drücken zum Schließen...' + " + ;; + + "󰒓 MySQL erstellen (neu)") + if ! ensure_docker_ready; then + exit 1 + fi + + if container_exists; then + notify-send "MySQL" "Container existiert bereits" + else + kitty -e bash -lc ' + echo "=== MySQL Container wird erstellt ===" + echo + + if ! systemctl is-active --quiet docker; then + echo "Docker-Service läuft nicht." + echo + read -n 1 -s -r -p "Taste drücken zum Schließen..." + exit 1 + fi + + if ! docker version >/dev/null 2>&1; then + echo "Docker läuft, aber dein User hat keinen Zugriff auf Docker oder Docker ist noch nicht bereit." + echo + echo "Prüfe z. B.:" + echo " docker version" + echo " groups" + echo + read -n 1 -s -r -p "Taste drücken zum Schließen..." + exit 1 + fi + + echo "Image wird geprüft/pulled: '"$MYSQL_IMAGE"'..." + docker pull "'"$MYSQL_IMAGE"'" + echo + + echo "Container wird erstellt..." + docker run -d \ + --name "'"$CONTAINER_NAME"'" \ + -e MYSQL_ROOT_PASSWORD="'"$MYSQL_ROOT_PASSWORD"'" \ + -p "'"$MYSQL_PORT"':3306" \ + -v "'"${CONTAINER_NAME}"'-data:/var/lib/mysql" \ + "'"$MYSQL_IMAGE"'" + + EXIT_CODE=$? + echo + + if [ $EXIT_CODE -eq 0 ]; then + echo "MySQL Container erfolgreich erstellt und gestartet." + echo + echo "Host: localhost" + echo "Port: '"$MYSQL_PORT"'" + echo "User: root" + echo "Passwort: '"$MYSQL_ROOT_PASSWORD"'" + notify-send "MySQL" "Container erstellt: localhost:'"$MYSQL_PORT"' (root/root)" + else + echo "Erstellung fehlgeschlagen." + echo + echo "Häufige Ursachen:" + echo "- Port bereits belegt" + echo "- Docker ist noch nicht bereit" + echo "- Keine Rechte auf Docker" + echo "- Containername existiert schon teilweise" + notify-send "MySQL Fehler" "Erstellung fehlgeschlagen - siehe Terminal" + fi + + echo + read -n 1 -s -r -p "Taste drücken zum Schließen..." + ' + fi + ;; +esac \ No newline at end of file diff --git a/scripts/devmenu.sh b/scripts/devmenu.sh new file mode 100755 index 0000000..b6747ef --- /dev/null +++ b/scripts/devmenu.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +choice=$(printf "󰨞 VS Code\n Terminal\n󰚩 AI Tools\n󰒋 Homelab\n󰆼 Local MySQL\n󰙴 Neues Projekt\n Projects Folder\n󰉋 Open Hypr Config\n󰊢 Git Status (current dir)\n Gitea\n GitHub\n🐳 Docker starten\n🐳 Docker stoppen\n🐳 Docker Status\n📦 Pacman Updates\n Open .config" | wofi --dmenu --prompt "Dev") + +case "$choice" in + "󰨞 VS Code") + code + ;; + " Terminal") + kitty + ;; + "󰚩 AI Tools") + ~/.config/hypr/scripts/ai-stuff/ai-launcher.sh + ;; + "󰒋 Homelab") + ~/.config/hypr/scripts/homelab/homelab-menu.sh + ;; + "󰆼 Local MySQL") + ~/.config/hypr/scripts/dev/mysql-menu.sh + ;; + "🐳 Docker starten") + if systemctl is-active --quiet docker; then + notify-send "Docker" "Docker läuft bereits" + else + pkexec systemctl start docker && notify-send "Docker" "Docker wurde gestartet" + fi + ;; + "🐳 Docker stoppen") + if systemctl is-active --quiet docker; then + pkexec systemctl stop docker && notify-send "Docker" "Docker wurde gestoppt" + else + notify-send "Docker" "Docker läuft nicht" + fi + ;; + "󰙴 Neues Projekt") + ~/.config/hypr/scripts/new-project-menu.sh + ;; + " Projects Folder") + nautilus "$HOME/Nextcloud/Development/Projekte" + ;; + "󰉋 Open Hypr Config") + kitty -e bash -lc 'code ~/.config/hypr/hyprland.conf' + ;; + "󰊢 Git Status (current dir)") + kitty -e bash -lc 'git status; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' + ;; + " Gitea") + xdg-open "https://git.pepe44.dev" + ;; + " GitHub") + xdg-open "https://github.com" + ;; + "🐳 Docker Status") + kitty -e bash -lc ' + echo "=== Docker Status ===" + echo + systemctl status docker --no-pager + echo + echo "=== Container ===" + docker ps -a + echo + read -n 1 -s -r -p "Taste drücken zum Schließen..." + ' + ;; + "📦 Pacman Updates") + kitty -e bash -lc 'pacman -Qu; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' + ;; + " Open .config") + nautilus "$HOME/.config" + ;; +esac \ No newline at end of file diff --git a/scripts/homelab/docker-restart.sh b/scripts/homelab/docker-restart.sh new file mode 100755 index 0000000..5129b60 --- /dev/null +++ b/scripts/homelab/docker-restart.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +ssh unraid "docker restart \$(docker ps -q)" + +echo "Alle Container neugestartet." + +echo +read -n 1 -s -r -p "Taste drücken zum Schließen..." \ No newline at end of file diff --git a/scripts/homelab/docker-status.sh b/scripts/homelab/docker-status.sh new file mode 100755 index 0000000..a7c5fbe --- /dev/null +++ b/scripts/homelab/docker-status.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +ssh unraid "docker ps -a" + +echo +read -n 1 -s -r -p "Taste drücken zum Schließen..." \ No newline at end of file diff --git a/scripts/homelab/homelab-menu.sh b/scripts/homelab/homelab-menu.sh new file mode 100755 index 0000000..2ee2841 --- /dev/null +++ b/scripts/homelab/homelab-menu.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +choice=$(printf "🖥 Server Status\n🐳 Docker Status\n🔁 Restart Docker\n🌐 Open Services\n📡 Network Tools\n🤖 Ollama Models" | wofi --dmenu --prompt "Homelab") + +case "$choice" in + "🖥 Server Status") + kitty -e bash -lc "~/.config/hypr/scripts/homelab/server-status.sh" + ;; + "🐳 Docker Status") + kitty -e bash -lc "~/.config/hypr/scripts/homelab/docker-status.sh" + ;; + "🔁 Restart Docker") + kitty -e bash -lc "~/.config/hypr/scripts/homelab/docker-restart.sh" + ;; + "🌐 Open Services") + ~/.config/hypr/scripts/homelab/services-menu.sh + ;; + "📡 Network Tools") + ~/.config/hypr/scripts/homelab/network-tools.sh + ;; +esac \ No newline at end of file diff --git a/scripts/homelab/network-tools.sh b/scripts/homelab/network-tools.sh new file mode 100755 index 0000000..4d17e06 --- /dev/null +++ b/scripts/homelab/network-tools.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +choice=$(printf "📡 Ping Server\n🌐 Ping Google\n⚡ Speedtest" | wofi --dmenu --prompt "Network") + +case "$choice" in + "📡 Ping Server") + kitty -e ping 10.0.0.15 + ;; + "🌐 Ping Google") + kitty -e ping google.com + ;; + "⚡ Speedtest") + kitty -e speedtest-cli + ;; +esac \ No newline at end of file diff --git a/scripts/homelab/server-status.sh b/scripts/homelab/server-status.sh new file mode 100755 index 0000000..6a7a8b9 --- /dev/null +++ b/scripts/homelab/server-status.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +echo "===== SERVER STATUS =====" +echo + +ssh root@10.0.0.15 " +echo 'Uptime:' +uptime +echo +echo 'Memory:' +free -h +echo +echo 'Disk:' +df -h +" + +echo +read -n 1 -s -r -p "Taste drücken zum Schließen..." \ No newline at end of file diff --git a/scripts/homelab/services-menu.sh b/scripts/homelab/services-menu.sh new file mode 100755 index 0000000..59cec86 --- /dev/null +++ b/scripts/homelab/services-menu.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +choice=$(printf "📦 Portainer\n☁ Nextcloud\n📄 Paperless\n🏠 Home Assistant\n🤖 Ollama" | wofi --dmenu --prompt "Services") + +case "$choice" in + "📦 Portainer") + xdg-open http://10.0.0.15:9000 + ;; + "☁ Nextcloud") + xdg-open http://10.0.0.15:8080 + ;; + "📄 Paperless") + xdg-open http://10.0.0.15:8000 + ;; + "🏠 Home Assistant") + xdg-open http://10.0.0.15:8123 + ;; + "🤖 Ollama") + xdg-open http://10.0.0.15:11434 + ;; +esac diff --git a/scripts/launcher.sh b/scripts/launcher.sh new file mode 100755 index 0000000..2f73062 --- /dev/null +++ b/scripts/launcher.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if pgrep -x wofi > /dev/null; then + pkill -SIGTERM wofi +else + wofi --show drun --allow-images +fi diff --git a/scripts/mainmenu.sh b/scripts/mainmenu.sh new file mode 100755 index 0000000..1b26c28 --- /dev/null +++ b/scripts/mainmenu.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +choice=$(printf "🚀 Applications\n⚙️ Settings\n🖥️ System\n📦 Packages\n🧩 Config\n🖼️ Wallpaper\n🔊 Audio\n👨‍💻 Dev\n⏻ Power\n📋 Clipboard" | wofi --dmenu --prompt "⚡ Control Center") + +case "$choice" in + "🚀 Applications") + ~/.config/hypr/scripts/launcher.sh + ;; + "⚙️ Settings") + ~/.config/hypr/scripts/settingsmenu.sh + ;; + "🖥️ System") + ~/.config/hypr/scripts/systemmenu.sh + ;; + "📦 Packages") + ~/.config/hypr/scripts/packagemenu.sh + ;; + "🧩 Config") + ~/.config/hypr/scripts/configmenu.sh + ;; + "🖼️ Wallpaper") + ~/.config/hypr/scripts/wallpapermenu.sh + ;; + "🔊 Audio") + ~/.config/hypr/scripts/audiomenu.sh + ;; + "👨‍💻 Dev") + ~/.config/hypr/scripts/devmenu.sh + ;; + "⏻ Power") + ~/.config/hypr/scripts/powermenu.sh + ;; + "📋 Clipboard") + ~/.config/hypr/scripts/clipboard.sh + ;; +esac \ No newline at end of file diff --git a/scripts/new-project-menu.sh b/scripts/new-project-menu.sh new file mode 100755 index 0000000..6909288 --- /dev/null +++ b/scripts/new-project-menu.sh @@ -0,0 +1,163 @@ +#!/bin/bash + +choice=$(printf " Laravel Projekt\n󰌝 Simple Web Projekt\n Node.js Projekt\n󰡄 Vue Projekt\n⚛ React Projekt\n🐍 Python Projekt\n🦀 Rust Projekt\n🚀 Tauri Projekt\n󱆃 Bash Projekt" | wofi --dmenu --prompt "Neues Projekt") + +case "$choice" in + " Laravel Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + composer create-project laravel/laravel "$NAME" + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; + "󰌝 Simple Web Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + mkdir -p "$NAME" + cd "$NAME" || exit + touch index.html style.css script.js + printf "\n\n\n\n\n%s\n\n\n\n

Hello World

\n\n\n\n" "$NAME" > index.html + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; + " Node.js Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + mkdir -p "$NAME" + cd "$NAME" || exit + npm init -y + touch index.js + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; + "󰡄 Vue Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + npm create vue@latest "$NAME" + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; + "⚛ React Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + npm create vite@latest "$NAME" -- --template react + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; + "🐍 Python Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + mkdir -p "$NAME" + cd "$NAME" || exit + python -m venv .venv + touch main.py requirements.txt + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; + "🦀 Rust Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + cargo new "$NAME" + cd "$NAME" || exit + + cat < README.md +# $NAME + +Rust Projekt + +## Start + +\`\`\`bash +cargo run +\`\`\` + +## Build + +\`\`\`bash +cargo build +\`\`\` +EOF + + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; + "🚀 Tauri Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + + npm create tauri-app@latest "$NAME" + + cd "$NAME" || exit + + cat < README.md +# $NAME + +Tauri Projekt + +## Dev Start + +\`\`\`bash +npm install +npm run tauri dev +\`\`\` + +## Build + +\`\`\`bash +npm run tauri build +\`\`\` +EOF + + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; + "󱆃 Bash Projekt") + kitty -e bash -lc ' + cd "$HOME/Nextcloud/Development/Projekte" || exit + read -rp "Projektname: " NAME + [ -z "$NAME" ] && exit + mkdir -p "$NAME"/{scripts,lib} + cd "$NAME" || exit + + cat < main.sh +#!/usr/bin/env bash + +set -e + +echo "Hello from $NAME" +EOF + + chmod +x main.sh + + cat < README.md +# $NAME + +Bash Script Projekt + +## Start + +\`\`\`bash +./main.sh +\`\`\` +EOF + + code "$HOME/Nextcloud/Development/Projekte/$NAME" + ' + ;; +esac \ No newline at end of file diff --git a/scripts/package-install.sh b/scripts/package-install.sh new file mode 100755 index 0000000..dcddb65 --- /dev/null +++ b/scripts/package-install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +pkg=$(wofi --dmenu --prompt "Pacman Install") + +[ -z "$pkg" ] && exit 0 + +kitty -e bash -lc "pkexec pacman -S $pkg; echo; read -n 1 -s -r -p 'Weiter mit beliebiger Taste...'" diff --git a/scripts/package-search.sh b/scripts/package-search.sh new file mode 100755 index 0000000..d1df9d3 --- /dev/null +++ b/scripts/package-search.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +query=$(wofi --dmenu --prompt "Pacman Search") + +[ -z "$query" ] && exit 0 + +kitty -e bash -lc "pacman -Ss $query; echo; read -n 1 -s -r -p 'Weiter mit beliebiger Taste...'" diff --git a/scripts/packagemenu.sh b/scripts/packagemenu.sh new file mode 100755 index 0000000..73bce9b --- /dev/null +++ b/scripts/packagemenu.sh @@ -0,0 +1,103 @@ +#!/bin/bash + +TERMINAL="kitty" + +run_term() { + "$TERMINAL" -e bash -lc "$1" _ "${@:2}" +} + +menu() { + printf "%s\n" \ + "󰏓 Install Package (Pacman)" \ + "󰛓 Install Package (AUR)" \ + "󰍉 Search & Install (Pacman)" \ + "󰢤 Search & Install (AUR)" \ + "󰚰 Full System Update" \ + "󰆴 Remove Package" \ + "󰁯 Clean Orphans" \ + "󰏗 Clear Package Cache" +} + +choice=$(menu | wofi --dmenu --prompt "Packages") +[ -z "$choice" ] && exit 0 + +case "$choice" in + "󰏓 Install Package (Pacman)") + pkg=$(wofi --dmenu --prompt "Pacman Install") + [ -z "$pkg" ] && exit 0 + run_term 'pkg="$1"; pkexec pacman -S --needed -- "$pkg"; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' "$pkg" + ;; + + "󰛓 Install Package (AUR)") + pkg=$(wofi --dmenu --prompt "AUR Install") + [ -z "$pkg" ] && exit 0 + run_term 'pkg="$1"; paru -S --needed -- "$pkg"; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' "$pkg" + ;; + + "󰍉 Search & Install (Pacman)") + query=$(wofi --dmenu --prompt "Pacman Search") + [ -z "$query" ] && exit 0 + + results=$(pacman -Ss -- "$query" | awk ' + /^[^ ]+\/[^ ]+/ { + split($1,a,"/"); + pkg=a[2]; + repo=a[1]; + ver=$2; + print repo " :: " pkg " :: " ver + }') + + [ -z "$results" ] && notify-send "Pacman Search" "Keine Pakete gefunden." && exit 0 + + selection=$(printf "%s\n" "$results" | wofi --dmenu --prompt "Select Pacman Package") + [ -z "$selection" ] && exit 0 + + pkg=$(printf "%s" "$selection" | awk -F ' :: ' '{print $2}') + [ -z "$pkg" ] && exit 0 + + run_term 'pkg="$1"; pkexec pacman -S --needed -- "$pkg"; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' "$pkg" + ;; + + "󰢤 Search & Install (AUR)") + query=$(wofi --dmenu --prompt "AUR Search") + [ -z "$query" ] && exit 0 + + results=$(paru -Ss -- "$query" | awk ' + /^[^ ]+\/[^ ]+/ { + split($1,a,"/"); + pkg=a[2]; + repo=a[1]; + ver=$2; + print repo " :: " pkg " :: " ver + }') + + [ -z "$results" ] && notify-send "AUR Search" "Keine Pakete gefunden." && exit 0 + + selection=$(printf "%s\n" "$results" | wofi --dmenu --prompt "Select AUR Package") + [ -z "$selection" ] && exit 0 + + pkg=$(printf "%s" "$selection" | awk -F ' :: ' '{print $2}') + [ -z "$pkg" ] && exit 0 + + run_term 'pkg="$1"; paru -S --needed -- "$pkg"; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' "$pkg" + ;; + + "󰚰 Full System Update") + run_term 'pkexec pacman -Syu; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' + ;; + + "󰆴 Remove Package") + installed=$(pacman -Qq | sort) + pkg=$(printf "%s\n" "$installed" | wofi --dmenu --prompt "Remove Package") + [ -z "$pkg" ] && exit 0 + run_term 'pkg="$1"; pkexec pacman -Rns -- "$pkg"; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' "$pkg" + ;; + + "󰁯 Clean Orphans") + run_term 'orphans=$(pacman -Qdtq); if [ -n "$orphans" ]; then pkexec pacman -Rns -- $orphans; else echo "Keine Waisenpakete gefunden."; fi; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' + ;; + + "󰏗 Clear Package Cache") + run_term 'pkexec pacman -Sc; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' + ;; +esac \ No newline at end of file diff --git a/scripts/powermenu.sh b/scripts/powermenu.sh new file mode 100755 index 0000000..1e8f9f4 --- /dev/null +++ b/scripts/powermenu.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +choice=$(printf " Lock\n Suspend\n󰜉 Reboot\n Shutdown\n Logout" | wofi --dmenu --prompt "Power") + +case "$choice" in + " Lock") + hyprlock + ;; + " Suspend") + systemctl suspend + ;; + "󰜉 Reboot") + systemctl reboot + ;; + " Shutdown") + systemctl poweroff + ;; + " Logout") + hyprctl dispatch exit + ;; +esac \ No newline at end of file diff --git a/scripts/screenshot.sh b/scripts/screenshot.sh new file mode 100755 index 0000000..2ff2813 --- /dev/null +++ b/scripts/screenshot.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +DIR="$HOME/Pictures/Screenshots" +FILE="$DIR/screenshot-$(date +%Y-%m-%d_%H-%M-%S).png" + +grim -g "$(slurp)" "$FILE" +wl-copy < "$FILE" + +notify-send "Screenshot gespeichert" "$FILE" diff --git a/scripts/settingsmenu.sh b/scripts/settingsmenu.sh new file mode 100755 index 0000000..8c5c99d --- /dev/null +++ b/scripts/settingsmenu.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +choice=$(printf "󰕾 Audio Control\n Bluetooth\n󰖩 Network\n󰔎 Appearance\n Terminal\n Files\n🖥 Display Settings" | wofi --dmenu --prompt "Settings") + +case "$choice" in + "󰕾 Audio Control") + pavucontrol + ;; + " Bluetooth") + blueman-manager + ;; + "󰖩 Network") + nm-connection-editor + ;; + "󰔎 Appearance") + nwg-look + ;; + " Terminal") + kitty + ;; + " Files") + nautilus + ;; + "🖥 Display Settings") + kitty -e bash -lc 'nano ~/.config/hypr/hyprland.conf' + ;; +esacr \ No newline at end of file diff --git a/scripts/systemmenu.sh b/scripts/systemmenu.sh new file mode 100755 index 0000000..b6a0364 --- /dev/null +++ b/scripts/systemmenu.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +choice=$(printf "󰍛 System Monitor\n󰑐 Disk Usage\n󰒋 Processes\n󰈆 Restart Waybar\n󰅶 Restart Dunst\n󰑐 Reload Hyprland\n󰋊 Check Updates" | wofi --dmenu --prompt "System") + +case "$choice" in + "󰍛 System Monitor") + gnome-system-monitor + ;; + "󰑐 Disk Usage") + kitty -e bash -lc 'df -h; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' + ;; + "󰒋 Processes") + kitty -e btop + ;; + "󰈆 Restart Waybar") + pkill waybar + waybar >/dev/null 2>&1 & + ;; + "󰅶 Restart Dunst") + pkill dunst + dunst >/dev/null 2>&1 & + ;; + "󰑐 Reload Hyprland") + hyprctl reload + ;; + "󰋊 Check Updates") + kitty -e bash -lc 'pkexec pacman -Sy; pacman -Qu; echo; read -n 1 -s -r -p "Taste drücken zum Schließen..."' + ;; +esac diff --git a/scripts/wallpapermenu.sh b/scripts/wallpapermenu.sh new file mode 100755 index 0000000..5e37f8d --- /dev/null +++ b/scripts/wallpapermenu.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +WALLDIR="$HOME/Pictures/Wallpapers" + +choice=$(find "$WALLDIR" -maxdepth 1 -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" \) -printf "%f\n" | sort | wofi --dmenu --prompt "Wallpaper") + +[ -z "$choice" ] && exit 0 + +wall="$WALLDIR/$choice" + +cat > "$HOME/.config/hypr/hyprpaper.conf" </dev/null 2>&1 & + +notify-send "Wallpaper geändert" "$choice"