Merge branch 'master' into dependabot/github_actions/DeterminateSystems/magic-nix-cache-action-8

This commit is contained in:
Sako 2024-10-21 11:17:55 +04:00 committed by GitHub
commit 86fed9ef3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
85 changed files with 2740 additions and 12679 deletions

View file

@ -14,9 +14,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v13
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- uses: DeterminateSystems/update-flake-lock@v23
- uses: DeterminateSystems/update-flake-lock@v24
with:
pr-title: "chore: update flake.lock"
# Labels to be set on the PR

View file

@ -1,8 +0,0 @@
keys:
- &host_sakotop age1nhj5fz9cakgd6rrkwpjkndra6fd4rqxgfvcrap5g0anwxgmh4yqspvf22y
creation_rules:
- path_regex: hosts/sakotop/secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
- age:
- *host_sakotop

View file

View file

@ -1,3 +1,4 @@
# My Dotfiles!
[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)
@ -5,14 +6,3 @@
TODO:: Make this better lmfao
TODO::TODO:: Get markdown preview for emacs silly!
## Credits
[Misterio77/nix-starter-configs2](https://github.com/Misterio77/nix-starter-configs)
[pull request for a bug](https://github.com/Misterio77/nix-starter-configs/pull/34/commits/2a5f3ca3dde606b83ea30b5507347bf989819301)<br></br>
[doom emacs guy -> hlissner/dotfiles](https://github.com/hlissner/dotfiles)<br></br>
^ reason i found out about nixos <br></br>
[nixos.wiki (unofficial)](https://nixos.wiki/)
[colemickens/nixcfg](https://github.com/colemickens/nixcfg)
[NotAShelf](https://github.com/NotAShelf) - config really helps, also helped me setup nix for a couple of things
[Fsnkty](https://github.com/fsnkty)

View file

@ -15,20 +15,53 @@ const date = Variable("", {
// so to make a reuseable widget, make it a function
// then you can simply instantiate one by calling it
function Workspaces() {
const activeId = hyprland.active.workspace.bind("id")
const workspaces = hyprland.bind("workspaces")
.as(ws => ws.map(({ id }) => Widget.Button({
on_clicked: () => hyprland.messageAsync(`dispatch workspace ${id}`),
child: Widget.Label(`${id}`),
class_name: activeId.as(i => `${i === id ? "focused" : ""}`),
})))
// function Workspaces() {
// const activeId = hyprland.active.workspace.bind("id")
// const workspaces = hyprland.bind("workspaces")
// .as(ws => ws.map(({ id }) => Widget.Button({
// on_clicked: () => hyprland.messageAsync(`dispatch workspace ${id}`),
// child: Widget.Label(`${id}`),
// class_name: activeId.as(i => `${i === id ? "focused" : ""}`),
// })))
return Widget.Box({
class_name: "workspaces",
children: workspaces,
})
}
// return Widget.Box({
// class_name: "workspaces",
// children: workspaces,
// })
// }
const dispatch = ws => hyprland.sendMessage(`dispatch workspace ${ws}`);
export const Workspaces = () => Widget.EventBox({
child: Widget.Box({
children: Array.from({ length: 10 }, (_, i) => i + 1).map(i => Widget.Button({
class_name: "workspace-buttons",
attribute: i,
// Keeps button from expanding to fit its container
onClicked: () => dispatch(i),
child: Widget.Box({
class_name: "workspace-indicator",
// vpack: "start",
vpack: "center",
hpack: "center",
children: [
Widget.Label({
label: `${i}`,
justification: "center",
})
],
setup: self => self.hook(hyprland, () => {
// The "?" is used here to return "undefined" if the workspace doesn't exist
self.toggleClassName('workspace-inactive', (hyprland.getWorkspace(i)?.windows || 0) === 0);
self.toggleClassName('workspace-occupied', (hyprland.getWorkspace(i)?.windows || 0) > 0);
self.toggleClassName('workspace-active', hyprland.active.workspace.id === i);
// self.toggleClassName('workspace-large', (hyprland.getWorkspace(i)?.windows || 0) > 1);
}),
}),
})),
}),
});
function ClientTitle() {
@ -128,22 +161,38 @@ function Volume() {
function BatteryLabel() {
const value = battery.bind("percent").as(p => p > 0 ? p / 100 : 0)
const icon = battery.bind("percent").as(p =>
`battery-level-${Math.floor(p / 10) * 10}-symbolic`)
const icons = {
80: "full",
50: "good",
30: "low",
10: "empty",
};
const value = battery.bind("percent").as(p => p > 0 ? p / 100 : 0);
// const icon = battery.bind("percent").as(p =>
// `battery-level-${Math.floor(p / 10) * 10}-symbolic`)
const percent = battery.bind("percent").as(x => x.toString()) + "%"
const percent = battery.bind("percent").as(x => x.toString()) + "%";
function getIcon() {
const icon = [80, 50, 30, 10].find(threshold => threshold <= battery.percent);
return `battery-${icons[icon]}-symbolic`;
}
const icon = Widget.Icon({
icon: Utils.watch(getIcon(), battery, getIcon),
});
return Widget.Box({
class_name: "battery",
visible: battery.bind("available"),
children: [
Widget.Icon({ icon }),
icon,
Widget.Label({
label: battery.bind('percent').as(x => x.toString()),
})
],
})
});
}
@ -168,7 +217,7 @@ function Left() {
spacing: 8,
children: [
Workspaces(),
ClientTitle(),
// ClientTitle(),
],
})
}
@ -201,8 +250,8 @@ function Bar(monitor = 0) {
name: `bar-${monitor}`, // name has to be unique
class_name: "bar",
monitor,
anchor: ["top", "left", "right"],
margins: [5, 10, 0, 10],
anchor: ["bottom", "left", "right"],
margins: [0, 10, 0, 10],
exclusivity: "exclusive",
child: Widget.CenterBox({
start_widget: Left(),

View file

@ -3,43 +3,69 @@
}
window.bar {
background-color: @theme_bg_color;
/* background-color: @theme_bg_color; */
background: rgba(0, 0, 0, .1);
color: @theme_fg_color;
min-height: 10rem;
border: 2px solid #ea4c88;
border-bottom: none;
border-radius: 6px 6px 0px 0px;
}
button {
min-width: 0;
padding-top: 0;
padding-bottom: 0;
border: none;
/* padding-top: 0;
padding-bottom: 0; */
background-color: transparent;
border-bottom: 3px solid transparent;
padding: 5px;
padding-left: 10px;
padding-right: 10px;
border: none;
background: none;
}
button:active {
background-color: @theme_selected_bg_color;
background-color: #ea4c88;
}
button:hover {
border-bottom: 3px solid @theme_fg_color;
/* border-bottom: 1px solid @theme_fg_color; */
}
label {
font-weight: bold;
}
.workspaces button.focused {
border-bottom: 3px solid @theme_selected_bg_color;
}
.client-title {
color: @theme_selected_bg_color;
color: #ea4c88;
}
.notification {
color: yellow;
}
.workspace-indicator {
min-width: 0;
padding-top: 0;
padding-bottom: 0;
margin: 0;
background-color: transparent;
padding-bottom: 2px;
}
.workspace-inactive {
opacity: 0.5;
}
.workspace-occupied {
opacity: 1;
}
.workspace-active {
border-bottom: 2px solid #ea4c88;
padding-bottom: 0;
}
levelbar block,
highlight {
min-height: 10px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 69 KiB

BIN
config/background5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View file

@ -1,38 +0,0 @@
MIT/X Consortium License
© 2006-2019 Anselm R Garbe <anselm@garbe.ca>
© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
© 2007-2011 Peter Hartlich <sgkkr at hartlich dot com>
© 2007-2009 Szabolcs Nagy <nszabolcs at gmail dot com>
© 2007-2009 Christof Musik <christof at sendfax dot de>
© 2007-2009 Premysl Hruby <dfenze at gmail dot com>
© 2007-2008 Enno Gottox Boland <gottox at s01 dot de>
© 2008 Martin Hurton <martin dot hurton at gmail dot com>
© 2008 Neale Pickett <neale dot woozle dot org>
© 2009 Mate Nagy <mnagy at port70 dot net>
© 2010-2016 Hiltjo Posthuma <hiltjo@codemadness.org>
© 2010-2012 Connor Lane Smith <cls@lubutu.com>
© 2011 Christoph Lohmann <20h@r-36.net>
© 2015-2016 Quentin Rameau <quinq@fifth.space>
© 2015-2016 Eric Pruitt <eric.pruitt@gmail.com>
© 2016-2017 Markus Teich <markus.teich@stusta.mhn.de>
© 2020-2022 Chris Down <chris@chrisdown.name>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View file

@ -1,51 +0,0 @@
# dwm - dynamic window manager
# See LICENSE file for copyright and license details.
include config.mk
SRC = drw.c dwm.c util.c
OBJ = ${SRC:.c=.o}
all: options dwm
options:
@echo dwm build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
.c.o:
${CC} -c ${CFLAGS} $<
${OBJ}: config.h config.mk
config.h:
cp config.def.h $@
dwm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
dist: clean
mkdir -p dwm-${VERSION}
cp -R LICENSE Makefile README config.def.h config.mk\
dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
tar -cf dwm-${VERSION}.tar dwm-${VERSION}
gzip dwm-${VERSION}.tar
rm -rf dwm-${VERSION}
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f dwm ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
mkdir -p ${DESTDIR}${MANPREFIX}/man1
sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/dwm\
${DESTDIR}${MANPREFIX}/man1/dwm.1
.PHONY: all options clean dist install uninstall

View file

@ -1,48 +0,0 @@
dwm - dynamic window manager
============================
dwm is an extremely fast, small, and dynamic window manager for X.
Requirements
------------
In order to build dwm you need the Xlib header files.
Installation
------------
Edit config.mk to match your local setup (dwm is installed into
the /usr/local namespace by default).
Afterwards enter the following command to build and install dwm (if
necessary as root):
make clean install
Running dwm
-----------
Add the following line to your .xinitrc to start dwm using startx:
exec dwm
In order to connect dwm to a specific display, make sure that
the DISPLAY environment variable is set correctly, e.g.:
DISPLAY=foo.bar:1 exec dwm
(This will start dwm on display :1 of the host foo.bar.)
In order to display status info in the bar, you can do something
like this in your .xinitrc:
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
do
sleep 1
done &
exec dwm
Configuration
-------------
The configuration of dwm is done by creating a custom config.h
and (re)compiling the source code.

View file

@ -1,131 +0,0 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "JetBrainsMono NF:size=10" };
static const char dmenufont[] = "monospace:size=10";
// default colors
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#005577";
// default colors
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
};
static const char *const autostart[] = {
"picom", NULL,
"keepassxc", NULL,
"nm-applet", NULL,
"blueman-applet", NULL,
NULL /* terminate */
};
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *roficmd[] = { "rofi", "-show-icons", "-show", "drun", NULL };
static const char *termcmd[] = { "kitty", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_space, spawn, {.v = roficmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_w, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_p, setlayout, {0} },
{ MODKEY|ShiftMask, XK_p, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static const Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};

View file

@ -1,123 +0,0 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "JetBrainsMono NF:size=10" };
static const char dmenufont[] = "monospace:size=10";
// default colors
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#005577";
// default colors
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
};
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *roficmd[] = { "rofi", "-show-icons", "-show", "drun", NULL };
static const char *termcmd[] = { "kitty", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_space, spawn, {.v = roficmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_p, setlayout, {0} },
{ MODKEY|ShiftMask, XK_p, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static const Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};

View file

@ -1,39 +0,0 @@
# dwm version
VERSION = 6.4
# Customize below to fit your system
# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# Xinerama, comment if you don't want it
XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA
# freetype
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/include/freetype2
# OpenBSD (uncomment)
#FREETYPEINC = ${X11INC}/freetype2
#MANPREFIX = ${PREFIX}/man
# includes and libs
INCS = -I${X11INC} -I${FREETYPEINC}
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
# flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}
# compiler and linker
CC = cc

View file

@ -1,450 +0,0 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>
#include "drw.h"
#include "util.h"
#define UTF_INVALID 0xFFFD
#define UTF_SIZ 4
static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
static const long utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
static long
utf8decodebyte(const char c, size_t *i)
{
for (*i = 0; *i < (UTF_SIZ + 1); ++(*i))
if (((unsigned char)c & utfmask[*i]) == utfbyte[*i])
return (unsigned char)c & ~utfmask[*i];
return 0;
}
static size_t
utf8validate(long *u, size_t i)
{
if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
*u = UTF_INVALID;
for (i = 1; *u > utfmax[i]; ++i)
;
return i;
}
static size_t
utf8decode(const char *c, long *u, size_t clen)
{
size_t i, j, len, type;
long udecoded;
*u = UTF_INVALID;
if (!clen)
return 0;
udecoded = utf8decodebyte(c[0], &len);
if (!BETWEEN(len, 1, UTF_SIZ))
return 1;
for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
if (type)
return j;
}
if (j < len)
return 0;
*u = udecoded;
utf8validate(u, len);
return len;
}
Drw *
drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
{
Drw *drw = ecalloc(1, sizeof(Drw));
drw->dpy = dpy;
drw->screen = screen;
drw->root = root;
drw->w = w;
drw->h = h;
drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
drw->gc = XCreateGC(dpy, root, 0, NULL);
XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
return drw;
}
void
drw_resize(Drw *drw, unsigned int w, unsigned int h)
{
if (!drw)
return;
drw->w = w;
drw->h = h;
if (drw->drawable)
XFreePixmap(drw->dpy, drw->drawable);
drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
}
void
drw_free(Drw *drw)
{
XFreePixmap(drw->dpy, drw->drawable);
XFreeGC(drw->dpy, drw->gc);
drw_fontset_free(drw->fonts);
free(drw);
}
/* This function is an implementation detail. Library users should use
* drw_fontset_create instead.
*/
static Fnt *
xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
{
Fnt *font;
XftFont *xfont = NULL;
FcPattern *pattern = NULL;
if (fontname) {
/* Using the pattern found at font->xfont->pattern does not yield the
* same substitution results as using the pattern returned by
* FcNameParse; using the latter results in the desired fallback
* behaviour whereas the former just results in missing-character
* rectangles being drawn, at least with some fonts. */
if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
return NULL;
}
if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
XftFontClose(drw->dpy, xfont);
return NULL;
}
} else if (fontpattern) {
if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
fprintf(stderr, "error, cannot load font from pattern.\n");
return NULL;
}
} else {
die("no font specified.");
}
font = ecalloc(1, sizeof(Fnt));
font->xfont = xfont;
font->pattern = pattern;
font->h = xfont->ascent + xfont->descent;
font->dpy = drw->dpy;
return font;
}
static void
xfont_free(Fnt *font)
{
if (!font)
return;
if (font->pattern)
FcPatternDestroy(font->pattern);
XftFontClose(font->dpy, font->xfont);
free(font);
}
Fnt*
drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount)
{
Fnt *cur, *ret = NULL;
size_t i;
if (!drw || !fonts)
return NULL;
for (i = 1; i <= fontcount; i++) {
if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
cur->next = ret;
ret = cur;
}
}
return (drw->fonts = ret);
}
void
drw_fontset_free(Fnt *font)
{
if (font) {
drw_fontset_free(font->next);
xfont_free(font);
}
}
void
drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
{
if (!drw || !dest || !clrname)
return;
if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
DefaultColormap(drw->dpy, drw->screen),
clrname, dest))
die("error, cannot allocate color '%s'", clrname);
}
/* Wrapper to create color schemes. The caller has to call free(3) on the
* returned color scheme when done using it. */
Clr *
drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
{
size_t i;
Clr *ret;
/* need at least two colors for a scheme */
if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
return NULL;
for (i = 0; i < clrcount; i++)
drw_clr_create(drw, &ret[i], clrnames[i]);
return ret;
}
void
drw_setfontset(Drw *drw, Fnt *set)
{
if (drw)
drw->fonts = set;
}
void
drw_setscheme(Drw *drw, Clr *scm)
{
if (drw)
drw->scheme = scm;
}
void
drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
{
if (!drw || !drw->scheme)
return;
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
if (filled)
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
else
XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
}
int
drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert)
{
int i, ty, ellipsis_x = 0;
unsigned int tmpw, ew, ellipsis_w = 0, ellipsis_len;
XftDraw *d = NULL;
Fnt *usedfont, *curfont, *nextfont;
int utf8strlen, utf8charlen, render = x || y || w || h;
long utf8codepoint = 0;
const char *utf8str;
FcCharSet *fccharset;
FcPattern *fcpattern;
FcPattern *match;
XftResult result;
int charexists = 0, overflow = 0;
/* keep track of a couple codepoints for which we have no match. */
enum { nomatches_len = 64 };
static struct { long codepoint[nomatches_len]; unsigned int idx; } nomatches;
static unsigned int ellipsis_width = 0;
if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts)
return 0;
if (!render) {
w = invert ? invert : ~invert;
} else {
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
d = XftDrawCreate(drw->dpy, drw->drawable,
DefaultVisual(drw->dpy, drw->screen),
DefaultColormap(drw->dpy, drw->screen));
x += lpad;
w -= lpad;
}
usedfont = drw->fonts;
if (!ellipsis_width && render)
ellipsis_width = drw_fontset_getwidth(drw, "...");
while (1) {
ew = ellipsis_len = utf8strlen = 0;
utf8str = text;
nextfont = NULL;
while (*text) {
utf8charlen = utf8decode(text, &utf8codepoint, UTF_SIZ);
for (curfont = drw->fonts; curfont; curfont = curfont->next) {
charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
if (charexists) {
drw_font_getexts(curfont, text, utf8charlen, &tmpw, NULL);
if (ew + ellipsis_width <= w) {
/* keep track where the ellipsis still fits */
ellipsis_x = x + ew;
ellipsis_w = w - ew;
ellipsis_len = utf8strlen;
}
if (ew + tmpw > w) {
overflow = 1;
/* called from drw_fontset_getwidth_clamp():
* it wants the width AFTER the overflow
*/
if (!render)
x += tmpw;
else
utf8strlen = ellipsis_len;
} else if (curfont == usedfont) {
utf8strlen += utf8charlen;
text += utf8charlen;
ew += tmpw;
} else {
nextfont = curfont;
}
break;
}
}
if (overflow || !charexists || nextfont)
break;
else
charexists = 0;
}
if (utf8strlen) {
if (render) {
ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
usedfont->xfont, x, ty, (XftChar8 *)utf8str, utf8strlen);
}
x += ew;
w -= ew;
}
if (render && overflow)
drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
if (!*text || overflow) {
break;
} else if (nextfont) {
charexists = 0;
usedfont = nextfont;
} else {
/* Regardless of whether or not a fallback font is found, the
* character must be drawn. */
charexists = 1;
for (i = 0; i < nomatches_len; ++i) {
/* avoid calling XftFontMatch if we know we won't find a match */
if (utf8codepoint == nomatches.codepoint[i])
goto no_match;
}
fccharset = FcCharSetCreate();
FcCharSetAddChar(fccharset, utf8codepoint);
if (!drw->fonts->pattern) {
/* Refer to the comment in xfont_create for more information. */
die("the first font in the cache must be loaded from a font string.");
}
fcpattern = FcPatternDuplicate(drw->fonts->pattern);
FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
FcDefaultSubstitute(fcpattern);
match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
FcCharSetDestroy(fccharset);
FcPatternDestroy(fcpattern);
if (match) {
usedfont = xfont_create(drw, NULL, match);
if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
; /* NOP */
curfont->next = usedfont;
} else {
xfont_free(usedfont);
nomatches.codepoint[++nomatches.idx % nomatches_len] = utf8codepoint;
no_match:
usedfont = drw->fonts;
}
}
}
}
if (d)
XftDrawDestroy(d);
return x + (render ? w : 0);
}
void
drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h)
{
if (!drw)
return;
XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
XSync(drw->dpy, False);
}
unsigned int
drw_fontset_getwidth(Drw *drw, const char *text)
{
if (!drw || !drw->fonts || !text)
return 0;
return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
}
unsigned int
drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n)
{
unsigned int tmp = 0;
if (drw && drw->fonts && text && n)
tmp = drw_text(drw, 0, 0, 0, 0, 0, text, n);
return MIN(n, tmp);
}
void
drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h)
{
XGlyphInfo ext;
if (!font || !text)
return;
XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
if (w)
*w = ext.xOff;
if (h)
*h = font->h;
}
Cur *
drw_cur_create(Drw *drw, int shape)
{
Cur *cur;
if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
return NULL;
cur->cursor = XCreateFontCursor(drw->dpy, shape);
return cur;
}
void
drw_cur_free(Drw *drw, Cur *cursor)
{
if (!cursor)
return;
XFreeCursor(drw->dpy, cursor->cursor);
free(cursor);
}

