diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-01-25 22:04:02 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-01-25 22:04:02 +0100 |
| commit | 8cf32ee8b4b8d28ec9ab1b75c476291a4e7c555d (patch) | |
| tree | c20d2bd35313c7d6223b8e3aab11cf3082d7e558 | |
| parent | 9485de7945672b2ab833add32dba1530147d3973 (diff) | |
Add the role to install elephant (walker dep)
| -rw-r--r-- | roles/elephant/defaults/main.yml | 16 | ||||
| -rw-r--r-- | roles/elephant/files/elephant.service | 11 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/archlinuxpkgs.toml | 2 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/calc.toml | 2 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/clipboard.toml | 2 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/desktopapplications.toml | 17 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/elephant.toml | 4 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/files.toml | 7 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/providerlist.toml | 2 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/runner.toml | 3 | ||||
| -rw-r--r-- | roles/elephant/files/elephant/windows.toml | 2 | ||||
| -rw-r--r-- | roles/elephant/handlers/main.yml | 12 | ||||
| -rw-r--r-- | roles/elephant/meta/argument_specs.yml | 6 | ||||
| -rw-r--r-- | roles/elephant/meta/main.yml | 13 | ||||
| -rw-r--r-- | roles/elephant/tasks/main.yml | 38 |
15 files changed, 137 insertions, 0 deletions
diff --git a/roles/elephant/defaults/main.yml b/roles/elephant/defaults/main.yml new file mode 100644 index 00000000..bcdf359e --- /dev/null +++ b/roles/elephant/defaults/main.yml @@ -0,0 +1,16 @@ +--- +elephant_packages: + - "elephant-bin" + # - "elephant-archlinuxpkgs-bin" + - "elephant-calc-bin" + - "elephant-clipboard-bin" + - "elephant-desktopapplications-bin" + # - "elephant-files-bin" + # - "elephant-menus" + - "elephant-providerlist-bin" + # - "elephant-runner-bin" + - "elephant-symbols-bin" + # - "elephant-todo-bin" + - "elephant-unicode-bin" + - "elephant-websearch-bin" + - "elephant-windows-bin" diff --git a/roles/elephant/files/elephant.service b/roles/elephant/files/elephant.service new file mode 100644 index 00000000..3a5bc384 --- /dev/null +++ b/roles/elephant/files/elephant.service @@ -0,0 +1,11 @@ +[Unit] +Description=Elephant +After=graphical-session.target + +[Service] +Type=simple +ExecStart=elephant --config /etc/xdg/elephant +Restart=on-failure + +[Install] +WantedBy=graphical-session.target diff --git a/roles/elephant/files/elephant/archlinuxpkgs.toml b/roles/elephant/files/elephant/archlinuxpkgs.toml new file mode 100644 index 00000000..7c6395ee --- /dev/null +++ b/roles/elephant/files/elephant/archlinuxpkgs.toml @@ -0,0 +1,2 @@ +hide_from_providerlist = false +auto_wrap_with_terminal = true diff --git a/roles/elephant/files/elephant/calc.toml b/roles/elephant/files/elephant/calc.toml new file mode 100644 index 00000000..660a8992 --- /dev/null +++ b/roles/elephant/files/elephant/calc.toml @@ -0,0 +1,2 @@ +async = false +autosave = false diff --git a/roles/elephant/files/elephant/clipboard.toml b/roles/elephant/files/elephant/clipboard.toml new file mode 100644 index 00000000..911c255f --- /dev/null +++ b/roles/elephant/files/elephant/clipboard.toml @@ -0,0 +1,2 @@ +ignore_symbols = true +auto_cleanup = 0 diff --git a/roles/elephant/files/elephant/desktopapplications.toml b/roles/elephant/files/elephant/desktopapplications.toml new file mode 100644 index 00000000..52cfa819 --- /dev/null +++ b/roles/elephant/files/elephant/desktopapplications.toml @@ -0,0 +1,17 @@ +launch_prefix = "uwsm-app --" +show_actions = false +show_generic = false +show_actions_without_query = false +history = false +history_when_empty = false +only_search_title = true +blacklist = [ + "avahi-*", + "bssh", # Avahi SSH Browser + "bvnc", # Avahi VNC Browser + "gscriptor", # GScriptor + "qv4l", # Qt V4L2 Test Utility + "qvidcap", # Qt V4L2 Vidio Test Utility + "uuctl", + "xgps*" # gpsd is required by waybar +] diff --git a/roles/elephant/files/elephant/elephant.toml b/roles/elephant/files/elephant/elephant.toml new file mode 100644 index 00000000..ed2093c7 --- /dev/null +++ b/roles/elephant/files/elephant/elephant.toml @@ -0,0 +1,4 @@ +auto_detect_launch_prefix = true +overload_local_env = false +ignored_providers = [] +git_on_demand = true diff --git a/roles/elephant/files/elephant/files.toml b/roles/elephant/files/elephant/files.toml new file mode 100644 index 00000000..edf477bc --- /dev/null +++ b/roles/elephant/files/elephant/files.toml @@ -0,0 +1,7 @@ +hide_from_providerlist = false +ignored_dirs = ["/"] +# ignore_previews = { "/"= "root preview not available" } +# ignore_watching = ["/"] +search_dirs = [] +watch_dirs = [] +watch = false diff --git a/roles/elephant/files/elephant/providerlist.toml b/roles/elephant/files/elephant/providerlist.toml new file mode 100644 index 00000000..d654dc23 --- /dev/null +++ b/roles/elephant/files/elephant/providerlist.toml @@ -0,0 +1,2 @@ +hide_from_providerlist = true +hidden = ["archlinuxpkgs", "files"] diff --git a/roles/elephant/files/elephant/runner.toml b/roles/elephant/files/elephant/runner.toml new file mode 100644 index 00000000..5cbb11fe --- /dev/null +++ b/roles/elephant/files/elephant/runner.toml @@ -0,0 +1,3 @@ +hide_from_providerlist = false +history = true +history_when_empty = false diff --git a/roles/elephant/files/elephant/windows.toml b/roles/elephant/files/elephant/windows.toml new file mode 100644 index 00000000..1feeadab --- /dev/null +++ b/roles/elephant/files/elephant/windows.toml @@ -0,0 +1,2 @@ +hide_from_providerlist = false +delay = 100 diff --git a/roles/elephant/handlers/main.yml b/roles/elephant/handlers/main.yml new file mode 100644 index 00000000..ad6dcb45 --- /dev/null +++ b/roles/elephant/handlers/main.yml @@ -0,0 +1,12 @@ +--- +- name: "Reload systemd" + ansible.builtin.systemd_service: + scope: "user" + daemon_reload: true + +- name: "Restart elephant" + ansible.builtin.systemd_service: + name: "elephant" + enabled: true + state: "restarted" + scope: "user" diff --git a/roles/elephant/meta/argument_specs.yml b/roles/elephant/meta/argument_specs.yml new file mode 100644 index 00000000..403b4029 --- /dev/null +++ b/roles/elephant/meta/argument_specs.yml @@ -0,0 +1,6 @@ +--- +argument_specs: + main: + short_description: "Install elephant on ArchLinux" + description: "Install elephant on ArchLinux" + options: {} diff --git a/roles/elephant/meta/main.yml b/roles/elephant/meta/main.yml new file mode 100644 index 00000000..f1cd068c --- /dev/null +++ b/roles/elephant/meta/main.yml @@ -0,0 +1,13 @@ +--- +dependencies: + - role: "yay" + - role: "systemd" +galaxy_info: + author: "a14m" + description: "Install elephant on ArchLinux" + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" diff --git a/roles/elephant/tasks/main.yml b/roles/elephant/tasks/main.yml new file mode 100644 index 00000000..a25f92fe --- /dev/null +++ b/roles/elephant/tasks/main.yml @@ -0,0 +1,38 @@ +--- +- name: "Ensure elephant (and providers) are installed" + become: true + become_user: "aur_builder" + kewlfft.aur.aur: + name: "{{ item }}" + state: "present" + use: "yay" + loop: "{{ elephant_packages }}" + +- name: "Create systemd user service" + become: true + ansible.builtin.copy: + src: "elephant.service" + dest: "/usr/lib/systemd/user/elephant.service" + mode: "0644" + notify: + - "Reload systemd" + - "Restart elephant" + +- name: "Configure elephant defaults" + become: true + ansible.builtin.copy: + src: "elephant/{{ item }}" + dest: "/etc/xdg/elephant/{{ item }}" + mode: "0644" + loop: + - "elephant.toml" + - "archlinuxpkgs.toml" + - "calc.toml" + - "clipboard.toml" + - "desktopapplications.toml" + - "files.toml" + - "providerlist.toml" + - "runner.toml" + - "windows.toml" + notify: + - "Restart elephant" |
