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
#!/usr/bin/python3 | |
import dbus | |
bus = dbus.SessionBus() | |
request_iface = 'org.gnome.Mutter.DisplayConfig' | |
DisplayConfig = bus.get_object(request_iface, | |
'/org/gnome/Mutter/DisplayConfig') | |
data = DisplayConfig.GetCurrentState(dbus_interface=request_iface) |
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 | |
busctl --user call org.gnome.Shell \ | |
/org/gnome/Shell \ | |
org.gnome.Shell \ | |
ShowOSD a{sv} 3 \ | |
icon s deadbeef \ | |
label s "$(deadbeef --nowplaying '%a - %t')" \ | |
level d $(deadbeef --nowplaying-tf '0.$num($muldiv(100,$mul(%playback_time_seconds%,1000),$mul(%length_seconds%,1000)),2)') |
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
#!/usr/local/bin/wpexec | |
local argv = ... | |
function getvolandquit(mixer, id) | |
local volume = mixer:call("get-volume", id) | |
print("Volume is set to "..tonumber(string.format("%.3f", volume.volume))) |
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
ignoredisk --only-use=vda,vdb | |
zerombr | |
# System bootloader configuration | |
bootloader --append="crashkernel=auto" --location=mbr --boot-drive=vda | |
bootloader --append="crashkernel=auto" --location=mbr --boot-drive=vdb | |
# Partition clearing information | |
clearpart --all --drives=vda,vdb --disklabel=gpt | |
# Disk partitioning information | |
part biosboot --fstype=biosboot --size=1 --ondisk=vda |
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
#[no_mangle] | |
pub unsafe extern "C" fn libsampleplugin_load(functions: *const DB_functions_t ) -> *mut c_void { | |
// "functions" argument is a pointer to a struct with function pointers for each API function. | |
// Callable like so: | |
let confdir: &CStr = CStr::from_ptr( (*functions).get_config_dir.unwrap()() ); | |
println!("From rust: Deadbeef config dir is {}", confdir.to_str().unwrap()); |
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
/* automatically generated by rust-bindgen 0.58.1 */ | |
#[repr(C)] | |
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] | |
pub struct __BindgenBitfieldUnit<Storage> { | |
storage: Storage, | |
} | |
impl<Storage> __BindgenBitfieldUnit<Storage> { | |
#[inline] | |
pub const fn new(storage: Storage) -> Self { |
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
struct SomeData { | |
name: &'static str, | |
age: i32, | |
} | |
static SOMEDATA: SomeData = SomeData { | |
name: "saivert", | |
age: 37 | |
}; |
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
#![allow(non_upper_case_globals)] | |
#![allow(non_camel_case_types)] | |
#![allow(non_snake_case)] | |
include!(concat!(env!("OUT_DIR"), "/bindings.rs")); |
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
#[repr(C)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct DB_functions_t { | |
pub vmajor: ::std::os::raw::c_int, | |
pub vminor: ::std::os::raw::c_int, | |
pub md5: ::std::option::Option< | |
unsafe extern "C" fn( | |
sig: *mut u8, | |
in_: *const ::std::os::raw::c_char, | |
len: ::std::os::raw::c_int, |
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
# ALSA monitor config file for PipeWire version "0.3.28" # | |
properties = { | |
# Create a JACK device. This is not enabled by default because | |
# it requires that the PipeWire JACK replacement libraries are | |
# not used by the session manager, in order to be able to | |
# connect to the real JACK server. | |
#alsa.jack-device = false | |
# Reserve devices. |