View file

@ -1,58 +0,0 @@
/* See LICENSE file for copyright and license details. */
typedef struct {
Cursor cursor;
} Cur;
typedef struct Fnt {
Display *dpy;
unsigned int h;
XftFont *xfont;
FcPattern *pattern;
struct Fnt *next;
} Fnt;
enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */
typedef XftColor Clr;
typedef struct {
unsigned int w, h;
Display *dpy;
int screen;
Window root;
Drawable drawable;
GC gc;
Clr *scheme;
Fnt *fonts;
} Drw;
/* Drawable abstraction */
Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
void drw_resize(Drw *drw, unsigned int w, unsigned int h);
void drw_free(Drw *drw);
/* Fnt abstraction */
Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount);
void drw_fontset_free(Fnt* set);
unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
/* Colorscheme abstraction */
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
/* Cursor abstraction */
Cur *drw_cur_create(Drw *drw, int shape);
void drw_cur_free(Drw *drw, Cur *cursor);
/* Drawing context manipulation */
void drw_setfontset(Drw *drw, Fnt *set);
void drw_setscheme(Drw *drw, Clr *scm);
/* Drawing functions */
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert);
int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert);
/* Map functions */
void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);

View file

@ -1,176 +0,0 @@
.TH DWM 1 dwm\-VERSION
.SH NAME
dwm \- dynamic window manager
.SH SYNOPSIS
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
dwm is a dynamic window manager for X. It manages windows in tiled, monocle
and floating layouts. Either layout can be applied dynamically, optimising the
environment for the application in use and the task performed.
.P
In tiled layouts windows are managed in a master and stacking area. The master
area on the left contains one window by default, and the stacking area on the
right contains all other windows. The number of master area windows can be
adjusted from zero to an arbitrary number. In monocle layout all windows are
maximised to the screen size. In floating layout windows can be resized and
moved freely. Dialog windows are always managed floating, regardless of the
layout applied.
.P
Windows are grouped by tags. Each window can be tagged with one or multiple
tags. Selecting certain tags displays all windows with these tags.
.P
Each screen contains a small status bar which displays all available tags, the
layout, the title of the focused window, and the text read from the root window
name property, if the screen is focused. A floating window is indicated with an
empty square and a maximised floating window is indicated with a filled square
before the windows title. The selected tags are indicated with a different
color. The tags of the focused window are indicated with a filled square in the
top left corner. The tags which are applied to one or more windows are
indicated with an empty square in the top left corner.
.P
dwm draws a small border around windows to indicate the focus state.
.SH OPTIONS
.TP
.B \-v
prints version information to stderr, then exits.
.SH USAGE
.SS Status bar
.TP
.B X root window name
is read and displayed in the status text area. It can be set with the
.BR xsetroot (1)
command.
.TP
.B Button1
click on a tag label to display all windows with that tag, click on the layout
label toggles between tiled and floating layout.
.TP
.B Button3
click on a tag label adds/removes all windows with that tag to/from the view.
.TP
.B Mod1\-Button1
click on a tag label applies that tag to the focused window.
.TP
.B Mod1\-Button3
click on a tag label adds/removes that tag to/from the focused window.
.SS Keyboard commands
.TP
.B Mod1\-Shift\-Return
Start
.BR st(1).
.TP
.B Mod1\-p
Spawn
.BR dmenu(1)
for launching other programs.
.TP
.B Mod1\-,
Focus previous screen, if any.
.TP
.B Mod1\-.
Focus next screen, if any.
.TP
.B Mod1\-Shift\-,
Send focused window to previous screen, if any.
.TP
.B Mod1\-Shift\-.
Send focused window to next screen, if any.
.TP
.B Mod1\-b
Toggles bar on and off.
.TP
.B Mod1\-t
Sets tiled layout.
.TP
.B Mod1\-f
Sets floating layout.
.TP
.B Mod1\-m
Sets monocle layout.
.TP
.B Mod1\-space
Toggles between current and previous layout.
.TP
.B Mod1\-j
Focus next window.
.TP
.B Mod1\-k
Focus previous window.
.TP
.B Mod1\-i
Increase number of windows in master area.
.TP
.B Mod1\-d
Decrease number of windows in master area.
.TP
.B Mod1\-l
Increase master area size.
.TP
.B Mod1\-h
Decrease master area size.
.TP
.B Mod1\-Return
Zooms/cycles focused window to/from master area (tiled layouts only).
.TP
.B Mod1\-Shift\-c
Close focused window.
.TP
.B Mod1\-Shift\-space
Toggle focused window between tiled and floating state.
.TP
.B Mod1\-Tab
Toggles to the previously selected tags.
.TP
.B Mod1\-Shift\-[1..n]
Apply nth tag to focused window.
.TP
.B Mod1\-Shift\-0
Apply all tags to focused window.
.TP
.B Mod1\-Control\-Shift\-[1..n]
Add/remove nth tag to/from focused window.
.TP
.B Mod1\-[1..n]
View all windows with nth tag.
.TP
.B Mod1\-0
View all windows with any tag.
.TP
.B Mod1\-Control\-[1..n]
Add/remove all windows with nth tag to/from the view.
.TP
.B Mod1\-Shift\-q
Quit dwm.
.SS Mouse commands
.TP
.B Mod1\-Button1
Move focused window while dragging. Tiled windows will be toggled to the floating state.
.TP
.B Mod1\-Button2
Toggles focused window between floating and tiled state.
.TP
.B Mod1\-Button3
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
.SH CUSTOMIZATION
dwm is customized by creating a custom config.h and (re)compiling the source
code. This keeps it fast, secure and simple.
.SH SEE ALSO
.BR dmenu (1),
.BR st (1)
.SH ISSUES
Java applications which use the XToolkit/XAWT backend may draw grey windows
only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early
JDK 1.6 versions, because it assumes a reparenting window manager. Possible workarounds
are using JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or setting the
environment variable
.BR AWT_TOOLKIT=MToolkit
(to use the older Motif backend instead) or running
.B xprop -root -f _NET_WM_NAME 32a -set _NET_WM_NAME LG3D
or
.B wmname LG3D
(to pretend that a non-reparenting window manager is running that the
XToolkit/XAWT backend can recognize) or when using OpenJDK setting the environment variable
.BR _JAVA_AWT_WM_NONREPARENTING=1 .
.SH BUGS
Send all bug reports with a patch to hackers@suckless.org.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,29 +0,0 @@
--- dwm.c
+++ dwm.c
@@ -1671,9 +1710,25 @@ showhide(Client *c)
void
sigchld(int unused)
{
+ pid_t pid;
+
if (signal(SIGCHLD, sigchld) == SIG_ERR)
die("can't install SIGCHLD handler:");
- while (0 < waitpid(-1, NULL, WNOHANG));
+ while (0 < (pid = waitpid(-1, NULL, WNOHANG))) {
+ pid_t *p, *lim;
+
+ if (!(p = autostart_pids))
+ continue;
+ lim = &p[autostart_len];
+
+ for (; p < lim; p++) {
+ if (*p == pid) {
+ *p = -1;
+ break;
+ }
+ }
+
+ }
}
void

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

View file

@ -1,42 +0,0 @@
/* cc transient.c -o transient -lX11 */
#include <stdlib.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
int main(void) {
Display *d;
Window r, f, t = None;
XSizeHints h;
XEvent e;
d = XOpenDisplay(NULL);
if (!d)
exit(1);
r = DefaultRootWindow(d);
f = XCreateSimpleWindow(d, r, 100, 100, 400, 400, 0, 0, 0);
h.min_width = h.max_width = h.min_height = h.max_height = 400;
h.flags = PMinSize | PMaxSize;
XSetWMNormalHints(d, f, &h);
XStoreName(d, f, "floating");
XMapWindow(d, f);
XSelectInput(d, f, ExposureMask);
while (1) {
XNextEvent(d, &e);
if (t == None) {
sleep(5);
t = XCreateSimpleWindow(d, r, 50, 50, 100, 100, 0, 0, 0);
XSetTransientForHint(d, t, f);
XStoreName(d, t, "transient");
XMapWindow(d, t);
XSelectInput(d, t, ExposureMask);
}
}
XCloseDisplay(d);
exit(0);
}

View file

@ -1,36 +0,0 @@
/* See LICENSE file for copyright and license details. */
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"
void
die(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
fputc(' ', stderr);
perror(NULL);
} else {
fputc('\n', stderr);
}
exit(1);
}
void *
ecalloc(size_t nmemb, size_t size)
{
void *p;
if (!(p = calloc(nmemb, size)))
die("calloc:");
return p;
}

View file

@ -1,8 +0,0 @@
/* See LICENSE file for copyright and license details. */
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
void die(const char *fmt, ...);
void *ecalloc(size_t nmemb, size_t size);

View file

@ -1,38 +0,0 @@
MIT/X Consortium License
© 2006-2019 Anselm R Garbe <anselm@garbe.ca>
© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
© 2007-2011 Peter Hartlich <sgkkr at hartlich dot com>
© 2007-2009 Szabolcs Nagy <nszabolcs at gmail dot com>
© 2007-2009 Christof Musik <christof at sendfax dot de>
© 2007-2009 Premysl Hruby <dfenze at gmail dot com>
© 2007-2008 Enno Gottox Boland <gottox at s01 dot de>
© 2008 Martin Hurton <martin dot hurton at gmail dot com>
© 2008 Neale Pickett <neale dot woozle dot org>
© 2009 Mate Nagy <mnagy at port70 dot net>
© 2010-2016 Hiltjo Posthuma <hiltjo@codemadness.org>
© 2010-2012 Connor Lane Smith <cls@lubutu.com>
© 2011 Christoph Lohmann <20h@r-36.net>
© 2015-2016 Quentin Rameau <quinq@fifth.space>
© 2015-2016 Eric Pruitt <eric.pruitt@gmail.com>
© 2016-2017 Markus Teich <markus.teich@stusta.mhn.de>
© 2020-2022 Chris Down <chris@chrisdown.name>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View file

