Add basic stumpwm module

Unfinished. Will revisit later.
This commit is contained in:
Henrik Lissner 2020-02-02 02:16:36 -05:00
parent 2fc26aef2c
commit 074ed153bf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 109 additions and 0 deletions

71
config/stumpwm/config Normal file
View file

@ -0,0 +1,71 @@
;; -*- lisp -*-
;;
;; Author: Henrik Lissner <henrik@lissner.net>
;; URL: https://github.com/hlissner/doom-emacs
;;
;;;
(in-package :stumpwm)
;; (swank:create-server
;; :dont-close t
;; :port swank::default-server-port)
;;;
(defvar *config-dir* "~/.dotfiles/config/stumpwm")
(defcommand reload-dotfiles () ()
(load (concat *config-dir* "/config"))
(message "Config reloaded"))
(define-key *top-map* (kbd "s-r") "reload-dotfiles")
(load (concat *config-dir* "/core/core.lisp"))
(defun show-key-seq (key seq val)
(message (print-key-seq (reverse seq))))
(add-hook *key-press-hook* 'show-key-seq)
;;; Config
(setf *mouse-focus-policy* :click)
(set-font "-CTDB-Fira Code-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1")
;;; Keybinds
(set-prefix-key (kbd "C-z"))
(define-key *top-map* (kbd "C-RET") "exec urxvt")
(let ((map *top-map*))
;; (gnew "a")
;; (gnew "b")
;; (gnew "c")
(dotimes (i 9)
(define-key map (kbd (format nil "s-~D" i))
(format nil "gselect ~D" i))
(define-key map (kbd (format nil "s-S-~D" i))
(format nil "gmove ~D" i))))
;; Window management
(define-key *top-map* (kbd "s-h") "move-focus left")
(define-key *top-map* (kbd "s-j") "move-focus down")
(define-key *top-map* (kbd "s-k") "move-focus up")
(define-key *top-map* (kbd "s-l") "move-focus right")
(define-key *top-map* (kbd "s-H") "move-window left")
(define-key *top-map* (kbd "s-J") "move-window down")
(define-key *top-map* (kbd "s-K") "move-window up")
(define-key *top-map* (kbd "s-L") "move-window right")
(define-key *top-map* (kbd "s-RET") "exec urxvt")
(define-key *top-map* (kbd "s-SPC") "exec rofi-appmenu")
(define-key *top-map* (kbd "s-`") "exec scratch")
(defvar *window-manipulation-map* (make-sparse-keymap))
(define-key *top-map* (kbd "s-w") *window-manipulation-map*)
(let ((map *window-manipulation-map*))
(define-key map (kbd "s-c") "remove-split")
(define-key map (kbd "s-d") "delete-window")
(define-key map (kbd "s-s") "hsplit")
(define-key map (kbd "s-v") "vsplit"))

View file

@ -7,10 +7,12 @@
./hardware-configuration.nix
## Desktop/shell environment
<modules/desktop/bspwm.nix>
# <modules/desktop/stumpwm.nix>
## Apps
<modules/browser/firefox.nix>
<modules/dev/cc.nix>
<modules/dev/rust.nix>
# <modules/dev/common-lisp.nix>
<modules/editors/emacs.nix>
<modules/editors/vim.nix>
<modules/gaming/steam.nix>

View file

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
# let unstable = import <nixos-unstable> {};
# in
{
imports = [
./. # common settings
];
environment.systemPackages = with pkgs; [
lightdm
dunst
libnotify
];
# unstable.services.picom.enable = true;
services = {
xserver = {
windowManager.default = "stumpwm";
windowManager.stumpwm.enable = true;
displayManager.lightdm.enable = true;
displayManager.lightdm.greeters.mini.enable = true;
};
};
# link recursively so other modules can link files in their folders
my.home.xdg.configFile."stumpwm" = {
source = <config/stumpwm>;
recursive = true;
};
}

View file

@ -1,6 +1,11 @@
# modules/dev/common-lisp.nix --- https://common-lisp.net/
#
# Mostly for my stumpwm config, and the occasional dip into lisp gamedev.
{ config, lib, pkgs, ... }:
{
my.packages = with pkgs; [
sbcl
lispPackages.quicklisp
];
}