stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] Start specific frames in external monitor (if present)


From: Shakthi Kannan
Subject: [STUMP] Start specific frames in external monitor (if present)
Date: Sat, 6 Jun 2015 20:09:07 +0530

Hi,

I use the following to start Emacs and Chrome in separate frames in
the Default group on a laptop running Ubuntu 14.10 and stumpwm-0.9.8.

=== ~/.stumpwmrc ===

;; Emacs
(defvar *emacs-command* nil
  "Start an emacs client frame. Starts an emacs daemon if necessary.")
(setf *emacs-command* "emacsclient -c -a \"\"")

(defcommand run-emacs () ()
    (run-shell-command (concat "exec " *emacs-command*)))

;; Chromium
(defcommand chromium () ()
  "run chromium"
  (run-or-raise "chromium-browser" '(:instance "chromium-browser")))
(define-key *root-map* (kbd "b") "chromium")

;; Clear rules
(clear-window-placement-rules)

(define-frame-preference "Default"
  ;; frame raise lock (lock AND raise == jumpto)
  (0 t   t :instance "emacs")
  (1 t   t :instance "chromium-browser"))

;; Start default applications
(run-emacs)
(chromium)

=== END ===

Sometimes, I use an external monitor. When starting stumpwm, would it
be possible to detect the presence of an external monitor and start
the emacs frame in it, while the chromium browser can be launched in
the laptop's head?

Any suggestions on how this can be implemented?

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]