@ -1,45 +0,0 @@
# dwm - dynamic window manager
# See LICENSE file for copyright and license details.
include config.mk
SRC = drw.c dwm.c util.c
OBJ = ${SRC:.c=.o}
all: dwm
.c.o:
${CC} -c ${CFLAGS} $<
${OBJ}: config.h config.mk
config.h:
cp config.def.h $@
dwm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
dist: clean
mkdir -p dwm-${VERSION}
cp -R LICENSE Makefile README config.def.h config.mk\
dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
tar -cf dwm-${VERSION}.tar dwm-${VERSION}
gzip dwm-${VERSION}.tar
rm -rf dwm-${VERSION}
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f dwm ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
mkdir -p ${DESTDIR}${MANPREFIX}/man1
sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/dwm\
${DESTDIR}${MANPREFIX}/man1/dwm.1
.PHONY: all clean dist install uninstall

View file

@ -1,48 +0,0 @@
dwm - dynamic window manager
============================
dwm is an extremely fast, small, and dynamic window manager for X.
Requirements
------------
In order to build dwm you need the Xlib header files.
Installation
------------
Edit config.mk to match your local setup (dwm is installed into
the /usr/local namespace by default).
Afterwards enter the following command to build and install dwm (if
necessary as root):
make clean install
Running dwm
-----------
Add the following line to your .xinitrc to start dwm using startx:
exec dwm
In order to connect dwm to a specific display, make sure that
the DISPLAY environment variable is set correctly, e.g.:
DISPLAY=foo.bar:1 exec dwm
(This will start dwm on display :1 of the host foo.bar.)
In order to display status info in the bar, you can do something
like this in your .xinitrc:
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
do
sleep 1
done &
exec dwm
Configuration
-------------
The configuration of dwm is done by creating a custom config.h
and (re)compiling the source code.

View file

@ -1,116 +0,0 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#005577";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
};
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};
/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static const Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};

View file

@ -1,113 +0,0 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = {"monospace:size=10"};
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#005577";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = {col_gray3, col_gray1, col_gray2},
[SchemeSel] = {col_gray4, col_cyan, col_cyan},
};
/* tagging */
static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9"};
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{"Gimp", NULL, NULL, 0, 1, -1},
{"Firefox", NULL, NULL, 1 << 8, 0, -1},
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints =
1; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen =
1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{"[]=", tile}, /* first entry is default */
{"><>", NULL}, /* no layout function means floating behavior */
{"[M]", monocle},
};
/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, view, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}},
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) \
{ \
.v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \
}
/* commands */
static const char *roficmd[] = {"rofi", "-show", "drun", NULL};
static const char *termcmd[] = {"wezterm", NULL};
static const Key keys[] = {
/* modifier key function argument */
{MODKEY, XK_p, spawn, {.v = roficmd}},
{MODKEY | ShiftMask, XK_Return, spawn, {.v = termcmd}},
{MODKEY, XK_b, togglebar, {0}},
{MODKEY, XK_j, focusstack, {.i = +1}},
{MODKEY, XK_k, focusstack, {.i = -1}},
{MODKEY, XK_i, incnmaster, {.i = +1}},
{MODKEY, XK_d, incnmaster, {.i = -1}},
{MODKEY, XK_h, setmfact, {.f = -0.05}},
{MODKEY, XK_l, setmfact, {.f = +0.05}},
{MODKEY, XK_Return, zoom, {0}},
{MODKEY, XK_Tab, view, {0}},
{MODKEY | ShiftMask, XK_c, killclient, {0}},
{MODKEY, XK_t, setlayout, {.v = &layouts[0]}},
{MODKEY, XK_f, setlayout, {.v = &layouts[1]}},
{MODKEY, XK_m, setlayout, {.v = &layouts[2]}},
{MODKEY, XK_space, setlayout, {0}},
{MODKEY | ShiftMask, XK_space, togglefloating, {0}},
{MODKEY, XK_0, view, {.ui = ~0}},
{MODKEY | ShiftMask, XK_0, tag, {.ui = ~0}},
{MODKEY, XK_comma, focusmon, {.i = -1}},
{MODKEY, XK_period, focusmon, {.i = +1}},
{MODKEY | ShiftMask, XK_comma, tagmon, {.i = -1}},
{MODKEY | ShiftMask, XK_period, tagmon, {.i = +1}},
TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3)
TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7)
TAGKEYS(XK_9, 8){MODKEY | ShiftMask, XK_q, quit, {0}},
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
* ClkClientWin, or ClkRootWin */
static const Button buttons[] = {
/* click event mask button function argument */
{ClkLtSymbol, 0, Button1, setlayout, {0}},
{ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}},
{ClkWinTitle, 0, Button2, zoom, {0}},
{ClkStatusText, 0, Button2, spawn, {.v = termcmd}},
{ClkClientWin, MODKEY, Button1, movemouse, {0}},
{ClkClientWin, MODKEY, Button2, togglefloating, {0}},
{ClkClientWin, MODKEY, Button3, resizemouse, {0}},
{ClkTagBar, 0, Button1, view, {0}},
{ClkTagBar, 0, Button3, toggleview, {0}},
{ClkTagBar, MODKEY, Button1, tag, {0}},
{ClkTagBar, MODKEY, Button3, toggletag, {0}},
};

View file

@ -1,39 +0,0 @@
# dwm version
VERSION = 6.5
# Customize below to fit your system
# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# Xinerama, comment if you don't want it
XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA
# freetype
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/include/freetype2
# OpenBSD (uncomment)
#FREETYPEINC = ${X11INC}/freetype2
#MANPREFIX = ${PREFIX}/man
# includes and libs
INCS = -I${X11INC} -I${FREETYPEINC}
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
# flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}
# compiler and linker
CC = cc

View file

@ -1,450 +0,0 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>
#include "drw.h"
#include "util.h"
#define UTF_INVALID 0xFFFD
#define UTF_SIZ 4
static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
static const long utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
static long
utf8decodebyte(const char c, size_t *i)
{
for (*i = 0; *i < (UTF_SIZ + 1); ++(*i))
if (((unsigned char)c & utfmask[*i]) == utfbyte[*i])
return (unsigned char)c & ~utfmask[*i];
return 0;
}
static size_t
utf8validate(long *u, size_t i)
{
if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
*u = UTF_INVALID;
for (i = 1; *u > utfmax[i]; ++i)
;
return i;
}
static size_t
utf8decode(const char *c, long *u, size_t clen)
{
size_t i, j, len, type;
long udecoded;
*u = UTF_INVALID;
if (!clen)
return 0;
udecoded = utf8decodebyte(c[0], &len);
if (!BETWEEN(len, 1, UTF_SIZ))
return 1;
for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
if (type)
return j;
}
if (j < len)
return 0;
*u = udecoded;
utf8validate(u, len);
return len;
}
Drw *
drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
{
Drw *drw = ecalloc(1, sizeof(Drw));
drw->dpy = dpy;
drw->screen = screen;
drw->root = root;
drw->w = w;
drw->h = h;
drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
drw->gc = XCreateGC(dpy, root, 0, NULL);
XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
return drw;
}
void
drw_resize(Drw *drw, unsigned int w, unsigned int h)
{
if (!drw)
return;
drw->w = w;
drw->h = h;
if (drw->drawable)
XFreePixmap(drw->dpy, drw->drawable);
drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
}
void
drw_free(Drw *drw)
{
XFreePixmap(drw->dpy, drw->drawable);
XFreeGC(drw->dpy, drw->gc);
drw_fontset_free(drw->fonts);
free(drw);
}
/* This function is an implementation detail. Library users should use
* drw_fontset_create instead.
*/
static Fnt *
xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
{
Fnt *font;
XftFont *xfont = NULL;
FcPattern *pattern = NULL;
if (fontname) {
/* Using the pattern found at font->xfont->pattern does not yield the
* same substitution results as using the pattern returned by
* FcNameParse; using the latter results in the desired fallback
* behaviour whereas the former just results in missing-character
* rectangles being drawn, at least with some fonts. */
if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
return NULL;
}
if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
XftFontClose(drw->dpy, xfont);
return NULL;
}
} else if (fontpattern) {
if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
fprintf(stderr, "error, cannot load font from pattern.\n");
return NULL;
}
} else {
die("no font specified.");
}
font = ecalloc(1, sizeof(Fnt));
font->xfont = xfont;
font->pattern = pattern;
font->h = xfont->ascent + xfont->descent;
font->dpy = drw->dpy;
return font;
}
static void
xfont_free(Fnt *font)
{
if (!font)
return;
if (font->pattern)
FcPatternDestroy(font->pattern);
XftFontClose(font->dpy, font->xfont);
free(font);
}
Fnt*
drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount)
{
Fnt *cur, *ret = NULL;
size_t i;
if (!drw || !fonts)
return NULL;
for (i = 1; i <= fontcount; i++) {
if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
cur->next = ret;
ret = cur;
}
}
return (drw->fonts = ret);
}
void
drw_fontset_free(Fnt *font)
{
if (font) {
drw_fontset_free(font->next);
xfont_free(font);
}
}
void
drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
{
if (!drw || !dest || !clrname)
return;
if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
DefaultColormap(drw->dpy, drw->screen),
clrname, dest))
die("error, cannot allocate color '%s'", clrname);
}
/* Wrapper to create color schemes. The caller has to call free(3) on the
* returned color scheme when done using it. */
Clr *
drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
{
size_t i;
Clr *ret;
/* need at least two colors for a scheme */
if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
return NULL;
for (i = 0; i < clrcount; i++)
drw_clr_create(drw, &ret[i], clrnames[i]);
return ret;
}
void
drw_setfontset(Drw *drw, Fnt *set)
{
if (drw)
drw->fonts = set;
}
void
drw_setscheme(Drw *drw, Clr *scm)
{
if (drw)
drw->scheme = scm;
}
void
drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
{
if (!drw || !drw->scheme)
return;
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
if (filled)
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
else
XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
}
int
drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert)
{
int i, ty, ellipsis_x = 0;
unsigned int tmpw, ew, ellipsis_w = 0, ellipsis_len;
XftDraw *d = NULL;
Fnt *usedfont, *curfont, *nextfont;
int utf8strlen, utf8charlen, render = x || y || w || h;
long utf8codepoint = 0;
const char *utf8str;
FcCharSet *fccharset;
FcPattern *fcpattern;
FcPattern *match;
XftResult result;
int charexists = 0, overflow = 0;
/* keep track of a couple codepoints for which we have no match. */
enum { nomatches_len = 64 };
static struct { long codepoint[nomatches_len]; unsigned int idx; } nomatches;
static unsigned int ellipsis_width = 0;
if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts)
return 0;
if (!render) {
w = invert ? invert : ~invert;
} else {
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
d = XftDrawCreate(drw->dpy, drw->drawable,
DefaultVisual(drw->dpy, drw->screen),
DefaultColormap(drw->dpy, drw->screen));
x += lpad;
w -= lpad;
}
usedfont = drw->fonts;
if (!ellipsis_width && render)
ellipsis_width = drw_fontset_getwidth(drw, "...");
while (1) {
ew = ellipsis_len = utf8strlen = 0;
utf8str = text;
nextfont = NULL;
while (*text) {
utf8charlen = utf8decode(text, &utf8codepoint, UTF_SIZ);
for (curfont = drw->fonts; curfont; curfont = curfont->next) {
charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
if (charexists) {
drw_font_getexts(curfont, text, utf8charlen, &tmpw, NULL);
if (ew + ellipsis_width <= w) {
/* keep track where the ellipsis still fits */
ellipsis_x = x + ew;
ellipsis_w = w - ew;
ellipsis_len = utf8strlen;
}
if (ew + tmpw > w) {
overflow = 1;
/* called from drw_fontset_getwidth_clamp():
* it wants the width AFTER the overflow
*/
if (!render)
x += tmpw;
else
utf8strlen = ellipsis_len;
} else if (curfont == usedfont) {
utf8strlen += utf8charlen;
text += utf8charlen;
ew += tmpw;
} else {
nextfont = curfont;
}
break;
}
}
if (overflow || !charexists || nextfont)
break;
else
charexists = 0;
}
if (utf8strlen) {
if (render) {
ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
usedfont->xfont, x, ty, (XftChar8 *)utf8str, utf8strlen);
}
x += ew;
w -= ew;
}
if (render && overflow)
drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
if (!*text || overflow) {
break;
} else if (nextfont) {
charexists = 0;
usedfont = nextfont;
} else {
/* Regardless of whether or not a fallback font is found, the
* character must be drawn. */
charexists = 1;
for (i = 0; i < nomatches_len; ++i) {
/* avoid calling XftFontMatch if we know we won't find a match */
if (utf8codepoint == nomatches.codepoint[i])
goto no_match;
}
fccharset = FcCharSetCreate();
FcCharSetAddChar(fccharset, utf8codepoint);
if (!drw->fonts->pattern) {
/* Refer to the comment in xfont_create for more information. */
die("the first font in the cache must be loaded from a font string.");
}
fcpattern = FcPatternDuplicate(drw->fonts->pattern);
FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
FcDefaultSubstitute(fcpattern);
match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
FcCharSetDestroy(fccharset);
FcPatternDestroy(fcpattern);
if (match) {
usedfont = xfont_create(drw, NULL, match);
if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
; /* NOP */
curfont->next = usedfont;
} else {
xfont_free(usedfont);
nomatches.codepoint[++nomatches.idx % nomatches_len] = utf8codepoint;
no_match:
usedfont = drw->fonts;
}
}
}
}
if (d)
XftDrawDestroy(d);
return x + (render ? w : 0);
}
void
drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h)
{
if (!drw)
return;
XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
XSync(drw->dpy, False);
}
unsigned int
drw_fontset_getwidth(Drw *drw, const char *text)
{
if (!drw || !drw->fonts || !text)
return 0;
return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
}
unsigned int
drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n)
{
unsigned int tmp = 0;
if (drw && drw->fonts && text && n)
tmp = drw_text(drw, 0, 0, 0, 0, 0, text, n);
return MIN(n, tmp);
}
void
drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h)
{
XGlyphInfo ext;
if (!font || !text)
return;
XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
if (w)
*w = ext.xOff;
if (h)
*h = font->h;
}
Cur *
drw_cur_create(Drw *drw, int shape)
{
Cur *cur;
if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
return NULL;
cur->cursor = XCreateFontCursor(drw->dpy, shape);
return cur;
}
void
drw_cur_free(Drw *drw, Cur *cursor)
{
if (!cursor)
return;
XFreeCursor(drw->dpy, cursor->cursor);
free(cursor);
}

View file

@ -1,58 +0,0 @@
/* See LICENSE file for copyright and license details. */
typedef struct {
Cursor cursor;
} Cur;
typedef struct Fnt {
Display *dpy;
unsigned int h;
XftFont *xfont;
FcPattern *pattern;
struct Fnt *next;
} Fnt;
enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */
typedef XftColor Clr;
typedef struct {
unsigned int w, h;
Display *dpy;
int screen;
Window root;
Drawable drawable;
GC gc;
Clr *scheme;
Fnt *fonts;
} Drw;
/* Drawable abstraction */
Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
void drw_resize(Drw *drw, unsigned int w, unsigned int h);
void drw_free(Drw *drw);
/* Fnt abstraction */
Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount);
void drw_fontset_free(Fnt* set);
unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
/* Colorscheme abstraction */
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
/* Cursor abstraction */
Cur *drw_cur_create(Drw *drw, int shape);
void drw_cur_free(Drw *drw, Cur *cursor);
/* Drawing context manipulation */
void drw_setfontset(Drw *drw, Fnt *set);
void drw_setscheme(Drw *drw, Clr *scm);
/* Drawing functions */
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert);
int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert);
/* Map functions */
void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);

