Skip to content

Instantly share code, notes, and snippets.

@dharmx
dharmx / desktop.py
Created August 18, 2023 12:11
A python script for making a dock in Eww.
View desktop.py
#!/usr/bin/env python
import json
from pathlib import Path
from sys import stdout
from typing import Any, Callable, Dict, List
import gi
gi.require_version("Gtk", "3.0")
@dharmx
dharmx / eww.yuck
Last active July 25, 2023 08:11
Handle keys only when EWW window is open.
View eww.yuck
(defwindow window :windowtype "normal" :wm-ignore true
:geometry (geometry :anchor "center" :y 100 :width "10%" :height "10%")
(key))
(deflisten log "./key.sh")
(defwidget key[] "This prints nohing. '${log}'")
;; vim:filetype=yuck
@dharmx
dharmx / THEMES.md
Last active December 26, 2022 14:49
An exhaustive list of colorschemes.
View THEMES.md

LIST OF COLORSCHEMES

This is a generated themes list so, errors or, typos may exist. They are highly unlikely that they will be fixed. It is recommended to visit the source if you want ful clarity.

Themes are fetched from nvim-colo.

The 3024 Dark theme

@dharmx
dharmx / feline.lua
Last active September 9, 2023 08:03
Minimal feline configuration.
View feline.lua
local present, feline = pcall(require, "feline")
if not present then return end
local theme = {
aqua = "#7AB0DF",
bg = "#1C212A",
blue = "#5FB0FC",
cyan = "#70C0BA",
darkred = "#FB7373",
fg = "#C7C7CA",
@dharmx
dharmx / xkb.c
Last active September 27, 2022 19:18
xkb indicator logger
View xkb.c
/* compile command: cc -O3 --std=c11 -pedantic -Wall xkb.c -o xkb -lX11 -lXi */
/* Headers and Defines {{{*/
#include <X11/XKBlib.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#define HELP_MESSAGE \
View eww.scss
* { all: unset; }
label {
font-family: Phosphor, Dosis;
font-size: 4em;
}
@dharmx
dharmx / node.c
Created September 21, 2022 12:11
A node of a BST
View node.c
#include <stdio.h>
typedef struct node_t node_t;
struct node_t {
int data;
node_t* left;
node_t* right;
};
int
@dharmx
dharmx / eww.scss
Created September 16, 2022 21:42
EWW GTK3 Calendar.
View eww.scss
* { all: unset; }
tooltip {
font-size: 2em;
background-color: #7BB0DF;
color: #24292E;
}
calendar {
background: #0C0F12;
@dharmx
dharmx / .zshrc
Created June 23, 2022 18:23
Monolithic .zshrc file that uses zplug.
View .zshrc
ZDOTDIR="$HOME"
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
# Colors
# black
foreground='#d4d4d5'
background='#101317'
color0='#171c21'
@dharmx
dharmx / eww.scss
Last active May 22, 2022 17:07
EWW box image example.
View eww.scss
box box {
background-image: url("https://runt-of-the-web.com/wordpress/wp-content/uploads/2013/05/shibe-meme-blazed.jpg");
border-radius: 20%;
color: red;
font-size: 30;
font-weight: bolder;
background-repeat: no-repeat;
}
// vim:ft=scss