Use Hyprland instead of sway #1
13
main.yml
13
main.yml
|
@ -1,8 +1,11 @@
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- common
|
- common
|
||||||
- desktop-environment # Sway, App Launcher etc.
|
- desktop-environment # Hyprland, App Launcher etc.
|
||||||
- essential-tools # Thunar File Manager, Firefox, KeePassXC, Nextcloud Desktop
|
- firefox
|
||||||
#- media-tools # Spotify, VLC
|
#- nextcloud
|
||||||
#- dev-tools # Visual Studio Code, Node.js
|
#- keepassxc
|
||||||
#- vm-tools # QEMU / KVM, libvirt, virt-manager
|
#- spotify
|
||||||
|
#- vlc
|
||||||
|
#- vs-code
|
||||||
|
#- qemu-kvm
|
|
@ -2,9 +2,9 @@
|
||||||
UBUNTU_CODENAME=jammy
|
UBUNTU_CODENAME=jammy
|
||||||
|
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install wget gpg
|
sudo apt install -y wget gpg
|
||||||
|
|
||||||
wget -O- "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" | sudo gpg --dearmour -o /usr/share/keyrings/ansible-archive-keyring.gpg
|
wget -O- "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" | sudo gpg --dearmour -o /usr/share/keyrings/ansible-archive-keyring.gpg
|
||||||
echo "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list.d/ansible.list
|
echo "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list.d/ansible.list
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install ansible
|
sudo apt install -y ansible
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 745 KiB After Width: | Height: | Size: 745 KiB |
|
@ -1,2 +0,0 @@
|
||||||
XDG_CURRENT_DESKTOP="sway"
|
|
||||||
XDG_SESSION_TYPE="wayland"
|
|
|
@ -1,2 +0,0 @@
|
||||||
dependencies:
|
|
||||||
- role: common
|
|
53
roles/desktop-environment/tasks/config.yml
Normal file
53
roles/desktop-environment/tasks/config.yml
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
- name: Create group for sudoers config
|
||||||
|
become: yes
|
||||||
|
group:
|
||||||
|
name: admins
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Add user to group for sudoers config
|
||||||
|
become: yes
|
||||||
|
user:
|
||||||
|
append: true
|
||||||
|
name: "{{ ansible_user_id }}"
|
||||||
|
groups:
|
||||||
|
- admins
|
||||||
|
|
||||||
|
- name: Create sudoers config
|
||||||
|
become: yes
|
||||||
|
community.general.sudoers:
|
||||||
|
name: desktop-environment
|
||||||
|
group: admins
|
||||||
|
nopassword: true
|
||||||
|
commands:
|
||||||
|
- "/usr/bin/systemctl poweroff"
|
||||||
|
- "/usr/bin/systemctl reboot"
|
||||||
|
- "/usr/bin/systemctl suspend"
|
||||||
|
|
||||||
|
- name: Copy static config files
|
||||||
|
copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
loop:
|
||||||
|
- src: "{{ role_path }}/files/.config"
|
||||||
|
dest: "{{ ansible_env.HOME }}/"
|
||||||
|
|
||||||
|
- name: Ensure presence of required directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
recurse: yes
|
||||||
|
state: directory
|
||||||
|
loop:
|
||||||
|
- "{{ ansible_env.HOME }}/.config/hypr"
|
||||||
|
- "{{ ansible_env.HOME }}/.config/waybar"
|
||||||
|
|
||||||
|
- name: Render config files
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
loop:
|
||||||
|
- src: "bash_profile.j2"
|
||||||
|
dest: "{{ ansible_env.HOME }}/.bash_profile"
|
||||||
|
- src: ".config/hypr/hyprland.conf.j2"
|
||||||
|
dest: "{{ ansible_env.HOME }}/.config/hypr/hyprland.conf"
|
||||||
|
- src: ".config/waybar/config.j2"
|
||||||
|
dest: "{{ ansible_env.HOME }}/.config/waybar/config"
|
22
roles/desktop-environment/tasks/flatpak.yml
Normal file
22
roles/desktop-environment/tasks/flatpak.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
- name: Install flatpak
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: latest
|
||||||
|
install_recommends: false
|
||||||
|
name:
|
||||||
|
- flatpak
|
||||||
|
|
||||||
|
- name: Add flathub remote to flatpak
|
||||||
|
community.general.flatpak_remote:
|
||||||
|
name: flathub
|
||||||
|
state: present
|
||||||
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
method: user
|
||||||
|
|
||||||
|
- name: Install flatpaks
|
||||||
|
community.general.flatpak:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
method: user
|
||||||
|
loop:
|
||||||
|
- org.wezfurlong.wezterm
|
110
roles/desktop-environment/tasks/hyprland.yml
Normal file
110
roles/desktop-environment/tasks/hyprland.yml
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
- name: Install build dependencies (1/2)
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: build-dep
|
||||||
|
name:
|
||||||
|
- wlroots
|
||||||
|
|
||||||
|
- name: Install build dependencies (2/2)
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: latest
|
||||||
|
install_recommends: false
|
||||||
|
name:
|
||||||
|
# General
|
||||||
|
- build-essential
|
||||||
|
- cmake
|
||||||
|
- meson
|
||||||
|
# Hyprland
|
||||||
|
- libpango1.0-dev
|
||||||
|
- libtomlplusplus-dev
|
||||||
|
# xdg-desktop-portal-hyprland
|
||||||
|
- qtbase5-dev
|
||||||
|
- libspa-0.2-dev
|
||||||
|
- libpipewire-0.3-dev
|
||||||
|
|
||||||
|
- name: Create source folders
|
||||||
|
become: yes
|
||||||
|
file:
|
||||||
|
path: "/usr/local/src/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ ansible_user_id }}"
|
||||||
|
group: "{{ ansible_user_id }}"
|
||||||
|
loop:
|
||||||
|
- "Hyprland"
|
||||||
|
- "hyprlang"
|
||||||
|
- "xdg-desktop-portal-hyprland"
|
||||||
|
|
||||||
|
- name: Checkout Hyprland repo
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: 'https://github.com/hyprwm/Hyprland.git'
|
||||||
|
dest: /usr/local/src/Hyprland
|
||||||
|
version: v0.35.0
|
||||||
|
force: true
|
||||||
|
recursive: true
|
||||||
|
|
||||||
|
- name: Checkout hyprlang repo
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: 'https://github.com/hyprwm/hyprlang.git'
|
||||||
|
dest: /usr/local/src/hyprlang
|
||||||
|
version: v0.4.0
|
||||||
|
force: true
|
||||||
|
recursive: true
|
||||||
|
|
||||||
|
- name: Checkout xdg-desktop-portal-hyprland repo
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: 'https://github.com/hyprwm/xdg-desktop-portal-hyprland.git'
|
||||||
|
dest: /usr/local/src/xdg-desktop-portal-hyprland
|
||||||
|
version: v1.3.1
|
||||||
|
force: true
|
||||||
|
recursive: true
|
||||||
|
|
||||||
|
- name: Build Hyprland
|
||||||
|
community.general.make:
|
||||||
|
chdir: /usr/local/src/Hyprland
|
||||||
|
target: all
|
||||||
|
|
||||||
|
- name: Install Hyprland
|
||||||
|
become: true
|
||||||
|
community.general.make:
|
||||||
|
chdir: /usr/local/src/Hyprland
|
||||||
|
target: install
|
||||||
|
|
||||||
|
- name: Build hyprlang
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: "{{ item }}"
|
||||||
|
chdir: /usr/local/src/hyprlang
|
||||||
|
loop:
|
||||||
|
- "cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B build"
|
||||||
|
- "cmake --build build --config Release --target hyprlang"
|
||||||
|
|
||||||
|
- name: Install hyprlang
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: "cmake --install build"
|
||||||
|
chdir: /usr/local/src/hyprlang
|
||||||
|
|
||||||
|
- name: Build xdg-desktop-portal-hyprland
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: "{{ item }}"
|
||||||
|
chdir: /usr/local/src/xdg-desktop-portal-hyprland
|
||||||
|
loop:
|
||||||
|
- "cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build"
|
||||||
|
- "cmake --build build"
|
||||||
|
|
||||||
|
- name: Install xdg-desktop-portal-hyprland
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: "cmake --install build"
|
||||||
|
chdir: /usr/local/src/xdg-desktop-portal-hyprland
|
||||||
|
|
||||||
|
- name: Move xdg-desktop-portal-hyprland.service into place
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: /usr/lib/x86_64-linux-gnu/systemd/user/xdg-desktop-portal-hyprland.service
|
||||||
|
dest: /usr/lib/systemd/user/xdg-desktop-portal-hyprland.service
|
||||||
|
|
||||||
|
- name: Reload systemd
|
||||||
|
ansible.builtin.systemd_service:
|
||||||
|
daemon_reload: true
|
||||||
|
scope: user
|
|
@ -1,93 +1,11 @@
|
||||||
- name: Install packages for desktop environment
|
- name: Include installation of Hyprland
|
||||||
become: yes
|
import_tasks: hyprland.yml
|
||||||
apt:
|
|
||||||
state: latest
|
|
||||||
install_recommends: false
|
|
||||||
name:
|
|
||||||
- sway
|
|
||||||
- xwayland
|
|
||||||
- swaylock
|
|
||||||
- waybar
|
|
||||||
- xdg-desktop-portal-wlr
|
|
||||||
- slurp
|
|
||||||
- xfce4-appfinder
|
|
||||||
- rtkit
|
|
||||||
- pipewire
|
|
||||||
- pipewire-pulse
|
|
||||||
- wireplumber
|
|
||||||
- alsa-utils
|
|
||||||
- brightnessctl
|
|
||||||
- flatpak
|
|
||||||
- adwaita-icon-theme
|
|
||||||
- fonts-firacode
|
|
||||||
- fonts-font-awesome
|
|
||||||
- fonts-noto-color-emoji
|
|
||||||
|
|
||||||
- name: Add flathub remote to flatpak
|
- name: Include installation of utilities
|
||||||
community.general.flatpak_remote:
|
import_tasks: utils.yml
|
||||||
name: flathub
|
|
||||||
state: present
|
|
||||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
||||||
method: user
|
|
||||||
|
|
||||||
- name: Install flatpaks
|
- name: Include flatpak setup
|
||||||
community.general.flatpak:
|
import_tasks: flatpak.yml
|
||||||
name: "{{ item }}"
|
|
||||||
state: present
|
|
||||||
method: user
|
|
||||||
loop:
|
|
||||||
- org.wezfurlong.wezterm
|
|
||||||
|
|
||||||
- name: Create group for sudoers config
|
- name: Include configuration steps
|
||||||
become: yes
|
import_tasks: config.yml
|
||||||
group:
|
|
||||||
name: admins
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Add user to group for sudoers config
|
|
||||||
become: yes
|
|
||||||
user:
|
|
||||||
append: true
|
|
||||||
name: "{{ ansible_user_id }}"
|
|
||||||
groups:
|
|
||||||
- admins
|
|
||||||
|
|
||||||
- name: Create sudoers config
|
|
||||||
become: yes
|
|
||||||
community.general.sudoers:
|
|
||||||
name: desktop-environment
|
|
||||||
group: admins
|
|
||||||
nopassword: true
|
|
||||||
commands:
|
|
||||||
- "/usr/bin/systemctl poweroff"
|
|
||||||
- "/usr/bin/systemctl reboot"
|
|
||||||
- "/usr/bin/systemctl suspend"
|
|
||||||
|
|
||||||
- name: Copy static config files
|
|
||||||
copy:
|
|
||||||
src: "{{ item.src }}"
|
|
||||||
dest: "{{ item.dest }}"
|
|
||||||
loop:
|
|
||||||
- src: "{{ role_path }}/files/.config"
|
|
||||||
dest: "{{ ansible_env.HOME }}/"
|
|
||||||
|
|
||||||
- name: Ensure presence of required directories
|
|
||||||
file:
|
|
||||||
path: "{{ item }}"
|
|
||||||
recurse: yes
|
|
||||||
state: directory
|
|
||||||
loop:
|
|
||||||
- "{{ ansible_env.HOME }}/.config/sway"
|
|
||||||
- "{{ ansible_env.HOME }}/.config/waybar"
|
|
||||||
|
|
||||||
- name: Render config files
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: "{{ item.src }}"
|
|
||||||
dest: "{{ item.dest }}"
|
|
||||||
loop:
|
|
||||||
- src: "bash_profile.j2"
|
|
||||||
dest: "{{ ansible_env.HOME }}/.bash_profile"
|
|
||||||
- src: "sway-config.j2"
|
|
||||||
dest: "{{ ansible_env.HOME }}/.config/sway/config"
|
|
||||||
- src: "waybar-config.j2"
|
|
||||||
dest: "{{ ansible_env.HOME }}/.config/waybar/config"
|
|
25
roles/desktop-environment/tasks/utils.yml
Normal file
25
roles/desktop-environment/tasks/utils.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
- name: Install utilities
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: latest
|
||||||
|
install_recommends: false
|
||||||
|
name:
|
||||||
|
- swaylock
|
||||||
|
- swaybg
|
||||||
|
- waybar
|
||||||
|
- xdg-desktop-portal-wlr
|
||||||
|
- xdg-desktop-portal-gtk
|
||||||
|
- xfce4-appfinder
|
||||||
|
- rtkit
|
||||||
|
- pipewire
|
||||||
|
- pipewire-pulse
|
||||||
|
- wireplumber
|
||||||
|
- qpwgraph
|
||||||
|
- alsa-utils
|
||||||
|
- brightnessctl
|
||||||
|
- gnome-keyring
|
||||||
|
- adwaita-icon-theme
|
||||||
|
- fonts-firacode
|
||||||
|
- fonts-font-awesome
|
||||||
|
- fonts-noto-color-emoji
|
||||||
|
- thunar
|
|
@ -0,0 +1,173 @@
|
||||||
|
# Monitor configuration (see https://wiki.hyprland.org/Configuring/Monitors/)
|
||||||
|
monitor=,preferred,auto,auto
|
||||||
|
|
||||||
|
# Programs to use
|
||||||
|
$terminal = flatpak run org.wezfurlong.wezterm
|
||||||
|
$menu = xfce4-appfinder --disable-server
|
||||||
|
|
||||||
|
# Default env vars
|
||||||
|
env = XCURSOR_SIZE,24
|
||||||
|
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||||
|
|
||||||
|
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||||
|
input {
|
||||||
|
kb_layout = de
|
||||||
|
kb_variant = nodeadkeys
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
}
|
||||||
|
|
||||||
|
general {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
|
||||||
|
gaps_in = 5
|
||||||
|
gaps_out = 10
|
||||||
|
border_size = 2
|
||||||
|
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||||
|
col.inactive_border = rgba(595959aa)
|
||||||
|
|
||||||
|
layout = master
|
||||||
|
|
||||||
|
allow_tearing = false
|
||||||
|
}
|
||||||
|
|
||||||
|
decoration {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
|
||||||
|
rounding = 10
|
||||||
|
|
||||||
|
blur {
|
||||||
|
enabled = true
|
||||||
|
size = 3
|
||||||
|
passes = 1
|
||||||
|
|
||||||
|
vibrancy = 0.1696
|
||||||
|
}
|
||||||
|
|
||||||
|
drop_shadow = true
|
||||||
|
shadow_range = 4
|
||||||
|
shadow_render_power = 3
|
||||||
|
col.shadow = rgba(1a1a1aee)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||||
|
animations {
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
master {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||||
|
new_is_master = true
|
||||||
|
orientation = right
|
||||||
|
}
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
workspace_swipe = false
|
||||||
|
}
|
||||||
|
|
||||||
|
misc {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||||
|
}
|
||||||
|
|
||||||
|
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
|
windowrulev2 = nomaximizerequest, class:.*
|
||||||
|
windowrulev2 = float,title:^(Application Finder)$
|
||||||
|
windowrulev2 = size 500 500,title:^(Application Finder)$
|
||||||
|
|
||||||
|
# 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
|
||||||
|
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 %}
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||||
|
$mainMod = SUPER
|
||||||
|
|
||||||
|
# Keybinds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||||
|
bind = $mainMod, Return, exec, $terminal
|
||||||
|
bind = $mainMod, D, exec, $menu
|
||||||
|
bind = $mainMod SHIFT, Q, killactive,
|
||||||
|
bind = $mainMod SHIFT, E, exit,
|
||||||
|
bind = $mainMod, F, fullscreen, 0
|
||||||
|
bind = $mainMod, V, togglefloating,
|
||||||
|
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
|
||||||
|
bind = $mainMod, right, movefocus, r
|
||||||
|
bind = $mainMod, up, movefocus, u
|
||||||
|
bind = $mainMod, down, movefocus, d
|
||||||
|
|
||||||
|
# Move window with mainMod + SHIFT + arrow keys
|
||||||
|
bind = $mainMod SHIFT, left, movewindow, l
|
||||||
|
bind = $mainMod SHIFT, right, movewindow, r
|
||||||
|
bind = $mainMod SHIFT, up, movewindow, u
|
||||||
|
bind = $mainMod SHIFT, down, movewindow, 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
|
||||||
|
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
{% if isNotebook | bool %}
|
||||||
|
# Backlight control
|
||||||
|
bind = , XF86MonBrightnessUp, exec, brightnessctl -d intel_backlight set +5%
|
||||||
|
bind = , XF86MonBrightnessDown, exec, brightnessctl -d intel_backlight set 5%-
|
||||||
|
|
||||||
|
# Volume control
|
||||||
|
bind = , XF86AudioRaiseVolume, exec, amixer -c 0 -q set Master 2dB+ unmute
|
||||||
|
bind = , XF86AudioLowerVolume, exec, amixer -c 0 -q set Master 2db- unmute
|
||||||
|
bind = , XF86AudioMute, exec, amixer -q set Master toggle
|
||||||
|
|
||||||
|
# Touchpad control
|
||||||
|
bind = , XF86TouchpadOn, exec, synclient Touchpadoff=0
|
||||||
|
bind = , XF86TouchpadOff, exec, synclient Touchpadoff=1
|
||||||
|
{% endif %}
|
|
@ -1,10 +1,8 @@
|
||||||
{
|
{
|
||||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
"modules-left": ["hyprland/workspaces"],
|
||||||
"modules-center": ["clock"],
|
"modules-center": ["clock"],
|
||||||
"modules-right": ["cpu", "memory", "network", "pulseaudio", {% if isNotebook | bool %}"battery", {% endif %}"custom/power"],
|
"modules-right": ["cpu", "memory", "network", "pulseaudio", {% if isNotebook | bool %}"battery", {% endif %}"custom/power"],
|
||||||
"sway/workspaces": {
|
"hyprland/workspaces": {},
|
||||||
"disable-scroll": true
|
|
||||||
},
|
|
||||||
"clock": {
|
"clock": {
|
||||||
"format": " {:%H:%M %d.%m.}",
|
"format": " {:%H:%M %d.%m.}",
|
||||||
"timezone": "Europe/Berlin"
|
"timezone": "Europe/Berlin"
|
|
@ -13,8 +13,10 @@ fi
|
||||||
# Fix gpg for git commit signing
|
# Fix gpg for git commit signing
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
# Autostart sway at login
|
# Autostart Hyprland at login
|
||||||
|
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
|
||||||
{% if isVm | bool %}
|
{% if isVm | bool %}
|
||||||
export WLR_NO_HARDWARE_CURSORS=1
|
export WLR_NO_HARDWARE_CURSORS=1
|
||||||
{% endif %}
|
{% endif %}
|
||||||
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec sway; fi
|
exec Hyprland
|
||||||
|
fi
|
|
@ -1,248 +0,0 @@
|
||||||
input "type:keyboard" {
|
|
||||||
xkb_layout de
|
|
||||||
xkb_variant nodeadkeys
|
|
||||||
repeat_delay 200
|
|
||||||
repeat_rate 40
|
|
||||||
}
|
|
||||||
|
|
||||||
input "type:touchpad" {
|
|
||||||
tap enabled
|
|
||||||
natural_scroll enabled
|
|
||||||
}
|
|
||||||
|
|
||||||
set $mod Mod4
|
|
||||||
|
|
||||||
default_border pixel 2
|
|
||||||
default_floating_border pixel 2
|
|
||||||
|
|
||||||
hide_edge_borders both
|
|
||||||
|
|
||||||
bindsym $mod+u border none
|
|
||||||
bindsym $mod+y border pixel 1
|
|
||||||
bindsym $mod+n border normal
|
|
||||||
|
|
||||||
font xft:Fira Code 11
|
|
||||||
|
|
||||||
floating_modifier $mod
|
|
||||||
|
|
||||||
bindsym $mod+Return exec flatpak run org.wezfurlong.wezterm
|
|
||||||
|
|
||||||
# Window kill command
|
|
||||||
bindsym $mod+Shift+q kill
|
|
||||||
|
|
||||||
# start program launcher
|
|
||||||
bindsym $mod+d exec --no-startup-id xfce4-appfinder --disable-server
|
|
||||||
for_window [title="Application Finder"] floating enable
|
|
||||||
for_window [title="Application Finder"] resize set 500 500
|
|
||||||
|
|
||||||
# change focus
|
|
||||||
bindsym $mod+j focus left
|
|
||||||
bindsym $mod+k focus down
|
|
||||||
bindsym $mod+l focus up
|
|
||||||
bindsym $mod+semicolon focus right
|
|
||||||
|
|
||||||
bindsym $mod+Left focus left
|
|
||||||
bindsym $mod+Down focus down
|
|
||||||
bindsym $mod+Up focus up
|
|
||||||
bindsym $mod+Right focus right
|
|
||||||
|
|
||||||
# move focused window
|
|
||||||
bindsym $mod+Shift+j move left
|
|
||||||
bindsym $mod+Shift+k move down
|
|
||||||
bindsym $mod+Shift+l move up
|
|
||||||
bindsym $mod+Shift+semicolon move right
|
|
||||||
|
|
||||||
bindsym $mod+Shift+Left move left
|
|
||||||
bindsym $mod+Shift+Down move down
|
|
||||||
bindsym $mod+Shift+Up move up
|
|
||||||
bindsym $mod+Shift+Right move right
|
|
||||||
|
|
||||||
# workspace back and forth (with/without active container)
|
|
||||||
workspace_auto_back_and_forth yes
|
|
||||||
bindsym $mod+b workspace back_and_forth
|
|
||||||
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
|
|
||||||
|
|
||||||
# split orientation
|
|
||||||
bindsym $mod+h split h;exec notify-send 'tile horizontally'
|
|
||||||
bindsym $mod+v split v;exec notify-send 'tile vertically'
|
|
||||||
bindsym $mod+q split toggle
|
|
||||||
|
|
||||||
# toggle fullscreen mode for the focused container
|
|
||||||
bindsym $mod+f fullscreen toggle
|
|
||||||
|
|
||||||
# change container layout (stacked, tabbed, toggle split)
|
|
||||||
bindsym $mod+s layout stacking
|
|
||||||
bindsym $mod+w layout tabbed
|
|
||||||
bindsym $mod+e layout toggle split
|
|
||||||
|
|
||||||
# toggle tiling / floating
|
|
||||||
bindsym $mod+Shift+space floating toggle
|
|
||||||
|
|
||||||
# change focus between tiling / floating windows
|
|
||||||
bindsym $mod+space focus mode_toggle
|
|
||||||
|
|
||||||
# toggle sticky
|
|
||||||
bindsym $mod+Shift+s sticky toggle
|
|
||||||
|
|
||||||
# focus the parent container
|
|
||||||
bindsym $mod+a focus parent
|
|
||||||
|
|
||||||
# move the currently focused window to the scratchpad
|
|
||||||
bindsym $mod+Shift+minus move scratchpad
|
|
||||||
|
|
||||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
|
||||||
# If there are multiple scratchpad windows, this command cycles through them.
|
|
||||||
bindsym $mod+minus scratchpad show
|
|
||||||
|
|
||||||
# navigate workspaces next / previous
|
|
||||||
bindsym $mod+Ctrl+Right workspace next
|
|
||||||
bindsym $mod+Ctrl+Left workspace prev
|
|
||||||
|
|
||||||
# workspaces
|
|
||||||
set $ws1 1
|
|
||||||
set $ws2 2
|
|
||||||
set $ws3 3
|
|
||||||
set $ws4 4
|
|
||||||
set $ws5 5
|
|
||||||
set $ws6 6
|
|
||||||
set $ws7 7
|
|
||||||
set $ws8 8
|
|
||||||
|
|
||||||
# switch to workspace
|
|
||||||
bindsym $mod+1 workspace $ws1
|
|
||||||
bindsym $mod+2 workspace $ws2
|
|
||||||
bindsym $mod+3 workspace $ws3
|
|
||||||
bindsym $mod+4 workspace $ws4
|
|
||||||
bindsym $mod+5 workspace $ws5
|
|
||||||
bindsym $mod+6 workspace $ws6
|
|
||||||
bindsym $mod+7 workspace $ws7
|
|
||||||
bindsym $mod+8 workspace $ws8
|
|
||||||
|
|
||||||
# Move focused container to workspace
|
|
||||||
bindsym $mod+Ctrl+1 move container to workspace $ws1
|
|
||||||
bindsym $mod+Ctrl+2 move container to workspace $ws2
|
|
||||||
bindsym $mod+Ctrl+3 move container to workspace $ws3
|
|
||||||
bindsym $mod+Ctrl+4 move container to workspace $ws4
|
|
||||||
bindsym $mod+Ctrl+5 move container to workspace $ws5
|
|
||||||
bindsym $mod+Ctrl+6 move container to workspace $ws6
|
|
||||||
bindsym $mod+Ctrl+7 move container to workspace $ws7
|
|
||||||
bindsym $mod+Ctrl+8 move container to workspace $ws8
|
|
||||||
|
|
||||||
# Move to workspace with focused container
|
|
||||||
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
|
|
||||||
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
|
|
||||||
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
|
|
||||||
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
|
|
||||||
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
|
|
||||||
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
|
|
||||||
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
|
|
||||||
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
|
||||||
|
|
||||||
# Open specific applications in floating mode
|
|
||||||
for_window [window_role="About"] floating enable
|
|
||||||
for_window [title="alsamixer"] floating enable border pixel 1
|
|
||||||
for_window [title="File Transfer*"] floating enable
|
|
||||||
for_window [class="eog"] floating enable
|
|
||||||
for_window [class="Galculator"] floating enable border pixel 1
|
|
||||||
for_window [class="GParted"] floating enable border normal
|
|
||||||
for_window [class="(?i)gnome-calculator"] floating enable
|
|
||||||
for_window [class="Pavucontrol"] floating enable
|
|
||||||
for_window [class="qt5ct"] floating enable sticky enable border normal
|
|
||||||
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
|
|
||||||
for_window [title="QEMU"] floating enable
|
|
||||||
for_window [class="Thus"] floating enable border normal
|
|
||||||
for_window [class="Timeset-gui"] floating enable border normal
|
|
||||||
|
|
||||||
# switch to workspace with urgent window automatically
|
|
||||||
for_window [urgent=latest] focus
|
|
||||||
|
|
||||||
# reload the configuration file
|
|
||||||
bindsym $mod+Shift+c reload
|
|
||||||
|
|
||||||
# restart sway inplace (preserves layout/session)
|
|
||||||
bindsym $mod+Shift+r restart
|
|
||||||
|
|
||||||
# exit sway
|
|
||||||
bindsym $mod+Shift+e exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"
|
|
||||||
|
|
||||||
# Set shut down, restart and locking features
|
|
||||||
set $mode_system (l)ock, (e)xit, (r)eboot, (Shift+s)hutdown
|
|
||||||
bindsym $mod+0 mode "$mode_system"
|
|
||||||
mode "$mode_system" {
|
|
||||||
bindsym l exec --no-startup-id swaylock -f -s fill -i ~/.config/sway/lockscreen.jpg, mode "default"
|
|
||||||
bindsym e exec --no-startup-id swaymsg exit, mode "default"
|
|
||||||
bindsym r exec --no-startup-id sudo systemctl reboot, mode "default"
|
|
||||||
bindsym Shift+s exec --no-startup-id sudo systemctl poweroff, mode "default"
|
|
||||||
|
|
||||||
# exit system mode: "Enter" or "Escape"
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Resize window (you can also use the mouse for that)
|
|
||||||
bindsym $mod+r mode "resize"
|
|
||||||
mode "resize" {
|
|
||||||
# These bindings trigger as soon as you enter the resize mode
|
|
||||||
# Pressing left will shrink the window’s width.
|
|
||||||
# Pressing right will grow the window’s width.
|
|
||||||
# Pressing up will shrink the window’s height.
|
|
||||||
# Pressing down will grow the window’s height.
|
|
||||||
bindsym j resize shrink width 5 px or 5 ppt
|
|
||||||
bindsym k resize grow height 5 px or 5 ppt
|
|
||||||
bindsym l resize shrink height 5 px or 5 ppt
|
|
||||||
bindsym semicolon resize grow width 5 px or 5 ppt
|
|
||||||
|
|
||||||
# same bindings, but for the arrow keys
|
|
||||||
bindsym Left resize shrink width 10 px or 10 ppt
|
|
||||||
bindsym Down resize grow height 10 px or 10 ppt
|
|
||||||
bindsym Up resize shrink height 10 px or 10 ppt
|
|
||||||
bindsym Right resize grow width 10 px or 10 ppt
|
|
||||||
|
|
||||||
# exit resize mode: Enter or Escape
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set background
|
|
||||||
output * bg ~/.config/sway/background.png fill
|
|
||||||
|
|
||||||
# Use waybar
|
|
||||||
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
|
||||||
exec hash dbus-update-activation-environment 2>/dev/null && \
|
|
||||||
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
|
||||||
exec waybar
|
|
||||||
|
|
||||||
# Autostart applications
|
|
||||||
{% if nextcloud is defined and nextcloud | bool %}
|
|
||||||
exec --no-startup-id nextcloud --background
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# Theme colors
|
|
||||||
client.focused #c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7
|
|
||||||
client.focused_inactive #c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7
|
|
||||||
client.unfocused #c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7
|
|
||||||
client.urgent #c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7
|
|
||||||
client.placeholder #c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7
|
|
||||||
|
|
||||||
client.background #1f1f1f
|
|
||||||
|
|
||||||
{% if isNotebook | bool %}
|
|
||||||
# backlight control
|
|
||||||
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl -d intel_backlight set +5%
|
|
||||||
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl -d intel_backlight set 5%-
|
|
||||||
|
|
||||||
# set volume control
|
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 0 -q set Master 2dB+ unmute
|
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 0 -q set Master 2db- unmute
|
|
||||||
bindsym XF86AudioMute exec --no-startup-id amixer -q set Master toggle
|
|
||||||
|
|
||||||
# touchpad on and off controller on laptops with Fn keys
|
|
||||||
bindsym XF86TouchpadOn exec --no-startup-id synclient Touchpadoff=0
|
|
||||||
bindsym XF86TouchpadOff exec --no-startup-id synclient Touchpadoff=1
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
focus_follows_mouse no
|
|
||||||
|
|
||||||
# User defined keys
|
|
||||||
#bindsym Print exec flameshot gui # TODO
|
|
||||||
#bindsym Shift+Print exec flameshot gui #TODO
|
|
|
@ -1,7 +0,0 @@
|
||||||
Package: *
|
|
||||||
Pin: release a=testing
|
|
||||||
Pin-Priority: 900
|
|
||||||
|
|
||||||
Package: *
|
|
||||||
Pin: release a=unstable
|
|
||||||
Pin-Priority: 10
|
|
|
@ -1,4 +0,0 @@
|
||||||
dependencies:
|
|
||||||
- role: desktop-environment
|
|
||||||
vars:
|
|
||||||
nextcloud: true
|
|
|
@ -1,24 +0,0 @@
|
||||||
- name: Add debian unstable repo
|
|
||||||
become: yes
|
|
||||||
apt_repository:
|
|
||||||
repo: deb http://deb.debian.org/debian unstable main non-free-firmware non-free contrib
|
|
||||||
state: present
|
|
||||||
filename: debian-unstable
|
|
||||||
|
|
||||||
- name: Create apt preferences file for unstable repo
|
|
||||||
become: yes
|
|
||||||
copy:
|
|
||||||
src: "{{ role_path }}/files/99pin-unstable"
|
|
||||||
dest: "/etc/apt/preferences.d/"
|
|
||||||
|
|
||||||
- name: Install essential tools
|
|
||||||
become: yes
|
|
||||||
apt:
|
|
||||||
state: latest
|
|
||||||
install_recommends: false
|
|
||||||
update_cache: true
|
|
||||||
name:
|
|
||||||
- thunar
|
|
||||||
- firefox
|
|
||||||
- keepassxc
|
|
||||||
- nextcloud-desktop
|
|
20
roles/firefox/tasks/main.yml
Normal file
20
roles/firefox/tasks/main.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
- name: Add Mozilla repository
|
||||||
|
become: yes
|
||||||
|
deb822_repository:
|
||||||
|
name: mozilla
|
||||||
|
types: deb
|
||||||
|
uris: https://packages.mozilla.org/apt
|
||||||
|
suites: mozilla
|
||||||
|
components: main
|
||||||
|
signed_by: https://packages.mozilla.org/apt/repo-signing-key.gpg
|
||||||
|
state: present
|
||||||
|
enabled: yes
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: latest
|
||||||
|
update_cache: true
|
||||||
|
install_recommends: false
|
||||||
|
name:
|
||||||
|
- firefox
|
7
roles/keepassxc/tasks/main.yml
Normal file
7
roles/keepassxc/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
- name: Install packages
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: latest
|
||||||
|
install_recommends: false
|
||||||
|
name:
|
||||||
|
- keepassxc
|
7
roles/nextcloud/tasks/main.yml
Normal file
7
roles/nextcloud/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
- name: Install packages
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: latest
|
||||||
|
install_recommends: false
|
||||||
|
name:
|
||||||
|
- nextcloud-desktop
|
|
@ -1,4 +1,4 @@
|
||||||
- name: Install packages for qemu-kvm
|
- name: Install packages
|
||||||
become: yes
|
become: yes
|
||||||
apt:
|
apt:
|
||||||
state: latest
|
state: latest
|
||||||
|
@ -6,6 +6,7 @@
|
||||||
name:
|
name:
|
||||||
- qemu-kvm
|
- qemu-kvm
|
||||||
- qemu-system
|
- qemu-system
|
||||||
|
- qemu-utils
|
||||||
- libvirt-daemon
|
- libvirt-daemon
|
||||||
- libvirt-daemon-system
|
- libvirt-daemon-system
|
||||||
- ovmf
|
- ovmf
|
|
@ -4,7 +4,7 @@ Name=Spotify
|
||||||
GenericName=Music Player
|
GenericName=Music Player
|
||||||
Icon=spotify-client
|
Icon=spotify-client
|
||||||
TryExec=spotify
|
TryExec=spotify
|
||||||
Exec=spotify --uri=%U
|
Exec=spotify --enable-features=UseOzonePlatform --ozone-platform=wayland --uri=%U
|
||||||
Terminal=false
|
Terminal=false
|
||||||
MimeType=x-scheme-handler/spotify;
|
MimeType=x-scheme-handler/spotify;
|
||||||
Categories=Audio;Music;Player;AudioVideo;
|
Categories=Audio;Music;Player;AudioVideo;
|
|
@ -6,7 +6,7 @@
|
||||||
uris: http://repository.spotify.com
|
uris: http://repository.spotify.com
|
||||||
suites: stable
|
suites: stable
|
||||||
components: non-free
|
components: non-free
|
||||||
signed_by: https://download.spotify.com/debian/pubkey_7A3A762FAFD4A51F.gpg
|
signed_by: https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg
|
||||||
state: present
|
state: present
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@
|
||||||
update_cache: true
|
update_cache: true
|
||||||
install_recommends: false
|
install_recommends: false
|
||||||
name:
|
name:
|
||||||
- vlc
|
|
||||||
- vlc-plugin-pipewire
|
|
||||||
- spotify-client
|
- spotify-client
|
||||||
|
|
||||||
- name: Ensure that directory for desktop entries exists
|
- name: Ensure that directory for desktop entries exists
|
9
roles/vlc/tasks/main.yml
Normal file
9
roles/vlc/tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
- name: Install packages
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: latest
|
||||||
|
update_cache: true
|
||||||
|
install_recommends: false
|
||||||
|
name:
|
||||||
|
- vlc
|
||||||
|
- vlc-plugin-pipewire
|
Loading…
Reference in a new issue