View file

@ -1,176 +0,0 @@
.TH DWM 1 dwm\-VERSION
.SH NAME
dwm \- dynamic window manager
.SH SYNOPSIS
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
dwm is a dynamic window manager for X. It manages windows in tiled, monocle
and floating layouts. Either layout can be applied dynamically, optimising the
environment for the application in use and the task performed.
.P
In tiled layouts windows are managed in a master and stacking area. The master
area on the left contains one window by default, and the stacking area on the
right contains all other windows. The number of master area windows can be
adjusted from zero to an arbitrary number. In monocle layout all windows are
maximised to the screen size. In floating layout windows can be resized and
moved freely. Dialog windows are always managed floating, regardless of the
layout applied.
.P
Windows are grouped by tags. Each window can be tagged with one or multiple
tags. Selecting certain tags displays all windows with these tags.
.P
Each screen contains a small status bar which displays all available tags, the
layout, the title of the focused window, and the text read from the root window
name property, if the screen is focused. A floating window is indicated with an
empty square and a maximised floating window is indicated with a filled square
before the windows title. The selected tags are indicated with a different
color. The tags of the focused window are indicated with a filled square in the
top left corner. The tags which are applied to one or more windows are
indicated with an empty square in the top left corner.
.P
dwm draws a small border around windows to indicate the focus state.
.SH OPTIONS
.TP
.B \-v
prints version information to stderr, then exits.
.SH USAGE
.SS Status bar
.TP
.B X root window name
is read and displayed in the status text area. It can be set with the
.BR xsetroot (1)
command.
.TP
.B Button1
click on a tag label to display all windows with that tag, click on the layout
label toggles between tiled and floating layout.
.TP
.B Button3
click on a tag label adds/removes all windows with that tag to/from the view.
.TP
.B Mod1\-Button1
click on a tag label applies that tag to the focused window.
.TP
.B Mod1\-Button3
click on a tag label adds/removes that tag to/from the focused window.
.SS Keyboard commands
.TP
.B Mod1\-Shift\-Return
Start
.BR st(1).
.TP
.B Mod1\-p
Spawn
.BR dmenu(1)
for launching other programs.
.TP
.B Mod1\-,
Focus previous screen, if any.
.TP
.B Mod1\-.
Focus next screen, if any.
.TP
.B Mod1\-Shift\-,
Send focused window to previous screen, if any.
.TP
.B Mod1\-Shift\-.
Send focused window to next screen, if any.
.TP
.B Mod1\-b
Toggles bar on and off.
.TP
.B Mod1\-t
Sets tiled layout.
.TP
.B Mod1\-f
Sets floating layout.
.TP
.B Mod1\-m
Sets monocle layout.
.TP
.B Mod1\-space
Toggles between current and previous layout.
.TP
.B Mod1\-j
Focus next window.
.TP
.B Mod1\-k
Focus previous window.
.TP
.B Mod1\-i
Increase number of windows in master area.
.TP
.B Mod1\-d
Decrease number of windows in master area.
.TP
.B Mod1\-l
Increase master area size.
.TP
.B Mod1\-h
Decrease master area size.
.TP
.B Mod1\-Return
Zooms/cycles focused window to/from master area (tiled layouts only).
.TP
.B Mod1\-Shift\-c
Close focused window.
.TP
.B Mod1\-Shift\-space
Toggle focused window between tiled and floating state.
.TP
.B Mod1\-Tab
Toggles to the previously selected tags.
.TP
.B Mod1\-Shift\-[1..n]
Apply nth tag to focused window.
.TP
.B Mod1\-Shift\-0
Apply all tags to focused window.
.TP
.B Mod1\-Control\-Shift\-[1..n]
Add/remove nth tag to/from focused window.
.TP
.B Mod1\-[1..n]
View all windows with nth tag.
.TP
.B Mod1\-0
View all windows with any tag.
.TP
.B Mod1\-Control\-[1..n]
Add/remove all windows with nth tag to/from the view.
.TP
.B Mod1\-Shift\-q
Quit dwm.
.SS Mouse commands
.TP
.B Mod1\-Button1
Move focused window while dragging. Tiled windows will be toggled to the floating state.
.TP
.B Mod1\-Button2
Toggles focused window between floating and tiled state.
.TP
.B Mod1\-Button3
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
.SH CUSTOMIZATION
dwm is customized by creating a custom config.h and (re)compiling the source
code. This keeps it fast, secure and simple.
.SH SEE ALSO
.BR dmenu (1),
.BR st (1)
.SH ISSUES
Java applications which use the XToolkit/XAWT backend may draw grey windows
only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early
JDK 1.6 versions, because it assumes a reparenting window manager. Possible workarounds
are using JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or setting the
environment variable
.BR AWT_TOOLKIT=MToolkit
(to use the older Motif backend instead) or running
.B xprop -root -f _NET_WM_NAME 32a -set _NET_WM_NAME LG3D
or
.B wmname LG3D
(to pretend that a non-reparenting window manager is running that the
XToolkit/XAWT backend can recognize) or when using OpenJDK setting the environment variable
.BR _JAVA_AWT_WM_NONREPARENTING=1 .
.SH BUGS
Send all bug reports with a patch to hackers@suckless.org.

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

View file

@ -1,42 +0,0 @@
/* cc transient.c -o transient -lX11 */
#include <stdlib.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
int main(void) {
Display *d;
Window r, f, t = None;
XSizeHints h;
XEvent e;
d = XOpenDisplay(NULL);
if (!d)
exit(1);
r = DefaultRootWindow(d);
f = XCreateSimpleWindow(d, r, 100, 100, 400, 400, 0, 0, 0);
h.min_width = h.max_width = h.min_height = h.max_height = 400;
h.flags = PMinSize | PMaxSize;
XSetWMNormalHints(d, f, &h);
XStoreName(d, f, "floating");
XMapWindow(d, f);
XSelectInput(d, f, ExposureMask);
while (1) {
XNextEvent(d, &e);
if (t == None) {
sleep(5);
t = XCreateSimpleWindow(d, r, 50, 50, 100, 100, 0, 0, 0);
XSetTransientForHint(d, t, f);
XStoreName(d, t, "transient");
XMapWindow(d, t);
XSelectInput(d, t, ExposureMask);
}
}
XCloseDisplay(d);
exit(0);
}

View file

@ -1,36 +0,0 @@
/* See LICENSE file for copyright and license details. */
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"
void
die(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
fputc(' ', stderr);
perror(NULL);
} else {
fputc('\n', stderr);
}
exit(1);
}
void *
ecalloc(size_t nmemb, size_t size)
{
void *p;
if (!(p = calloc(nmemb, size)))
die("calloc:");
return p;
}

View file

@ -1,8 +0,0 @@
/* See LICENSE file for copyright and license details. */
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
void die(const char *fmt, ...);
void *ecalloc(size_t nmemb, size_t size);

View file

@ -1,30 +0,0 @@
#!/bin/sh
blue=#0000ff
battery() {
get_capacity="$(cat /sys/class/power_supply/BAT1/capacity)"
get_status="$(cat /sys/class/power_supply/BAT1/status)"
case "$get_status" in
Charging) printf "󰂄 $get_capacity" ;;
Discharging) printf "󰁹 $get_capacity" ;;
esac
}
audio() {
get_vol=$(pamixer --get-volume-human)
if [ $get_vol = 'muted' ]; then
printf "󰕾 Muted"
else
printf "󰕾 $get_vol"
fi
}
clock() {
printf "$(date '+%H:%M') "
}
while true; do
xsetroot -name " $(clock) $(audio) $(battery) "
sleep 1
done

View file

@ -1,9 +1,10 @@
IMAPAccount outlook
AuthMechs XOAUTH2
Host outlook.office365.com
Port 993
UserCmd "pass Microsoft | awk 'BEGIN {ORS=\"\"} FNR == 2{gsub(\"login: \", \"\"); gsub(/ /, \"\"); print}'"
PassCmd "pass Microsoft"
SSLType IMAPS
UserCmd "pass Microsoft | grep 'login:' | sed 's/login: //'"
PassCmd "oama access $(pass Microsoft | grep 'login:' | sed 's/login: //')"
TLSType IMAPS
IMAPStore outlook-remote
Account outlook
@ -21,20 +22,68 @@ Create Both
Expunge Both
SyncState *
IMAPAccount gmail-1
AuthMechs XOAUTH2
Host imap.gmail.com
Port 993
UserCmd "pass accounts.google.com/one | grep 'login:' | sed 's/login: //'"
PassCmd "oama access $(pass accounts.google.com/one | grep 'login:' | sed 's/login: //')"
TLSType IMAPS
IMAPStore gmail-1-remote
Account gmail-1
MaildirStore gmail-1-local
Subfolders Verbatim
Path ~/Mail/gmail-one/
Inbox ~/Mail/gmail-one/Inbox
Channel gmail-1
Far :gmail-1-remote:
Near :gmail-1-local:
Patterns * !"[Gmail]/All Mail" !"[Gmail]/Important" !"[Gmail]/Starred" !"[Gmail]/Bin"
Create Both
Expunge Both
SyncState *
IMAPAccount gmail-2
AuthMechs XOAUTH2
Host imap.gmail.com
Port 993
UserCmd "pass accounts.google.com/two| grep 'login:' | sed 's/login: //'"
PassCmd "oama access $(pass accounts.google.com/two | grep 'login:' | sed 's/login: //')"
TLSType IMAPS
IMAPStore gmail-2-remote
Account gmail-2
MaildirStore gmail-2-local
Subfolders Verbatim
Path ~/Mail/gmail-two/
Inbox ~/Mail/gmail-two/Inbox
Channel gmail-2
Far :gmail-2-remote:
Near :gmail-2-local:
Patterns * !"[Gmail]/All Mail" !"[Gmail]/Important" !"[Gmail]/Starred" !"[Gmail]/Bin"
Create Both
Expunge Both
SyncState *
IMAPAccount proton
Host 127.0.0.1
Port 1143
UserCmd "pass 'Proton Account' | awk 'BEGIN {ORS=\"\"} FNR == 2{gsub(\"login: \", \"\"); gsub(/ /, \"\"); print}'"
UserCmd "pass 'Proton Account' | grep 'login:' | sed 's/login: //'"
PassCmd "cat ~/.hydroxide-bridge-pass"
SSLType none
TLSType None
IMAPStore proton-remote
Account proton
MailDirStore proton-local
SubFolders Verbatim
Path ~/Mail/Proton/
Inbox ~/Mail/Proton/Inbox
Path ~/.mail/proton/
Inbox ~/.mail/proton/Inbox
Channel proton
Far :proton-remote:
@ -43,3 +92,25 @@ Patterns *
Create Both
Expunge Both
SyncState *
IMAPAccount li
AuthMechs *
UserCmd "pass show email/li | grep 'login: ' | sed 's/login: //'"
PassCmd "pass show email/li"
Tunnel "nc -T protocols=all -T ciphers=compat -X 5 -x <PROXY> <HOST> <PORT>"
IMAPStore li-remote
Account li
MailDirStore li-local
SubFolders Verbatim
Path ~/.mail/li/
Inbox ~/.mail/li/Inbox
Channel li
Far :li-remote:
Near :li-local:
Patterns *
Create Both
Expunge Both
SyncState *

View file

@ -0,0 +1,52 @@
#! /usr/bin/env python
from subprocess import check_output
import re
def get_pass(account):
return check_output("pass " + account, shell=True).splitlines()[0]
def get_user(account):
usercmd = check_output("pass " + account, shell=True)
return re.search(rb"login: (.*)", usercmd, flags=0).group(1).decode("utf-8")
def get_host(account):
usercmd = check_output("pass " + account, shell=True)
return re.search(rb"host: (.*)", usercmd, flags=0).group(1).decode("utf-8")
def hydroxide(path):
file = open(path, "r")
pword = file.read()
return pword
def get_client_id(account):
cmd = check_output("pass " + account, shell=True)
output = re.search("client_id: (.*)", cmd.decode(), flags=0).group(1)
return output
def get_client_secret(account):
cmd = check_output("pass " + account, shell=True)
output = re.search("client_secret: (.*)", cmd.decode(), flags=0).group(1)
return output
def get_client_refresh_token(account):
cmd = check_output("pass " + account, shell=True)
output = re.search("client_refresh_token: (.*)", cmd.decode(), flags=0).group(1)
return output

112
config/emacs/.offlineimaprc Normal file
View file

@ -0,0 +1,112 @@
[general]
pythonfile = ~/.offlineimap.py
accounts = Proton, Outlook, Gmail-personal-1, Gmail-personal-2, li
socktimeout = 60
[Account Proton]
localrepository = Proton-local
remoterepository = Proton-remote
[Repository Proton-local]
type = Maildir
localfolders = ~/.mail/protonmail
[Repository Proton-remote]
type = IMAP
ssl = no
remotehost = 127.0.0.1
remoteport = 1143
remoteusereval = get_user("Proton\ Account")
remotepasseval = hydroxide("/home/sako/.hydroxide-bridge-pass")
folderfilter = lambda foldername: foldername in [ "All Mail", "Archive", "Drafts", "INBOX", "Sent", "Spam", "Starred", "Trash" ]
[Account Outlook]
localrepository = Outlook-local
remoterepository = Outlook-remote
[Repository Outlook-local]
type = Maildir
localfolders = ~/.mail/outlook
[Repository Outlook-remote]
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
type = IMAP
remoteusereval = get_user("Microsoft")
remotehost = outlook.office365.com
remoteport = 993
auth_mechanisms = XOAUTH2
oauth2_request_url = https://login.microsoftonline.com/common/oauth2/v2.0/token
# Thunderbird client_id below
oauth2_client_id = 9e5f94bc-e8a4-4e73-b8be-63364c29d753
# Do not need client_secret :D
oauth2_client_secret =
oauth2_refresh_token_eval = get_client_refresh_token("Microsoft")
folderfilter = lambda folder: not folder.startswith('Calendar') and not folder.startswith('Contacts')
[Account Gmail-personal-1]
localrepository = Gmail-personal-1-local
remoterepository = Gmail-personal-1-remote
[Repository Gmail-personal-1-local]
type = GmailMaildir
localfolders = ~/.mail/gmail1
# Google IMAP weirdness
nametrans = lambda f: '[Gmail]/' + f if f in ['Drafts', 'Starred', 'Important', 'Spam', 'Trash', 'All Mail', 'Sent Mail'] else f
[Repository Gmail-personal-1-remote]
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
type = Gmail
remotehost = imap.gmail.com
auth_mechanisms = XOAUTH2
remoteusereval = get_user("accounts.google.com/one")
oauth2_request_url = https://accounts.google.com/o/oauth2/token
oauth2_client_id_eval = get_client_id("email/oauth/gmail")
oauth2_client_secret_eval = get_client_secret("email/oauth/gmail")
oauth2_refresh_token_eval = get_client_refresh_token("accounts.google.com/one")
# Google IMAP weirdness
nametrans = lambda f: f.replace('[Gmail]/', '') if f.startswith('[Gmail]/') else f
[Account Gmail-personal-2]
localrepository = Gmail-personal-2-local
remoterepository = Gmail-personal-2-remote
[Repository Gmail-personal-2-local]
type = GmailMaildir
localfolders = ~/.mail/gmail2
# Google IMAP weirdness
nametrans = lambda f: '[Gmail]/' + f if f in ['Drafts', 'Starred', 'Important', 'Spam', 'Trash', 'All Mail', 'Sent Mail'] else f
[Repository Gmail-personal-2-remote]
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
type = Gmail
remotehost = imap.gmail.com
auth_mechanisms = XOAUTH2
remoteusereval = get_user("accounts.google.com/two")
oauth2_request_url = https://accounts.google.com/o/oauth2/token
oauth2_client_id_eval = get_client_id("email/oauth/gmail")
oauth2_client_secret_eval = get_client_secret("email/oauth/gmail")
oauth2_refresh_token_eval = get_client_refresh_token("accounts.google.com/two")
# Google IMAP weirdness
nametrans = lambda f: f.replace('[Gmail]/', '') if f.startswith('[Gmail]/') else f
[Account li]
localrepository = li-local
remoterepository = li-remote
proxy = SOCKS5:localhost:9050
[Repository li-local]
type = Maildir
localfolders = ~/.mail/li
[Repository li-remote]
type = IMAP
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
remotehosteval = get_host("email/li")
remoteport = 993
remoteusereval = get_user("email/li")
remotepasseval = get_pass("email/li")

