Skip to content

Instantly share code, notes, and snippets.

View duckcantcode's full-sized avatar

duck duckcantcode

  • hire me
View GitHub Profile
@duckcantcode
duckcantcode / README.md
Created October 28, 2023 02:22
omp-theme

My first nushell script to apply and list oh-my-posh themes! Made in my first day with nushell.

@duckcantcode
duckcantcode / windows_monitor_names.rs
Created October 28, 2024 01:30
Get all friendly monitor names (model number, brand) in Rust
use windows::Win32::Devices::Display::DISPLAYCONFIG_PATH_INFO;
use windows::Win32::{
Devices::Display::{
DisplayConfigGetDeviceInfo, GetDisplayConfigBufferSizes, QueryDisplayConfig,
DISPLAYCONFIG_ADAPTER_NAME, DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME,
DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME, DISPLAYCONFIG_MODE_INFO,
DISPLAYCONFIG_TARGET_DEVICE_NAME, QDC_ONLY_ACTIVE_PATHS,
QDC_VIRTUAL_MODE_AWARE,
},
Foundation::{ERROR_INSUFFICIENT_BUFFER, ERROR_SUCCESS, WIN32_ERROR},