diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-02-03 23:29:04 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-02-04 00:09:07 +0100 |
| commit | 61d0ea9cb67c77bbcb587e3deebb40d511894c17 (patch) | |
| tree | 0a27a80204e1bf74616f32720c9823f42d42f571 /roles/tofi | |
| parent | a28abfae412d0f9391264f63df7223fc9107d300 (diff) | |
Add tofi launcher with theming
Diffstat (limited to 'roles/tofi')
| -rw-r--r-- | roles/tofi/files/config | 46 | ||||
| -rw-r--r-- | roles/tofi/meta/argument_specs.yml | 6 | ||||
| -rw-r--r-- | roles/tofi/meta/main.yml | 12 | ||||
| -rw-r--r-- | roles/tofi/tasks/main.yml | 38 |
4 files changed, 102 insertions, 0 deletions
diff --git a/roles/tofi/files/config b/roles/tofi/files/config new file mode 100644 index 00000000..0cc136e7 --- /dev/null +++ b/roles/tofi/files/config @@ -0,0 +1,46 @@ +# Default config for tofi +# +# To use the following line to ~/.config/tofi/config +# include = /etc/xdg/tofi/config +# A complete reference of available options can be found in `man 5 tofi`. +# Ref: https://github.com/philj56/tofi/blob/1eb6137572ab6c257ab6ab851d5d742167c18120/doc/config + +### Fonts +font = "monospace" +font-size = 14 +font-features = "" +font-variations = "" +hint-font = true + +### Text layout +prompt-text = "Run: " +prompt-padding = 0 +placeholder-text = "Application" +num-results = 0 +result-spacing = 14 +horizontal = false +min-input-width = 0 + +### Window positioning +output = "" +anchor = center +exclusive-zone = 0 +margin-top = 0 +margin-bottom = 0 +margin-left = 0 +margin-right = 0 + +### Behaviour +hide-cursor = false +text-cursor = false +history = false +# history-file = /path/to/histfile +matching-algorithm = normal +require-match = true +auto-accept-single = false +hide-input = false +physical-keybindings = false +print-index = false +drun-launch = false +late-keyboard-init = false +multi-instance = true diff --git a/roles/tofi/meta/argument_specs.yml b/roles/tofi/meta/argument_specs.yml new file mode 100644 index 00000000..91cdfcf5 --- /dev/null +++ b/roles/tofi/meta/argument_specs.yml @@ -0,0 +1,6 @@ +--- +argument_specs: + main: + short_description: "Install tofi" + description: "Install tofi" + options: {} diff --git a/roles/tofi/meta/main.yml b/roles/tofi/meta/main.yml new file mode 100644 index 00000000..82a1aa8c --- /dev/null +++ b/roles/tofi/meta/main.yml @@ -0,0 +1,12 @@ +--- +dependencies: + - role: "yay" +galaxy_info: + author: "a14m" + description: "Install tofi" + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" diff --git a/roles/tofi/tasks/main.yml b/roles/tofi/tasks/main.yml new file mode 100644 index 00000000..56b24972 --- /dev/null +++ b/roles/tofi/tasks/main.yml @@ -0,0 +1,38 @@ +--- +- name: "Ensure tofi is installed" + become: true + become_user: "aur_builder" + kewlfft.aur.aur: + name: "tofi" + state: "present" + use: "yay" + +- name: "Create config directories" + become: true + ansible.builtin.file: + path: "{{ item }}" + state: "directory" + mode: "0755" + loop: + - "/etc/xdg/tofi" + - "{{ ansible_facts['env']['HOME'] }}/.config/tofi" + +- name: "Configure system defaults" + become: true + ansible.builtin.copy: + src: "config" + dest: "/etc/xdg/tofi/config" + mode: "0644" + +- name: "Configure user defaults" + ansible.builtin.blockinfile: + path: "{{ ansible_facts['env']['HOME'] }}/.config/tofi/config" + state: "present" + prepend_newline: true + append_newline: true + marker: "# ==== {mark} ANSIBLE TOFI CONFIG" + block: | + # System defaults + include = /etc/xdg/tofi/config + # Load Theme + include = ../hyprtheme/current/tofi.config |