File diff suppressed because it is too large Load diff

View file

@ -1,236 +0,0 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
term=xterm-256color
# login-shell=no
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
# title=foot
# locked-title=no
font=JetBrainsMono NF:size=12
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# font-size-adjustment=0.5
# line-height=<font metrics>
# letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# underline-thickness=<font underline thickness>
# box-drawings-uses-font-glyphs=no
# dpi-aware=no
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
# pad=0x0 # optionally append 'center'
# resize-by-cells=yes
# resize-delay-ms=100
# bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is libutempter (Linux)
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ulog (FreeBSD)
[environment]
# name=value
[bell]
# urgent=no
# notify=no
# visual=no
# command=
# command-focused=no
#[desktop-notifications]
# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}
# command-action-argument=--action ${action-name}=${action-label}
# close=""
# inhibit-when-focused=yes
[scrollback]
lines=1000
# multiplier=3.0
# indicator-position=relative
# indicator-format=""
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
[cursor]
# style=block
# color=<inverse foreground/background>
# blink=no
# blink-rate=500
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
# hide-when-typing=no
# alternate-scroll-mode=yes
[touch]
# long-press-delay=400
[colors]
# alpha=1.0
# background=242424
# foreground=ffffff
# flash=7f7f00
# flash-alpha=0.5
## Normal/regular colors (color palette 0-7)
# regular0=242424 # black
# regular1=f62b5a # red
# regular2=47b413 # green
# regular3=e3c401 # yellow
# regular4=24acd4 # blue
# regular5=f2affd # magenta
# regular6=13c299 # cyan
# regular7=e6e6e6 # white
## Bright colors (color palette 8-15)
# bright0=616161 # bright black
# bright1=ff4d51 # bright red
# bright2=35d450 # bright green
# bright3=e9e836 # bright yellow
# bright4=5dc5f8 # bright blue
# bright5=feabf2 # bright magenta
# bright6=24dfc4 # bright cyan
# bright7=ffffff # bright white
## dimmed colors (see foot.ini(5) man page)
# dim0=<not set>
# ...
# dim7=<not-set>
## The remaining 256-color palette
# 16 = <256-color palette #16>
# ...
# 255 = <256-color palette #255>
## Misc colors
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3>
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# hide-when-maximized=no
# double-click-to-maximize=yes
# border-width=0
# border-color=<csd.color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
# clipboard-copy=Control+Shift+c XF86Copy
# clipboard-paste=Control+Shift+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
# show-urls-launch=Control+Shift+o
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
# unicode-input=Control+Shift+u
# noop=none
[search-bindings]
# cancel=Control+g Control+c Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-char=Shift+Right
# extend-to-word-boundary=Control+w Control+Shift+Right
# extend-to-next-whitespace=Control+Shift+w
# extend-line-down=Shift+Down
# extend-backward-char=Shift+Left
# extend-backward-to-word-boundary=Control+Shift+Left
# extend-backward-to-next-whitespace=none
# extend-line-up=Shift+Up
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
# primary-paste=Shift+Insert
# unicode-input=none
# quit=none
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[text-bindings]
# \x03=Mod4+c # Map Super+c -> Ctrl+c
[mouse-bindings]
# scrollback-up-mouse=BTN_WHEEL_BACK
# scrollback-down-mouse=BTN_WHEEL_FORWARD
# font-increase=Control+BTN_WHEEL_BACK
# font-decrease=Control+BTN_WHEEL_FORWARD
# selection-override-modifiers=Shift
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-quote = BTN_LEFT-3
# select-row=BTN_LEFT-4
# vim: ft=dosini

View file

@ -56,9 +56,11 @@ input {
kb_layout = us, ara
kb_variant =
kb_model =
kb_options = grp:alt_shift_toggle, ctrl:nocaps
kb_options = grp:ctrls_toggle, ctrl:nocaps
kb_rules =
numlock_by_default = true
# no mouse acceleration pls :)
accel_profile = flat
@ -75,11 +77,11 @@ input {
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 10
gaps_out = 10
border_size = 1
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
gaps_in = 10
gaps_out = 10
border_size = 2
col.active_border = rgba(ea4c88ee) rgba(e691b1ee) 45deg
col.inactive_border = rgb(6F2440) rgb(734959) 45deg
layout = dwindle
}
@ -105,7 +107,7 @@ decoration {
}
animations {
enabled = false
enabled = false
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

View file

@ -3,18 +3,38 @@ background {
path = /home/sako/background.png
}
general {
no_fade_in = true
no_fade_out = true
}
# Time
label {
monitor =
text = $TIME
text_align = center # center/right or any value for default left. multi-line text alignment inside label container
color = rgba(200, 200, 200, 1.0)
font_size = 25
font_family = JetBrains Mono
rotate = 0 # degrees, counter-clockwise
position = 0, 80
halign = center
valign = center
}
input-field {
monitor =
size = 300, 50
outline_thickness = 4
outline_thickness = 1
dots_size = 0.1
dots_spacing = 0.2
dots_center = true
outer_color = $accent
outer_color =rgb(ea4c88)
inner_color = $surface0
font_color = $text
fade_on_empty = false
placeholder_text = silly!
placeholder_text = placeholder
rounding = 0
hide_input = false
check_color = $accent

View file

@ -1,3 +1,3 @@
require("core.keymaps")
require("core.plugins")
require("core.plugin_config")
-- require("core.plugin_config")

View file

@ -15,121 +15,11 @@ vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " "
local plugins = {
-- whats an ide without a file explorer
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
-- colorscheme
-- { "bluz71/vim-moonfly-colors", name = "moonfly", lazy = false, priority = 1000 },
"savq/melange-nvim",
-- default bar only looks good on linux
"nvim-lualine/lualine.nvim",
-- syntax highlighting apparently
"nvim-treesitter/nvim-treesitter",
"windwp/nvim-ts-autotag",
-- org mode
{
'nvim-orgmode/orgmode',
event = 'VeryLazy',
config = function()
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org',
})
-- NOTE: If you are using nvim-treesitter with `ensure_installed = "all"` option
-- add `org` to ignore_install
-- require('nvim-treesitter.configs').setup({
-- ensure_installed = 'all',
-- ignore_install = { 'org' },
-- })
end,
},
-- like fzf but goofier
{
"nvim-telescope/telescope.nvim",
version = "0.1.1",
dependencies = { { "nvim-lua/plenary.nvim" } },
},
-- lsp stuff
{
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
},
-- completion
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-nvim-lsp",
"onsails/lspkind.nvim",
-- snippet
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
-- auto close to prevent carpal tunnel :
"windwp/nvim-autopairs",
-- git stuff lol
"lewis6991/gitsigns.nvim",
-- flex
"andweeb/presence.nvim",
-- color picker
"ziontee113/color-picker.nvim",
-- startup
{
"glepnir/dashboard-nvim",
config = function()
require("dashboard").setup({
theme = "doom", -- theme is doom and hyper default is hyper
config = {
-- todo https://github.com/nvimdev/dashboard-nvim
center = {
{
icon = "",
icon_hl = "Title",
desc = "Find File ",
desc_hl = "String",
keymap = "SPC SPC",
key_hl = "Number",
action = "lua print(2)",
},
},
},
})
end,
event = "VimEnter",
dependencies = { { "nvim-tree/nvim-web-devicons" } },
},
-- floating terminal, useful to mimic/be better than vscode
"voldikss/vim-floaterm",
-- git client
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed, not both.
"nvim-telescope/telescope.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
},
config = true
},
{ "wakatime/vim-wakatime", lazy = false },
}
require("lazy").setup(plugins, {})

View file

