my_konfig
This commit is contained in:
28
.tmux.conf
Normal file
28
.tmux.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
# ~/.tmux.conf
|
||||
|
||||
# Options to make tmux more pleasant
|
||||
set -g mouse on
|
||||
set -g default-terminal "tmux-256color"
|
||||
set-option -g update-environment "SWAYSOCK WAYLAND_DISPLAY"
|
||||
|
||||
# Configure the catppuccin plugin
|
||||
set -g @catppuccin_flavor "mocha" # latte, frappe, macchiato, or mocha
|
||||
set -g @catppuccin_window_status_style "rounded" # basic, rounded, slanted, custom, or none
|
||||
|
||||
# Load catppuccin
|
||||
run /home/jonnybravo/.config/tmux/plugin/catppuccin/catppuccin.tmux
|
||||
# For TPM, instead use `run ~/.config/tmux/plugins/tmux/catppuccin.tmux`
|
||||
|
||||
# Make the status line pretty and add some modules
|
||||
set -g status-right-length 100
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
set -g status-right "#{E:@catppuccin_status_application}"
|
||||
set -agF status-right "#{E:@catppuccin_status_cpu}"
|
||||
set -ag status-right "#{E:@catppuccin_status_session}"
|
||||
set -ag status-right "#{E:@catppuccin_status_uptime}"
|
||||
set -agF status-right "#{E:@catppuccin_status_battery}"
|
||||
|
||||
run ~/.config/tmux/plugins/tmux-plugins/tmux-cpu/cpu.tmux
|
||||
run ~/.config/tmux/plugins/tmux-plugins/tmux-battery/battery.tmux
|
||||
# Or, if using TPM, just run TPM
|
||||
99
README.md
Normal file
99
README.md
Normal file
@@ -0,0 +1,99 @@
|
||||
# Sway Setup Wiederherstellung
|
||||
|
||||
Dieses Verzeichnis enthält alle notwendigen Konfigurationen und eine Liste der Pakete, um dein personalisiertes Sway-Setup wiederherzustellen.
|
||||
|
||||
## 1. Installation der Pakete
|
||||
|
||||
In der Datei `packages.txt` findest du eine Liste aller benötigten Software-Pakete. Du musst diese mit dem Paketmanager deiner Linux-Distribution installieren.
|
||||
|
||||
**Beispiel für Debian/Ubuntu:**
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install sway waybar wofi alacritty swaylock swayidle mako kanshi wl-clipboard brightnessctl grim slurp playerctl
|
||||
```
|
||||
|
||||
**Beispiel für Arch Linux:**
|
||||
```bash
|
||||
sudo pacman -Syu
|
||||
sudo pacman -S sway waybar wofi alacritty swaylock swayidle mako kanshi wl-clipboard brightnessctl grim slurp playerctl
|
||||
```
|
||||
|
||||
**Hinweis:** Die Namen der Pakete (besonders für Schriftarten) können leicht variieren. Die in `packages.txt` genannten Anwendungen (wie `brave-browser`) musst du eventuell aus einem separaten Repository installieren.
|
||||
|
||||
**Hinweis zu AUR-Paketen (nur Arch Linux):** Einige Pakete wie `tty-clock` befinden sich im Arch User Repository (AUR) und sind nicht in der Paketliste des Ansible-Playbooks enthalten. Diese müssen manuell mit einem AUR-Helper (z.B. `yay` oder `paru`) installiert werden:
|
||||
```bash
|
||||
yay -S tty-clock
|
||||
```
|
||||
|
||||
## 2. Backup und Wiederherstellung der Konfiguration
|
||||
|
||||
Dieser Ordner (`my_sway_konfig`) dient als zentraler Speicherort für deine Sway-Konfigurationen.
|
||||
|
||||
### Backup erstellen
|
||||
|
||||
Um ein vollständiges Backup deiner aktuellen Konfigurationen zu erstellen, führe die folgenden Befehle aus:
|
||||
```bash
|
||||
cp -r ~/.config/{sway,waybar,mako,wofi,alacritty} ~/my_sway_konfig/config/
|
||||
cp ~/.tmux.conf ~/my_sway_konfig/
|
||||
```
|
||||
Diese Befehle kopieren die Konfigurationsordner und die `.tmux.conf` in dein `my_sway_konfig`-Verzeichnis.
|
||||
|
||||
### Konfiguration wiederherstellen
|
||||
|
||||
Um die Konfigurationen wiederherzustellen, kannst du entweder das Ansible-Playbook verwenden (siehe Abschnitt 3) oder die Dateien manuell kopieren.
|
||||
|
||||
**Manuelle Wiederherstellung:**
|
||||
Navigiere in das `my_sway_konfig`-Verzeichnis und führe die folgenden Befehle aus:
|
||||
```bash
|
||||
cp -rT config/ ~/.config/
|
||||
cp .tmux.conf ~/
|
||||
```
|
||||
Dieser Befehl kopiert die `sway`, `waybar`, `mako`, `wofi` und `alacritty` Ordner an die richtige Stelle in deinem System, sowie die `.tmux.conf`.
|
||||
|
||||
---
|
||||
|
||||
## 3. Deployment und Testen der Konfiguration mit Ansible
|
||||
|
||||
Dieses Verzeichnis enthält ein Ansible-Playbook (`sway_config_deploy.yml`), das die Installation der benötigten Pakete (für Arch Linux) und das Kopieren deiner Konfigurationsdateien automatisiert.
|
||||
|
||||
**Voraussetzung:** Ansible muss auf deinem System installiert sein. Falls nicht:
|
||||
* **Arch Linux:** `sudo pacman -S ansible`
|
||||
* **Debian/Ubuntu:** `sudo apt-get install ansible`
|
||||
* **Fedora:** `sudo dnf install ansible`
|
||||
|
||||
### Playbook ausführen
|
||||
|
||||
1. **Navigiere in das Konfigurationsverzeichnis:**
|
||||
```bash
|
||||
cd ~/my_sway_konfig
|
||||
```
|
||||
|
||||
2. **Führe das Playbook mit `sudo` aus:**
|
||||
```bash
|
||||
sudo ansible-playbook sway_config_deploy.yml
|
||||
```
|
||||
Dieser Befehl installiert die Pakete und kopiert alle Konfigurationsdateien für den im Playbook definierten Benutzer (`target_user`, standardmäßig `jonnybravo`).
|
||||
|
||||
3. **(Optional) Zielbenutzer ändern:**
|
||||
Wenn du die Konfiguration für einen anderen Benutzer bereitstellen möchtest, kannst du die Variable `target_user` beim Aufruf überschreiben:
|
||||
```bash
|
||||
sudo ansible-playbook sway_config_deploy.yml --extra-vars "target_user=anderer_benutzer"
|
||||
```
|
||||
|
||||
### Playbook testen (Dry Run)
|
||||
|
||||
Du kannst das Playbook im "Check-Modus" ausführen, um zu sehen, welche Änderungen vorgenommen würden, ohne sie tatsächlich anzuwenden.
|
||||
|
||||
1. **Nur Dateikopieroperationen testen (Paketinstallation überspringen):**
|
||||
```bash
|
||||
cd ~/my_sway_konfig
|
||||
sudo ansible-playbook sway_config_deploy.yml --check --skip-tags install_packages
|
||||
```
|
||||
Dies simuliert das Kopieren der Dateien, ohne Pakete zu installieren.
|
||||
|
||||
2. **Alle Aufgaben im Check-Modus testen (inklusive Paketinstallation):**
|
||||
```bash
|
||||
cd ~/my_sway_konfig
|
||||
sudo ansible-playbook sway_config_deploy.yml --check
|
||||
```
|
||||
Dies simuliert die Installation der Pakete und das Kopieren der Dateien.
|
||||
40
config/alacritty/alacritty.toml
Normal file
40
config/alacritty/alacritty.toml
Normal file
@@ -0,0 +1,40 @@
|
||||
# =============================================================================
|
||||
# Moderne Alacritty Konfiguration (TOML-Format)
|
||||
# =============================================================================
|
||||
|
||||
# Importiert ein separates Theme. So bleibt die Hauptkonfiguration sauber.
|
||||
# Du kannst Themes hier finden: https://github.com/alacritty/alacritty-theme
|
||||
# Wir legen eine Catppuccin-Theme-Datei im selben Verzeichnis an.
|
||||
[general]
|
||||
import = [
|
||||
"~/.config/alacritty/catppuccin-mocha.toml"
|
||||
]
|
||||
|
||||
[font]
|
||||
# Schriftgröße
|
||||
size = 17.0
|
||||
|
||||
# Schriftart-Einstellungen
|
||||
# "DejaVu Sans Mono" ist eine sehr klare, einfache und weit verbreitete Schriftart.
|
||||
# Die Nerd-Font-Version wird für Symbole empfohlen.
|
||||
# https://www.nerdfonts.com/
|
||||
normal = { family = "DejaVu Sans Mono", style = "Book" }
|
||||
bold = { family = "DejaVu Sans Mono", style = "Bold" }
|
||||
italic = { family = "DejaVu Sans Mono", style = "Oblique" }
|
||||
|
||||
[scrolling]
|
||||
# Anzahl der Zeilen, die im Scrollback-Puffer gespeichert werden.
|
||||
history = 100000
|
||||
|
||||
[window]
|
||||
# Innenabstand im Terminalfenster (in Pixel)
|
||||
# Erzeugt einen schönen Rand um den Text.
|
||||
padding = { x = 10, y = 10 }
|
||||
|
||||
# Hintergrund-Transparenz (Opacity)
|
||||
# 1.0 ist komplett undurchsichtig, 0.0 ist komplett durchsichtig.
|
||||
opacity = 0.95
|
||||
|
||||
# Entfernt die Standard-Fensterdekoration (Titelleiste)
|
||||
# In Sway ist das oft gewünscht, da Sway die Fenster verwaltet.
|
||||
decorations = "none"
|
||||
12
config/alacritty/alacritty.yml
Normal file
12
config/alacritty/alacritty.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
# Alacritty Konfiguration
|
||||
|
||||
# Einstellungen für das Scrollen
|
||||
scrolling:
|
||||
# Anzahl der Zeilen, die im Scrollback-Puffer gespeichert werden.
|
||||
# Ein Wert von '0' deaktiviert das Scrollen.
|
||||
history: 100000
|
||||
|
||||
# Font Konfiguration
|
||||
font:
|
||||
# Schriftgröße
|
||||
size: 14.0
|
||||
65
config/alacritty/catppuccin-mocha.toml
Normal file
65
config/alacritty/catppuccin-mocha.toml
Normal file
@@ -0,0 +1,65 @@
|
||||
# Catppuccin-Mocha Theme für Alacritty
|
||||
# https://github.com/catppuccin/alacritty
|
||||
|
||||
[colors]
|
||||
draw_bold_text_with_bright_colors = true
|
||||
|
||||
[colors.primary]
|
||||
background = "#1e1e2e"
|
||||
foreground = "#cdd6f4"
|
||||
|
||||
[colors.cursor]
|
||||
cursor = "#f5e0dc"
|
||||
text = "#1e1e2e"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
cursor = "#b4befe"
|
||||
text = "#1e1e2e"
|
||||
|
||||
[colors.selection]
|
||||
background = "#585b70"
|
||||
text = "#cdd6f4"
|
||||
|
||||
[colors.search.matches]
|
||||
background = "#a6adc8"
|
||||
foreground = "#1e1e2e"
|
||||
|
||||
[colors.search.focused_match]
|
||||
background = "#a6e3a1"
|
||||
foreground = "#1e1e2e"
|
||||
|
||||
[colors.footer_bar]
|
||||
background = "#1e1e2e"
|
||||
foreground = "#cdd6f4"
|
||||
|
||||
[colors.hints.start]
|
||||
background = "#f9e2af"
|
||||
foreground = "#1e1e2e"
|
||||
|
||||
[colors.hints.end]
|
||||
background = "#a6adc8"
|
||||
foreground = "#1e1e2e"
|
||||
|
||||
[colors.line_indicator]
|
||||
background = "none"
|
||||
foreground = "none"
|
||||
|
||||
[colors.normal]
|
||||
black = "#45475a"
|
||||
blue = "#89b4fa"
|
||||
cyan = "#89dceb"
|
||||
green = "#a6e3a1"
|
||||
magenta = "#f5c2e7"
|
||||
red = "#f38ba8"
|
||||
white = "#bac2de"
|
||||
yellow = "#f9e2af"
|
||||
|
||||
[colors.bright]
|
||||
black = "#585b70"
|
||||
blue = "#89b4fa"
|
||||
cyan = "#89dceb"
|
||||
green = "#a6e3a1"
|
||||
magenta = "#f5c2e7"
|
||||
red = "#f38ba8"
|
||||
white = "#a6adc8"
|
||||
yellow = "#f9e2af"
|
||||
35
config/mako/config
Normal file
35
config/mako/config
Normal file
@@ -0,0 +1,35 @@
|
||||
# Catppuccin Mocha theme for Mako
|
||||
# https://github.com/catppuccin/mako
|
||||
|
||||
# Globale Einstellungen
|
||||
font=DejaVu Sans Mono 12
|
||||
background-color=#1e1e2e
|
||||
text-color=#cdd6f4
|
||||
border-color=#313244
|
||||
border-size=2
|
||||
border-radius=15
|
||||
padding=15
|
||||
margin=10
|
||||
width=350
|
||||
anchor=top-right
|
||||
default-timeout=5000
|
||||
ignore-timeout=false
|
||||
format=<b>%s</b>\n%b
|
||||
|
||||
# Dringlichkeitsstufen
|
||||
[urgency=low]
|
||||
background-color=#1e1e2e
|
||||
text-color=#cdd6f4
|
||||
border-color=#313244
|
||||
|
||||
[urgency=normal]
|
||||
background-color=#1e1e2e
|
||||
text-color=#cdd6f4
|
||||
border-color=#89b4fa
|
||||
|
||||
[urgency=high]
|
||||
background-color=#1e1e2e
|
||||
text-color=#f38ba8
|
||||
border-color=#f38ba8
|
||||
default-timeout=0
|
||||
|
||||
315
config/sway/config
Normal file
315
config/sway/config
Normal file
@@ -0,0 +1,315 @@
|
||||
# =============================================================================
|
||||
# Sway Konfiguration - Überarbeitet für bessere Benutzerfreundlichkeit
|
||||
# =============================================================================
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Mod-Taste (Logo-Taste). Mod1 ist die Alt-Taste.
|
||||
set $mod Mod4
|
||||
|
||||
# =============================================================================
|
||||
# Arbeitsbereiche (Workspaces) mit Namen und Icons
|
||||
# =============================================================================
|
||||
set $ws1 "1 "
|
||||
set $ws2 "2 "
|
||||
set $ws3 "3 "
|
||||
set $ws4 "4 "
|
||||
set $ws5 "5 "
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
|
||||
# =============================================================================
|
||||
# Programme & Variablen
|
||||
# =============================================================================
|
||||
# Dein bevorzugter Terminal-Emulator
|
||||
set $term alacritty
|
||||
# Dein bevorzugter Anwendungs-Launcher
|
||||
set $menu 'wofi --show drun --allow-images --icon-theme breeze-dark'
|
||||
# Dein Sperrbildschirm-Programm
|
||||
set $lock swaylock -f -c 000000
|
||||
|
||||
# Schriftart für Fenstertitel
|
||||
font pango:DejaVu Sans Mono 12
|
||||
|
||||
# Home-Row-Richtungstasten (wie in Vim)
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
# =============================================================================
|
||||
# Ausgabekonfiguration (Monitore & Hintergrund)
|
||||
# =============================================================================
|
||||
# Standard-Hintergrundbild
|
||||
output * bg ~/Bilder/wallpapersden.com_astronaut-with-jellyfish_2560x1440.jpg fill
|
||||
|
||||
# Gaps (Lücken zwischen Fenstern)
|
||||
# Alte Konfiguration auskommentiert:
|
||||
# gaps inner 10
|
||||
# gaps outer 5
|
||||
gaps inner 10
|
||||
gaps outer 5
|
||||
smart_gaps on
|
||||
|
||||
#
|
||||
# Um die Namen deiner Monitore zu finden, führe aus: swaymsg -t get_outputs
|
||||
# Beispiel: output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
|
||||
# =============================================================================
|
||||
# Eingabekonfiguration (Tastatur & Maus)
|
||||
# =============================================================================
|
||||
# Deutsches Tastaturlayout
|
||||
input * xkb_layout de
|
||||
|
||||
# Maus-Modifier zum Verschieben und Ändern der Größe von Fenstern
|
||||
# Halte $mod + linke Maustaste zum Verschieben
|
||||
# Halte $mod + rechte Maustaste zum Ändern der Größe
|
||||
floating_modifier $mod normal
|
||||
|
||||
# =============================================================================
|
||||
# Tastenkombinationen (Key Bindings)
|
||||
# =============================================================================
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Grundlegende Aktionen
|
||||
# -----------------------------------------------------------------------------
|
||||
# Terminal starten
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Aktives Fenster schließen
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Anwendungs-Launcher starten
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Konfiguration neu laden
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Sway beenden (beendet deine Wayland-Sitzung)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'Möchtest du Sway wirklich beenden?' -B 'Ja, beenden' 'swaymsg exit'
|
||||
|
||||
# Bildschirm sperren
|
||||
bindsym $mod+l exec $lock
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Fenster-Fokus bewegen
|
||||
# -----------------------------------------------------------------------------
|
||||
# Fokus mit Pfeiltasten bewegen
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
# Fokus innerhalb eines gestapelten/getabbten Containers wechseln
|
||||
bindsym $mod+Tab focus child
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Aktives Fenster verschieben
|
||||
# -----------------------------------------------------------------------------
|
||||
# Fenster mit Pfeiltasten verschieben
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Arbeitsbereiche (Workspaces)
|
||||
# -----------------------------------------------------------------------------
|
||||
# Zu einem Arbeitsbereich wechseln
|
||||
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
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
# Aktives Fenster in einen Arbeitsbereich verschieben
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
# Alter Code auskommentiert:
|
||||
# # Zu einem Arbeitsbereich wechseln
|
||||
# bindsym $mod+1 workspace number 1
|
||||
# bindsym $mod+2 workspace number 2
|
||||
# bindsym $mod+3 workspace number 3
|
||||
# bindsym $mod+4 workspace number 4
|
||||
# bindsym $mod+5 workspace number 5
|
||||
# bindsym $mod+6 workspace number 6
|
||||
# bindsym $mod+7 workspace number 7
|
||||
# bindsym $mod+8 workspace number 8
|
||||
# bindsym $mod+9 workspace number 9
|
||||
# bindsym $mod+0 workspace number 10
|
||||
#
|
||||
# # Aktives Fenster in einen Arbeitsbereich verschieben
|
||||
# bindsym $mod+Shift+1 move container to workspace number 1
|
||||
# bindsym $mod+Shift+2 move container to workspace number 2
|
||||
# bindsym $mod+Shift+3 move container to workspace number 3
|
||||
# bindsym $mod+Shift+4 move container to workspace number 4
|
||||
# bindsym $mod+Shift+5 move container to workspace number 5
|
||||
# bindsym $mod+Shift+6 move container to workspace number 6
|
||||
# bindsym $mod+Shift+7 move container to workspace number 7
|
||||
# bindsym $mod+Shift+8 move container to workspace number 8
|
||||
# bindsym $mod+Shift+9 move container to workspace number 9
|
||||
# bindsym $mod+Shift+0 move container to workspace number 10
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Fenster-Layout
|
||||
# -----------------------------------------------------------------------------
|
||||
# Fenster horizontal teilen
|
||||
bindsym $mod+b splith
|
||||
# Fenster vertikal teilen
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Layout-Stil wechseln (stacking, tabbed, split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# Vollbildmodus umschalten
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Fenster zwischen "tiling" und "floating" umschalten
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Fokus zwischen "tiling" und "floating" Bereich wechseln
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Scratchpad (Ein "Versteck" für Fenster)
|
||||
# -----------------------------------------------------------------------------
|
||||
# Aktives Fenster ins Scratchpad verschieben
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Fenster aus dem Scratchpad holen/verstecken
|
||||
bindsym $mod+minus scratchpad show
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Modus: Fenstergröße ändern
|
||||
# -----------------------------------------------------------------------------
|
||||
mode "resize" {
|
||||
# Fenstergröße mit Pfeiltasten ändern
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Right resize grow width 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Down resize grow height 10px
|
||||
|
||||
# Fenstergröße mit Vim-Tasten (h,j,k,l) ändern
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $right resize grow width 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $down resize grow height 10px
|
||||
|
||||
# Modus verlassen
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
# Modus "resize" starten
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# =============================================================================
|
||||
# Hilfsprogramme & Systemtasten
|
||||
# =============================================================================
|
||||
# Lautstärke (benötigt pactl)
|
||||
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
|
||||
# Bildschirmhelligkeit (benötigt brightnessctl)
|
||||
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||
|
||||
# Screenshots (benötigt grim und slurp)
|
||||
# Ganzen Bildschirm aufnehmen
|
||||
bindsym Print exec grim ~/Bilder/screenshot-$(date +%Y%m%d-%H%M%S).png
|
||||
# Einen Bereich auswählen und aufnehmen
|
||||
bindsym Shift+Print exec grim -g "$(slurp)" ~/Bilder/screenshot-$(date +%Y%m%d-%H%M%S).png
|
||||
|
||||
# =============================================================================
|
||||
# Statusleiste (z.B. waybar)
|
||||
# =============================================================================
|
||||
# Die Standard-Sway-Bar wird hier deaktiviert, da du waybar verwendest.
|
||||
# Wenn du die Standard-Leiste nutzen willst, entferne die '#' vor dem bar-Block.
|
||||
#
|
||||
# bar {
|
||||
# position top
|
||||
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
|
||||
# colors {
|
||||
# statusline #ffffff
|
||||
# background #323232
|
||||
# inactive_workspace #32323200 #32323200 #5c5c5c
|
||||
# }
|
||||
# }
|
||||
|
||||
# =============================================================================
|
||||
# Autostart-Anwendungen
|
||||
# =============================================================================
|
||||
exec waybar
|
||||
exec mako --config ~/.config/mako/config
|
||||
# Startet den Display-Manager für automatische Profile
|
||||
exec kanshi
|
||||
# Startet einen Clipboard-Manager (clipman muss installiert sein)
|
||||
exec wl-paste --watch clipman store
|
||||
|
||||
# Alter Code auskommentiert:
|
||||
# # Optional: Startet einen Clipboard-Manager (Zwischenablage-Verlauf)
|
||||
# # exec wl-paste -t text --watch clipman store
|
||||
|
||||
# =============================================================================
|
||||
# Idle-Management (Automatisches Sperren & Abschalten)
|
||||
# =============================================================================
|
||||
# Sperrt den Bildschirm nach 5 Minuten, schaltet ihn nach 10 Minuten aus
|
||||
exec swayidle -w \
|
||||
timeout 300 '$lock' \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"'
|
||||
|
||||
|
||||
# Lade zusätzliche Konfigurations-Snippets
|
||||
# include /etc/sway/config.d/*
|
||||
|
||||
# =============================================================================
|
||||
# Fenster-Regeln (for_window)
|
||||
# =============================================================================
|
||||
#
|
||||
# Um die 'app_id' oder 'class' eines Fensters herauszufinden, fokussiere es
|
||||
# und führe im Terminal aus: swaymsg -t get_tree
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
# Spezifische Programme auf Workspaces zuweisen
|
||||
# -----------------------------------------------------------------------------
|
||||
# Brave Browser immer auf Workspace 2 starten
|
||||
for_window [app_id="brave-browser"] move to workspace $ws2
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Bestimmte Fenster automatisch schweben lassen
|
||||
# -----------------------------------------------------------------------------
|
||||
# Dialogfenster und Benachrichtigungen
|
||||
for_window [window_type="dialog"] floating enable
|
||||
for_window [window_type="notification"] floating enable
|
||||
|
||||
# Taschenrechner
|
||||
for_window [app_id="gnome-calculator"] floating enable
|
||||
|
||||
# KDE Systemeinstellungen
|
||||
for_window [app_id="systemsettings"] floating enable
|
||||
|
||||
# Qalculate! (GTK Taschenrechner)
|
||||
for_window [app_id="qalculate-gtk"] floating enable, resize set 400px 600px
|
||||
|
||||
|
||||
65
config/waybar/bluetooth.sh
Executable file
65
config/waybar/bluetooth.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ein einfaches Skript zur Steuerung von Bluetooth über wofi und bluetoothctl
|
||||
|
||||
# Funktion zum Anzeigen des Menüs
|
||||
show_menu() {
|
||||
# Prüfen, ob Bluetooth eingeschaltet ist
|
||||
if /usr/bin/bluetoothctl show | grep -q "Powered: yes"; then
|
||||
power_status="On"
|
||||
power_option=" Turn Off"
|
||||
else
|
||||
power_status="Off"
|
||||
power_option=" Turn On"
|
||||
fi
|
||||
|
||||
# Menüoptionen zusammenstellen
|
||||
options="$power_option\n Scan for devices"
|
||||
|
||||
# Liste der bekannten und gekoppelten Geräte abrufen
|
||||
devices=$(/usr/bin/bluetoothctl devices Paired | awk '{print $3, $4, $5, $6, $7}')
|
||||
if [ -n "$devices" ]; then
|
||||
options+="\n\nPaired Devices:"
|
||||
while read -r line; do
|
||||
mac=$(echo "$line" | awk '{print $1}')
|
||||
name=$(echo "$line" | cut -d' ' -f2-)
|
||||
if /usr/bin/bluetoothctl info "$mac" | grep -q "Connected: yes"; then
|
||||
options+="\n $name (Connected)"
|
||||
else
|
||||
options+="\n $name"
|
||||
fi
|
||||
done <<< "$devices"
|
||||
fi
|
||||
|
||||
# Menü mit wofi anzeigen und Auswahl des Benutzers abrufen
|
||||
chosen=$(echo -e "$options" | wofi --dmenu --prompt "Bluetooth | Status: $power_status")
|
||||
|
||||
# Auswahl verarbeiten
|
||||
case "$chosen" in
|
||||
" Turn Off")
|
||||
/usr/bin/bluetoothctl power off
|
||||
;;
|
||||
" Turn On")
|
||||
/usr/bin/bluetoothctl power on
|
||||
;;
|
||||
" Scan for devices")
|
||||
# Scan im Hintergrund für 10 Sekunden in einem neuen Terminal starten
|
||||
alacritty -e bash -c "echo 'Scanning for 15 seconds...'; /usr/bin/bluetoothctl scan on; sleep 15; /usr/bin/bluetoothctl scan off; echo 'Scan finished.'; sleep 2" &
|
||||
;;
|
||||
*)
|
||||
# Wenn ein Gerät ausgewählt wurde
|
||||
if [[ "$chosen" == *"Connected"* ]]; then
|
||||
mac=$(/usr/bin/bluetoothctl devices Paired | grep "$(echo "$chosen" | sed 's/ (Connected)//' | sed 's/ //')" | awk '{print $2}')
|
||||
/usr/bin/bluetoothctl disconnect "$mac"
|
||||
elif [[ "$chosen" == *"Paired Devices:"* ]] || [[ "$chosen" == "" ]]; then
|
||||
# Mache nichts, wenn der Header oder nichts ausgewählt wurde
|
||||
:
|
||||
else
|
||||
mac=$(/usr/bin/bluetoothctl devices Paired | grep "$(echo "$chosen" | sed 's/ //')" | awk '{print $2}')
|
||||
/usr/bin/bluetoothctl connect "$mac"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_menu
|
||||
101
config/waybar/config
Normal file
101
config/waybar/config
Normal file
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 35,
|
||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["mpris", "tray", "pulseaudio", "custom/bluetooth", "network", "cpu", "memory", "sway/window", "idle_inhibitor", "custom/power"],
|
||||
|
||||
"mpris": {
|
||||
"format": "{player_icon} {dynamic}",
|
||||
"format-paused": "{player_icon} {dynamic}",
|
||||
"player-icons": {
|
||||
"default": "🎵",
|
||||
"kew": "🎧"
|
||||
},
|
||||
"tooltip-format": "Titel: {title}\nAlbum: {album}\nKünstler: {artist}",
|
||||
"max-length": 30,
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-scroll-up": "playerctl next",
|
||||
"on-scroll-down": "playerctl previous"
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"spacing": 10
|
||||
},
|
||||
|
||||
"custom/power": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "~/.config/waybar/power.sh"
|
||||
},
|
||||
|
||||
"custom/bluetooth": {
|
||||
"format": " {}",
|
||||
"exec": "/usr/bin/bluetoothctl show | grep -q 'Powered: yes' && echo 'On' || echo 'Off'",
|
||||
"tooltip": true,
|
||||
"interval": 15,
|
||||
"on-click": "~/.config/waybar/bluetooth.sh"
|
||||
},
|
||||
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"all-outputs": true,
|
||||
"format": "{name}"
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<span style='italic'>{}</span>"
|
||||
},
|
||||
"sway/window": {
|
||||
"format": "{}",
|
||||
"max-length": 50
|
||||
},
|
||||
"clock": {
|
||||
"format": " {:%H:%M:%S}",
|
||||
"interval": 1,
|
||||
"format-alt": " {:%d.%m.%Y}",
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
|
||||
},
|
||||
"cpu": {
|
||||
"format": " {usage}%",
|
||||
"tooltip": true,
|
||||
"interval": 1
|
||||
},
|
||||
"memory": {
|
||||
"format": " {}%",
|
||||
"interval": 1
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ifname}",
|
||||
"format-linked": " {ifname} (No IP)",
|
||||
"format-disconnected": "⚠",
|
||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||
"on-click": "alacritty -e iwctl"
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", ""]
|
||||
},
|
||||
"on-click": "pavucontrol",
|
||||
"on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
},
|
||||
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
},
|
||||
"tooltip": "Bildschirmsperre verhindern"
|
||||
}
|
||||
}
|
||||
17
config/waybar/power.sh
Executable file
17
config/waybar/power.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
entries="Ausloggen
|
||||
Neustart
|
||||
Herunterfahren"
|
||||
selected=$(echo -e $entries | wofi --show dmenu --prompt "Power-Menü")
|
||||
|
||||
case $selected in
|
||||
"Ausloggen")
|
||||
swaymsg exit
|
||||
;;
|
||||
"Neustart")
|
||||
systemctl reboot
|
||||
;;
|
||||
"Herunterfahren")
|
||||
systemctl poweroff
|
||||
;;
|
||||
esac
|
||||
118
config/waybar/style.css
Normal file
118
config/waybar/style.css
Normal file
@@ -0,0 +1,118 @@
|
||||
/* Catppuccin-Mocha Waybar Theme (Kompatibilitätsversion) */
|
||||
|
||||
* {
|
||||
border: none;
|
||||
font-family: "DejaVu Sans Mono", "Font Awesome 7 Free Solid", "Font Awesome 7 Brands", "Font Awesome 7 Free";
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(30, 30, 46, 0.85); /* Base with transparency */
|
||||
color: #cdd6f4; /* Text */
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
border-radius: 15px;
|
||||
margin: 5px 5px;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#mode,
|
||||
#clock,
|
||||
#cpu,
|
||||
#memory,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#custom-bluetooth,
|
||||
#custom-power,
|
||||
#window,
|
||||
#mpris {
|
||||
padding: 2px 10px;
|
||||
margin: 3px 3px;
|
||||
border-radius: 10px;
|
||||
transition: background-color 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
color: #a6adc8; /* Subtext0 */
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #313244; /* Surface0 */
|
||||
color: #cdd6f4; /* Text */
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #f38ba8; /* Red */
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #cba6f7; /* Mauve */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#custom-bluetooth, #custom-power {
|
||||
background-color: #74c7ec; /* Sapphire */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #94e2d5; /* Teal */
|
||||
color: #1e1e2e; /* Base */
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: #a6e3a1; /* Green */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: #89b4fa; /* Blue */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #f9e2af; /* Yellow */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #f5c2e7; /* Pink */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#mpris {
|
||||
background-color: #b4befe; /* Lavender */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#window {
|
||||
font-weight: bold;
|
||||
color: #cdd6f4; /* Text */
|
||||
}
|
||||
|
||||
/* Hover-Effekt für alle Module */
|
||||
#workspaces:hover, #mode:hover, #clock:hover, #cpu:hover, #memory:hover, #network:hover, #pulseaudio:hover, #custom-bluetooth:hover, #custom-power:hover {
|
||||
background-color: rgba(88, 91, 112, 0.9); /* Surface2 with transparency */
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
padding: 2px 10px;
|
||||
margin: 3px 3px;
|
||||
border-radius: 10px;
|
||||
background-color: #f38ba8; /* Red */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #a6e3a1; /* Green */
|
||||
}
|
||||
1
config/wofi/config
Normal file
1
config/wofi/config
Normal file
@@ -0,0 +1 @@
|
||||
show_icons=true
|
||||
55
config/wofi/style.css
Normal file
55
config/wofi/style.css
Normal file
@@ -0,0 +1,55 @@
|
||||
/* Catppuccin Mocha for Wofi */
|
||||
|
||||
window {
|
||||
background-color: #1e1e2e; /* Base */
|
||||
color: #cdd6f4; /* Text */
|
||||
font-family: "DejaVu Sans Mono", monospace;
|
||||
font-size: 16px; /* Increased font size slightly */
|
||||
border-radius: 15px; /* Matched Waybar's radius */
|
||||
border: 2px solid #89b4fa; /* Blue */
|
||||
}
|
||||
|
||||
#input {
|
||||
background-color: #313244; /* Surface0 */
|
||||
color: #cdd6f4; /* Text */
|
||||
border-radius: 10px; /* Matched Waybar's module radius */
|
||||
margin: 8px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 5px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#entry {
|
||||
padding: 10px;
|
||||
margin: 0px 8px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #89b4fa; /* Blue */
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#text {
|
||||
color: #cdd6f4; /* Text */
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: #1e1e2e; /* Base */
|
||||
}
|
||||
|
||||
#img {
|
||||
margin-right: 8px;
|
||||
}
|
||||
34
packages.txt
Normal file
34
packages.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
# =================================================
|
||||
# Benötigte Pakete für das Sway-Setup
|
||||
# =================================================
|
||||
# Die genauen Paketnamen können je nach Linux-Distribution variieren.
|
||||
|
||||
# --- Grundsystem ---
|
||||
sway
|
||||
waybar
|
||||
wofi
|
||||
alacritty
|
||||
swaylock
|
||||
swayidle
|
||||
mako
|
||||
kanshi
|
||||
|
||||
# --- Hilfsprogramme & Werkzeuge ---
|
||||
wl-clipboard # Stellt wl-paste zur Verfügung, oft für clipman benötigt
|
||||
clipman # Optional, aber empfohlen für Clipboard-Verlauf
|
||||
brightnessctl # Für Helligkeitssteuerung
|
||||
grim # Für Screenshots
|
||||
slurp # Für Bereichsauswahl bei Screenshots
|
||||
playerctl # Für Mediensteuerung in Waybar (MPRIS)
|
||||
pactl # Für Lautstärkeregelung (normalerweise Teil von pulseaudio oder pipewire-pulse)
|
||||
|
||||
# --- Schriftarten ---
|
||||
# Schriftart für die Oberfläche (z.B. ttf-dejavu)
|
||||
fonts-noto-core # Enthält DejaVu Sans Mono
|
||||
# Schriftart für Icons (z.B. otf-font-awesome)
|
||||
otf-font-awesome # Enthält Font Awesome 7
|
||||
|
||||
# --- Anwendungen (Beispiele) ---
|
||||
brave-browser # Der verwendete Webbrowser
|
||||
gnome-calculator # Der verwendete Taschenrechner
|
||||
systemsettings # KDE Systemeinstellungen
|
||||
76
sway_config_deploy.yml
Normal file
76
sway_config_deploy.yml
Normal file
@@ -0,0 +1,76 @@
|
||||
- name: Deploy Sway Configuration
|
||||
hosts: localhost
|
||||
connection: local
|
||||
become: true # Run the entire playbook with elevated privileges
|
||||
|
||||
vars:
|
||||
target_user: jonnybravo
|
||||
|
||||
tasks:
|
||||
- name: Install required packages for Arch Linux
|
||||
tags: install_packages
|
||||
community.general.pacman:
|
||||
name:
|
||||
- sway
|
||||
- waybar
|
||||
- wofi
|
||||
- alacritty
|
||||
- swaylock
|
||||
- swayidle
|
||||
- mako
|
||||
- kanshi
|
||||
- wl-clipboard
|
||||
- brightnessctl
|
||||
- grim
|
||||
- slurp
|
||||
- playerctl
|
||||
- qalculate-gtk
|
||||
- tmux
|
||||
state: present
|
||||
|
||||
- name: Ensure .config directory exists for target user
|
||||
ansible.builtin.file:
|
||||
path: "/home/{{ target_user }}/.config"
|
||||
state: directory
|
||||
owner: "{{ target_user }}"
|
||||
group: "{{ target_user }}"
|
||||
mode: '0755'
|
||||
|
||||
- name: Ensure .config subdirectories exist
|
||||
ansible.builtin.file:
|
||||
path: "/home/{{ target_user }}/.config/{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ target_user }}"
|
||||
group: "{{ target_user }}"
|
||||
mode: '0755'
|
||||
loop:
|
||||
- sway
|
||||
- waybar
|
||||
- mako
|
||||
- wofi
|
||||
- alacritty
|
||||
|
||||
- name: Copy all config files
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/config/{{ item.path }}"
|
||||
dest: "/home/{{ target_user }}/.config/{{ item.path }}"
|
||||
owner: "{{ target_user }}"
|
||||
group: "{{ target_user }}"
|
||||
mode: '0644'
|
||||
loop:
|
||||
- { path: 'sway/config' }
|
||||
- { path: 'waybar/config' }
|
||||
- { path: 'waybar/style.css' }
|
||||
- { path: 'mako/config' }
|
||||
- { path: 'wofi/config' }
|
||||
- { path: 'alacritty/alacritty.toml' }
|
||||
- { path: 'alacritty/alacritty.yml' }
|
||||
- { path: 'alacritty/catppuccin-mocha.toml' }
|
||||
|
||||
- name: Copy Tmux config to home directory
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/.tmux.conf"
|
||||
dest: "/home/{{ target_user }}/.tmux.conf"
|
||||
owner: "{{ target_user }}"
|
||||
group: "{{ target_user }}"
|
||||
mode: '0644'
|
||||
Reference in New Issue
Block a user