<commit_before>#!/bin/bash
pid=$(ps aux | grep [c]ompton | awk '{print $2}')  # the [c] on the beginning of the program name assures it does not include the own grep pid on the output
if [ -z "$pid" ]
then
    echo 'Compton not running, will run it.';
    compton --config ~/compton.conf &
else
    echo 'Compton running, will kill it!'
    kill $pid
fi    <commit_msg>fix: fixed toggle compositor script to run with picom.<commit_after>#!/bin/bash

LOG_FILE=/tmp/xprofile.$(date +%Y-%m-%d).log

_isRunning() {
	## function to check if a process is alive and running:
	ps -o args= -C "$1" 2>/dev/null | grep -x "$1" >/dev/null 2>&1
	ps aux | grep "$1" 2>/dev/null | grep -v "grep" >/dev/null 2>&1
}

PROCESS_NAME=picom

if ! _isRunning $PROCESS_NAME; then
	notify-send -u critical "Compositor $PROCESS_NAME will be turned ON..."
	picom --config ~/picom.conf --backend glx &
else
	notify-send -u critical "Compositor $PROCESS_NAME will be turned OFF..."
	pkill picom
fi

{'fraction_non_alphanumeric': 0.14241486068111456, 'fraction_numerical': 0.010319917440660475, 'mean_word_length': 3.4292237442922375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6166473', 'n_tokens_mistral': 360, 'n_tokens_neox': 345, 'n_words': 128}