@ -1,213 +0,0 @@
# Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2010, 2014 dequis
# Copyright (c) 2012 Randall Ma
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2013 horsik
# Copyright (c) 2013 Tao Sauvage
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from libqtile import bar, layout, widget
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
mod = "mod4"
terminal = "kitty"
keys = [
# A list of available commands that can be bound to keys can be found
# at https://docs.qtile.org/en/latest/manual/config/lazy.html
# Switch between windows
Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"),
# Move windows between left/right columns or move up/down in current stack.
# Moving out of range in Columns layout will create new column.
Key(
[mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"
),
Key(
[mod, "shift"],
"l",
lazy.layout.shuffle_right(),
desc="Move window to the right",
),
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
# Grow windows. If current window is on the edge of screen and direction
# will be to screen edge - window would shrink.
Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"),
Key(
[mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"
),
Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"),
Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
# Toggle between split and unsplit sides of stack.
# Split = all windows displayed
# Unsplit = 1 window displayed, like Max layout, but still with
# multiple stack panes
Key(
[mod, "shift"],
"Return",
lazy.layout.toggle_split(),
desc="Toggle between split and unsplit sides of stack",
),
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
# Toggle between different layouts as defined below
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
Key([mod], "w", lazy.window.kill(), desc="Kill focused window"),
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
]
groups = [Group(i) for i in "123456789"]
for i in groups:
keys.extend(
[
# mod1 + letter of group = switch to group
Key(
[mod],
i.name,
lazy.group[i.name].toscreen(),
desc="Switch to group {}".format(i.name),
),
# mod1 + shift + letter of group = switch to & move focused window to group
Key(
[mod, "shift"],
i.name,
lazy.window.togroup(i.name, switch_group=True),
desc="Switch to & move focused window to group {}".format(i.name),
),
# Or, use below if you prefer not to switch to that group.
# # mod1 + shift + letter of group = move focused window to group
# Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
# desc="move focused window to group {}".format(i.name)),
]
)
layouts = [
layout.Columns(border_focus_stack=["#d75f5f", "#8f3d3d"], border_width=4),
layout.Max(),
# Try more layouts by unleashing below layouts.
# layout.Stack(num_stacks=2),
# layout.Bsp(),
# layout.Matrix(),
# layout.MonadTall(),
# layout.MonadWide(),
# layout.RatioTile(),
# layout.Tile(),
# layout.TreeTab(),
# layout.VerticalTile(),
# layout.Zoomy(),
]
widget_defaults = dict(
font="sans",
fontsize=12,
padding=3,
)
extension_defaults = widget_defaults.copy()
screens = [
Screen(
bottom=bar.Bar(
[
widget.CurrentLayout(),
widget.GroupBox(),
widget.Prompt(),
widget.WindowName(),
widget.Chord(
chords_colors={
"launch": ("#ff0000", "#ffffff"),
},
name_transform=lambda name: name.upper(),
),
widget.TextBox("default config", name="default"),
widget.TextBox("Press &lt;M-r&gt; to spawn", foreground="#d75f5f"),
# NB Systray is incompatible with Wayland, consider using StatusNotifier instead
# widget.StatusNotifier(),
widget.Systray(),
widget.Clock(format="%Y-%m-%d %a %I:%M %p"),
widget.QuickExit(),
],
24,
# border_width=[2, 0, 2, 0], # Draw top and bottom borders
# border_color=["ff00ff", "000000", "ff00ff", "000000"] # Borders are magenta
),
),
]
# Drag floating layouts.
mouse = [
Drag(
[mod],
"Button1",
lazy.window.set_position_floating(),
start=lazy.window.get_position(),
),
Drag(
[mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()
),
Click([mod], "Button2", lazy.window.bring_to_front()),
]
dgroups_key_binder = None
dgroups_app_rules = [] # type: list
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating(
float_rules=[
# Run the utility of `xprop` to see the wm class and name of an X client.
*layout.Floating.default_float_rules,
Match(wm_class="confirmreset"), # gitk
Match(wm_class="makebranch"), # gitk
Match(wm_class="maketag"), # gitk
Match(wm_class="ssh-askpass"), # ssh-askpass
Match(title="branchdialog"), # gitk
Match(title="pinentry"), # GPG key password entry
]
)
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True
# If things like steam games want to auto-minimize themselves when losing
# focus, should we respect this or not?
auto_minimize = True
# When using the Wayland backend, this can be used to configure input devices.
wl_input_rules = None
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
# string besides java UI toolkits; you can see several discussions on the
# mailing lists, GitHub issues, and other WM documentation that suggest setting
# this string if your java app doesn't work correctly. We may as well just lie
# and say that we're a working one by default.
#
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
# java that happens to be on java's whitelist.
wmname = "LG3D"

View file

@ -1,20 +1,12 @@
{
config,
inputs,
outputs,
pkgs,
lib,
home-manager,
...
}: {
{ config, inputs, outputs, pkgs, lib, home-manager, ... }: {
imports = [
# home manager
inputs.home-manager.nixosModules.default
# modules
inputs.agenix.nixosModules.default
# TODO:: GET RID OF THIS PLEASE
# my modules modules
# import for each folder
# modules/desktop IMPORT
# modules/desktop/example DO NOT IMPORT,
# add entry to module's default.nix
# add entry to module category's default.nix
outputs.nixosModules.desktop
outputs.nixosModules.shell
outputs.nixosModules.hardware
@ -28,7 +20,7 @@
# nix settings that should 100% be global
#nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings = {
experimental-features = ["nix-command" "flakes"];
experimental-features = [ "nix-command" "flakes" ];
substituters = [
# garnix
"https://cache.garnix.io"
@ -67,7 +59,7 @@
efiSysMountPoint = "/boot/efi";
};
grub = {
devices = ["nodev"];
devices = [ "nodev" ];
efiSupport = true;
enable = true;
useOSProber = true;
@ -99,13 +91,12 @@
users.users.sako = {
isNormalUser = true;
extraGroups = ["wheel" "networkmanager"]; # Enable sudo for the user.
extraGroups = [ "wheel" "networkmanager" "audio" ];
};
home-manager.useUserPackages = true;
home-manager.users.sako = {pkgs, ...}: {
# CHANGE THIS WHEN THE SYSTEM VERSION CHANGES TOO!!!
home.packages = [];
home-manager.users.sako = { pkgs, ... }: {
home.packages = [ ];
home.username = "sako";
home.homeDirectory = "/home/sako";
programs.bash.enable = true;
@ -118,11 +109,7 @@
enable = true;
userName = "Sakooooo";
userEmail = "78461130+Sakooooo@users.noreply.github.com";
includes = [
{
path = "~/.config/git/config.local";
}
];
includes = [{ path = "~/.config/git/config.local"; }];
extraConfig = {
color.ui = "auto";
init.defaultBranch = "master";
@ -134,18 +121,18 @@
# bare minimum
environment.systemPackages = with pkgs; [
vim # backup
wget #double u get
wget # double u get
killall # die processes
alsa-utils # unsupported application
pulseaudio # unsupported application
pamixer # unsupported application
feh # im different
unzip # zip file
gh # github
htop # htop
tree # trees
ripgrep # better grep may help later
inputs.agenix.packages.${system}.default
];
age.secretsDir = "/run/secrets";
# you phisiclally cannot live without this
# litearlly! ! ! ! ! !
programs.gnupg.agent = {
@ -154,6 +141,8 @@
settings = {
allow-emacs-pinentry = "";
allow-loopback-pinentry = "";
default-cache-ttl = "28800";
max-cache-ttl = "28800";
};
# enableSSHSupport = true;
};
@ -163,8 +152,4 @@
# package = pkgs.gitFull;
# };
# read stable version patch notes and fix any issues
# then you can change this
#system.stateVersion = "23.05";
# read comment you read the comment?
}

View file

@ -9,11 +9,11 @@
]
},
"locked": {
"lastModified": 1725358307,
"narHash": "sha256-su/Nzp2X8JlaD9wPYQGXeTilaVa5H06X7A3kqCLJNuo=",
"lastModified": 1728588346,
"narHash": "sha256-P1j+Nf+pzxPYK2Qe7lF2yB0vR3YvW8Td5sD0ZvrKIq8=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "8a89995f745b1a9029d654c391a0f62ca03f7fe7",
"rev": "0fc8d9bb51cc46b31d950513df6d088905c8fe55",
"type": "github"
},
"original": {
@ -22,19 +22,42 @@
"type": "github"
}
},
"ags": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2"
},
"locked": {
"lastModified": 1721306136,
"narHash": "sha256-VKPsIGf3/a+RONBipx4lEE4LXG2sdMNkWQu22LNQItg=",
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"ags": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
},
"locked": {
"lastModified": 1728326430,
"narHash": "sha256-tV1ABHuA1HItMdCTuNdA8fMB+qw7LpjvI945VwMSABI=",
"owner": "Aylur",
"repo": "ags",
"rev": "344ea72cd3b8d4911f362fec34bce7d8fb37028c",
"rev": "60180a184cfb32b61a1d871c058b31a3b9b0743d",
"type": "github"
},
"original": {
@ -63,11 +86,11 @@
]
},
"locked": {
"lastModified": 1725199881,
"narHash": "sha256-jsmipf/u1GFZE5tBUkr56CHMN6VpUWCAjfLIhvQijU0=",
"lastModified": 1728326504,
"narHash": "sha256-dQXAj+4d6neY7ldCiH6gNym3upP49PVxRzEPxXlD9Aw=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "f8a687dd29ff019657498f1bd14da2fbbf0e604b",
"rev": "65dd97b5d21e917295159bbef1d52e06963f4eb0",
"type": "github"
},
"original": {
@ -76,6 +99,28 @@
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
@ -83,11 +128,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1725674458,
"narHash": "sha256-AeemHTjtU56bXUCXJ4CrEJmIOfXfALkIR8Ix+AVlclg=",
"lastModified": 1728753084,
"narHash": "sha256-OgpebVl9jecLspSckK9xeYk804z9GM2ROClCJbmPpac=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "0442d57ffa83985ec2ffaec95db9c0fe742f5182",
"rev": "5921ff72aa8019353091f0e63b3e34db28fa757f",
"type": "github"
},
"original": {
@ -112,16 +157,32 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
@ -132,14 +193,14 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
@ -148,18 +209,61 @@
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1725694918,
"narHash": "sha256-+HsjshXpqNiJHLaJaK0JnIicJ/a1NquKcfn4YZ3ILgg=",
"lastModified": 1728726232,
"narHash": "sha256-8ZWr1HpciQsrFjvPMvZl0W+b0dilZOqXPoKa2Ux36bc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "aaebdea769a5c10f1c6e50ebdf5924c1a13f0cda",
"rev": "d57112db877f07387ce7104b5ac346ede556d2d7",
"type": "github"
},
"original": {
@ -184,11 +288,11 @@
]
},
"locked": {
"lastModified": 1722623071,
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=",
"lastModified": 1727821604,
"narHash": "sha256-hNw5J6xatedqytYowx0mJKgctjA4lQARZFdgnzM2RpM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c",
"rev": "d60e1e01e6e6633ef1c87148b9137cc1dd39263d",
"type": "github"
},
"original": {
@ -201,19 +305,21 @@
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_2",
"systems": "systems_4",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_5",
"xdph": "xdph"
},
"locked": {
"lastModified": 1725667615,
"narHash": "sha256-ksmD1gNS/AX4qHvcCS7u+agvB+0fg2wCukFr3Hy4A3I=",
"lastModified": 1728752206,
"narHash": "sha256-r5xU/LqU4TrUOIouhYqrTZc1VY1zLQOOzbLsFCDlfpI=",
"ref": "refs/heads/main",
"rev": "0500213086f8402ccbdb2acb4748dbc6d22e21f6",
"revCount": 5192,
"rev": "1822707c7e7394ce8c7572f2fe890763a307f499",
"revCount": 5332,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@ -228,21 +334,19 @@
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
"locked": {
"lastModified": 1721326555,
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=",
"lastModified": 1728345020,
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84",
"rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github"
},
"original": {
@ -267,11 +371,11 @@
]
},
"locked": {
"lastModified": 1725188252,
"narHash": "sha256-yBH8c4GDaEAtBrh+BqIlrx5vp6gG/Gu8fQQK63KAQgs=",
"lastModified": 1728168612,
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "c12ab785ce1982f82594aff03b3104c598186ddd",
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github"
},
"original": {
@ -315,7 +419,7 @@
"hyprutils": "hyprutils_2",
"hyprwayland-scanner": "hyprwayland-scanner_2",
"nixpkgs": "nixpkgs_3",
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1725200438,
@ -343,11 +447,11 @@
]
},
"locked": {
"lastModified": 1724966483,
"narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=",
"lastModified": 1727300645,
"narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2",
"rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c",
"type": "github"
},
"original": {
@ -393,11 +497,11 @@
]
},
"locked": {
"lastModified": 1721324119,
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
"lastModified": 1726874836,
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github"
},
"original": {
@ -433,11 +537,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1725432240,
"narHash": "sha256-+yj+xgsfZaErbfYM3T+QvEE2hU7UuE+Jf0fJCJ8uPS0=",
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad416d066ca1222956472ab7d0555a6946746a80",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"type": "github"
},
"original": {
@ -449,11 +553,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1725407940,
"narHash": "sha256-tiN5Rlg/jiY0tyky+soJZoRzLKbPyIdlQ77xVgREDNM=",
"lastModified": 1728627514,
"narHash": "sha256-r+SF9AnHrTg+bk6YszoKfV9lgyw+yaFUQe0dOjI0Z2o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6f6c45b5134a8ee2e465164811e451dcb5ad86e3",
"rev": "c505ebf777526041d792a49d5f6dd4095ea391a7",
"type": "github"
},
"original": {
@ -465,11 +569,27 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1725407940,
"narHash": "sha256-tiN5Rlg/jiY0tyky+soJZoRzLKbPyIdlQ77xVgREDNM=",
"lastModified": 1720386169,
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1728627514,
"narHash": "sha256-r+SF9AnHrTg+bk6YszoKfV9lgyw+yaFUQe0dOjI0Z2o=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6f6c45b5134a8ee2e465164811e451dcb5ad86e3",
"rev": "c505ebf777526041d792a49d5f6dd4095ea391a7",
"type": "github"
},
"original": {
@ -479,13 +599,13 @@
"type": "github"
}
},
"nixpkgs-stable_3": {
"nixpkgs-stable_4": {
"locked": {
"lastModified": 1721524707,
"narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=",
"lastModified": 1728156290,
"narHash": "sha256-uogSvuAp+1BYtdu6UWuObjHqSbBohpyARXDWqgI12Ss=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "556533a23879fc7e5f98dd2e0b31a6911a213171",
"rev": "17ae88b569bb15590549ff478bab6494dde4a907",
"type": "github"
},
"original": {
@ -497,11 +617,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1725103162,
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"type": "github"
},
"original": {
@ -529,11 +649,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1725432240,
"narHash": "sha256-+yj+xgsfZaErbfYM3T+QvEE2hU7UuE+Jf0fJCJ8uPS0=",
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad416d066ca1222956472ab7d0555a6946746a80",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"type": "github"
},
"original": {
@ -543,16 +663,41 @@
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1728092656,
"narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "1211305a5b237771e13fcca0c51e60ad47326a9a",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"NixOS-WSL": "NixOS-WSL",
"agenix": "agenix",
"ags": "ags",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"home-manager": "home-manager_2",
"hyprland": "hyprland",
"hyprpaper": "hyprpaper",
"nixpkgs": "nixpkgs_4",
"nixpkgs-stable": "nixpkgs-stable_2",
"nixpkgs-stable": "nixpkgs-stable_3",
"sops-nix": "sops-nix"
}
},
@ -561,14 +706,14 @@
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_3"
"nixpkgs-stable": "nixpkgs-stable_4"
},
"locked": {
"lastModified": 1725540166,
"narHash": "sha256-htc9rsTMSAY5ek+DB3tpntdD/es0eam2hJgO92bWSys=",
"lastModified": 1728345710,
"narHash": "sha256-lpunY1+bf90ts+sA2/FgxVNIegPDKCpEoWwOPu4ITTQ=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "d9d781523a1463965cd1e1333a306e70d9feff07",
"rev": "06535d0e3d0201e6a8080dd32dbfde339b94f01b",
"type": "github"
},
"original": {
@ -593,21 +738,6 @@
}
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -622,7 +752,7 @@
"type": "github"
}
},
"systems_4": {
"systems_3": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@ -637,6 +767,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1689347949,
@ -652,13 +797,39 @@
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
@ -669,11 +840,11 @@
]
},
"locked": {
"lastModified": 1725203932,
"narHash": "sha256-VLULC/OnI+6R9KEP2OIGk+uLJJsfRlaLouZ5gyFd2+Y=",
"lastModified": 1728166987,
"narHash": "sha256-w6dVTguAn9zJ+7aPOhBQgDz8bn6YZ7b56cY8Kg5HJRI=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "2425e8f541525fa7409d9f26a8ffaf92a3767251",
"rev": "fb9c8d665af0588bb087f97d0f673ddf0d501787",
"type": "github"
},
"original": {

125
flake.nix
View file

@ -3,8 +3,10 @@
description = "Sako's NixOS Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # nixpkgs unstable branch
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05"; # nixpkgs stable branch because some things break
nixpkgs.url =
"github:NixOS/nixpkgs/nixos-unstable"; # nixpkgs unstable branch
nixpkgs-stable.url =
"github:nixos/nixpkgs/nixos-24.05"; # nixpkgs stable branch because some things break
home-manager = {
# this manages your dotfiles for the most part
url = "github:nix-community/home-manager";
@ -20,9 +22,11 @@
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = { url = "github:nix-community/emacs-overlay"; };
ags = {
url = "github:Aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
@ -31,78 +35,53 @@
hyprpaper.url = "github:hyprwm/hyprpaper";
};
outputs = {
self,
nixpkgs,
home-manager,
NixOS-WSL,
sops-nix,
emacs-overlay,
hyprland,
hyprpaper,
ags,
...
} @ inputs: let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
];
in rec {
# custom packages
packages = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./packages {inherit pkgs;}
);
# dev shell for bootstrap
devShells = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./shell.nix {inherit pkgs;}
);
outputs = { self, nixpkgs, home-manager, NixOS-WSL, agenix, emacs-overlay
, hyprland, hyprpaper, ags, ... }@inputs:
let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" ];
in rec {
# custom packages
packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./packages { inherit pkgs; });
# dev shell for bootstrap
devShells = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./shell.nix { inherit pkgs; });
# overlays here
overlays = import ./overlays {inherit inputs;};
# overlays here
overlays = import ./overlays { inherit inputs; };
# modules :D
nixosModules = import ./modules;
# modules :D
nixosModules = import ./modules;
nixosConfigurations = {
sakotop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./default.nix
./hosts/sakotop/configuration.nix
sops-nix.nixosModules.sops
];
};
sakopc = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./default.nix
./hosts/sakopc/configuration.nix
];
};
#sakoserver = nixpkgs.lib.nixosSystem {
# specialArgs = {inherit inputs outputs;};
# modules = [
# ./default.nix
# ./hosts/sakoserver/configuration.nix
# ];
#};
sakowsl = nixpkgs.lib.nixosSystem {
# because theres no hardware-configuration.nix
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
modules = [
{nix.registry.nixpkgs.flake = nixpkgs;}
./hosts/sakowsl/configuration.nix
NixOS-WSL.nixosModules.wsl
sops-nix.nixosModules.sops
];
nixosConfigurations = {
sakotop = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [ ./default.nix ./hosts/sakotop/configuration.nix ];
};
sakopc = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [ ./default.nix ./hosts/sakopc/configuration.nix ];
};
#sakoserver = nixpkgs.lib.nixosSystem {
# specialArgs = {inherit inputs outputs;};
# modules = [
# ./default.nix
# ./hosts/sakoserver/configuration.nix
# ];
#};
sakowsl = nixpkgs.lib.nixosSystem {
# because theres no hardware-configuration.nix
system = "x86_64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
{ nix.registry.nixpkgs.flake = nixpkgs; }
./hosts/sakowsl/configuration.nix
NixOS-WSL.nixosModules.wsl
];
};
};
};
};
}

View file

