diff --git a/README.md b/README.md index 90b334c..17133d0 100644 --- a/README.md +++ b/README.md @@ -1,99 +1,142 @@ -# Sway Setup Wiederherstellung +# Sway Desktop Wiederherstellung via Ansible -Dieses Verzeichnis enthält alle notwendigen Konfigurationen und eine Liste der Pakete, um dein personalisiertes Sway-Setup wiederherzustellen. +Dieses Repository enthält die Konfigurationen und das Ansible-Playbook, um ein vollständiges und personalisiertes Sway-Desktop-Setup automatisiert bereitzustellen. -## 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,kanshi} ~/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`, `alacritty` und `kanshi` Ordner an die richtige Stelle in deinem System, sowie die `.tmux.conf`. +Das Playbook konfiguriert unter anderem: +* **Desktop-Umgebung:** Sway, Waybar, Wofi, Alacritty, Mako +* **Hintergrund:** Statisches Hintergrundbild +* **Skripte:** Automatisches Verbinden von Bluetooth-Geräten, Update-Anzeige für Waybar +* **Systemdienste:** MPD (Music Player Daemon), rclone-Synchronisierung --- -## 3. Deployment und Testen der Konfiguration mit Ansible +## 1. Voraussetzungen -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. +Bevor Sie das Playbook ausführen können, müssen die folgenden Werkzeuge auf dem Zielsystem (Arch Linux) installiert sein: -**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` +1. **Ansible:** + ```bash + sudo pacman -S ansible + ``` +2. **git** und **base-devel** (um AUR-Pakete bauen zu können): + ```bash + sudo pacman -S --needed git base-devel + ``` +3. **Ein AUR-Helper (empfohlen: `yay`):** Das Playbook verwendet `yay`, um Pakete aus dem Arch User Repository (AUR) zu installieren. Bitte installieren Sie es manuell, bevor Sie das Playbook starten. + ```bash + git clone https://aur.archlinux.org/yay.git + cd yay + makepkg -si + cd .. + rm -rf yay + ``` + +--- + +## 2. Konfiguration mit Ansible bereitstellen (Empfohlene Methode) + +Der empfohlene Weg, dieses Setup zu installieren, ist die Verwendung des mitgelieferten Ansible-Playbooks. ### Playbook ausführen -1. **Navigiere in das Konfigurationsverzeichnis:** +1. **Navigieren Sie in das Verzeichnis:** ```bash cd ~/my_sway_konfig ``` -2. **Führe das Playbook mit `sudo` aus:** +2. **Führen Sie das Playbook aus:** + Dieser Befehl startet den automatisierten Prozess. Er wird Sie nach Ihrem `sudo`-Passwort fragen, um Pakete zu installieren und Systemkonfigurationen vorzunehmen. ```bash - sudo ansible-playbook sway_config_deploy.yml + ansible-playbook sway_config_deploy.yml --ask-become-pass ``` - 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: + Standardmäßig ist das Playbook für den Benutzer `jonnybravo` konfiguriert. Um es für einen anderen Benutzer auszuführen, verwenden Sie die `--extra-vars`-Option: ```bash - sudo ansible-playbook sway_config_deploy.yml --extra-vars "target_user=anderer_benutzer" + ansible-playbook sway_config_deploy.yml --ask-become-pass --extra-vars "target_user=anderer_benutzer" ``` -### Playbook testen (Dry Run) +### Playbook testen (ohne Änderungen) -Du kannst das Playbook im "Check-Modus" ausführen, um zu sehen, welche Änderungen vorgenommen würden, ohne sie tatsächlich anzuwenden. +Bevor Sie das Playbook ausführen, können Sie mit `--check` und `--diff` eine Simulation durchführen. Dies ist sehr nützlich, um zu sehen, was sich ändern würde, ohne das System zu verändern. -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. +```bash +# Simuliert die Ausführung und zeigt alle geplanten Änderungen an +ansible-playbook sway_config_deploy.yml --ask-become-pass --check --diff +``` -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. \ No newline at end of file +--- + +## 3. Referenz: Installierte Pakete + +Das Playbook installiert die folgenden Pakete. Diese Liste dient als Referenz. + +### Offizielle Repositories (via pacman) +- sway +- waybar +- wofi +- alacritty +- swaylock +- swayidle +- mako +- kanshi +- wl-clipboard +- brightnessctl +- grim +- slurp +- playerctl +- qalculate-gtk +- tmux +- rclone +- pacman-contrib +- udisks2 +- udiskie +- mpd +- ncmpcpp +- ttf-dejavu +- otf-font-awesome +- papirus-icon-theme +- nwg-look + +### Arch User Repository (AUR) (via yay) +- tty-clock +- catppuccin-gtk-theme-mocha + +--- + +## 4. MPD & ncmpcpp Cheatsheet + +Hier sind einige nützliche Befehle zur Steuerung des Music Player Daemon (MPD) und des Clients `ncmpcpp`. + +**Wichtiger Hinweis:** Dein MPD-Server läuft auf Port `6601`. Fast alle Befehle benötigen daher die Angabe `-p 6601`. + +### MPD (Der Server) + +| Befehl | Beschreibung | +| ------------------------------------ | ------------------------------------------ | +| `systemctl --user status mpd` | Zeigt den Status des MPD-Dienstes an. | +| `systemctl --user restart mpd` | Startet den MPD-Dienst neu. | +| `mpc -p 6601 update` | Scannt dein Musikverzeichnis nach neuen Liedern. | + +### mpc (Einfacher Kommandozeilen-Client) + +| Befehl | Beschreibung | +| ------------------------------------ | ------------------------------------------ | +| `mpc -p 6601 toggle` | Spielt ab oder pausiert. | +| `mpc -p 6601 next` | Nächstes Lied. | +| `mpc -p 6601 prev` | Vorheriges Lied. | +| `mpc -p 6601 current` | Zeigt den aktuell spielenden Titel an. | + +### ncmpcpp (Visueller Client im Terminal) + +**Starten:** `ncmpcpp -p 6601` + +| Taste(n) | Aktion | +| ---------------- | ------------------------------------------ | +| `1` | Aktuelle Wiedergabeliste | +| `2` | Musik-Browser (Dateisystem) | +| `q` | Beenden | +| `Leertaste` | Wiedergabe umschalten (Play/Pause) | +| `>` | Nächstes Lied | +| `<` | Vorheriges Lied | +| `u` | Musik-Datenbank aktualisieren | diff --git a/config/Thunar/accels.scm b/config/Thunar/accels.scm new file mode 100644 index 0000000..65068ad --- /dev/null +++ b/config/Thunar/accels.scm @@ -0,0 +1,128 @@ +; thunar GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +; (gtk_accel_path "/ThunarDetailsView/expandable-folders" "") +; (gtk_accel_path "/ThunarStandardView/sort-by-type" "") +; (gtk_accel_path "/ThunarStatusBar/toggle-last-modified" "") +; (gtk_accel_path "/Thunarwindow/menu" "") +; (gtk_accel_path "/ThunarActionManager/cut" "x") +; (gtk_accel_path "/ThunarStandardView/sort-by-size" "") +; (gtk_accel_path "/ThunarWindow/file-menu" "") +; (gtk_accel_path "/ThunarWindow/close-tab" "w") +; (gtk_accel_path "/ThunarWindow/switch-previous-tab-alt" "ISO_Left_Tab") +; (gtk_accel_path "/ThunarStatusBar/toggle-size" "") +; (gtk_accel_path "/ThunarWindow/new-window" "n") +; (gtk_accel_path "/ThunarWindow/clear-directory-specific-settings" "") +; (gtk_accel_path "/ThunarWindow/close-window" "q") +; (gtk_accel_path "/ThunarWindow/open-parent" "Up") +; (gtk_accel_path "/ThunarWindow/view-side-pane-menu" "") +; (gtk_accel_path "/ThunarStatusBar/toggle-size-in-bytes" "") +; (gtk_accel_path "/ThunarWindow/switch-previous-tab" "Page_Up") +; (gtk_accel_path "/ThunarActionManager/open" "o") +; (gtk_accel_path "/ThunarBookmarks/87f311946d76aaa57a4debfe8d0f656a" "") +; (gtk_accel_path "/ThunarStandardView/sort-ascending" "") +; (gtk_accel_path "/ThunarWindow/toggle-split-view" "F3") +; (gtk_accel_path "/ThunarActionManager/copy-2" "Insert") +; (gtk_accel_path "/ThunarActionManager/trash-delete" "Delete") +; (gtk_accel_path "/ThunarWindow/open-recent" "") +; (gtk_accel_path "/ThunarWindow/view-configure-toolbar" "") +; (gtk_accel_path "/ThunarStandardView/forward" "Right") +; (gtk_accel_path "/ThunarActionManager/restore" "") +; (gtk_accel_path "/ThunarWindow/open-location-alt" "d") +; (gtk_accel_path "/ThunarWindow/zoom-out-alt" "KP_Subtract") +; (gtk_accel_path "/ThunarStandardView/select-by-pattern" "s") +; (gtk_accel_path "/ThunarWindow/open-file-menu" "F10") +; (gtk_accel_path "/ThunarWindow/contents" "F1") +; (gtk_accel_path "/ThunarWindow/show-highlight" "") +; (gtk_accel_path "/ThunarStandardView/sort-descending" "") +; (gtk_accel_path "/ThunarStandardView/sort-by-name" "") +; (gtk_accel_path "/ThunarStandardView/select-all-files" "a") +; (gtk_accel_path "/ThunarActionManager/execute" "") +; (gtk_accel_path "/ThunarStandardView/properties" "Return") +; (gtk_accel_path "/ThunarActionManager/cut-2" "") +; (gtk_accel_path "/ThunarStandardView/sort-by-dtime" "") +; (gtk_accel_path "/ThunarWindow/switch-next-tab" "Page_Down") +; (gtk_accel_path "/ThunarWindow/open-templates" "") +; (gtk_accel_path "/ThunarActionManager/paste-2" "Insert") +; (gtk_accel_path "/ThunarStatusBar/toggle-filetype" "") +; (gtk_accel_path "/ThunarWindow/close-all-windows" "w") +; (gtk_accel_path "/ThunarStandardView/create-document" "") +; (gtk_accel_path "/ThunarWindow/detach-tab" "") +; (gtk_accel_path "/ThunarWindow/cancel-search" "Escape") +; (gtk_accel_path "/ThunarWindow/zoom-in-alt2" "equal") +; (gtk_accel_path "/ThunarStatusBar/toggle-hidden-count" "") +; (gtk_accel_path "/ThunarShortcutsPane/sendto-shortcuts" "d") +; (gtk_accel_path "/ThunarActionManager/undo" "z") +; (gtk_accel_path "/ThunarStandardView/toggle-sort-order" "") +; (gtk_accel_path "/ThunarWindow/view-location-selector-entry" "") +; (gtk_accel_path "/ThunarActionManager/paste" "v") +; (gtk_accel_path "/ThunarWindow/zoom-in-alt1" "KP_Add") +; (gtk_accel_path "/ThunarWindow/view-menubar" "m") +; (gtk_accel_path "/ThunarStandardView/back" "Left") +; (gtk_accel_path "/ThunarWindow/open-desktop" "") +; (gtk_accel_path "/ThunarWindow/view-as-detailed-list" "2") +; (gtk_accel_path "/ThunarActionManager/restore-show" "") +; (gtk_accel_path "/ThunarWindow/sendto-menu" "") +; (gtk_accel_path "/ThunarStatusBar/toggle-display-name" "") +; (gtk_accel_path "/ThunarWindow/go-menu" "") +; (gtk_accel_path "/ThunarWindow/zoom-out" "minus") +; (gtk_accel_path "/ThunarWindow/remove-from-recent" "") +; (gtk_accel_path "/ThunarActionManager/open-with-other" "") +; (gtk_accel_path "/ThunarStandardView/invert-selection" "i") +; (gtk_accel_path "/ThunarWindow/view-side-pane-shortcuts" "b") +; (gtk_accel_path "/ThunarWindow/reload-alt-2" "Reload") +; (gtk_accel_path "/ThunarWindow/view-location-selector-menu" "") +; (gtk_accel_path "/ThunarWindow/reload" "r") +; (gtk_accel_path "/ThunarWindow/edit-menu" "") +; (gtk_accel_path "/ThunarActionManager/copy" "c") +; (gtk_accel_path "/ThunarWindow/bookmarks-menu" "") +; (gtk_accel_path "/ThunarStandardView/forward-alt" "Forward") +; (gtk_accel_path "/ThunarActionManager/move-to-trash" "") +; (gtk_accel_path "/ThunarWindow/reload-alt-1" "F5") +; (gtk_accel_path "/ThunarActionManager/delete-3" "KP_Delete") +; (gtk_accel_path "/ThunarStandardView/unselect-all-files" "Escape") +; (gtk_accel_path "/ThunarWindow/contents/help-menu" "") +; (gtk_accel_path "/ThunarStandardView/arrange-items-menu" "") +; (gtk_accel_path "/ThunarStandardView/sort-by-mtime" "") +; (gtk_accel_path "/ThunarWindow/open-computer" "") +; (gtk_accel_path "/ThunarWindow/toggle-image-preview" "") +; (gtk_accel_path "/ThunarWindow/toggle-side-pane" "F9") +; (gtk_accel_path "/ThunarWindow/view-as-icons" "1") +; (gtk_accel_path "/ThunarActionManager/delete-2" "Delete") +; (gtk_accel_path "/ThunarWindow/zoom-in" "plus") +; (gtk_accel_path "/ThunarStandardView/configure-columns" "") +; (gtk_accel_path "/ThunarStandardView/rename" "F2") +; (gtk_accel_path "/ThunarWindow/open-location" "l") +; (gtk_accel_path "/ThunarWindow/view-as-compact-list" "3") +; (gtk_accel_path "/ThunarWindow/view-menu" "") +; (gtk_accel_path "/ThunarWindow/search" "f") +; (gtk_accel_path "/ThunarWindow/new-tab" "t") +; (gtk_accel_path "/ThunarWindow/zoom-reset" "0") +; (gtk_accel_path "/ThunarStandardView/back-alt2" "Back") +; (gtk_accel_path "/ThunarActionManager/open-in-new-tab" "p") +; (gtk_accel_path "/ThunarWindow/view-location-selector-buttons" "") +; (gtk_accel_path "/ThunarActionManager/redo" "z") +; (gtk_accel_path "/ThunarWindow/open-trash" "") +; (gtk_accel_path "/ThunarActionManager/open-in-new-window" "o") +; (gtk_accel_path "/ThunarWindow/view-statusbar" "") +; (gtk_accel_path "/ThunarActionManager/open-location" "") +; (gtk_accel_path "/ThunarStandardView/duplicate" "") +; (gtk_accel_path "/ThunarActionManager/trash-delete-2" "KP_Delete") +; (gtk_accel_path "/ThunarStandardView/back-alt1" "BackSpace") +; (gtk_accel_path "/ThunarStandardView/create-folder" "n") +; (gtk_accel_path "/ThunarWindow/open-home" "Home") +; (gtk_accel_path "/ThunarWindow/switch-focused-split-view-pane" "") +; (gtk_accel_path "/ThunarWindow/show-hidden" "h") +; (gtk_accel_path "/ThunarStandardView/set-default-app" "") +; (gtk_accel_path "/ThunarWindow/empty-trash" "") +; (gtk_accel_path "/ThunarWindow/preferences" "") +; (gtk_accel_path "/ThunarActionManager/delete" "") +; (gtk_accel_path "/ThunarWindow/open-network" "") +; (gtk_accel_path "/ThunarWindow/view-side-pane-tree" "e") +; (gtk_accel_path "/ThunarWindow/open-file-system" "") +; (gtk_accel_path "/ThunarWindow/search-alt" "Search") +; (gtk_accel_path "/ThunarWindow/switch-next-tab-alt" "Tab") +; (gtk_accel_path "/ThunarActionManager/sendto-desktop" "") +; (gtk_accel_path "/ThunarStandardView/make-link" "") +; (gtk_accel_path "/ThunarWindow/zoom-reset-alt" "KP_0") +; (gtk_accel_path "/ThunarWindow/about" "") diff --git a/config/Thunar/uca.xml b/config/Thunar/uca.xml new file mode 100644 index 0000000..7268155 --- /dev/null +++ b/config/Thunar/uca.xml @@ -0,0 +1,59 @@ + + + + audacious + Add to audacious playlist + + 1681893052016505-1 + audacious -e %U + + * + * + + + + utilities-terminal + Open Terminal Here + + 1703572977408169-1 + exo-open --working-directory %f --launch TerminalEmulator + Launch TerminalEmulator + + * + + + + + checkbox + Check sha1sum + + 1526633271260079-26 + yad --info --title="Check sha1 for %n" --text="$(sha1sum %f)" + Check sha1sum + + *.iso;*.ISO + + + + checkbox + Check sha256sum + + 1577688162350307-1 + yad --info --title="Check sha256 for %n" --text="$(sha256sum %f)" + Check sha256sum + + *.iso;*.ISO + + + + checkbox + Check md5sum + + 1526736788575383-2 + yad --info --title="Check md5 for %n" --text="$(md5sum %f)" + Check md5sum + + *.iso;*.ISO;*.tar.gz;*.TAR.GZ;*.zip;*.ZIP + + + diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index 6ae684f..85f2cae 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -9,6 +9,7 @@ import = [ "~/.config/alacritty/catppuccin-mocha.toml" ] +live_config_reload = true [font] # Schriftgröße @@ -33,8 +34,8 @@ padding = { x = 10, y = 10 } # Hintergrund-Transparenz (Opacity) # 1.0 ist komplett undurchsichtig, 0.0 ist komplett durchsichtig. -opacity = 0.95 +opacity = 0.4 # Entfernt die Standard-Fensterdekoration (Titelleiste) # In Sway ist das oft gewünscht, da Sway die Fenster verwaltet. -decorations = "none" \ No newline at end of file +decorations = "none" diff --git a/config/alacritty/alacritty.yml b/config/alacritty/alacritty.yml index c207562..6ab00fa 100644 --- a/config/alacritty/alacritty.yml +++ b/config/alacritty/alacritty.yml @@ -10,3 +10,7 @@ scrolling: font: # Schriftgröße size: 14.0 + +# Fenster-Transparenz +window: + background_opacity: 0.8 \ No newline at end of file diff --git a/config/fastfetch/arch.png b/config/fastfetch/arch.png new file mode 100644 index 0000000..cd97313 Binary files /dev/null and b/config/fastfetch/arch.png differ diff --git a/config/fastfetch/config-compact.jsonc b/config/fastfetch/config-compact.jsonc new file mode 100644 index 0000000..c7ea378 --- /dev/null +++ b/config/fastfetch/config-compact.jsonc @@ -0,0 +1,75 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "~/.config/fastfetch/arch.png", + "type": "kitty-direct", + "height": 10, + "width": 20, + "padding": { + "top": 1 + } + }, + "display": { + "separator": " -> " + }, + "modules": [ + "break", + { + "type": "title", + "keyWidth": 10, + "format": " {6}{7}{8}" + }, + { + "type": "custom", + "format": " ─────────────────────────── " + }, + { + "type": "kernel", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "wm", + "key": " ", + "keyColor": "blue" + }, + { + "type": "shell", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "terminal", + "key": " ", + "keyColor": "blue" + }, + /* + { + "type": "packages", + "key": "󰏖 ", + "keyColor": "yellow" + }, + */ + { + "type": "memory", + "key": "󰍛 ", + "keyColor": "magenta", + // format: used / total + "format": "{1} / {2}" + }, + { + "type": "uptime", + "key": "󰔛 ", + "keyColor": "green" + }, + { + "type": "custom", + "format": " ─────────────────────────── " + }, + { + "type": "custom", + "format": " \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[90m " + }, + "break", + ] +} diff --git a/config/fastfetch/config-pokemon.jsonc b/config/fastfetch/config-pokemon.jsonc new file mode 100644 index 0000000..2b4522f --- /dev/null +++ b/config/fastfetch/config-pokemon.jsonc @@ -0,0 +1,73 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "height": 5, + "width": 10, + "padding": { + "top": 1 + } + }, + "display": { + "separator": " -> " + }, + "modules": [ + "break", + { + "type": "title", + "keyWidth": 10, + "format": " {6}{7}{8}" + }, + { + "type": "custom", + "format": " ─────────────────────────── " + }, + { + "type": "kernel", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "wm", + "key": " ", + "keyColor": "blue" + }, + { + "type": "shell", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "terminal", + "key": " ", + "keyColor": "blue" + }, + /* + { + "type": "packages", + "key": "󰏖 ", + "keyColor": "yellow" + }, + */ + { + "type": "memory", + "key": "󰍛 ", + "keyColor": "magenta", + // format: used / total + "format": "{1} / {2}" + }, + { + "type": "uptime", + "key": "󰔛 ", + "keyColor": "green" + }, + { + "type": "custom", + "format": " ─────────────────────────── " + }, + { + "type": "custom", + "format": " \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[90m " + }, + "break", + ] +} diff --git a/config/fastfetch/config-v2.jsonc b/config/fastfetch/config-v2.jsonc new file mode 100644 index 0000000..cee27fd --- /dev/null +++ b/config/fastfetch/config-v2.jsonc @@ -0,0 +1,112 @@ +{ +"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", +"logo": { + //"source": "~/.config/fastfetch/nixos.png", + //"type": "kitty-direct", + "height": 15, + "width": 30, + "padding": { + "top": 1 + } + }, +"display": { + "separator": " ➜ " +}, + +"modules": [ + "break", + { + "type": "os", + "key": " DISTRO", + "keyColor": "31", + }, + { + "type": "kernel", + "key": " ├  ", + "keyColor": "31", + }, + { + "type": "packages", + "key": " ├ 󰏖 ", + "keyColor": "31", + }, + { + "type": "shell", + "key": " └  ", + "keyColor": "31", + }, + "break", + { + "type": "wm", + "key": " DE/WM", + "keyColor": "32", + }, + { + "type": "wmtheme", + "key": " ├ 󰉼 ", + "keyColor": "32", + }, + { + "type": "icons", + "key": " ├ 󰀻 ", + "keyColor": "32", + }, + { + "type": "cursor", + "key": " ├  ", + "keyColor": "32", + }, + { + "type": "terminal", + "key": " ├  ", + "keyColor": "32", + }, + { + "type": "terminalfont", + "key": " └  ", + "keyColor": "32", + }, + "break", + { + "type": "host", + "format": "{2}", + "key": "󰌢 SYSTEM", + "keyColor": "33", + }, + { + "type": "cpu", + "format": "{1} ({3}) @ {7} GHz", + "key": " ├  ", + "keyColor": "33", + }, + { + "type": "gpu", + "format": "{2}", + "key": " ├ 󰢮 ", + "keyColor": "33", + }, + { + "type": "memory", + "key": " ├  ", + "keyColor": "33", + }, + { + "type": "swap", + "key": " ├ 󰓡 ", + "keyColor": "33", + }, + { + "type": "disk", + "key": " ├ 󰋊 ", + "keyColor": "33", + }, + { + "type": "display", + "key": " └  ", + "compactType": "original-with-refresh-rate", + "keyColor": "33", + }, + "break", + "break", +] +} diff --git a/config/fastfetch/config.jsonc b/config/fastfetch/config.jsonc new file mode 100644 index 0000000..dfbe1c8 --- /dev/null +++ b/config/fastfetch/config.jsonc @@ -0,0 +1,128 @@ + +{ +"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", +"logo": { +"padding": { +"top": 1 +} +}, +"display": { +"separator": " 󰑃 " +}, +"modules": [ + "break", + { + "type": "os", + "key": " DISTRO", + "keyColor": "yellow" + }, + { + "type": "kernel", + "key": "│ ├", + "keyColor": "yellow" + }, + { + "type": "packages", + "key": "│ ├󰏖", + "keyColor": "yellow" + }, + { + "type": "shell", + "key": "│ └", + "keyColor": "yellow" + }, + { + "type": "wm", + "key": " DE/WM", + "keyColor": "blue" + }, + { + "type": "wmtheme", + "key": "│ ├󰉼", + "keyColor": "blue" + }, + { + "type": "icons", + "key": "│ ├󰀻", + "keyColor": "blue" + }, + { + "type": "cursor", + "key": "│ ├", + "keyColor": "blue", + }, + { + "type": "terminalfont", + "key": "│ ├", + "keyColor": "blue", + }, + { + "type": "terminal", + "key": "│ └", + "keyColor": "blue" + }, + { + "type": "host", + "key": "󰌢 SYSTEM", + "keyColor": "green" + }, + { + "type": "cpu", + "key": "│ ├󰻠", + "keyColor": "green" + }, + { + "type": "gpu", + "key": "│ ├󰻑", + "format": "{2}", + "keyColor": "green" + }, + { + "type": "display", + "key": "│ ├󰍹", + "keyColor": "green", + "compactType": "original-with-refresh-rate" + }, + { + "type": "memory", + "key": "│ ├󰾆", + "keyColor": "green" + }, + { + "type": "swap", + "key": "│ ├󰓡", + "keyColor": "green" + }, + { + "type": "uptime", + "key": "│ ├󰅐", + "keyColor": "green" + }, + { + "type": "display", + "key": "│ └󰍹", + "keyColor": "green" + }, + { + "type": "sound", + "key": " AUDIO", + "format": "{2}", + "keyColor": "magenta" + }, + { + "type": "player", + "key": "│ ├󰥠", + "keyColor": "magenta" + }, + { + "type": "media", + "key": "│ └󰝚", + "keyColor": "magenta" + }, + { + "type": "custom", + "format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[38m \u001b[39m \u001b[39m  \u001b[38m \u001b[37m \u001b[36m \u001b[35m \u001b[34m \u001b[33m \u001b[32m \u001b[31m \u001b[90m " + }, + "break", + ] +} diff --git a/config/fastfetch/my_config.jsonc b/config/fastfetch/my_config.jsonc new file mode 100644 index 0000000..77953bc --- /dev/null +++ b/config/fastfetch/my_config.jsonc @@ -0,0 +1,40 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/master/doc/json_schema.json", + "modules": [ + "title", + "separator", + "os", + "host", + "kernel", + "uptime", + "shell", + "display", + "de", + "cpu", + "gpu", + "memory", + "swap", + "disk", + "wifi", + "localip", + //"publicip", + //"dns", + "poweradapter" + ], + "logo": { + "type": "auto", // Logo type: auto, builtin, small, file, etc. + "source": "manjaro", // Built-in logo name or file path + // "width": 40, // Width in characters + // "height": 15, // Height in characters + // "padding": { + // "top": 0, // Top padding + // "left": 0, // Left padding + // "right": 2 // Right padding + // }, + "color": { // Override logo colors + "1": "blue", + "2": "green" + } +} + +} diff --git a/config/fish/conf.d/omf.fish b/config/fish/conf.d/omf.fish new file mode 100644 index 0000000..3e0f6d6 --- /dev/null +++ b/config/fish/conf.d/omf.fish @@ -0,0 +1,7 @@ +# Path to Oh My Fish install. +set -q XDG_DATA_HOME + and set -gx OMF_PATH "$XDG_DATA_HOME/omf" + or set -gx OMF_PATH "$HOME/.local/share/omf" + +# Load Oh My Fish configuration. +source $OMF_PATH/init.fish diff --git a/config/fish/config.fish b/config/fish/config.fish new file mode 100644 index 0000000..6e923eb --- /dev/null +++ b/config/fish/config.fish @@ -0,0 +1,15 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end + +# =================================================================== +# Automatische Helligkeit für externen Monitor +# Setzt den externen Monitor auf 100% Helligkeit, wenn er erkannt wird. +# =================================================================== +if command -v ddcutil >/dev/null 2>&1 + # Prüft, ob der spezifische Monitor (Acer XB273K GP an card1-DP-3) angeschlossen ist. + if ddcutil detect | grep -q "card1-DP-3" + # Befehl im Hintergrund ausführen, um den Shell-Start nicht zu blockieren. + ddcutil --display 1 setvcp 10 100 >/dev/null 2>&1 & + end +end diff --git a/config/fish/fish_variables b/config/fish/fish_variables new file mode 100644 index 0000000..3a2f968 --- /dev/null +++ b/config/fish/fish_variables @@ -0,0 +1,32 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3800 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:normal +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_greeting:Hallo\x20du\x20kleiner\x20Fish +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/config/fish/functions/fish_prompt.fish b/config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..e07e990 --- /dev/null +++ b/config/fish/functions/fish_prompt.fish @@ -0,0 +1,30 @@ +function fish_prompt --description 'Prompt ausgeben' + set -l last_status $status + set -l normal (set_color normal) + set -l status_color (set_color brgreen) + set -l cwd_color (set_color $fish_color_cwd) + set -l vcs_color (set_color brpurple) + set -l prompt_status "" + + # Since we display the prompt on a new line allow the directory names to be longer. + set -q fish_prompt_pwd_dir_length + or set -lx fish_prompt_pwd_dir_length 0 + + # Color the prompt differently when we're root + set -l suffix '❯' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set cwd_color (set_color $fish_color_cwd_root) + end + set suffix '#' + end + + # Color the prompt in red on error + if test $last_status -ne 0 + set status_color (set_color $fish_color_error) + set prompt_status $status_color "[" $last_status "]" $normal + end + + echo -s (prompt_login) ' ' $cwd_color (prompt_pwd) $vcs_color (fish_vcs_prompt) $normal ' ' $prompt_status + echo -n -s $status_color $suffix ' ' $normal +end diff --git a/config/htop/htoprc b/config/htop/htoprc new file mode 100644 index 0000000..2c65457 --- /dev/null +++ b/config/htop/htoprc @@ -0,0 +1,64 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +htop_version=3.4.1-3.4.1 +config_reader_min_version=3 +fields=0 48 17 18 38 39 40 2 46 47 49 1 +hide_kernel_threads=1 +hide_userland_threads=0 +hide_running_in_container=0 +shadow_other_users=0 +show_thread_names=0 +show_program_path=1 +highlight_base_name=0 +highlight_deleted_exe=1 +shadow_distribution_path_prefix=0 +highlight_megabytes=1 +highlight_threads=1 +highlight_changes=0 +highlight_changes_delay_secs=5 +find_comm_in_cmdline=1 +strip_exe_from_cmdline=1 +show_merged_command=0 +header_margin=1 +screen_tabs=1 +detailed_cpu_time=0 +cpu_count_from_one=0 +show_cpu_usage=1 +show_cpu_frequency=0 +show_cpu_temperature=0 +degree_fahrenheit=0 +show_cached_memory=1 +update_process_names=0 +account_guest_in_cpu_meter=0 +color_scheme=0 +enable_mouse=1 +delay=15 +hide_function_bar=0 +header_layout=two_50_50 +column_meters_0=LeftCPUs Memory Swap +column_meter_modes_0=1 1 1 +column_meters_1=RightCPUs Tasks LoadAverage Uptime +column_meter_modes_1=1 2 2 2 +tree_view=1 +sort_key=46 +tree_sort_key=46 +sort_direction=-1 +tree_sort_direction=-1 +tree_view_always_by_pid=0 +all_branches_collapsed=0 +screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command +.sort_key=PERCENT_CPU +.tree_sort_key=PERCENT_CPU +.tree_view_always_by_pid=0 +.tree_view=1 +.sort_direction=-1 +.tree_sort_direction=-1 +.all_branches_collapsed=0 +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command +.sort_key=IO_RATE +.tree_sort_key=PID +.tree_view_always_by_pid=0 +.tree_view=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 diff --git a/config/mpd/mpd.conf b/config/mpd/mpd.conf new file mode 100644 index 0000000..ddaff01 --- /dev/null +++ b/config/mpd/mpd.conf @@ -0,0 +1,37 @@ +# Recommended location for database +db_file "/home/jonnybravo/.config/mpd/database" + +# If you want to log messages to a file +log_file "/home/jonnybravo/.config/mpd/log" + +# The music directory is by default the home directory. +music_directory "/home/jonnybravo/Musik" + +# If you want to support playlists +playlist_directory "/home/jonnybravo/.config/mpd/playlists" + +# A unique name for this MPD server +pid_file "/home/jonnybravo/.config/mpd/pid" + +state_file "/home/jonnybravo/.config/mpd/state" +sticker_file "/home/jonnybravo/.config/mpd/sticker.sql" + +bind_to_address "127.0.0.1" +port "6601" + +audio_output { + type "pipewire" + name "PipeWire Sound Server" +} + +audio_output { + type "fifo" + name "my_fifo" + path "/tmp/mpd.fifo" + format "44100:16:2" +} + +decoder { + plugin "wildmidi" + enabled "no" +} diff --git a/config/ncmpcpp/config b/config/ncmpcpp/config new file mode 100644 index 0000000..37311ec --- /dev/null +++ b/config/ncmpcpp/config @@ -0,0 +1,19 @@ +mpd_host = "127.0.0.1" +mpd_port = "6601" +mpd_connection_timeout = "5" + +colors_enabled = "yes" + +# Progressbar +progressbar_look = "━━" +current_item_prefix = "▶ " +current_item_suffix = "" + +# Layout +song_status_format = "%a - %t" +song_columns_list_format = "(50)[]{t|a} (50)[]{b}" +playlist_display_mode = "columns" + +header_visibility = "yes" +statusbar_visibility = "yes" +titles_visibility = "yes" diff --git a/config/ncmpcpp/error.log b/config/ncmpcpp/error.log new file mode 100644 index 0000000..e69de29 diff --git a/config/rclone/rclone.conf b/config/rclone/rclone.conf new file mode 100644 index 0000000..e6d7f4c --- /dev/null +++ b/config/rclone/rclone.conf @@ -0,0 +1,7 @@ +[nextcloud] +type = webdav +url = https://nextcloud.schlaubistechtalk.de/remote.php/dav/files/JonnyBravo/ +vendor = nextcloud +user = JonnyBravo +pass = sRF3pKvZMWmo6ZhchVtPaaa0NG5CFG-AdjeXy-zTdW0os6tIDsOHkzL-48Q6 + diff --git a/config/sway/config b/config/sway/config index 22c05e4..ee890f7 100644 --- a/config/sway/config +++ b/config/sway/config @@ -34,6 +34,7 @@ set $lock swaylock -f -c 000000 # Schriftart für Fenstertitel font pango:DejaVu Sans Mono 12 +default_border pixel 2 # Home-Row-Richtungstasten (wie in Vim) set $left h @@ -44,15 +45,14 @@ set $right l # ============================================================================= # Ausgabekonfiguration (Monitore & Hintergrund) # ============================================================================= -# Standard-Hintergrundbild +# Standard-Hintergrundbild (ersetzt durch swww) 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 +gaps outer 0 smart_gaps on # @@ -74,9 +74,9 @@ floating_modifier $mod normal # Tastenkombinationen (Key Bindings) # ============================================================================= -# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Grundlegende Aktionen -# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Terminal starten bindsym $mod+Return exec $term @@ -95,9 +95,9 @@ bindsym $mod+Shift+e exec swaynag -t warning -m 'Möchtest du Sway wirklich been # Bildschirm sperren bindsym $mod+l exec $lock -# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Fenster-Fokus bewegen -# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Fokus mit Pfeiltasten bewegen bindsym $mod+Left focus left bindsym $mod+Down focus down @@ -106,18 +106,18 @@ 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 @@ -167,9 +167,9 @@ bindsym $mod+Shift+0 move container to workspace $ws10 # 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 @@ -189,18 +189,18 @@ 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 @@ -259,12 +259,20 @@ bindsym Shift+Print exec grim -g "$(slurp)" ~/Bilder/screenshot-$(date +%Y%m%d-% # ============================================================================= # Autostart-Anwendungen # ============================================================================= -exec waybar +# Startet den Wallpaper-Manager +# exec mpvpaper -o "loop" DP-3 /home/jonnybravo/Bilder/270983_large.mp4 + +# exec waybar # Original command commented out +exec sleep 1 && waybar # Start Waybar with a 1-second delay 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 +# Startet udiskie für Automounting +exec udiskie & +# Startet das Skript für die automatische Bluetooth-Verbindung +exec /home/jonnybravo/.config/sway/scripts/auto-bluetooth.sh & # Alter Code auskommentiert: # # Optional: Startet einen Clipboard-Manager (Zwischenablage-Verlauf) @@ -290,15 +298,19 @@ exec swayidle -w \ # 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 +# ----------------------------------------------------------------------------- +# Brave Browser startet auf Workspace 2 (nicht schwebend) +for_window [app_id="brave-browser"] move to workspace $ws2 +# floating enable -# ----------------------------------------------------------------------------- +# Firefox als schwebendes Fenster +for_window [app_id="firefox"] floating enable + +# ----------------------------------------------------------------------------- # Bestimmte Fenster automatisch schweben lassen -# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Dialogfenster und Benachrichtigungen for_window [window_type="dialog"] floating enable for_window [window_type="notification"] floating enable @@ -312,4 +324,11 @@ for_window [app_id="systemsettings"] floating enable # Qalculate! (GTK Taschenrechner) for_window [app_id="qalculate-gtk"] floating enable, resize set 400px 600px +# pulseaudio Einstellungen! +for_window [app_id="org.pulseaudio.pavucontrol"] floating enable, resize set 800px 600px +# VLC als schwebendes Fenster +for_window [class="vlc"] floating enable, resize set 800px 450px, position center + +# Thunar als schwebendes Fenster +for_window [app_id="thunar"] floating enable, resize set 1000px 700px, position center diff --git a/config/sway/scripts/auto-bluetooth.sh b/config/sway/scripts/auto-bluetooth.sh new file mode 100755 index 0000000..2c25686 --- /dev/null +++ b/config/sway/scripts/auto-bluetooth.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Skript zum automatischen Verbinden von Bluetooth-Geräten beim Start + +# Eine kurze Pause, um sicherzustellen, dass der Bluetooth-Dienst vollständig gestartet ist +sleep 10 + +# Verwendung eines Here-Dokuments, um Befehle an bluetoothctl zu senden +bluetoothctl < / /') + + # Gibt das JSON-Format für Waybar aus + printf '{"text": " %s", "tooltip": "%s"}\n' "$num_updates" "$tooltip" +else + # Gibt nichts aus, damit Waybar das Modul verbirgt + exit 0 +fi diff --git a/config/waybar/vpn-status.sh b/config/waybar/vpn-status.sh new file mode 100755 index 0000000..2f318da --- /dev/null +++ b/config/waybar/vpn-status.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# This script checks for a WireGuard interface. +WG_INTERFACE="wg0" + +if ip link show "$WG_INTERFACE" &> /dev/null; then + # If the interface exists, VPN is on. + printf " VPN On\n" +else + # If not, VPN is off. + printf " VPN Off\n" +fi \ No newline at end of file diff --git a/media/wallpapersden.com_astronaut-with-jellyfish_2560x1440.jpg b/media/wallpapersden.com_astronaut-with-jellyfish_2560x1440.jpg new file mode 100644 index 0000000..a1b8de7 Binary files /dev/null and b/media/wallpapersden.com_astronaut-with-jellyfish_2560x1440.jpg differ diff --git a/sway_config_deploy.yml b/sway_config_deploy.yml index 8f16407..1425f01 100644 --- a/sway_config_deploy.yml +++ b/sway_config_deploy.yml @@ -1,7 +1,7 @@ - name: Deploy Sway Configuration hosts: localhost connection: local - become: true # Run the entire playbook with elevated privileges + become: true vars: target_user: jonnybravo @@ -26,53 +26,127 @@ - playerctl - qalculate-gtk - tmux + - rclone + - pacman-contrib + - udisks2 + - udiskie + - mpd + - ncmpcpp + - ttf-dejavu + - otf-font-awesome + - papirus-icon-theme + - nwg-look 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: Check if yay is installed + ansible.builtin.command: "which yay" + register: yay_check + changed_when: false + ignore_errors: true - - name: Ensure .config subdirectories exist + - name: Install AUR packages with yay + ansible.builtin.command: "yay -S --noconfirm tty-clock catppuccin-gtk-theme-mocha" + when: yay_check.rc == 0 + become: true + become_user: "{{ target_user }}" + + - name: Add user to storage group + ansible.builtin.user: + name: "{{ target_user }}" + groups: storage + append: true + notify: + - Reboot required for group changes + + - name: Create required directories ansible.builtin.file: - path: "/home/{{ target_user }}/.config/{{ item }}" + path: "{{ item }}" state: directory owner: "{{ target_user }}" group: "{{ target_user }}" mode: '0755' loop: - - sway - - waybar - - mako - - wofi - - alacritty - - kanshi + - "/home/{{ target_user }}/.config/sway" + - "/home/{{ target_user }}/.config/sway/scripts" + - "/home/{{ target_user }}/.config/waybar" + - "/home/{{ target_user }}/.config/mako" + - "/home/{{ target_user }}/.config/wofi" + - "/home/{{ target_user }}/.config/alacritty" + - "/home/{{ target_user }}/.config/kanshi" + - "/home/{{ target_user }}/.config/rclone" + - "/home/{{ target_user }}/.config/systemd/user" + - "/home/{{ target_user }}/.config/mpd" + - "/home/{{ target_user }}/.config/ncmpcpp" - - name: Copy all config files + - name: Copy configuration files ansible.builtin.copy: - src: "{{ playbook_dir }}/config/{{ item.path }}" - dest: "/home/{{ target_user }}/.config/{{ item.path }}" + src: "{{ playbook_dir }}/{{ item.src }}" + dest: "/home/{{ target_user }}/{{ item.dest }}" 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' } - - { path: 'kanshi/config' } + - { src: 'config/sway/config', dest: '.config/sway/config' } + - { src: 'config/waybar/config', dest: '.config/waybar/config' } + - { src: 'config/waybar/style.css', dest: '.config/waybar/style.css' } + - { src: 'config/mako/config', dest: '.config/mako/config' } + - { src: 'config/wofi/config', dest: '.config/wofi/config' } + - { src: 'config/alacritty/alacritty.toml', dest: '.config/alacritty/alacritty.toml' } + - { src: 'config/alacritty/alacritty.yml', dest: '.config/alacritty/alacritty.yml' } + - { src: 'config/alacritty/catppuccin-mocha.toml', dest: '.config/alacritty/catppuccin-mocha.toml' } + - { src: 'config/kanshi/config', dest: '.config/kanshi/config' } + - { src: 'config/rclone/rclone.conf', dest: '.config/rclone/rclone.conf' } + - { src: '.tmux.conf', dest: '.tmux.conf' } + - { src: 'config/systemd/user/rclone-sync.service', dest: '.config/systemd/user/rclone-sync.service' } + - { src: 'config/systemd/user/rclone-sync.timer', dest: '.config/systemd/user/rclone-sync.timer' } + - { src: 'config/mpd/mpd.conf', dest: '.config/mpd/mpd.conf' } + - { src: 'config/ncmpcpp', dest: '.config/ncmpcpp' } + - { src: 'config/systemd/user/mpd.service', dest: '.config/systemd/user/mpd.service' } - - name: Copy Tmux config to home directory + - name: Copy background image ansible.builtin.copy: - src: "{{ playbook_dir }}/.tmux.conf" - dest: "/home/{{ target_user }}/.tmux.conf" + src: "{{ playbook_dir }}/media/wallpapersden.com_astronaut-with-jellyfish_2560x1440.jpg" + dest: "/home/{{ target_user }}/Bilder/wallpapersden.com_astronaut-with-jellyfish_2560x1440.jpg" owner: "{{ target_user }}" group: "{{ target_user }}" mode: '0644' + + - name: Copy and make waybar scripts executable + ansible.builtin.copy: + src: "{{ playbook_dir }}/config/waybar/{{ item }}" + dest: "/home/{{ target_user }}/.config/waybar/{{ item }}" + owner: "{{ target_user }}" + group: "{{ target_user }}" + mode: '0755' + loop: + - "updates.sh" + - "vpn-status.sh" + - "rclone-status.sh" + + - name: Copy and make sway scripts executable + ansible.builtin.copy: + src: "{{ playbook_dir }}/config/sway/scripts/auto-bluetooth.sh" + dest: "/home/{{ target_user }}/.config/sway/scripts/auto-bluetooth.sh" + owner: "{{ target_user }}" + group: "{{ target_user }}" + mode: '0755' + + - name: Reload systemd daemon for the target user + ansible.builtin.command: "systemctl --user daemon-reload" + become: true + become_user: "{{ target_user }}" + + - name: Enable and start the rclone timer for the target user + ansible.builtin.command: "systemctl --user enable --now rclone-sync.timer" + become: true + become_user: "{{ target_user }}" + + - name: Enable and start mpd service for the target user + ansible.builtin.command: "systemctl --user enable --now mpd.service" + become: true + become_user: "{{ target_user }}" + + handlers: + - name: Reboot required for group changes + ansible.builtin.debug: + msg: "User '{{ target_user }}' was added to the 'storage' group. A reboot or re-login is required for changes to take effect." \ No newline at end of file