This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Magic code to flatten the children of two or more nodelists. | |
// [...sides] converts the two nodelists into two arrays. this is then | |
// mapped to get the children. [...element.children] gets the children of each | |
// side, but in the form of an array. This is done so that there will be n arrays | |
// that is composed of the children, this is then flattened | |
const getChildren = (sides) => [...sides].map((element) => [...element.children]).flat(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$PLAYER_EVENT" = "start" ] || [ "$PLAYER_EVENT" = "change" ]; | |
then | |
trackName=$(playerctl metadata title) | |
artistAndAlbumName=$(playerctl metadata --format "{{ artist }} ({{ album }})") | |
notify-send -u low "$trackName" "$artistAndAlbumName " | |
fi |