@ -1,10 +1,4 @@
{
config, pkgs,
lib,
inputs,
outputs,
...
}: {
{ config, pkgs, lib, inputs, outputs, ... }: {
imports = [
# Hardware Configuration
# TODO:: Add this back once generated!!!!!!!
@ -25,8 +19,8 @@
hyprland.enable = true;
foot.enable = true;
kitty.enable = true;
picom.enable = true;
dunst.enable = true;
picom.enable = false;
dunst.enable = false;
apps = {
nextcloud.enable = true;
rssguard.enable = true;
@ -39,7 +33,7 @@
browsers = {
firefox.enable = true;
qutebrowser.enable = false;
chromium.enable = true;
chromium.enable = false;
};
chat = {
zoom.enable = true;
@ -49,6 +43,8 @@
weechat.enable = true;
signal.enable = true;
element.enable = true;
gajim.enable = true;
psi-plus.enable = true;
};
game = {
lutris.enable = true;
@ -58,10 +54,11 @@
};
media = {
mpv.enable = true;
ardour.enable = true;
kdenlive.enable = true;
blender.enable = true;
feishin.enable = true;
jellyfin.enable = true;
jellyfin.enable = false;
};
};
dev = {
@ -78,7 +75,7 @@
lua.enable = true;
python.enable = true;
rust.enable = true;
nil.enable = true;
nixd.enable = true;
};
hardware = {
bluetooth.enable = false;
@ -107,17 +104,22 @@
onlyoffice.enable = true;
};
security = {
sops.enable = true;
certs.enable = true;
tor.enable = true;
};
};
# fuck you AOC
# my monitor only works on 240hz now
services.xserver.displayManager.setupCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 1920x1080 --rate 239.96 --primary --output HDMI-0 --mode 1920x1080 --left-of DP-0
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 1920x1080 --rate 239.96 --primary --output HDMI-0 --mode 1920x1080 --left-of DP-0
'';
# secrets
age.identityPaths = [ "/home/sako/.ssh/id_ed25519" ];
age.secrets.test.file = ../../secrets/test.age;
# lol
services.xserver.dpi = 100;

View file

@ -1,13 +1,6 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page and in the NixOS manual (accessible by running `nixos-help`).
{
config,
pkgs,
lib,
inputs,
outputs,
...
}: {
{ config, pkgs, lib, inputs, outputs, ... }: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@ -46,6 +39,8 @@
telegram.enable = true;
weechat.enable = true;
element.enable = true;
gajim.enable = true;
psi-plus.enable = true;
};
apps = {
nemo.enable = true;
@ -64,6 +59,7 @@
lutris.enable = true;
steam.enable = true;
tetrio.enable = true;
osu.enable = true;
prismlauncher.enable = true;
};
media = {
@ -75,9 +71,7 @@
mpv.enable = true;
jellyfin.enable = true;
};
security = {
wireshark.enable = true;
};
security = { wireshark.enable = true; };
};
hardware = {
nvidia = {
@ -101,7 +95,7 @@
package = pkgs.emacs-unstable-pgtk;
};
};
nil.enable = true;
nixd.enable = true;
cc.enable = true;
csharp.enable = true;
javascript.enable = true;
@ -138,27 +132,18 @@
};
security = {
age.enable = true;
sops.enable = true;
certs.enable = true;
tor.enable = true;
};
virtualization = {
waydroid.enable = true;
};
virtualization = { waydroid.enable = true; };
};
# Enable CUPS to print documents.
# services.printing.enable = true;
services.xserver.videoDrivers = ["nvidia"];
services.xserver.videoDrivers = [ "nvidia" ];
# homelab
sops = {
# we need to setup wireguard with this soon
age.sshKeyPaths = ["/home/sako/.ssh/id_ed25519"];
};
networking.wireguard.interfaces = {
};
networking.wireguard.interfaces = { };
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
@ -168,6 +153,10 @@
# set laptop dpi
services.xserver.dpi = 100;
age.identityPaths = [ "/home/sako/.ssh/id_ed25519" ];
age.secrets.test.file = ../../secrets/test.age;
# Enable the OpenSSH daemon.
# services.openssh.enable = true;

View file

