Skip to content

Instantly share code, notes, and snippets.

View hydren's full-sized avatar

Carlos Faruolo hydren

  • Brazil, Rio de Janeiro
View GitHub Profile
@hydren
hydren / sound_pitching_example.cpp
Last active October 5, 2023 15:56
SDL_Mixer chunk pitching
/*
* sound_pitching_example.cpp
*
* Created on: 27 de dez de 2017
* Author: Carlos Faruolo
*/
#include <SDL2/SDL.h>
#include <SDL2/SDL_mixer.h>
#include <iostream>
@hydren
hydren / custom_mix_pitch_func.h
Last active April 26, 2023 08:22
SDL_mixer chunk pitching C example
/*
* custom_mix_pitch_func.h
*
* Created on: 10 de jan de 2018
* Author: carlosfaruolo
*/
// Mix_EffectFunc_t callback that redirects to handler method (handler passed via user_data)
// Processing function to be able to change chunk speed/pitch.
// AUDIO_FORMAT_TYPE depends on the current audio format (queryable via Mix_QuerySpec)
@hydren
hydren / custom_mix_pitch.c
Last active May 13, 2022 12:11
SDL_mixer sound pitching effect on chunks C example (as library)
/*
* custom_mix_pitch.c
*
* Created on: 10 jan 2018
* Author: Carlos Faruolo
*/
#include "custom_mix_pitch.h"
#include <stdio.h>
@hydren
hydren / stitchWPmod.sh
Last active October 27, 2023 00:03
Modified version of Hans Möller's stitchWP.sh to specify different wallpaper image per monitor.
#!/usr/bin/env bash
# 2018 Hans P. Möller <[email protected]>
################################################################################
# This script is a workaround for the lack of support from pcfman-qt
# for differenct wallpaper images for each display environment. pcmanfm-qt handle
# all the monitors as only one big monitor. This script takes the configuration
# from pcfman-qt and replicate it in all the monitors creating a big canvas
# and stitching a different image to it. The steps are
# 1) Takes the pxfman-qt configuration
# 2) Reads information about the images passed as argument to this script.
@hydren
hydren / stitchWPmod-zenity.sh
Created August 26, 2023 23:31
A zenity script to provide a simple dialog to choose wallpapers in conjunction with stitchWPmod.sh script
#!/bin/bash
wpFiles=()
XOUT=$(xrandr | grep -oP '.*(?=\sconnected)')
for LINE in $XOUT; do
FILE=`zenity --file-selection --file-filter=""*.bmp" "*.gif" "*.jpg" "*.jpeg" "*.png" "*.webp"" --title="Select an image for display $LINE"`
case $? in
0)
wpFile="${FILE}"
wpFiles+=("$wpFile");;