Compare commits
No commits in common. "d8113f6228260fc22f1f63cddd1a9bfab1a3e42d" and "d092f15eee205a0cf3936ba04e6d715c3f79ae60" have entirely different histories.
d8113f6228
...
d092f15eee
3
group_vars/all.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
isNotebook: true
|
||||
isDesktop: false
|
||||
isVm: false
|
|
@ -1,47 +0,0 @@
|
|||
mobile_platform: false
|
||||
|
||||
monitors:
|
||||
- desc: "LG Electronics LG ULTRAGEAR 311NTZN8J917"
|
||||
output: "DP-1"
|
||||
resolution: "2560x1440@120"
|
||||
position: "1440x1440"
|
||||
background:
|
||||
file: "bg1.png"
|
||||
mode: "fill"
|
||||
|
||||
- desc: "LG Electronics LG ULTRAGEAR 311NTVS8J911"
|
||||
output: "DP-2"
|
||||
resolution: "2560x1440@120"
|
||||
position: "1440x0"
|
||||
background:
|
||||
file: "bg0.png"
|
||||
mode: "fill"
|
||||
|
||||
- desc: "Acer Technologies KG271U TATEE0048524"
|
||||
output: "HDMI-A-4"
|
||||
resolution: "2560x1440@120"
|
||||
position: "0x320"
|
||||
transform: 3
|
||||
background:
|
||||
file: "bgv0.png"
|
||||
mode: "fill"
|
||||
|
||||
workspaces:
|
||||
- id: 1
|
||||
monitor: "LG Electronics LG ULTRAGEAR 311NTZN8J917"
|
||||
default: true
|
||||
- id: 2
|
||||
monitor: "LG Electronics LG ULTRAGEAR 311NTVS8J911"
|
||||
default: true
|
||||
- id: 3
|
||||
monitor: "Acer Technologies KG271U TATEE0048524"
|
||||
default: true
|
||||
layoutopt_orientation: "top"
|
||||
on_created_empty: "flatpak run com.discordapp.Discord & keepassxc"
|
||||
- id: 9
|
||||
monitor: "LG Electronics LG ULTRAGEAR 311NTVS8J911"
|
||||
|
||||
autostart:
|
||||
- command: "spotify --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
workspace: 9
|
||||
silent: true
|
|
@ -1,26 +0,0 @@
|
|||
mobile_platform: true
|
||||
|
||||
monitors:
|
||||
- desc: "BOE 0x07C9"
|
||||
output: "eDP-1"
|
||||
resolution: "1920x1080@60"
|
||||
background:
|
||||
file: "bg0.png"
|
||||
mode: "fill"
|
||||
|
||||
workspaces:
|
||||
- id: 1
|
||||
monitor: "BOE 0x07C9"
|
||||
default: true
|
||||
- id: 8
|
||||
monitor: "BOE 0x07C9"
|
||||
- id: 9
|
||||
monitor: "BOE 0x07C9"
|
||||
|
||||
autostart:
|
||||
- command: "keepassxc"
|
||||
workspace: 8
|
||||
silent: true
|
||||
- command: "spotify --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
workspace: 9
|
||||
silent: true
|
After Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 6.7 MiB |
Before Width: | Height: | Size: 5.7 MiB |
Before Width: | Height: | Size: 4.3 MiB |
Before Width: | Height: | Size: 6.7 MiB |
Before Width: | Height: | Size: 5.7 MiB |
Before Width: | Height: | Size: 4.3 MiB |
After Width: | Height: | Size: 745 KiB |
|
@ -30,8 +30,6 @@
|
|||
loop:
|
||||
- src: "{{ role_path }}/files/.config"
|
||||
dest: "{{ ansible_env.HOME }}/"
|
||||
- src: "{{ role_path }}/files/.local"
|
||||
dest: "{{ ansible_env.HOME }}/"
|
||||
|
||||
- name: Ensure presence of required directories
|
||||
file:
|
||||
|
@ -41,7 +39,6 @@
|
|||
loop:
|
||||
- "{{ ansible_env.HOME }}/.config/hypr"
|
||||
- "{{ ansible_env.HOME }}/.config/waybar"
|
||||
- "{{ ansible_env.HOME }}/.local/bin"
|
||||
|
||||
- name: Render config files
|
||||
ansible.builtin.template:
|
||||
|
@ -54,10 +51,3 @@
|
|||
dest: "{{ ansible_env.HOME }}/.config/hypr/hyprland.conf"
|
||||
- src: ".config/waybar/config.j2"
|
||||
dest: "{{ ansible_env.HOME }}/.config/waybar/config"
|
||||
- src: ".local/bin/hyprhelpr.j2"
|
||||
dest: "{{ ansible_env.HOME }}/.local/bin/hyprhelpr"
|
||||
|
||||
- name: Make "~/.local/bin/hyprhelpr" executable
|
||||
ansible.builtin.file:
|
||||
dest: "{{ ansible_env.HOME }}/.local/bin/hyprhelpr"
|
||||
mode: "og+x"
|
|
@ -15,19 +15,14 @@
|
|||
- build-essential
|
||||
- cmake
|
||||
- meson
|
||||
# hyprland-scanner
|
||||
- libpugixml-dev
|
||||
# hyprcursor
|
||||
- libzip-dev
|
||||
- librsvg2-dev
|
||||
- libxcb-util-dev
|
||||
# Hyprland
|
||||
- libpango1.0-dev
|
||||
- libtomlplusplus-dev
|
||||
- uuid-dev
|
||||
# xdg-desktop-portal-hyprland
|
||||
#- qtbase5-dev
|
||||
- qt6-base-dev
|
||||
- qtbase5-dev
|
||||
- libspa-0.2-dev
|
||||
- libpipewire-0.3-dev
|
||||
|
||||
|
@ -39,25 +34,16 @@
|
|||
owner: "{{ ansible_user_id }}"
|
||||
group: "{{ ansible_user_id }}"
|
||||
loop:
|
||||
- "hyprwayland-scanner"
|
||||
- "Hyprland"
|
||||
- "hyprlang"
|
||||
- "hyprcursor"
|
||||
- "xdg-desktop-portal-hyprland"
|
||||
|
||||
- name: Checkout hyprwayland-scanner repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/hyprwayland-scanner.git'
|
||||
dest: /usr/local/src/hyprwayland-scanner
|
||||
version: v0.3.4
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
- name: Checkout Hyprland repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/Hyprland.git'
|
||||
dest: /usr/local/src/Hyprland
|
||||
version: v0.40.0
|
||||
version: v0.37.1
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
|
@ -65,7 +51,7 @@
|
|||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/hyprlang.git'
|
||||
dest: /usr/local/src/hyprlang
|
||||
version: v0.5.1
|
||||
version: v0.5.0
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
|
@ -73,7 +59,7 @@
|
|||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/hyprcursor.git'
|
||||
dest: /usr/local/src/hyprcursor
|
||||
version: v0.1.8
|
||||
version: v0.1.4
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
|
@ -81,24 +67,10 @@
|
|||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/xdg-desktop-portal-hyprland.git'
|
||||
dest: /usr/local/src/xdg-desktop-portal-hyprland
|
||||
version: master
|
||||
version: v1.3.1
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
- name: Build hyprwayland-scanner
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ item }}"
|
||||
chdir: /usr/local/src/hyprwayland-scanner
|
||||
loop:
|
||||
- "cmake -DCMAKE_INSTALL_PREFIX=/usr -B build"
|
||||
- "cmake --build build"
|
||||
|
||||
- name: Install hyprwayland-scanner
|
||||
become: yes
|
||||
ansible.builtin.command:
|
||||
cmd: "cmake --install build"
|
||||
chdir: /usr/local/src/hyprwayland-scanner
|
||||
|
||||
- name: Build hyprlang
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ item }}"
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
name:
|
||||
- swaylock
|
||||
- swaybg
|
||||
- swayidle
|
||||
- waybar
|
||||
- wofi
|
||||
- xdg-desktop-portal-wlr
|
||||
- xdg-desktop-portal-gtk
|
||||
- xfce4-appfinder
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
# Monitor configuration (see https://wiki.hyprland.org/Configuring/Monitors/)
|
||||
{% for monitor in hostvars[ansible_hostname]['monitors'] -%}
|
||||
monitor=desc:{{ monitor['desc'] }}, {{ monitor['resolution'] }}, {{ monitor['position'] }}, 1
|
||||
{% endfor %}
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
# Programs to use
|
||||
$terminal = flatpak run --nosocket=wayland org.wezfurlong.wezterm
|
||||
$terminal = flatpak run org.wezfurlong.wezterm
|
||||
$menu = xfce4-appfinder --disable-server
|
||||
|
||||
# Default env vars
|
||||
env = XCURSOR_SIZE,24
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = de
|
||||
kb_variant = nodeadkeys
|
||||
numlock_by_default = 1
|
||||
|
||||
follow_mouse = 2
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = 1
|
||||
natural_scroll = enabled
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
@ -37,7 +34,6 @@ general {
|
|||
|
||||
layout = master
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false
|
||||
}
|
||||
|
||||
|
@ -90,28 +86,22 @@ misc {
|
|||
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
}
|
||||
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
windowrulev2 = suppressevent maximize, class:.*
|
||||
windowrulev2 = idleinhibit fullscreen, class:.*
|
||||
windowrulev2 = nomaximizerequest, class:.*
|
||||
windowrulev2 = float,title:^(Application Finder)$
|
||||
windowrulev2 = size 500 500,title:^(Application Finder)$
|
||||
|
||||
# Workspace rules
|
||||
{% for workspace in hostvars[ansible_hostname]['workspaces'] -%}
|
||||
workspace = {{ workspace['id'] }}{% if 'monitor' in workspace %}, monitor:desc:{{ workspace['monitor'] }}{% endif %}{% if 'default' in workspace %}, default:{{ workspace['default'] }}{% endif %}{% if 'layoutopt_orientation' in workspace %}, layoutopt:orientation:{{ workspace['layoutopt_orientation'] }}{% endif %}{% if 'on_created_empty' in workspace %}, on-created-empty:{{ workspace['on_created_empty'] }}{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
# Execute apps at launch
|
||||
exec-once = systemctl --user import-environment DISPLAY WAYLAND_DISPLAY && hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
exec-once = waybar & ~/.local/bin/hyprhelpr background & ~/.local/bin/hyprhelpr idle
|
||||
exec-once = waybar
|
||||
exec-once = swaybg -i ~/.config/background/background.png -m fill
|
||||
{% if 'spotify' in role_names %}
|
||||
exec-once = [workspace 9 silent] spotify --enable-features=UseOzonePlatform --ozone-platform=wayland
|
||||
{% endif %}
|
||||
{% if 'nextcloud' in role_names %}
|
||||
exec-once = nextcloud --background
|
||||
{% endif %}
|
||||
{% for autostart in hostvars[ansible_hostname]['autostart'] -%}
|
||||
exec-once = {% if 'workspace' in autostart %}[workspace {{ autostart['workspace'] }}] {% endif %}{{ autostart['command'] }}
|
||||
{% endfor %}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
|
@ -123,8 +113,9 @@ bind = $mainMod SHIFT, Q, killactive,
|
|||
bind = $mainMod SHIFT, E, exit,
|
||||
bind = $mainMod, F, fullscreen, 0
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, L, exec, ~/.local/bin/hyprhelpr lock
|
||||
bind = $mainMod, P, exec, ~/.local/bin/hyprhelpr powermenu
|
||||
bind = $mainMod, L, exec, pa-loopback
|
||||
#bind = $mainMod, P, pseudo, # dwindle
|
||||
#bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
|
|
|
@ -28,11 +28,15 @@
|
|||
"reverse-scrolling": true,
|
||||
"on-click": "swaymsg exec amixer -q set Master toggle"
|
||||
},
|
||||
{% if hostvars[ansible_hostname]['mobile_platform'] | bool %}
|
||||
{% if isNotebook | bool %}
|
||||
"battery": {
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
}
|
||||
},
|
||||
{% endif %}
|
||||
"custom/power":{
|
||||
"format":" ",
|
||||
"on-click":"swaynag -t warning -m 'Power Menu Options' -b 'Logout' 'swaymsg exit' -b 'Lock' 'swaymsg exec swaylock -f' -b 'Suspend' 'swaymsg exec sudo systemctl suspend && swaylock -f' -b 'Reboot' 'swaymsg exec sudo systemctl reboot' -b 'Shutdown' 'swaymsg exec sudo systemctl poweroff'"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
background() {
|
||||
swaybg \
|
||||
{% for monitor in hostvars[ansible_hostname]['monitors'] -%}
|
||||
-o "{{ monitor['desc'] }}" -i ~/.config/background/{{ monitor['background']['file'] }} -m {{ monitor['background']['mode'] }} {%- if not loop.last %}\{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
idle() {
|
||||
swayidle -w \
|
||||
timeout 180 '~/.local/bin/hyprhelpr lock' \
|
||||
timeout 240 'hyprctl dispatch dpms off' \
|
||||
resume 'hyprctl dispatch dpms on'
|
||||
}
|
||||
|
||||
lock() {
|
||||
if pgrep -x "swaylock" >/dev/null
|
||||
then
|
||||
echo "A instance of swaylock is already running."
|
||||
exit 1
|
||||
else
|
||||
swaylock -f -e -s fill --indicator-radius 150 \
|
||||
{% for monitor in hostvars[ansible_hostname]['monitors'] -%}
|
||||
-i {{ monitor['output'] }}:~/.config/background/lock-{{ monitor['background']['file'] }} {%- if not loop.last %}\{% endif %}
|
||||
{% endfor %}
|
||||
fi
|
||||
}
|
||||
|
||||
shutdown() {
|
||||
sudo systemctl poweroff
|
||||
}
|
||||
|
||||
reboot() {
|
||||
sudo systemctl reboot
|
||||
}
|
||||
|
||||
powermenu() {
|
||||
PM_ACTION=$(printf "Shutdown\nReboot\nLock\nLogoff" | wofi --show=dmenu -i --width 200 --height 150)
|
||||
if [ -n "$PM_ACTION" ]; then
|
||||
case $PM_ACTION in
|
||||
Shutdown)
|
||||
shutdown
|
||||
;;
|
||||
Reboot)
|
||||
reboot
|
||||
;;
|
||||
Lock)
|
||||
lock
|
||||
;;
|
||||
Logoff)
|
||||
hyprctl dispatch exit
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
ACTION=$1
|
||||
case $ACTION in
|
||||
background)
|
||||
background
|
||||
;;
|
||||
idle)
|
||||
idle
|
||||
;;
|
||||
lock)
|
||||
lock
|
||||
;;
|
||||
shutdown)
|
||||
shutdown
|
||||
;;
|
||||
reboot)
|
||||
reboot
|
||||
;;
|
||||
powermenu)
|
||||
powermenu
|
||||
;;
|
||||
help | -h | --help)
|
||||
echo "Usage: hyprhelpr <action> [parameters]"
|
||||
echo "Available actions:"
|
||||
echo " background Start swaybg with the configured backgrounds."
|
||||
echo " idle Start swayidle with the configured actions."
|
||||
echo " lock Lock the current session using swaylock."
|
||||
echo " shutdown Shut down the system."
|
||||
echo " reboot Reboot the system."
|
||||
echo " powermenu Show wofi in dmenu mode with different power options"
|
||||
echo " help Show this help text."
|
||||
;;
|
||||
*)
|
||||
echo "Invalid action \"$ACTION\"."' Use "hyprhelpr help" to get help.'
|
||||
exit 1
|
||||
esac
|
|
@ -15,7 +15,7 @@ export GPG_TTY=$(tty)
|
|||
|
||||
# Autostart Hyprland at login
|
||||
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
|
||||
{% if hostvars[ansible_hostname]['virtual_machine'] | bool %}
|
||||
{% if isVm | bool %}
|
||||
export WLR_NO_HARDWARE_CURSORS=1
|
||||
{% endif %}
|
||||
exec Hyprland
|
||||
|
|