@ -1,12 +1,4 @@
{
lib,
pkgs,
config,
modulesPath,
inputs,
outputs,
...
}: {
{ lib, pkgs, config, modulesPath, inputs, outputs, ... }: {
imports = [
inputs.home-manager.nixosModules.default
"${modulesPath}/profiles/minimal.nix"
@ -49,38 +41,31 @@
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
# nix.settings.experimental-features = ["nix-command" "flakes"];
# nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings = {
experimental-features = ["nix-command" "flakes"];
substituters = [
"https://cache.garnix.io"
"https://nix-community.cachix.org"
];
experimental-features = [ "nix-command" "flakes" ];
substituters =
[ "https://cache.garnix.io" "https://nix-community.cachix.org" ];
trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
# Home manager setup
home-manager.useUserPackages = true;
home-manager.users.sako = {pkgs, ...}: {
home-manager.users.sako = { pkgs, ... }: {
home.stateVersion = "22.05";
home.packages = [];
home.packages = [ ];
home.username = "sako";
home.homeDirectory = "/home/sako";
xdg.configFile.git = {
source = ../../config/git;
};
xdg.configFile.git = { source = ../../config/git; };
# cure my sanity
home.pointerCursor = {
name = "Catppuccin-Mocha-Dark";
size = 16;
x11 = {
enable = true;
};
x11 = { enable = true; };
gtk.enable = true;
package = pkgs.catppuccin-cursors.mochaDark;
};
@ -97,16 +82,16 @@
programs.gnupg.agent = {
enable = true;
#pinentryPackage = null;
settings = {
# pinentry-program = "/mnt/c/Program Files (x86)/Gpg4win/bin/pinentry.exe";
settings = {
# pinentry-program = "/mnt/c/Program Files (x86)/Gpg4win/bin/pinentry.exe";
allow-emacs-pinentry = "";
allow-loopback-pinentry = "";
};
};
};
# bare minimum
environment.systemPackages = with pkgs; [
vim # backup
wget #double u get
wget # double u get
killall # die processes
unzip # zip file
gh # github
@ -115,8 +100,6 @@
wsl-open # wsl-open
];
environment.noXlibs = lib.mkForce false;
programs.git = {
enable = true;
package = pkgs.gitFull;
@ -128,9 +111,7 @@
nextcloud.enable = true;
pass.enable = true;
};
chat = {
weechat.enable = true;
};
chat = { weechat.enable = true; };
};
dev = {
editors = {
@ -157,17 +138,13 @@
search.enable = true;
};
};
security = {
certs.enable = true;
};
security = { certs.enable = true; };
};
services.gnome.gnome-keyring.enable = true;
# for wsl-open
environment.sessionVariables = rec {
BROWSER = "wsl-open";
};
environment.sessionVariables = rec { BROWSER = "wsl-open"; };
security.sudo.wheelNeedsPassword = true;

View file

@ -1,11 +1,5 @@
{
options,
config,
lib,
pkgs,
...
}: let
cfg = config.modules.desktop.browsers.firefox;
{ options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.browsers.firefox;
in {
options.modules.desktop.browsers.firefox = {
enable = lib.mkEnableOption false;
@ -34,38 +28,63 @@ in {
# userChrome = ''
# '';
search.default = "DuckDuckGo";
# search.default = "DuckDuckGo";
search.default = "sakosearch";
search.force = true;
search.engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages?channel=unstable";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@nixpkgs"];
urls = [{
template =
"https://search.nixos.org/packages?channel=unstable";
params = [{
name = "query";
value = "{searchTerms}";
}];
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nixpkgs" ];
};
"Nix Options" = {
definedAliases = ["@nixopts"];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
urls = [
{
template = "https://search.nixos.org/options?channel=unstable";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ "@nixopts" ];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
urls = [{
template =
"https://search.nixos.org/options?channel=unstable";
params = [{
name = "query";
value = "{searchTerms}";
}];
}];
};
"Home Manager Options" = {
definedAliases = [ "@homemgropts" ];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
urls = [{
template =
"https://home-manager-options.extranix.com/?release=master";
params = [{
name = "query";
value = "{searchTerms}";
}];
}];
};
"sakosearch" = {
definedAliases = [ "@sakosearch" ];
icon = pkgs.fetchurl {
url =
"https://raw.githubusercontent.com/searxng/searxng/refs/heads/master/src/brand/searxng-wordmark.svg";
hash = "sha256-TwwPUNL+IRRjLY7Xmd466F474vglkvpJUYa+fBwDzFI=";
};
urls = [{
template = "https://search.sako.box/search";
params = [{
name = "q";
value = "{searchTerms}";
}];
}];
};
};
};

View file

@ -8,5 +8,8 @@
./signal
./cinny
./element
./gajim
./pidgin
./psiplus
];
}

View file

@ -0,0 +1,10 @@
{ outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.chat.gajim;
in {
options.modules.desktop.chat.gajim = { enable = lib.mkEnableOption false; };
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [ gajim ];
};
}

View file

@ -0,0 +1,15 @@
{ outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.chat.pidgin;
in {
options.modules.desktop.chat.pidgin = { enable = lib.mkEnableOption false; };
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs;
[
(pidgin.override {
plugins =
[ pidginPackages.pidgin-otr pidginPackages.pidgin-indicator ];
})
];
};
}

View file

@ -0,0 +1,12 @@
{ outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.chat.psi-plus;
in {
options.modules.desktop.chat.psi-plus = {
enable = lib.mkEnableOption false;
};
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [ psi-plus ];
};
}

View file

@ -3,10 +3,8 @@
# window managers
./awesome
./bspwm
./dwm
./hyprland
./xmonad
./qtile
./exwm
./i3
# desktop environ men t s s s s

View file

@ -1,110 +0,0 @@
{
outputs,
options,
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.desktop.dwm;
in {
options.modules.desktop.dwm = {
enable = lib.mkEnableOption false;
};
config = lib.mkIf cfg.enable {
# this needs to be enabled for gtk apps
programs.dconf.enable = true;
# enable dwm
services.displayManager.defaultSession = "none+dwm";
services.xserver = {
enable = true;
windowManager = {
dwm.enable = true;
};
displayManager = {
lightdm = {
enable = true;
background = ../../../config/background.png;
greeters.gtk = {
enable = true;
theme = {
name = "vimix-dark-ruby";
package = pkgs.vimix-gtk-themes;
};
cursorTheme = {
name = "Catppuccin-Mocha-Dark";
size = 16;
package = pkgs.catppuccin-cursors.mochaDark;
};
};
# greeters.mini = {
# enable = true;
# user = "sako";
# extraConfig = ''
# [greeter]
# show-password-label = true
# password-label-text = magic word
# invalid-password-text = skull issue
# '';
# };
};
};
};
services.libinput = {
mouse = {
accelProfile = "flat";
};
touchpad = {
accelProfile = "flat";
};
};
users.users.sako.packages = with pkgs; [
rofi
# network
networkmanagerapplet
# brightness
brightnessctl
# gee tee k
vimix-gtk-themes
vimix-icon-theme
lxappearance
catppuccin-cursors.mochaDark
# screen shot (s)
flameshot
# clipboard
xclip
];
home-manager.users.sako = {pkgs, ...}: {
home.file = {
"background.png" = {
enable = true;
source = ../../../config/background.png;
};
".dwmscripts" = {
enable = true;
recursive = true;
source = ../../../config/dwmbar;
};
};
home.pointerCursor = {
name = "Catppuccin-Mocha-Dark";
size = 16;
x11 = {
enable = true;
};
gtk.enable = true;
package = pkgs.catppuccin-cursors.mochaDark;
};
gtk = {
enable = true;
theme.name = "vimix-dark-ruby";
iconTheme.name = "Vimix Ruby Dark";
};
};
};
}

View file

@ -1,23 +1,55 @@
{ options, config, lib, pkgs, ...}:
let
cfg = config.modules.desktop.foot;
{ options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.foot;
in {
options.modules.desktop.foot = {
enable = lib.mkEnableOption false;
};
options.modules.desktop.foot = { enable = lib.mkEnableOption false; };
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
foot
];
users.users.sako.packages = with pkgs; [ foot ];
home-manager.users.sako = {pkgs, ...}: {
xdg.configFile = {
foot = {
source = ../../../config/foot;
home-manager.users.sako = { pkgs, ... }: {
programs.foot = {
enable = true;
server.enable = false;
settings = {
main = {
term = "xterm-256color";
font = "JetBrainsMono NF:size=12";
};
scrollback = { lines = 1000; };
cursor = {
style = "block";
blink = "yes";
blink-rate = "1000";
};
mouse = { hide-when-typing = "yes"; };
colors = {
alpha = "1.0";
background = "010000";
foreground = "bfbfbf";
# Normal/Regular colors (0-7)
regular0 = "010000";
regular1 = "67514A";
regular2 = "6A5D4E";
regular3 = "9B686A";
regular4 = "9F8975";
regular5 = "BD7D81";
regular6 = "D07789";
regular7 = "bfbfbf";
# Bright colors (8-15)
bright0 = "615050";
bright1 = "67514A";
bright2 = "6A5D4E";
bright3 = "9B686A";
bright4 = "9F8975";
bright5 = "BD7D81";
bright6 = "D07788";
bright7 = "bfbfbf";
};
};
};
};
};
};
}

View file

@ -1,10 +1,4 @@
{
imports = [
./steam
./lutris
./wine
./grapejuice
./tetrio
./prismlauncher
];
imports =
[ ./steam ./lutris ./wine ./grapejuice ./tetrio ./prismlauncher ./osu ];
}

View file

@ -0,0 +1,9 @@
{ outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.game.osu;
in {
options.modules.desktop.game.osu = { enable = lib.mkEnableOption false; };
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [ osu-lazer-bin ];
};
}

View file

@ -15,9 +15,10 @@ in {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
(tetrio-desktop.override {
withTetrioPlus = true;
})
# (tetrio-desktop.override {
# withTetrioPlus = true;
# })
tetrio-desktop
];
};
}

View file

@ -1,80 +1,69 @@
{ inputs, outputs, options, config, lib, pkgs, ...}:
let
cfg = config.modules.desktop.hyprland;
in
{
imports = [
inputs.hyprland.nixosModules.default
];
{ inputs, outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.hyprland;
in {
imports = [ inputs.hyprland.nixosModules.default ];
options.modules.desktop.hyprland = {
enable = lib.mkEnableOption false;
};
options.modules.desktop.hyprland = { enable = lib.mkEnableOption false; };
config = lib.mkIf cfg.enable {
modules.desktop.dunst.enable = lib.mkForce false;
modules.desktop.dunst.enable = lib.mkForce false;
services.gnome.gnome-keyring.enable = true;
services.gnome.gnome-keyring.enable = true;
services.greetd = {
enable = true;
settings = {
terminal = {
vt = 2;
};
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --time-format '%I:%M %p | %a %h | %F' --cmd Hyprland";
user = "greeter";
services.greetd = {
enable = true;
settings = {
terminal = { vt = 2; };
default_session = {
command =
"${pkgs.greetd.tuigreet}/bin/tuigreet --time --time-format '%I:%M %p | %a %h | %F' --cmd Hyprland";
user = "greeter";
};
};
};
};
# https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960
# make greetd not have systemd logs overlap
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
# https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960
# make greetd not have systemd logs overlap
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
services.xserver = {
services.xserver = {
enable = true;
# displayManager = {
# # lightdm = {
# # enable = true;
# # background = ../../../config/background.png;
# # greeters.gtk = {
# # enable = true;
# # theme = {
# # name = "vimix-dark-ruby";
# # package = pkgs.vimix-gtk-themes;
# # };
# # };
# # };
# gdm = {
# enable = true;
# };
# };
};
services.libinput = {
enable = true;
# displayManager = {
# # lightdm = {
# # enable = true;
# # background = ../../../config/background.png;
# # greeters.gtk = {
# # enable = true;
# # theme = {
# # name = "vimix-dark-ruby";
# # package = pkgs.vimix-gtk-themes;
# # };
# # };
# # };
# gdm = {
# enable = true;
# };
# };
};
services.libinput = {
enable = true;
# no mouse accel
mouse = {
accelProfile = "flat";
};
# no mouse accel
mouse = { accelProfile = "flat"; };
# no touchpad accel
touchpad = {
accelProfile = "flat";
};
};
# no touchpad accel
touchpad = { accelProfile = "flat"; };
};
users.users.sako.packages = with pkgs; [
# use wayland counterparts
@ -114,9 +103,7 @@ in
wl-clipboard
];
programs.hyprland = {
enable = true;
};
programs.hyprland = { enable = true; };
programs.hyprlock.enable = true;
@ -126,7 +113,7 @@ in
# piece of shit thanks!
services.emacs.startWithGraphical = false;
home-manager.users.sako = { pkgs , ...}: {
home-manager.users.sako = { pkgs, ... }: {
home.pointerCursor = {
# name = "Catppuccin-Mocha-Dark";
name = "catppuccin-mocha-dark-cursors";
@ -136,10 +123,10 @@ in
};
gtk = {
enable = true;
theme.name = "Fluent-red-Dark";
iconTheme.name = "Fluent-red-dark";
theme.name = "Fluent-pink-Dark";
iconTheme.name = "Fluent-pink-dark";
};
home.file = {
home.file = {
"background.png" = {
enable = true;
source = ../../../config/background.png;
@ -148,12 +135,13 @@ in
# thanks PartyWumpus
# https://github.com/PartyWumpus/dotfiles/blob/277949d84d53a58a3f52be935cd3c581c89d5d7c/modules/hyprland/hyprland.nix#L492
"/nixos/config/ags/types" = {
source = "${inputs.ags.packages.x86_64-linux.agsWithTypes.out}/share/com.github.Aylur.ags/types";
source =
"${inputs.ags.packages.x86_64-linux.agsWithTypes.out}/share/com.github.Aylur.ags/types";
};
};
xdg.configFile = {
hypr = {
source = ../../../config/hyprland;
source = ../../../config/hyprland;
recursive = true;
};
waybar = {
@ -168,7 +156,7 @@ in
source = ../../../config/ags;
recursive = true;
};
};
};
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";

View file

@ -0,0 +1,15 @@
{ outputs, options, config, lib, pkgs, ...}:
let
cfg = config.modules.desktop.media.ardour;
in
{
options.modules.desktop.media.ardour = {
enable = lib.mkEnableOption false;
};
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
ardour
];
};
}

View file

@ -6,6 +6,7 @@
./blender
./kdenlive
./lmms
./ardour
./mpv
./jellyfin
./feishin

View file

@ -1,97 +0,0 @@
{
outputs,
options,
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.desktop.qtile;
in {
options.modules.desktop.qtile = {
enable = lib.mkEnableOption false;
};
#TODO Do this
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
windowManager.qtile = {
enable = true;
};
displayManager = {
defaultSession = "none+qtile";
lightdm = {
enable = true;
background = ../../../config/background.png;
greeters.gtk = {
enable = true;
theme = {
name = "vimix-dark-ruby";
package = pkgs.vimix-gtk-themes;
};
};
};
};
libinput = {
enable = true;
# no mouse accel
mouse = {
accelProfile = "flat";
};
# no touchpad accel
touchpad = {
accelProfile = "flat";
};
};
};
users.users.sako.packages = with pkgs; [
rofi
# network
networkmanagerapplet
# brightness
brightnessctl
# gee tee k
vimix-gtk-themes
vimix-icon-theme
lxappearance
catppuccin-cursors.mochaDark
# screen shot (s)
flameshot
];
home-manager.users.sako = {pkgs, ...}: {
home.pointerCursor = {
name = "Catppuccin-Mocha-Dark";
size = 16;
x11 = {
enable = true;
};
gtk.enable = true;
package = pkgs.catppuccin-cursors.mochaDark;
};
gtk = {
enable = true;
theme.name = "vimix-dark-ruby";
iconTheme.name = "Vimix Ruby Dark";
};
home.file = {
"background.png" = {
enable = true;
source = ../../../config/background.png;
};
};
#xdg.configFile = {
# qtile = {
# enable = true;
# source = ../../../config/qtile;
# recursive = true;
# };
#};
};
};
}

View file

@ -16,5 +16,10 @@ in {
config = lib.mkIf cfg.enable {
# todo declaritivly setting it up
networking.wireguard.enable = true;
users.users.sako.packages = with pkgs; [
openresolv
];
};
}

View file

@ -1,15 +1,15 @@
{
outputs,
options,
config,
lib,
pkgs,
inputs,
...
}:
{ outputs, options, config, lib, pkgs, inputs, ... }:
let
cfg = config.modules.dev.editors.emacs;
inherit (lib) mkForce;
# so we dont cry later on why texLive is MASSIVE
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-basic dvisvgm dvipng # for preview and export as html
wrapfig amsmath ulem hyperref capt-of fontspec inputenx graphics etoolbox;
});
myEmacs = pkgs.emacsWithPackagesFromUsePackage {
config = ../../../../config/emacs/emacs.org;
@ -21,54 +21,54 @@ let
epkgs.mu4e
# TODO make this check if EXWM is enabled or not
epkgs.exwm
# epkgs.sakomodules
# epkgs.sakomodules
epkgs.eglot-booster
epkgs.app-launcher
];
# add eglot-lsp-booster package
override = epkgs: epkgs // {
eglot-booster = epkgs.trivialBuild {
pname = "eglot-booster";
version = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
override = epkgs:
epkgs // {
eglot-booster = epkgs.trivialBuild {
pname = "eglot-booster";
version = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
packageRequires = with pkgs; [ emacs-lsp-booster ];
packageRequires = with pkgs; [ emacs-lsp-booster ];
src = pkgs.fetchFromGitHub {
owner = "jdtsmith";
repo = "eglot-booster";
rev = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
hash = "sha256-vF34ZoUUj8RENyH9OeKGSPk34G6KXZhEZozQKEcRNhs=";
src = pkgs.fetchFromGitHub {
owner = "jdtsmith";
repo = "eglot-booster";
rev = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6";
hash = "sha256-vF34ZoUUj8RENyH9OeKGSPk34G6KXZhEZozQKEcRNhs=";
};
};
app-launcher = epkgs.melpaBuild {
pname = "app-launcher";
version = "1.0";
commit = "d5015e394b0a666a8c7c4d4bdf786266e773b145";
recipe = pkgs.writeText "recipe" ''
(app-launcher :repo "SebastienWae/app-launcher" :fetcher github)
'';
src = pkgs.fetchFromGitHub {
owner = "SebastienWae";
repo = "app-launcher";
rev = "d5015e394b0a666a8c7c4d4bdf786266e773b145";
hash = "sha256-d0d5rkuxK/zKpSCa1UTdpV7o+RDDsEeab56rI7xUJ1E=";
};
};
};
};
app-launcher = epkgs.melpaBuild {
pname = "app-launcher";
version = "1.0";
commit = "d5015e394b0a666a8c7c4d4bdf786266e773b145";
recipe = pkgs.writeText "recipe" ''
(app-launcher :repo "SebastienWae/app-launcher" :fetcher github)
'';
src = pkgs.fetchFromGitHub {
owner = "SebastienWae";
repo = "app-launcher";
rev = "d5015e394b0a666a8c7c4d4bdf786266e773b145";
hash = "sha256-d0d5rkuxK/zKpSCa1UTdpV7o+RDDsEeab56rI7xUJ1E=";
};
};
};
# override for modules
# override = epkgs: epkgs // {
# sakomodules = epkgs.trivialBuild {
# pname = "sakomodules";
# version = "lol";
# override = epkgs: epkgs // {
# sakomodules = epkgs.trivialBuild {
# pname = "sakomodules";
# version = "lol";
# src = ../../../../config/emacs/modules;
# src = ../../../../config/emacs/modules;
# };
# };
# };
# };
};
in {
options.modules.dev.editors.emacs = {
@ -82,9 +82,7 @@ in {
};
config = lib.mkIf cfg.enable {
nixpkgs.overlays = [
inputs.emacs-overlay.overlay
];
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
# ues daemon
services.emacs = {
enable = cfg.daemon;
@ -107,18 +105,27 @@ in {
direnv
# mu for email
mu
# sync
isync
cyrus-sasl-xoauth2
# email sync
offlineimap
(isync.override { withCyrusSaslXoauth2 = true; })
# oauth
oama
# protonmail
hydroxide
# send mail
msmtp
# doc-view
unoconv
# org to pdf
# this might be bloat...
texliveMinimal
tex
# lsp
emacs-lsp-booster
# zenity-color-picker
zenity
# org-wild-notifier
libnotify
# wakatime-mode
wakatime-cli
];
systemd.services.hydroxide = {
@ -140,20 +147,24 @@ in {
# };
# };
home-manager.users.sako = {lib, ...}: {
home-manager.users.sako = { lib, ... }: {
home.file = {
".emacs.d/init.el".source = pkgs.runCommand "init.el" {} ''
".emacs.d/init.el".source = pkgs.runCommand "init.el" { } ''
cp ${../../../../config/emacs/emacs.org} emacs.org
${pkgs.emacs}/bin/emacs -Q --batch ./emacs.org -f org-babel-tangle
${myEmacs}/bin/emacs -Q --batch ./emacs.org -f org-babel-tangle
mv init.el $out
'';
".emacs.d/icon.png".source = ../../../../config/emacs/icon.png;
".mbsyncrc".source = ../../../../config/emacs/.mbsyncrc;
# ".mbsyncrc".source = ../../../../config/emacs/.mbsyncrc;
".offlineimaprc".source = ../../../../config/emacs/.offlineimaprc;
".offlineimap.py".source = ../../../../config/emacs/.offlineimap.py;
};
};
programs.gnupg.agent.pinentryPackage = mkForce pkgs.pinentry-emacs;
fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["JetBrainsMono"];})
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
jetbrains-mono
];
};

View file

@ -11,6 +11,7 @@ in
environment.systemPackages = with pkgs; [
nil
alejandra
nixfmt
];
};
}

View file

@ -1,26 +1,13 @@
# nixd nix lsp using nix and nixpkgs
# where has this been my whole life
{
outputs,
options,
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.dev.nixd;
{ outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.dev.nixd;
in {
options.modules.dev.nixd = {
enable = lib.mkEnableOption false;
};
options.modules.dev.nixd = { enable = lib.mkEnableOption false; };
# TODO(sako):: figure out how .nixd.json works
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
unstable.nixd
alejandra
];
environment.systemPackages = with pkgs; [ nixd alejandra nixfmt ];
};
}

View file

@ -1,11 +1,7 @@
{ outputs, options, config, lib, pkgs, ...}:
let
cfg = config.modules.hardware.pipewire;
in
{
options.modules.hardware.pipewire = {
enable = lib.mkEnableOption false;
};
{ outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.hardware.pipewire;
in {
options.modules.hardware.pipewire = { enable = lib.mkEnableOption false; };
config = lib.mkIf cfg.enable {
# resolve racial conflict between
@ -23,9 +19,13 @@ in
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
jack.enable = true;
pulse.enable = true;
};
# unsupported apps that use these
environment.systemPackages = with pkgs; [ pulseaudio alsa-utils pamixer ];
};
}

View file

@ -1,7 +1 @@
{
imports = [
./age.nix
./sops.nix
./certs
];
}
{ imports = [ ./age.nix ./certs ./tor.nix ]; }

View file

@ -1,21 +0,0 @@
{
outputs,
options,
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.security.age;
in {
options.modules.security.sops = {
enable = lib.mkEnableOption false;
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
sops
];
};
}

25
modules/security/tor.nix Normal file
View file

@ -0,0 +1,25 @@
{ outputs, options, config, lib, pkgs, ... }:
let cfg = config.modules.security.tor;
in {
options.modules.security.tor = { enable = lib.mkEnableOption false; };
config = lib.mkIf cfg.enable {
age.secrets.torrc = {
file = ../../secrets/shared/torrc.age;
owner = "tor";
group = "tor";
};
users.users.sako.packages = with pkgs; [ tor-browser ];
services.tor = {
enable = true;
torsocks.enable = true;
client = { enable = true; };
};
environment.etc = { "tor/torrc".source = config.age.secrets.torrc.path; };
};
}

View file

@ -1,17 +1,10 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.modules.server;
{ config, lib, ... }:
with lib;
let cfg = config.modules.server;
in {
imports = [
];
imports = [ ];
options.modules.server = {
isServer = mkEnableOption false;
};
options.modules.server = { isServer = mkEnableOption false; };
config = mkIf cfg.isServer {
# we need this if you say otherwise ill throw you
@ -23,11 +16,13 @@ in {
PermitRootLogin = "no";
# its so easy to use keys your grandmother could use it
PasswordAuthentication = false;
ports = [
69
];
ports = [ 69 ];
openFirewall = true;
};
};
users.users.sako.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPGAwG2Fqs3xNF/6/9GdznH/jUIqxW3aTYvmteuq9odZ sako@sakotop"
];
};
}

View file

@ -1,5 +1,6 @@
{
imports = [
./waydroid.nix
./virt-manager.nix
];
}

View file

@ -8,12 +8,8 @@ in
};
config = lib.mkIf cfg.enable {
virtualization.libvirtd.enable = true;
programs.dconf.enable = true;
environtment.systemPackages = with pkgs; [
virt-manager
];
users.users.sako.extraGroups = [ "libvirtd" ];
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
users.users.sako.extraGroups = [ "libvirtd" ];
};
}

View file

@ -1,10 +1,8 @@
{inputs, ...}: {
{ inputs, ... }: {
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../packages {pkgs = final;};
additions = final: _prev: import ../packages { pkgs = final; };
nixpkgs.overlays = [
inputs.emacs-overlay
];
nixpkgs.overlays = [ inputs.emacs-overlay ];
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
@ -12,35 +10,23 @@
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
polybar = prev.polybar.override {
pulseSupport = true;
};
qutebrowser = prev.qutebrowser.override {
enableWideVine = true;
};
vimix-gtk-themes = prev.vimix-gtk-themes.override {
themeVariants = ["ruby"];
};
polybar = prev.polybar.override { pulseSupport = true; };
qutebrowser = prev.qutebrowser.override { enableWideVine = true; };
vimix-gtk-themes =
prev.vimix-gtk-themes.override { themeVariants = [ "ruby" ]; };
fluent-gtk-theme = prev.fluent-gtk-theme.override {
colorVariants = [ "dark" ];
themeVariants = [ "red" ];
themeVariants = [ "pink" ];
tweaks = [ "square" ];
};
fluent-icon-theme = prev.fluent-icon-theme.override {
colorVariants = [ "red" ];
};
dwm = prev.dwm.overrideAttrs (old: {
src = ../config/dwm;
});
fluent-icon-theme =
prev.fluent-icon-theme.override { colorVariants = [ "pink" ]; };
dwm = prev.dwm.overrideAttrs (old: { src = ../config/dwm; });
ags = prev.ags.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ inputs.nixpkgs.legacyPackages.x86_64-linux.libdbusmenu-gtk3 ];
});
isync = prev.isync.overrideAttrs (old: {
withCyrusSaslXoauth2 = true;
});
blender = prev.blender.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ inputs.nixpkgs.legacyPackages.x86_64-linux.pkg-config inputs.nixpkgs.legacyPackages.x86_64-linux.wayland-scanner ];
buildInputs = old.buildInputs
++ [ inputs.nixpkgs.legacyPackages.x86_64-linux.libdbusmenu-gtk3 ];
});
isync = prev.isync.overrideAttrs (old: { withCyrusSaslXoauth2 = true; });
};
# incase something breaks

12
secrets/secrets.nix Normal file
View file

@ -0,0 +1,12 @@
let
sakotop =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPGAwG2Fqs3xNF/6/9GdznH/jUIqxW3aTYvmteuq9odZ sako@sakotop";
sakopc =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDjPSt4TykAJgafU9Trk7sr9wzXhBZxawDIZir0CPyDN sako@sakopc";
shared = [ sakotop sakopc ];
in {
"test.age".publicKeys = shared;
"shared/torrc.age".publicKeys = shared;
}

BIN
secrets/shared/torrc.age Normal file

Binary file not shown.

BIN
secrets/test.age Normal file

Binary file not shown.