This file contains hidden or 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 | |
# Send notification with album art (if found) when mpd plays a new song, depends on libnotify | |
readonly MUSIC_DIR="${HOME}/Music" | |
while true; do | |
SONG_PATH="$(mpc --format '%file%' current --wait)" | |
if [[ ! -z "$SONG_PATH" ]]; then # check if song is being played | |
SONG_DIR="$(dirname "${SONG_PATH}")" |
This file contains hidden or 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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <pthread.h> | |
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; | |
typedef struct node{ | |
int data; | |
struct node* next; | |
} node; |