Skip to content

Instantly share code, notes, and snippets.

View clearlysid's full-sized avatar
🎛️
knobs.

Siddharth clearlysid

🎛️
knobs.
View GitHub Profile
@clearlysid
clearlysid / mouse.rs
Last active October 11, 2024 15:05
get mouse cursor type on windows
use windows::Win32::UI::WindowsAndMessaging::{GetCursorInfo, LoadCursorW, CURSORINFO, HCURSOR};
// Different cursor types
use windows::Win32::UI::WindowsAndMessaging::{
IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_IBEAM, IDC_NO, IDC_SIZEALL, IDC_SIZENESW,
IDC_SIZENS, IDC_SIZENWSE, IDC_SIZEWE, IDC_UPARROW, IDC_WAIT,
};
unsafe fn get_cursor_type_from_handle(cursor_handle: HCURSOR) -> &'static str {
let arrow_cursor = LoadCursorW(None, IDC_ARROW);
@clearlysid
clearlysid / obsidian-newton-theme.css
Created September 17, 2023 09:52
Newton: Simple CSS snippet for Obsidian
body {
/* Background colors */
--background-primary: transparent;
--modal-background: rgba(20, 20, 20, 1);
--titlebar-background: transparent;
--titlebar-background-focused: transparent;
--tab-container-background: transparent;
--ribbon-background: transparent;
--background-secondary: transparent;
@clearlysid
clearlysid / obsidian-theme.css
Created March 20, 2023 10:04
Opinionated theme for Obsidian. Tested only on macOS.
body {
--status-bar-background: transparent;
--status-bar-border-width: 0;
--status-bar-text-color: var(--text-faint);
--tab-radius: var(--radius-m);
--tab-radius-active: var(--radius-m);
--checkbox-size: 1.3em;
--ribbon-background: transparent;
--tab-outline-color: transparent;
--titlebar-background: transparent;