Add dmenu
This commit is contained in:
1
main.yml
1
main.yml
@@ -1,6 +1,7 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
connection: local
|
connection: local
|
||||||
roles:
|
roles:
|
||||||
|
- dmenu
|
||||||
- mpv
|
- mpv
|
||||||
- arkenfox
|
- arkenfox
|
||||||
- dwm
|
- dwm
|
||||||
|
1620
roles/dmenu/files/emoji
Normal file
1620
roles/dmenu/files/emoji
Normal file
File diff suppressed because it is too large
Load Diff
16
roles/dmenu/files/scripts/dmenuunicode
Executable file
16
roles/dmenu/files/scripts/dmenuunicode
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get user selection via dmenu from emoji file.
|
||||||
|
chosen=$(cut -d ';' -f1 ~/.local/share/chars/emoji | dmenu -l 30 | sed "s/ .*//")
|
||||||
|
|
||||||
|
# Exit if none chosen.
|
||||||
|
[ -z "$chosen" ] && exit
|
||||||
|
|
||||||
|
# If you run this command with an argument, it will automatically insert the
|
||||||
|
# character. Otherwise, show a message that the emoji has been copied.
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
xdotool type "$chosen"
|
||||||
|
else
|
||||||
|
printf "%s" "$chosen" | xclip -selection clipboard
|
||||||
|
notify-send "'$chosen' copied to clipboard." &
|
||||||
|
fi
|
22
roles/dmenu/tasks/main.yml
Normal file
22
roles/dmenu/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
- name: Clone source code from gitea
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: "https://git.mjwilson.org/mike/{{ role_name }}"
|
||||||
|
dest: "{{ src_dir }}/dwm"
|
||||||
|
|
||||||
|
- name: Run build
|
||||||
|
community.general.make:
|
||||||
|
chdir: "{{ src_dir }}/{{ role_name }}"
|
||||||
|
params:
|
||||||
|
clean:
|
||||||
|
|
||||||
|
- name: Install scripts
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: scripts/
|
||||||
|
dest: "~/.local/bin/"
|
||||||
|
mode: 0774
|
||||||
|
|
||||||
|
- name: Install supplementary files
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: emoji
|
||||||
|
dest: "~/.local/share/chars/emoji"
|
||||||
|
mode: 0664
|
Reference in New Issue
Block a user