Skip to content

Commit

Permalink
[dunst] Fix contact filenames
Browse files Browse the repository at this point in the history
Slugify special characters
  • Loading branch information
MarcelRobitaille committed Apr 6, 2021
1 parent cdd8eb0 commit 84f6cb3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ config:
minversion: 0.29.4
instignore:
- '*/__pycache__/*'
filter_file:
- ./dotdrop_filters.py

actions:
pre:
Expand Down
5 changes: 5 additions & 0 deletions dotdrop_filters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import re


def slufigy(s):
return re.sub(r'[^a-zA-Z\.]', '', s)
6 changes: 3 additions & 3 deletions dunst/dunstrc
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@
{%@@ for contact in contacts.split('\n') @@%}
[{{@@ contact @@}}]
summary="{{@@ contact @@}}"
new_icon="{{@@ contact @@}}"
new_icon="{{@@ contact | slufigy @@}}"
[{{@@ contact @@}}-video-call]
summary="WhatsApp video call from {{@@ contact @@}}"
new_icon="{{@@ contact @@}}"
new_icon="{{@@ contact | slufigy @@}}"
[{{@@ contact @@}}-voice-call]
summary="WhatsApp video call from {{@@ contact @@}}"
new_icon="{{@@ contact @@}}"
new_icon="{{@@ contact | slufigy @@}}"
{%@@ endfor @@%}

0 comments on commit 84f6cb3

Please sign in to comment.