Saturday, October 31, 2009

more on .stumpwmrc

(in-package :stumpwm)
;;(setf *new-window-preferred-frame* :empty)
(setf *mouse-focus-policy* :sloppy)
;; really messed stuff up check this (set-prefix-key (kbd "F20")) ; F20 = start key i think?

(defcommand windowlist-pull (&optional (fmt *window-format*)) (:rest)
(if (null (group-windows (current-group)))
(message "No Managed Windows")
(let* ((group (current-group))
(window (select-window-from-menu (sort-windows group) fmt)))
(if window
(pull-window window)
(throw 'error :abort)))))
(define-key *root-map* (kbd "C-z") "windowlist-pull")



(defcommand conkeror () () (run-shell-command "conkeror"))
(define-key *root-map* (kbd "c") "conkeror")
(defcommand konsole () () (run-shell-command "konsole"))
(define-key *root-map* (kbd "x") "konsole")
(defcommand emacsa () () (run-shell-command "emacs"))
(define-key *root-map* (kbd "e") "emacsa")
(defcommand iceweasel () () (run-shell-command "iceweasel"))
(define-key *root-map* (kbd "i") "iceweasel")

Wednesday, October 21, 2009

how to ssh through ssh to a secondary destination

sh -t -t dest.in.at.ion ssh sec.ondary.destina.ation

Sunday, October 18, 2009

stumpwmrc and conkerrc

.stumpwmrc
in-package :stumpwm)
;;(setf *new-window-preferred-frame* :empty)
(setf *mouse-focus-policy* :sloppy)
;; really messed stuff up check this (set-prefix-key (kbd "F20")) ; F20 = start key i think?

(defcommand windowlist-pull (&optional (fmt *window-format*)) (:rest)
(if (null (group-windows (current-group)))
(message "No Managed Windows")
(let* ((group (current-group))
(window (select-window-from-menu (sort-windows group) fmt)))
(if window
(pull-window window)
(throw 'error :abort)))))
(define-key *root-map* (kbd "C-z") "windowlist-pull")

------------------
while for the

.conkerorrc

let (home = get_home_directory()) {
home.append("home.html");
homepage = home.path;
}
define_key(content_buffer_normal_keymap, "b", "back");
define_key(content_buffer_normal_keymap, "C-b", "bookmark");


proxy_server_default = "localhost";
proxy_port_default = 8080;

function set_proxy_session (window, server, port) {

if (server == "N") {
session_pref ('network.proxy.type', 0); //direct connection
window.minibuffer.message ("Direction connection to the internet enabled for this session");
} else {
if (server == "") server = proxy_server_default;
if (port == "") port = proxy_port_default;

session_pref ('network.proxy.socks', server);

session_pref ('network.proxy.socks_port', port);

session_pref ('network.proxy.type', 1);

window.minibuffer.message ("All protocols using "+server+":"+port+" for this session");
}
}

interactive ("set-proxy-session", "set the proxy server for all protocols for this session only",
function (I) {
set_proxy_session (
I.window,
(yield I.minibuffer.read ($prompt = "server ["+proxy_server_default+"] or N: ")),
(yield I.minibuffer.read ($prompt = "port ["+proxy_port_default+"]: ")));
});