Initial commit

This commit is contained in:
Collin J. Doering 2022-01-31 11:41:17 -05:00
commit 32b8ebec9a
Signed by: rekahsoft
GPG Key ID: 7B4DEB93212B3022
259 changed files with 19423 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use guix --ad-hoc stow make

25
.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
# All
*~
.tern-port
# Shepherd
user-config/shepherd/.config/shepherd/shepherd.log
# Emacs
.#*
*.elc
user-config/emacs/.emacs.d/var
user-config/emacs/.emacs.d/config.el
# Transmission
rkd-conf/.config/transmission/dht.dat
rkd-conf/.config/transmission/resume/
rkd-conf/.config/transmission/stats.json
rkd-conf/.config/transmission/torrents/
# Xmonad
xmonad/.xmonad/xmonad-x86_64-linux
xmonad/.xmonad/xmonad.errors
xmonad/.xmonad/xmonad.hi
xmonad/.xmonad/xmonad.o

9
.guix-authorizations Normal file
View File

@ -0,0 +1,9 @@
;; This is the list of OpenPGP keys currently authorized to sign commits in
;; this repository.
(authorizations
(version 0)
((;; primary: "F7BD DC6D BBE6 B16B 2C71 1A02 5FAB 9938 E05B FEC8"
"F8D5 46F3 AF37 EF53 D1B6 48BE 7B4D EB93 212B 3022"
(name "rekahsoft"))))

3
.guix-channel Normal file
View File

@ -0,0 +1,3 @@
(channel
(version 0)
(directory ".guix"))

323
.guix/home-manifest.scm Normal file
View File

@ -0,0 +1,323 @@
(use-modules
(gnu packages)
(guix profiles)
(guix transformations))
(define transform--emacs-helm-mu
(options->transformation
'((with-commit . "emacs-helm-mu=392a8c11ab27b625d9f863cdde14e09893401b15"))))
(define transform--emacs-org-super-agenda
(options->transformation
'((without-tests . "emacs-org-super-agenda"))))
(define %emacs-manifest
(concatenate-manifests
(list
(packages->manifest
(list
;; Temporary: emacs-helm-mu is broken but has been fixed upstream
(transform--emacs-helm-mu
(specification->package "emacs-helm-mu"))
;; Temporary: emacs-org-super-agenda tests stall and do not complete due to interactive prompt
(transform--emacs-org-super-agenda
(specification->package "emacs-org-super-agenda"))
(transform--emacs-org-super-agenda ;; org-ql propigates org-super-agenda
(specification->package "emacs-org-ql"))))
(specifications->manifest
'("aspell"
"aspell-dict-en"
"emacs"
"emacs-ace-jump-mode"
"emacs-ace-window"
"emacs-ag"
"emacs-all-the-icons-dired"
"emacs-auctex"
"emacs-auto-complete"
"emacs-auto-yasnippet"
"emacs-dashboard"
"emacs-dired-hacks"
"emacs-docker"
"emacs-docker-tramp"
"emacs-doom-modeline"
"emacs-elpher"
"emacs-emmet-mode"
"emacs-emms"
"emacs-expand-region"
"emacs-exwm"
"emacs-eval-in-repl"
"emacs-fill-column-indicator"
"emacs-flycheck"
"emacs-flycheck-ledger"
"emacs-geiser"
"emacs-gnuplot"
"emacs-go-mode"
"emacs-god-mode"
"emacs-graphql-mode"
"emacs-graphviz-dot-mode"
"emacs-guix"
"emacs-haskell-mode"
"emacs-helm"
"emacs-helm-ag"
"emacs-helm-c-yasnippet"
"emacs-helm-descbinds"
"emacs-helm-exwm"
"emacs-helm-gtags"
"emacs-helm-ls-git"
"emacs-helm-org"
"emacs-helm-pass"
"emacs-helm-projectile"
"emacs-helm-swoop"
"emacs-highlight-sexp"
"emacs-htmlize"
"emacs-hydra"
"emacs-ibuffer-projectile"
"emacs-isearch+"
"emacs-ivy"
"emacs-json-mode"
"emacs-jsonnet-mode"
"emacs-ledger-mode"
"emacs-lua-mode"
"emacs-magit"
"emacs-forge"
"emacs-markdown-mode"
"emacs-mmm-mode"
"emacs-mu4e-alert"
"emacs-mu4e-conversation"
"emacs-multi-term"
"emacs-multiple-cursors"
"emacs-no-littering"
"emacs-org"
"emacs-org-babel-eval-in-repl"
"emacs-org-download"
"emacs-org-mind-map"
"emacs-org-noter"
"emacs-org-roam"
"emacs-org-web-tools"
"emacs-orgit"
"emacs-ob-async"
"emacs-paredit"
"emacs-pdf-tools"
"emacs-persp-mode"
"emacs-php-mode"
"emacs-plantuml-mode"
"emacs-pretty-mode"
"emacs-projectile"
"emacs-racket-mode"
"emacs-rainbow-delimiters"
"emacs-rainbow-identifiers"
"emacs-rainbow-mode"
"emacs-realgud"
"emacs-recutils"
"emacs-restclient"
"emacs-ripgrep"
"emacs-rust-mode"
"emacs-scribble-mode"
"emacs-slime"
"emacs-string-inflection"
"emacs-swiper"
"emacs-terraform-mode"
"emacs-tramp"
"emacs-undo-tree"
"emacs-use-package"
"emacs-vterm"
"emacs-yaml-mode"
"emacs-yasnippet"
"emacs-yasnippet-snippets"
"gnuplot"
"isync"
"mu"
"plantuml"
; "emacs-ac-geiser" ;; TODO: hash mismatch; possible non-determinism
;"emacs-helm-mu" ;; TODO: broken, but fixed upstream
;;
;; Remaining packages from the rekahsoft-guix channel
"emacs-ace-mc"
"emacs-all-the-icons-ibuffer"
"emacs-hamlet-mode"
"emacs-helm-rg"
"emacs-helm-tramp"
"emacs-helm-unicode"
"emacs-highlight-indent-guides"
"emacs-highlight-parentheses"
"emacs-ibuffer-vc"
"emacs-intel-hex-mode"
"emacs-ix"
"emacs-mu4e-dashboard"
"emacs-mu4e-maildirs-extension"
"emacs-org-html-theme-darksun"
"emacs-org-html-themes"
"emacs-org-roam-extensions"
"emacs-org-roam-ui"
"emacs-persp-projectile"
"emacs-quack"
"emacs-rcirc-notify"
"emacs-rebox2"
"emacs-vimish-fold"
;; Use more up-to-date treemacs and treemacs-extra (as well as required dependencies)
"emacs-treemacs-20201225"
"emacs-treemacs-extra-20201225"
"emacs-all-the-icons-20201225"
"emacs-doom-themes-20201225"
;; Use more up-to-date ace-link
"emacs-ace-link-2021-01-1")))))
(define %shell-manifest
(specifications->manifest
'("bat"
"exa"
"ripgrep"
;; Remaining packages from the rekahsoft-guix channel
"fzf" ;; TODO: this was added upstream (as "go-github-com-junegunn-fzf") but is not as complete as my existing package
"sh-z"
"spaceship-prompt"
"zsh-autosuggestions")))
(define %xorg-manifest
(specifications->manifest
'("mesa"
"setxkbmap"
"xdg-utils"
"xf86-input-libinput"
"xf86-video-fbdev"
"xinit"
"xkbcomp"
"xkeyboard-config"
"xlsfonts"
"xorg-server"
"xrandr"
"xrdb"
"xsetroot")))
(define %wayland-manifest
(specifications->manifest
'("grim"
"hicolor-icon-theme" ;; Required for wofi icon theme
"slurp"
"sway"
"wayland"
"wofi")))
;; Manifest containing x programs (that cannot natively run with wayland).
(define %xorg-apps-manifest
(specifications->manifest
'("dunst" ;; <- May not need this; use something in emacs
"feh"
"pavucontrol"
"redshift"
"rofi" ;; <- Look into replacing in emacs
"rofi-pass" ;; <- This should be replacable in emacs with helm-pass
"unclutter"
"xautolock"
"xclip"
"zathura"
"zathura-djvu"
"zathura-pdf-poppler"
"zathura-ps"
;; "xbindkeys" <- should be able to depricate this
;; "compton" <- this historyically caused issues with screen locking
;;
;; Remaining packages from the rekahsoft-guix channel
"virt-viewer@11.0")))
;; Manifest containing Xorg and Wayland native compatible programs
(define %xorg-wayland-apps-manifest
(specifications->manifest
'("kitty" ;; <- May not need this and instead will use emacs-vterm
"alacritty" ;; <- ditto
"adwaita-icon-theme")))
(define %guile-manifest
(specifications->manifest
'("guile"
"guile-charting" ;; guile-charting is required for 'guix size --map-file'
"guile-colorized"
"guile-hall"
"guile-readline")))
(define %misc-manifest
(specifications->manifest
'("ansible"
"awscliv2"
"beets"
"bmon"
"coreutils"
"curl"
"direnv"
"flatpak"
"font-dejavu" ;; TODO: check if font is needed
"font-fira-code" ;; TODO: check if font is needed
"font-gnu-freefont"
"font-terminus"
"font-google-noto"
"git"
"git:send-email"
"git:subtree"
"glibc-locales"
"gnupg"
"graphviz"
"gs-fonts" ;; TODO: check if font is needed
"gwl"
"hledger"
"htop"
"ledger"
"ledger-autosync"
"mpd"
"mpv"
"ncmpcpp" ;; <- This can be replaced by emacs-emms
"nmap"
"nss-certs"
"nyxt"
"openssh"
"pass-otp"
"password-store"
"recutils"
"rhash"
"skopeo"
"texlive"
"tmux"
"ungoogled-chromium"
"util-linux"
"wget"
"youtube-dl"
;; TODO: kicad currently broken (wxwidgets does not build)
;; "kicad" "kicad-library" "kicad-symbols" "gtkwave"
;; TODO: (packages I like but maybe should be project specific?)
;; "avr-toolchain" (propigated inputs: "avrdude" "avr-binutils" "avr-gcc")
;; "clojure"
;; "lua"
;; "chez"
;; "coq"
;; TODO: (these probably should go in the system configuration)
;; "bitlebee"
;;
;; Remaining packages from the rekahsoft-guix channel
"aws-vault"
"hledger-ui"
"hledger-web"
"terraform-provider-aws"
"terraform-wrapper")))
(concatenate-manifests
(list
%emacs-manifest
%shell-manifest
%xorg-manifest
%wayland-manifest
%xorg-apps-manifest
%xorg-wayland-apps-manifest
%guile-manifest
%misc-manifest))

49
Makefile Normal file
View File

@ -0,0 +1,49 @@
# Set default target for make > 3.80
.DEFAULT_GOAL := default
# Default make to the dev target
.PHONY: default
default: all
# Variables
STOW := $(shell command -v stow 2> /dev/null)
STOW_FLAGS=-v -t $(HOME)
STOW_PACKAGE_DIR=user-config
STOW_PACKAGES=$(shell ls $(STOW_PACKAGE_DIR))
# Add additional flags if requested
ifeq ($(DRY),true)
STOW_FLAGS+=-n
endif
ifeq ($(RESTOW),true)
STOW_FLAGS+=-R
endif
ifeq ($(DELETE),true)
STOW_FLAGS+=-D
endif
.PHONY: check-env
check-env:
ifndef STOW
$(error GNU stow must be installed)
endif
@[ -d ~/.config ] || mkdir ~/.config
@[ -d ~/.bin ] || mkdir ~/.bin
@[ -d ~/.local/share ] || mkdir -p ~/.local/share
.PHONY: list-packages
list-packages:
@ls $(STOW_PACKAGE_DIR)
.PHONY: $(STOW_PACKAGES)
$(STOW_PACKAGES): check-env
@cd $(STOW_PACKAGE_DIR) && $(STOW) $(STOW_FLAGS) $@
.PHONY: all
all: check-env
@cd $(STOW_PACKAGE_DIR) && $(STOW) $(STOW_FLAGS) $(STOW_PACKAGES)
.PHONY: init
init:
guix pull -C channels.scm
guix package -m user-manifest.scm

129
README.org Normal file
View File

@ -0,0 +1,129 @@
#+TITLE: RekahSoft Dotfiles
#+AUTHOR: Collin J. Doering
#+begin_abstract
These are the dotfiles of Collin Doering.
#+end_abstract
* Quickstart
Clone this repository.
#+begin_src shell
git clone <repo> ~/.dotfiles
cd ~/.dotfiles
#+end_src
Dependencies are managed using [guix](https://guix.gnu.org) and can be installed with the
following.
#+begin_src shell
guix pull -C ~/.dotfiles/channels.scm
guix package -m ~/.dotfiles/user-manifest.scm
#+end_src
Configurations for a variety of programs are available to be 'installed' by symbolically
linking them into ~$HOME~ using stow. This process is simplified by the provided ~Makefile~.
#+begin_src shell
# See what will be installed/linked by stow
make DRY=true
# Install/link all configurations
make
#+end_src
* Makefile Usage
#+begin_verse
make [packages] [DRY=true] [RESTOW=true] [DELETE=true]
Where:
<DRY> must be undfined or 'true'
<RESTOW> must be undfined or 'true'
<DELETE> must be undfined or 'true'
Notes:
If no [packages] are listed, all packages are actioned upon via the all target
#+end_verse
** Examples
#+begin_src shell
# Install a subset of the entire configuration
make zsh xorg
# Relink configuration
make RESTOW=true
# Relink configuration for a subset of packages
make RESTOW=true bash zsh
# Uninstall/unlink configuration
make DELETE=true
# Uninstall/unlink configuration for a subset of packages
make DELETE=true bash
#+end_src
* Development
This section details some useful tips regarding development.
** Guix
Here are some useful commands for working with package upgrades on guix.
#+begin_src shell
# Check for binary substitute availability on the tip of master
guix time-machine -- weather -m ~/.dotfiles/user-manifest.scm
# Build a environment using the provided user-manifest.scm off the tip of master (useful to test the new environment)
guix time-machine -- environment -m ~/.dotfiles/user-manifest.scm -- exit
#+end_src
*** Updates that modify zsh site-functions (completions)
These updates require additional manual effort, otherwise completions don't show up.
#+begin_src shell
# Set fpath in ~/.zprofile (this is already done in the zsh configuration)
#fpath=(~/.guix-profile/share/zsh/site-functions $fpath)
rm -r ~/.zcompdump && compinit
#+end_src
*** Try out any packaged window manager
The included ~xorg~ configuration provides a script that is used to ~startx~, located in
~~/.bin/startx.sh~ after installing/linking the ~xorg~ configuration. This script is required
as the ~startx~ that comes with the ~xinit~ package on guix does not work when Xorg is
installed in a user profile. Like the original ~startx~ command, this script passes through
arguments to ~~/.xinitrc~. The included ~~/.xinitrc~ takes two optional arguments,
~SESSION_WM~ and ~SESSION_TYPE~, the window manager to run and the session type to use. The
session type can be one of ~full~ (default), ~min~, or ~new~.
Start the default window manager (~exwm~) with the default session type (~full~).
#+begin_src shell
startx
#+end_src
**Note:** if using the configuration ~zsh~ or ~bash~, all ~*.sh~
scripts linked into ~~/.bin~ are aliased to exclude the ~.sh~ suffix.
#+begin_src shell
guix environment --ad-hoc ratpoison -- startx.sh ratpoison new
#+end_src
**Note:** The script ~startx.sh~ must be used directly here, and not
by the ~startx~ alias mentioned above.
This works very well for simple window managers, however for more
complicated environments, many times there are numerous packages that
will be required. Here is an example of starting xfce using this
mechanism.
#+begin_src shell
guix environment --ad-hoc xfce xfce4-session xfconf -- startx.sh startxfce4 new
#+end_src

22
channels.scm Normal file
View File

@ -0,0 +1,22 @@
(list (channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(branch "master")
(commit
"a4eae0c3adce8e4c4ac153a4959d18b9897a67e1")
(introduction
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
(openpgp-fingerprint
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
(channel
(name 'rekahsoft-guix)
(url "https://git.rekahsoft.ca/rekahsoft/rekahsoft-guix.git")
(branch "master")
(commit
"b72c13392a9ffab0dd52dcf9e30fb599e364a78e")
(introduction
(make-channel-introduction
"191cdaa0947657e0c85fe89ebbb8e7b1e7a8e0a4"
(openpgp-fingerprint
"F8D5 46F3 AF37 EF53 D1B6 48BE 7B4D EB93 212B 3022")))))

View File

@ -0,0 +1,373 @@
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
-- Handle runtime errors after startup
do
local in_error = false
awesome.add_signal("debug::error", function (err)
-- Make sure we don't go into an endless error loop
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "xterm"
editor = os.getenv("EDITOR") or "nano"
editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
{
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier
}
-- }}}
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
for s = 1, screen.count() do
-- Each screen has its own tag table.
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
end
-- }}}
-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awesome.conffile },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "open terminal", terminal }
}
})
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
menu = mymainmenu })
-- }}}
-- {{{ Wibox
-- Create a textclock widget
mytextclock = awful.widget.textclock({ align = "right" })
-- Create a systray
mysystray = widget({ type = "systray" })
-- Create a wibox for each screen and add it
mywibox = {}
mypromptbox = {}
mylayoutbox = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ width=250 })
end
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
mylayoutbox[s]:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(function(c)
return awful.widget.tasklist.label.currenttags(c, s)
end, mytasklist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s })
-- Add widgets to the wibox - order matters
mywibox[s].widgets = {
{
mylauncher,
mytaglist[s],
mypromptbox[s],
layout = awful.widget.layout.horizontal.leftright
},
mylayoutbox[s],
mytextclock,
s == 1 and mysystray or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
}
end
-- }}}
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
))
-- }}}
-- {{{ Key bindings
globalkeys = awful.util.table.join(
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "w", function () mymainmenu:show({keygrabber=true}) end),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
-- Standard program
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
awful.key({ modkey, "Control" }, "n", awful.client.restore),
-- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
awful.key({ modkey }, "x",
function ()
awful.prompt.run({ prompt = "Run Lua code: " },
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
awful.util.getdir("cache") .. "/history_eval")
end)
)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end),
awful.key({ modkey, }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
end)
)
-- Compute the maximum number of digit we need, limited to 9
keynumber = 0
for s = 1, screen.count() do
keynumber = math.min(9, math.max(#tags[s], keynumber));
end
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, keynumber do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewonly(tags[screen][i])
end
end),
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewtoggle(tags[screen][i])
end
end),
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.movetotag(tags[client.focus.screen][i])
end
end),
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.toggletag(tags[client.focus.screen][i])
end
end))
end
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { class = "pinentry" },
properties = { floating = true } },
{ rule = { class = "gimp" },
properties = { floating = true } },
-- Set Firefox to always map on tags number 2 of screen 1.
-- { rule = { class = "Firefox" },
-- properties = { tag = tags[1][2] } },
}
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.add_signal("manage", function (c, startup)
-- Add a titlebar
-- awful.titlebar.add(c, { modkey = modkey })
-- Enable sloppy focus
c:add_signal("mouse::enter", function(c)
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
and awful.client.focus.filter(c) then
client.focus = c
end
end)
if not startup then
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
-- Put windows in a smart way, only if they does not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
awful.placement.no_offscreen(c)
end
end
end)
client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}

View File

@ -0,0 +1,244 @@
# Thank you code_nomad: http://9m.no/ꪯ鵞
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
#################################
#
# GLX backend
#
#################################
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
# Useful with --glx-swap-method, as well.
glx-copy-from-front = false;
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
# glx-no-rebind-pixmap = true;
# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
glx-swap-method = "undefined";
#################################
#
# Shadows
#
#################################
# Enabled client-side shadows on windows.
shadow = true;
# Don't draw shadows on DND windows.
no-dnd-shadow = true;
# Avoid drawing shadows on dock/panel windows.
no-dock-shadow = true;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = -5;
# The top offset for shadows. (default -15)
shadow-offset-y = -5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;
# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
"! name~=''",
"name = 'Notification'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;
#################################
#
# Opacity
#
#################################
menu-opacity = 1;
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
alpha-step = 0.06;
# Dim inactive windows. (0.0 - 1.0)
# inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = true;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.01;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.01;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
#################################
#
# Other
#
#################################
# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;
# Specify refresh rate of the screen.
# If not specified or 0, compton will try detecting this with X RandR extension.
refresh-rate = 0;
# Set VSync method. VSync methods currently available:
# none: No VSync
# drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers.
# opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers.
# opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers.
# opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesnt have the effect of --sw-opti unlike other methods. Experimental.
# opengl-mswc: Try to VSync with MESA_swap_control OpenGL extension. Basically the same as opengl-swc above, except the extension we use.
# (Note some VSync methods may not be enabled at compile time.)
vsync = "opengl";
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
# paint-on-overlay may make the flickering less obvious.
unredir-if-possible = false;
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;
#################################
#
# Window type settings
#
#################################
wintypes:
{
tooltip =
{
# fade: Fade the particular type of windows.
fade = true;
# shadow: Give those windows shadow
shadow = false;
# opacity: Default opacity for the type of windows.
opacity = 0.85;
# focus: Whether to always consider windows of this type focused.
focus = true;
};
};
######################
#
# XSync
# See: https://github.com/yshui/compton/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
#
######################
# Attempt to synchronize client applications' draw calls with `XSync()`, used on GLX backend to ensure up-to-date window content is painted.
xrender-sync = true;
# use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;

View File

@ -0,0 +1,242 @@
[global]
font = Terminus 8
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
# If markup is not allowed, those tags will be stripped out of the
# message.
allow_markup = yes
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# Markup is allowed
format = "<b>%s</b>\n%b"
# Sort messages by urgency.
sort = yes
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# The frequency with wich text that is longer than the notification
# window allows bounces back and forth.
# This option conflicts with "word_wrap".
# Set to 0 to disable.
bounce_freq = 0
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes
# Ignore newlines '\n' in notifications.
ignore_newline = no
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectevly.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "300x5-20+30"
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = no
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 10
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
idle_threshold = 120
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a windowmanager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern windowmanagers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
# The height of a single line. If the height is smaller than the
# font height, it will get raised to the font height.
# This adds empty space above and under the text.
line_height = 0
# Draw a line of "separatpr_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 2
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 8
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = true
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/conkeror
# Align icons left/right/off
icon_position = off
# Paths to default icons.
icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
[frame]
width = 1
color = "#2fed55"
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
close = ctrl+space
# Close all notifications.
close_all = ctrl+shift+space
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1".
history = ctrl+shift+grave
# Context menu.
context = ctrl+shift+period
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the '#' and following would be interpreted as a comment.
background = "#3b615d"
foreground = "#93a1a1"
timeout = 5
[urgency_normal]
background = "#38A69A"
foreground = "#000000"
timeout = 10
[urgency_critical]
background = "#f51f1b"
foreground = "#000000"
timeout = 0
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#

View File

@ -0,0 +1,11 @@
[Filechooser Settings]
LocationMode=path-bar
ShowHidden=true
ShowSizeColumn=true
GeometryX=431
GeometryY=715
GeometryWidth=2978
GeometryHeight=758
SortColumn=modified
SortOrder=ascending
StartupMode=recent

View File

@ -0,0 +1 @@
file:///home/collin/work/documents/PSHSA

View File

@ -0,0 +1,17 @@
[Settings]
#gtk-key-theme-name=Emacs
gtk-theme-name=Arc
gtk-icon-theme-name=gnome
gtk-font-name=FreeMono 12
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb

View File

@ -0,0 +1,19 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/collin/.gtkrc-2.0.mine"
gtk-theme-name="Arc"
gtk-icon-theme-name="gnome"
gtk-font-name="FreeMono 12"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"
gtk-xft-rgba="rgb"

View File

@ -0,0 +1,588 @@
-----------------
-- Keybindings --
-----------------
-- Binding aliases
local key, buf, but = lousy.bind.key, lousy.bind.buf, lousy.bind.but
local cmd, any = lousy.bind.cmd, lousy.bind.any
-- Util aliases
local match, join = string.match, lousy.util.table.join
local strip, split = lousy.util.string.strip, lousy.util.string.split
-- Globals or defaults that are used in binds
local scroll_step = globals.scroll_step or 20
local zoom_step = globals.zoom_step or 0.1
-- Add binds to a mode
function add_binds(mode, binds, before)
assert(binds and type(binds) == "table", "invalid binds table type: " .. type(binds))
mode = type(mode) ~= "table" and {mode} or mode
for _, m in ipairs(mode) do
local mdata = get_mode(m)
if mdata and before then
mdata.binds = join(binds, mdata.binds or {})
elseif mdata then
mdata.binds = mdata.binds or {}
for _, b in ipairs(binds) do table.insert(mdata.binds, b) end
else
new_mode(m, { binds = binds })
end
end
end
-- Add commands to command mode
function add_cmds(cmds, before)
add_binds("command", cmds, before)
end
-- Adds the default menu widget bindings to a mode
menu_binds = {
-- Navigate items
key({}, "j", function (w) w.menu:move_down() end),
key({}, "k", function (w) w.menu:move_up() end),
key({}, "Down", function (w) w.menu:move_down() end),
key({}, "Up", function (w) w.menu:move_up() end),
key({}, "Tab", function (w) w.menu:move_down() end),
key({"Shift"}, "Tab", function (w) w.menu:move_up() end),
}
-- Add binds to special mode "all" which adds its binds to all modes.
add_binds("all", {
key({}, "Escape", "Return to `normal` mode.",
function (w) w:set_mode() end),
key({"Control"}, "[", "Return to `normal` mode.",
function (w) w:set_mode() end),
-- Mouse bindings
but({}, 8, "Go back.",
function (w) w:back() end),
but({}, 9, "Go forward.",
function (w) w:forward() end),
-- Open link in new tab or navigate to selection
but({}, 2, [[Open link under mouse cursor in new tab or navigate to the
contents of `luakit.selection.primary`.]],
function (w, m)
-- Ignore button 2 clicks in form fields
if not m.context.editable then
-- Open hovered uri in new tab
local uri = w.view.hovered_uri
if uri then
w:new_tab(uri, false)
else -- Open selection in current tab
uri = luakit.selection.primary
if uri then w:navigate(w:search_open(uri)) end
end
end
end),
-- Open link in new tab when Ctrl-clicked.
but({"Control"}, 1, "Open link under mouse cursor in new tab.",
function (w, m)
local uri = w.view.hovered_uri
if uri then
w:new_tab(uri, false)
end
end),
-- Zoom binds
but({"Control"}, 4, "Increase text zoom level.",
function (w, m) w:zoom_in() end),
but({"Control"}, 5, "Reduce text zoom level.",
function (w, m) w:zoom_out() end),
-- Horizontal mouse scroll binds
but({"Shift"}, 4, "Scroll left.",
function (w, m) w:scroll{ xrel = -scroll_step } end),
but({"Shift"}, 5, "Scroll right.",
function (w, m) w:scroll{ xrel = scroll_step } end),
})
add_binds("normal", {
-- Autoparse the `[count]` before a binding and re-call the hit function
-- with the count removed and added to the opts table.
any([[Meta-binding to detect the `^[count]` syntax. The `[count]` is parsed
and stripped from the internal buffer string and the value assigned to
`state.count`. Then `lousy.bind.hit()` is re-called with the modified
buffer string & original modifier state.
#### Example binding
lousy.bind.key({}, "%", function (w, state)
w:scroll{ ypct = state.count }
end, { count = 0 })
This binding demonstrates several concepts. Firstly that you are able to
specify per-binding default values of `count`. In this case if the user
types `"%"` the document will be scrolled vertically to `0%` (the top).
If the user types `"100%"` then the document will be scrolled to `100%`
(the bottom). All without the need to use `lousy.bind.buf` bindings
everywhere and or using a `^(%d*)` pattern prefix on every binding which
would like to make use of the `[count]` syntax.]],
function (w, m)
local count, buf
if m.buffer then
count = string.match(m.buffer, "^(%d+)")
end
if count then
buf = string.sub(m.buffer, #count + 1, (m.updated_buf and -2) or -1)
local opts = join(m, {count = tonumber(count)})
opts.buffer = (#buf > 0 and buf) or nil
if lousy.bind.hit(w, m.binds, m.mods, m.key, opts) then
return true
end
end
return false
end),
key({}, "i", "Enter `insert` mode.",
function (w) w:set_mode("insert") end),
key({}, ":", "Enter `command` mode.",
function (w) w:set_mode("command") end),
-- Scrolling
key({}, "j", "Scroll document down.",
function (w) w:scroll{ yrel = scroll_step } end),
key({}, "k", "Scroll document up.",
function (w) w:scroll{ yrel = -scroll_step } end),
key({}, "h", "Scroll document left.",
function (w) w:scroll{ xrel = -scroll_step } end),
key({}, "l", "Scroll document right.",
function (w) w:scroll{ xrel = scroll_step } end),
key({}, "Down", "Scroll document down.",
function (w) w:scroll{ yrel = scroll_step } end),
key({}, "Up", "Scroll document up.",
function (w) w:scroll{ yrel = -scroll_step } end),
key({}, "Left", "Scroll document left.",
function (w) w:scroll{ xrel = -scroll_step } end),
key({}, "Right", "Scroll document right.",
function (w) w:scroll{ xrel = scroll_step } end),
key({}, "^", "Scroll to the absolute left of the document.",
function (w) w:scroll{ x = 0 } end),
key({}, "$", "Scroll to the absolute right of the document.",
function (w) w:scroll{ x = -1 } end),
key({}, "0", "Scroll to the absolute left of the document.",
function (w, m)
if not m.count then w:scroll{ y = 0 } else return false end
end),
key({"Control"}, "e", "Scroll document down.",
function (w) w:scroll{ yrel = scroll_step } end),
key({"Control"}, "y", "Scroll document up.",
function (w) w:scroll{ yrel = -scroll_step } end),
key({"Control"}, "d", "Scroll half page down.",
function (w) w:scroll{ ypagerel = 0.5 } end),
key({"Control"}, "u", "Scroll half page up.",
function (w) w:scroll{ ypagerel = -0.5 } end),
key({"Control"}, "f", "Scroll page down.",
function (w) w:scroll{ ypagerel = 1.0 } end),
key({"Control"}, "b", "Scroll page up.",
function (w) w:scroll{ ypagerel = -1.0 } end),
key({}, "space", "Scroll page down.",
function (w) w:scroll{ ypagerel = 1.0 } end),
key({"Shift"}, "space", "Scroll page up.",
function (w) w:scroll{ ypagerel = -1.0 } end),
key({}, "BackSpace", "Scroll page up.",
function (w) w:scroll{ ypagerel = -1.0 } end),
key({}, "Page_Down", "Scroll page down.",
function (w) w:scroll{ ypagerel = 1.0 } end),
key({}, "Page_Up", "Scroll page up.",
function (w) w:scroll{ ypagerel = -1.0 } end),
key({}, "Home", "Go to the end of the document.",
function (w) w:scroll{ y = 0 } end),
key({}, "End", "Go to the top of the document.",
function (w) w:scroll{ y = -1 } end),
-- Specific scroll
buf("^gg$", "Go to the top of the document.",
function (w, b, m) w:scroll{ ypct = m.count } end, {count=0}),
buf("^G$", "Go to the bottom of the document.",
function (w, b, m) w:scroll{ ypct = m.count } end, {count=100}),
buf("^%%$", "Go to `[count]` percent of the document.",
function (w, b, m) w:scroll{ ypct = m.count } end),
-- Zooming
key({}, "+", "Enlarge text zoom of the current page.",
function (w, m) w:zoom_in(zoom_step * m.count) end, {count=1}),
key({}, "-", "Reduce text zom of the current page.",
function (w, m) w:zoom_out(zoom_step * m.count) end, {count=1}),
key({}, "=", "Reset zoom level.",
function (w, m) w:zoom_set() end),
buf("^z[iI]$", [[Enlarge text zoom of current page with `zi` or `zI` to
reduce full zoom.]],
function (w, b, m)
w:zoom_in(zoom_step * m.count, b == "zI")
end, {count=1}),
buf("^z[oO]$", [[Reduce text zoom of current page with `zo` or `zO` to
reduce full zoom.]],
function (w, b, m)
w:zoom_out(zoom_step * m.count, b == "zO")
end, {count=1}),
-- Zoom reset or specific zoom ([count]zZ for full content zoom)
buf("^z[zZ]$", [[Set current page zoom to `[count]` percent with
`[count]zz`, use `[count]zZ` to set full zoom percent.]],
function (w, b, m)
w:zoom_set(m.count/100, b == "zZ")
end, {count=100}),
-- Fullscreen
key({}, "F11", "Toggle fullscreen mode.",
function (w) w.win.fullscreen = not w.win.fullscreen end),
-- Clipboard
key({}, "p", [[Open a URL based on the current primary selection contents
in the current tab.]],
function (w)
local uri = luakit.selection.primary
if not uri then w:notify("No primary selection...") return end
w:navigate(w:search_open(uri))
end),
key({}, "P", [[Open a URL based on the current primary selection contents
in `[count=1]` new tab(s).]],
function (w, m)
local uri = luakit.selection.primary
if not uri then w:notify("No primary selection...") return end
for i = 1, m.count do w:new_tab(w:search_open(uri)) end
end, {count = 1}),
-- Yanking
key({}, "y", "Yank current URI to primary selection.",
function (w)
local uri = string.gsub(w.view.uri or "", " ", "%%20")
luakit.selection.primary = uri
w:notify("Yanked uri: " .. uri)
end),
-- Commands
key({"Control"}, "a", "Increment last number in URL.",
function (w) w:navigate(w:inc_uri(1)) end),
key({"Control"}, "x", "Decrement last number in URL.",
function (w) w:navigate(w:inc_uri(-1)) end),
key({}, "o", "Open one or more URLs.",
function (w) w:enter_cmd(":open ") end),
key({}, "t", "Open one or more URLs in a new tab.",
function (w) w:enter_cmd(":tabopen ") end),
key({}, "w", "Open one or more URLs in a new window.",
function (w) w:enter_cmd(":winopen ") end),
key({}, "O", "Open one or more URLs based on current location.",
function (w) w:enter_cmd(":open " .. (w.view.uri or "")) end),
key({}, "T",
"Open one or more URLs based on current location in a new tab.",
function (w) w:enter_cmd(":tabopen " .. (w.view.uri or "")) end),
key({}, "W",
"Open one or more URLs based on current locaton in a new window.",
function (w) w:enter_cmd(":winopen " .. (w.view.uri or "")) end),
-- History
key({}, "H", "Go back in the browser history `[count=1]` items.",
function (w, m) w:back(m.count) end),
key({}, "L", "Go forward in the browser history `[count=1]` times.",
function (w, m) w:forward(m.count) end),
key({}, "XF86Back", "Go back in the browser history.",
function (w, m) w:back(m.count) end),
key({}, "XF86Forward", "Go forward in the browser history.",
function (w, m) w:forward(m.count) end),
key({"Control"}, "o", "Go back in the browser history.",
function (w, m) w:back(m.count) end),
key({"Control"}, "i", "Go forward in the browser history.",
function (w, m) w:forward(m.count) end),
-- Tab
key({"Control"}, "Page_Up", "Go to previous tab.",
function (w) w:prev_tab() end),
key({"Control"}, "Page_Down", "Go to next tab.",
function (w) w:next_tab() end),
key({"Control"}, "Tab", "Go to next tab.",
function (w) w:next_tab() end),
key({"Shift","Control"}, "Tab", "Go to previous tab.",
function (w) w:prev_tab() end),
buf("^gT$", "Go to previous tab.",
function (w) w:prev_tab() end),
buf("^gt$", "Go to next tab (or `[count]` nth tab).",
function (w, b, m)
if not w:goto_tab(m.count) then w:next_tab() end
end, {count=0}),
buf("^g0$", "Go to first tab.",
function (w) w:goto_tab(1) end),
buf("^g$$", "Go to last tab.",
function (w) w:goto_tab(-1) end),
key({"Control"}, "t", "Open a new tab.",
function (w) w:new_tab(globals.homepage) end),
key({"Control"}, "w", "Close current tab.",
function (w) w:close_tab() end),
key({}, "d", "Close current tab (or `[count]` tabs).",
function (w, m) for i=1,m.count do w:close_tab() end end, {count=1}),
key({}, "<", "Reorder tab left `[count=1]` positions.",
function (w, m)
w.tabs:reorder(w.view, w.tabs:current() - m.count)
end, {count=1}),
key({}, ">", "Reorder tab right `[count=1]` positions.",
function (w, m)
w.tabs:reorder(w.view,
(w.tabs:current() + m.count) % w.tabs:count())
end, {count=1}),
buf("^gH$", "Open homepage in new tab.",
function (w) w:new_tab(globals.homepage) end),
buf("^gh$", "Open homepage.",
function (w) w:navigate(globals.homepage) end),
buf("^gy$", "Duplicate current tab.",
function (w) w:new_tab(w.view.history or "") end),
key({}, "r", "Reload current tab.",
function (w) w:reload() end),
key({}, "R", "Reload current tab (skipping cache).",
function (w) w:reload(true) end),
key({"Control"}, "c", "Stop loading the current tab.",
function (w) w.view:stop() end),
key({"Control", "Shift"}, "R", "Restart luakit (reloading configs).",
function (w) w:restart() end),
-- Window
buf("^ZZ$", "Quit and save the session.",
function (w) w:save_session() w:close_win() end),
buf("^ZQ$", "Quit and don't save the session.",
function (w) w:close_win() end),
buf("^D$", "Quit and don't save the session.",
function (w) w:close_win() end),
-- Enter passthrough mode
key({"Control"}, "z",
"Enter `passthrough` mode, ignores all luakit keybindings.",
function (w) w:set_mode("passthrough") end),
})
add_binds("insert", {
key({"Control"}, "z",
"Enter `passthrough` mode, ignores all luakit keybindings.",
function (w) w:set_mode("passthrough") end),
})
readline_bindings = {
key({"Shift"}, "Insert",
"Insert contents of primary selection at cursor position.",
function (w) w:insert_cmd(luakit.selection.primary) end),
key({"Control"}, "w", "Delete previous word.",
function (w) w:del_word() end),
key({"Control"}, "u", "Delete until beginning of current line.",
function (w) w:del_line() end),
key({"Control"}, "h", "Delete character to the left.",
function (w) w:del_backward_char() end),
key({"Control"}, "d", "Delete character to the right.",
function (w) w:del_forward_char() end),
key({"Control"}, "a", "Move cursor to beginning of current line.",
function (w) w:beg_line() end),
key({"Control"}, "e", "Move cursor to end of current line.",
function (w) w:end_line() end),
key({"Control"}, "f", "Move cursor forward one character.",
function (w) w:forward_char() end),
key({"Control"}, "b", "Move cursor backward one character.",
function (w) w:backward_char() end),
key({"Mod1"}, "f", "Move cursor forward one word.",
function (w) w:forward_word() end),
key({"Mod1"}, "b", "Move cursor backward one word.",
function (w) w:backward_word() end),
}
add_binds({"command", "search"}, readline_bindings)
-- Switching tabs with Mod1+{1,2,3,...}
mod1binds = {}
for i=1,10 do
table.insert(mod1binds,
key({"Mod1"}, tostring(i % 10), "Jump to tab at index "..i..".",
function (w) w.tabs:switch(i) end))
end
add_binds("normal", mod1binds)
-- Command bindings which are matched in the "command" mode from text
-- entered into the input bar.
add_cmds({
buf("^%S+!",
[[Detect bang syntax in `:command!` and recursively calls
`lousy.bind.match_cmd(..)` removing the bang from the command string
and setting `bang = true` in the bind opts table.]],
function (w, cmd, opts)
local cmd, args = string.match(cmd, "^(%S+)!+(.*)")
if cmd then
opts = join(opts, { bang = true })
return lousy.bind.match_cmd(w, opts.binds, cmd .. args, opts)
end
end),
cmd("c[lose]", "Close current tab.",
function (w) w:close_tab() end),
cmd("print", "Print current page.",
function (w) w.view:eval_js("print()") end),
cmd("stop", "Stop loading.",
function (w) w.view:stop() end),
cmd("reload", "Reload page",
function (w) w:reload() end),
cmd("restart", "Restart browser (reload config files).",
function (w) w:restart() end),
cmd("write", "Save current session.",
function (w) w:save_session() end),
cmd("noh[lsearch]", "Clear search highlighting.",
function (w) w:clear_search() end),
cmd("back", "Go back in the browser history `[count=1]` items.",
function (w, a) w:back(tonumber(a) or 1) end),
cmd("f[orward]", "Go forward in the browser history `[count=1]` items.",
function (w, a) w:forward(tonumber(a) or 1) end),
cmd("inc[rease]", "Increment last number in URL.",
function (w, a) w:navigate(w:inc_uri(tonumber(a) or 1)) end),
cmd("o[pen]", "Open one or more URLs.",
function (w, a) w:navigate(w:search_open(a)) end),
cmd("t[abopen]", "Open one or more URLs in a new tab.",
function (w, a) w:new_tab(w:search_open(a)) end),
cmd("w[inopen]", "Open one or more URLs in a new window.",
function (w, a) window.new{w:search_open(a)} end),
cmd({"javascript", "js"}, "Evaluate JavaScript snippet.",
function (w, a) w.view:eval_js(a) end),
-- Tab manipulation commands
cmd("tab", "Execute command and open result in new tab.",
function (w, a) w:new_tab() w:run_cmd(":" .. a) end),
cmd("tabd[o]", "Execute command in each tab.",
function (w, a) w:each_tab(function (v) w:run_cmd(":" .. a) end) end),
cmd("tabdu[plicate]", "Duplicate current tab.",
function (w) w:new_tab(w.view.history) end),
cmd("tabfir[st]", "Switch to first tab.",
function (w) w:goto_tab(1) end),
cmd("tabl[ast]", "Switch to last tab.",
function (w) w:goto_tab(-1) end),
cmd("tabn[ext]", "Switch to the next tab.",
function (w) w:next_tab() end),
cmd("tabp[revious]", "Switch to the previous tab.",
function (w) w:prev_tab() end),
cmd("q[uit]", "Close the current window.",
function (w, a, o) w:close_win(o.bang) end),
cmd({"viewsource", "vs"}, "View the source code of the current document.",
function (w, a, o) w:toggle_source(not o.bang and true or nil) end),
cmd({"wqall", "wq"}, "Save the session and quit.",
function (w, a, o) w:save_session() w:close_win(o.bang) end),
cmd("lua", "Evaluate Lua snippet.", function (w, a)
if a then
local ret = assert(
loadstring("return function(w) return "..a.." end"))()(w)
if ret then print(ret) end
else
w:set_mode("lua")
end
end),
cmd("dump", "Dump current tabs html to file.",
function (w, a)
local fname = string.gsub(w.win.title, '[^%w%.%-]', '_')..'.html' -- sanitize filename
local file = a or luakit.save_file("Save file", w.win, xdg.download_dir or '.', fname)
if file then
local fd = assert(io.open(file, "w"), "failed to open: " .. file)
local html = assert(w.view:eval_js("document.documentElement.outerHTML"), "Unable to get HTML")
assert(fd:write(html), "unable to save html")
io.close(fd)
w:notify("Dumped HTML to: " .. file)
end
end),
})
-- vim: et:sw=4:ts=8:sts=4:tw=80

View File

@ -0,0 +1,85 @@
-- Global variables for luakit
globals = {
homepage = "http://luakit.org/",
-- homepage = "http://github.com/mason-larobina/luakit",
scroll_step = 40,
zoom_step = 0.1,
max_cmd_history = 100,
max_srch_history = 100,
-- http_proxy = "http://example.com:3128",
default_window_size = "800x600",
-- Disables loading of hostnames from /etc/hosts (for large host files)
-- load_etc_hosts = false,
-- Disables checking if a filepath exists in search_open function
-- check_filepath = false,
}
-- Make useragent
local _, arch = luakit.spawn_sync("uname -sm")
-- Only use the luakit version if in date format (reduces identifiability)
local lkv = string.match(luakit.version, "^(%d+.%d+.%d+)")
globals.useragent = string.format("Mozilla/5.0 (%s) AppleWebKit/%s+ (KHTML, like Gecko) WebKitGTK+/%s luakit%s",
string.sub(arch, 1, -2), luakit.webkit_user_agent_version,
luakit.webkit_version, (lkv and ("/" .. lkv)) or "")
-- Search common locations for a ca file which is used for ssl connection validation.
local ca_files = {
-- $XDG_DATA_HOME/luakit/ca-certificates.crt
luakit.data_dir .. "/ca-certificates.crt",
"/etc/certs/ca-certificates.crt",
"/etc/ssl/certs/ca-certificates.crt",
}
-- Use the first ca-file found
for _, ca_file in ipairs(ca_files) do
if os.exists(ca_file) then
soup.ssl_ca_file = ca_file
break
end
end
-- Change to stop navigation sites with invalid or expired ssl certificates
soup.ssl_strict = false
-- Set cookie acceptance policy
cookie_policy = { always = 0, never = 1, no_third_party = 2 }
soup.accept_policy = cookie_policy.always
-- List of search engines. Each item must contain a single %s which is
-- replaced by URI encoded search terms. All other occurances of the percent
-- character (%) may need to be escaped by placing another % before or after
-- it to avoid collisions with lua's string.format characters.
-- See: http://www.lua.org/manual/5.1/manual.html#pdf-string.format
search_engines = {
duckduckgo = "https://duckduckgo.com/?q=%s",
github = "https://github.com/search?q=%s",
google = "https://google.com/search?q=%s",
imdb = "http://www.imdb.com/find?s=all&q=%s",
wikipedia = "https://en.wikipedia.org/wiki/Special:Search?search=%s",
}
-- Set google as fallback search engine
search_engines.default = search_engines.google
-- Use this instead to disable auto-searching
--search_engines.default = "%s"
-- Per-domain webview properties
-- See http://webkitgtk.org/reference/webkitgtk/stable/WebKitWebSettings.html
domain_props = { --[[
["all"] = {
enable_scripts = false,
enable_plugins = false,
enable_private_browsing = false,
user_stylesheet_uri = "",
},
["youtube.com"] = {
enable_scripts = true,
enable_plugins = true,
},
["bbs.archlinux.org"] = {
user_stylesheet_uri = "file://" .. luakit.data_dir .. "/styles/dark.css",
enable_private_browsing = true,
}, ]]
}
-- vim: et:sw=4:ts=8:sts=4:tw=80

View File

@ -0,0 +1,163 @@
-------------------------------
-- luakit mode configuration --
-------------------------------
-- Table of modes and their callback hooks
local modes = {}
local lousy = require "lousy"
local join = lousy.util.table.join
local order = 0
-- Add new mode table (optionally merges with original mode)
function new_mode(name, desc, mode, replace)
assert(string.match(name, "^[%w-_]+$"), "invalid mode name: " .. name)
-- Detect optional description
if type(desc) == "table" then
desc, mode, replace = nil, desc, mode
end
local traceback = debug.traceback("Creation traceback:", 2)
order = order + 1
modes[name] = join({ order = order, traceback = traceback },
(not replace and modes[name]) or {}, mode or {},
{ name = name, desc = desc })
end
-- Get mode table
function get_mode(name) return modes[name] end
function get_modes() return lousy.util.table.clone(modes) end
-- Attach window & input bar signals for mode hooks
window.init_funcs.modes_setup = function (w)
-- Calls the `enter` and `leave` mode hooks.
w:add_signal("mode-changed", function (_, name, ...)
local leave = (w.mode or {}).leave
-- Get new modes functions/hooks/data
local mode = assert(modes[name], "invalid mode: " .. name)
-- Call last modes leave hook.
if leave then leave(w) end
-- Create w.mode object
w.mode = mode
-- Update window binds
w:update_binds(name)
-- Call new modes enter hook.
if mode.enter then mode.enter(w, ...) end
w:emit_signal("mode-entered", mode)
end)
local input = w.ibar.input
-- Calls the changed hook on input widget changed.
input:add_signal("changed", function ()
local changed = w.mode.changed
if changed then changed(w, input.text) end
end)
input:add_signal("property::position", function ()
local move_cursor = w.mode.move_cursor
if move_cursor then move_cursor(w, input.position) end
end)
-- Calls the `activate` hook on input widget activate.
input:add_signal("activate", function ()
local mode = w.mode
if mode and mode.activate then
local text, hist = input.text, mode.history
if mode.activate(w, text) == false then return end
-- Check if last history item is identical
if hist and hist.items and hist.items[hist.len or -1] ~= text then
table.insert(hist.items, text)
end
end
end)
end
-- Add mode related window methods
window.methods.set_mode = lousy.mode.set
local mget = lousy.mode.get
window.methods.is_mode = function (w, name) return name == mget(w) end
-- Setup normal mode
new_mode("normal", [[When luakit first starts you will find yourself in this
mode.]], {
enter = function (w)
w:set_prompt()
w:set_input()
end,
})
new_mode("all", [[Special meta-mode in which the bindings for this mode are
present in all modes.]])
-- Setup insert mode
new_mode("insert", [[When clicking on form fields luakit will enter the insert
mode which allows you to enter text in form fields without accidentally
triggering normal mode bindings.]], {
enter = function (w)
w:set_prompt("-- INSERT --")
w:set_input()
w.view:focus()
end,
-- Send key events to webview
passthrough = true,
})
new_mode("passthrough", [[Luakit will pass every key event to the WebView
until the user presses Escape.]], {
enter = function (w)
w:set_prompt("-- PASS THROUGH --")
w:set_input()
end,
-- Send key events to webview
passthrough = true,
-- Don't exit mode when clicking outside of form fields
reset_on_focus = false,
-- Don't exit mode on navigation
reset_on_navigation = false,
})
-- Setup command mode
new_mode("command", [[Enter commands.]], {
enter = function (w)
w:set_prompt()
w:set_input(":")
end,
changed = function (w, text)
-- Auto-exit command mode if user backspaces ":" in the input bar.
if not string.match(text, "^:") then w:set_mode() end
end,
activate = function (w, text)
w:set_mode()
local cmd = string.sub(text, 2)
if not string.find(cmd, "%S") then return end
local success, match = xpcall(
function () return w:match_cmd(cmd) end,
function (err) w:error(debug.traceback(err, 3)) end)
if success and not match then
w:error(string.format("Not a browser command: %q", cmd))
end
end,
history = {maxlen = 50},
})
new_mode("lua", [[Execute arbitrary Lua commands within the luakit
environment.]], {
enter = function (w)
w:set_prompt(">")
w:set_input("")
end,
activate = function (w, text)
w:set_input("")
local ret = assert(loadstring("return function(w) return "..text.." end"))()(w)
if ret then print(ret) end
end,
history = {maxlen = 50},
})

View File

@ -0,0 +1,181 @@
-----------------------------------------------------------------------
-- luakit configuration file, more information at http://luakit.org/ --
-----------------------------------------------------------------------
require "lfs"
if unique then
unique.new("org.luakit")
-- Check for a running luakit instance
if unique.is_running() then
if uris[1] then
for _, uri in ipairs(uris) do
if lfs.attributes(uri) then uri = os.abspath(uri) end
unique.send_message("tabopen " .. uri)
end
else
unique.send_message("winopen")
end
luakit.quit()
end
end
-- Load library of useful functions for luakit
require "lousy"
-- Small util functions to print output (info prints only when luakit.verbose is true)
function warn(...) io.stderr:write(string.format(...) .. "\n") end
function info(...) if luakit.verbose then io.stdout:write(string.format(...) .. "\n") end end
-- Load users global config
-- ("$XDG_CONFIG_HOME/luakit/globals.lua" or "/etc/xdg/luakit/globals.lua")
require "globals"
-- Load users theme
-- ("$XDG_CONFIG_HOME/luakit/theme.lua" or "/etc/xdg/luakit/theme.lua")
lousy.theme.init(lousy.util.find_config("theme.lua"))
theme = assert(lousy.theme.get(), "failed to load theme")
-- Load users window class
-- ("$XDG_CONFIG_HOME/luakit/window.lua" or "/etc/xdg/luakit/window.lua")
require "window"
-- Load users webview class
-- ("$XDG_CONFIG_HOME/luakit/webview.lua" or "/etc/xdg/luakit/webview.lua")
require "webview"
-- Load users mode configuration
-- ("$XDG_CONFIG_HOME/luakit/modes.lua" or "/etc/xdg/luakit/modes.lua")
require "modes"
-- Load users keybindings
-- ("$XDG_CONFIG_HOME/luakit/binds.lua" or "/etc/xdg/luakit/binds.lua")
require "binds"
----------------------------------
-- Optional user script loading --
----------------------------------
require "webinspector"
-- Add sqlite3 cookiejar
require "cookies"
-- Cookie blocking by domain (extends cookies module)
-- Add domains to the whitelist at "$XDG_CONFIG_HOME/luakit/cookie.whitelist"
-- and blacklist at "$XDG_CONFIG_HOME/luakit/cookie.blacklist".
-- Each domain must be on it's own line and you may use "*" as a
-- wildcard character (I.e. "*google.com")
--require "cookie_blocking"
-- Block all cookies by default (unless whitelisted)
--cookies.default_allow = false
-- Add uzbl-like form filling
require "formfiller"
-- Add proxy support & manager
require "proxy"
-- Add quickmarks support & manager
require "quickmarks"
-- Add session saving/loading support
require "session"
-- Add command to list closed tabs & bind to open closed tabs
require "undoclose"
-- Add command to list tab history items
require "tabhistory"
-- Add greasemonkey-like javascript userscript support
require "userscripts"
-- Add bookmarks support
require "bookmarks"
require "bookmarks_chrome"
-- Add download support
require "downloads"
require "downloads_chrome"
-- Example using xdg-open for opening downloads / showing download folders
--downloads.add_signal("open-file", function (file, mime)
-- luakit.spawn(string.format("xdg-open %q", file))
-- return true
--end)
-- Add vimperator-like link hinting & following
require "follow"
-- Use a custom charater set for hint labels
--local s = follow.label_styles
--follow.label_maker = s.sort(s.reverse(s.charset("asdfqwerzxcv")))
-- Match only hint labels
--follow.pattern_maker = follow.pattern_styles.match_label
-- Add command history
require "cmdhist"
-- Add search mode & binds
require "search"
-- Add ordering of new tabs
require "taborder"
-- Save web history
require "history"
require "history_chrome"
require "introspector"
-- Add command completion
require "completion"
-- NoScript plugin, toggle scripts and or plugins on a per-domain basis.
-- `,ts` to toggle scripts, `,tp` to toggle plugins, `,tr` to reset.
-- Remove all "enable_scripts" & "enable_plugins" lines from your
-- domain_props table (in config/globals.lua) as this module will conflict.
--require "noscript"
require "follow_selected"
require "go_input"
require "go_next_prev"
require "go_up"
-----------------------------
-- End user script loading --
-----------------------------
-- Restore last saved session
local w = (session and session.restore())
if w then
for i, uri in ipairs(uris) do
w:new_tab(uri, i == 1)
end
else
-- Or open new window
window.new(uris)
end
-------------------------------------------
-- Open URIs from other luakit instances --
-------------------------------------------
if unique then
unique.add_signal("message", function (msg, screen)
local cmd, arg = string.match(msg, "^(%S+)%s*(.*)")
local w = lousy.util.table.values(window.bywidget)[1]
if cmd == "tabopen" then
w:new_tab(arg)
elseif cmd == "winopen" then
w = window.new((arg ~= "") and { arg } or {})
end
w.win.screen = screen
w.win.urgency_hint = true
end)
end
-- vim: et:sw=4:ts=8:sts=4:tw=80

View File

@ -0,0 +1,69 @@
--------------------------
-- Default luakit theme --
--------------------------
local theme = {}
-- Default settings
theme.font = "monospace normal 9"
theme.fg = "#fff"
theme.bg = "#000"
-- Genaral colours
theme.success_fg = "#0f0"
theme.loaded_fg = "#33AADD"
theme.error_fg = "#FFF"
theme.error_bg = "#F00"
-- Warning colours
theme.warning_fg = "#F00"
theme.warning_bg = "#FFF"
-- Notification colours
theme.notif_fg = "#444"
theme.notif_bg = "#FFF"
-- Menu colours
theme.menu_fg = "#000"
theme.menu_bg = "#fff"
theme.menu_selected_fg = "#000"
theme.menu_selected_bg = "#FF0"
theme.menu_title_bg = "#fff"
theme.menu_primary_title_fg = "#f00"
theme.menu_secondary_title_fg = "#666"
-- Proxy manager
theme.proxy_active_menu_fg = '#000'
theme.proxy_active_menu_bg = '#FFF'
theme.proxy_inactive_menu_fg = '#888'
theme.proxy_inactive_menu_bg = '#FFF'
-- Statusbar specific
theme.sbar_fg = "#fff"
theme.sbar_bg = "#000"
-- Downloadbar specific
theme.dbar_fg = "#fff"
theme.dbar_bg = "#000"
theme.dbar_error_fg = "#F00"
-- Input bar specific
theme.ibar_fg = "#000"
theme.ibar_bg = "#fff"
-- Tab label
theme.tab_fg = "#888"
theme.tab_bg = "#222"
theme.tab_ntheme = "#ddd"
theme.selected_fg = "#fff"
theme.selected_bg = "#000"
theme.selected_ntheme = "#ddd"
theme.loading_fg = "#33AADD"
theme.loading_bg = "#000"
-- Trusted/untrusted ssl colours
theme.trust_fg = "#0F0"
theme.notrust_fg = "#F00"
return theme
-- vim: et:sw=4:ts=8:sts=4:tw=80

View File

@ -0,0 +1,350 @@
--------------------------
-- WebKit WebView class --
--------------------------
-- Webview class table
webview = {}
-- Table of functions which are called on new webview widgets.
webview.init_funcs = {
-- Set useragent
set_useragent = function (view, w)
view.user_agent = globals.useragent
end,
-- Check if checking ssl certificates
checking_ssl = function (view, w)
local ca_file = soup.ssl_ca_file
if ca_file and os.exists(ca_file) then
w.checking_ssl = true
end
end,
-- Update window and tab titles
title_update = function (view, w)
view:add_signal("property::title", function (v)
w:update_tablist()
if w.view == v then
w:update_win_title()
end
end)
end,
-- Update uri label in statusbar
uri_update = function (view, w)
view:add_signal("property::uri", function (v)
w:update_tablist()
if w.view == v then
w:update_uri()
end
end)
end,
-- Update history indicator
hist_update = function (view, w)
view:add_signal("load-status", function (v, status)
if w.view == v then
w:update_hist()
end
end)
end,
-- Update tab titles
tablist_update = function (view, w)
view:add_signal("load-status", function (v, status)
if status == "provisional" or status == "finished" or status == "failed" then
w:update_tablist()
end
end)
end,
-- Update scroll widget
scroll_update = function (view, w)
view:add_signal("expose", function (v)
if w.view == v then
w:update_scroll()
end
end)
end,
-- Update progress widget
progress_update = function (view, w)
for _, sig in ipairs({"load-status", "property::progress"}) do
view:add_signal(sig, function (v)
if w.view == v then
w:update_progress()
w:update_ssl()
end
end)
end
end,
-- Display hovered link in statusbar
link_hover_display = function (view, w)
view:add_signal("link-hover", function (v, link)
if w.view == v and link then
w:update_uri(link)
end
end)
view:add_signal("link-unhover", function (v)
if w.view == v then
w:update_uri()
end
end)
end,
-- Clicking a form field automatically enters insert mode.
form_insert_mode = function (view, w)
view:add_signal("button-press", function (v, mods, button, context)
-- Clear start search marker
(w.search_state or {}).marker = nil
if button == 1 and context.editable then
view:emit_signal("form-active")
end
end)
-- Emit root-active event in button release to prevent "missing"
-- buttons or links when the input bar hides.
view:add_signal("button-release", function (v, mods, button, context)
if button == 1 and not context.editable then
view:emit_signal("root-active")
end
end)
view:add_signal("form-active", function ()
if not w.mode.passthrough then
w:set_mode("insert")
end
end)
view:add_signal("root-active", function ()
if w.mode.reset_on_focus ~= false then
w:set_mode()
end
end)
end,
-- Catch keys in non-passthrough modes
mode_key_filter = function (view, w)
view:add_signal("key-press", function ()
if not w.mode.passthrough then
return true
end
end)
end,
-- Try to match a button event to a users button binding else let the
-- press hit the webview.
button_bind_match = function (view, w)
view:add_signal("button-release", function (v, mods, button, context)
(w.search_state or {}).marker = nil
if w:hit(mods, button, { context = context }) then
return true
end
end)
end,
-- Reset the mode on navigation
mode_reset_on_nav = function (view, w)
view:add_signal("load-status", function (v, status)
if status == "provisional" and w.view == v then
if w.mode.reset_on_navigation ~= false then
w:set_mode()
end
end
end)
end,
-- Domain properties
domain_properties = function (view, w)
view:add_signal("load-status", function (v, status)
if status ~= "committed" or v.uri == "about:blank" then return end
-- Get domain
local domain = lousy.uri.parse(v.uri).host
-- Strip leading www.
domain = string.match(domain or "", "^www%.(.+)") or domain or "all"
-- Build list of domain props tables to join & load.
-- I.e. for luakit.org load .luakit.org, luakit.org, .org
local props = {domain_props.all or {}, domain_props[domain] or {}}
repeat
table.insert(props, 2, domain_props["."..domain] or {})
domain = string.match(domain, "%.(.+)")
until not domain
-- Join all property tables
for k, v in pairs(lousy.util.table.join(unpack(props))) do
info("Domain prop: %s = %s (%s)", k, tostring(v), domain)
view[k] = v
end
end)
end,
-- Action to take on mime type decision request.
mime_decision = function (view, w)
-- Return true to accept or false to reject from this signal.
view:add_signal("mime-type-decision", function (v, uri, mime)
info("Requested link: %s (%s)", uri, mime)
-- i.e. block binary files like *.exe
--if mime == "application/octet-stream" then
-- return false
--end
end)
end,
-- Action to take on window open request.
--window_decision = function (view, w)
-- view:add_signal("new-window-decision", function (v, uri, reason)
-- if reason == "link-clicked" then
-- window.new({uri})
-- else
-- w:new_tab(uri)
-- end
-- return true
-- end)
--end,
create_webview = function (view, w)
-- Return a newly created webview in a new tab
view:add_signal("create-web-view", function (v)
return w:new_tab()
end)
end,
-- Creates context menu popup from table (and nested tables).
-- Use `true` for menu separators.
--populate_popup = function (view, w)
-- view:add_signal("populate-popup", function (v)
-- return {
-- true,
-- { "_Toggle Source", function () w:toggle_source() end },
-- { "_Zoom", {
-- { "Zoom _In", function () w:zoom_in() end },
-- { "Zoom _Out", function () w:zoom_out() end },
-- true,
-- { "Zoom _Reset", function () w:zoom_set() end }, }, },
-- }
-- end)
--end,
-- Action to take on resource request.
resource_request_decision = function (view, w)
view:add_signal("resource-request-starting", function(v, uri)
info("Requesting: %s", uri)
-- Return false to cancel the request.
end)
end,
}
-- These methods are present when you index a window instance and no window
-- method is found in `window.methods`. The window then checks if there is an
-- active webview and calls the following methods with the given view instance
-- as the first argument. All methods must take `view` & `w` as the first two
-- arguments.
webview.methods = {
-- Reload with or without ignoring cache
reload = function (view, w, bypass_cache)
if bypass_cache then
view:reload_bypass_cache()
else
view:reload()
end
end,
-- Toggle source view
toggle_source = function (view, w, show)
if show == nil then
view.view_source = not view.view_source
else
view.view_source = show
end
view:reload()
end,
-- Zoom functions
zoom_in = function (view, w, step, full_zoom)
view.full_content_zoom = not not full_zoom
step = step or globals.zoom_step or 0.1
view.zoom_level = view.zoom_level + step
end,
zoom_out = function (view, w, step, full_zoom)
view.full_content_zoom = not not full_zoom
step = step or globals.zoom_step or 0.1
view.zoom_level = math.max(0.01, view.zoom_level) - step
end,
zoom_set = function (view, w, level, full_zoom)
view.full_content_zoom = not not full_zoom
view.zoom_level = level or 1.0
end,
-- History traversing functions
back = function (view, w, n)
view:go_back(n or 1)
end,
forward = function (view, w, n)
view:go_forward(n or 1)
end,
}
function webview.methods.scroll(view, w, new)
local s = view.scroll
for _, axis in ipairs{ "x", "y" } do
-- Relative px movement
if rawget(new, axis.."rel") then
s[axis] = s[axis] + new[axis.."rel"]
-- Relative page movement
elseif rawget(new, axis .. "pagerel") then
s[axis] = s[axis] + math.ceil(s[axis.."page_size"] * new[axis.."pagerel"])
-- Absolute px movement
elseif rawget(new, axis) then
local n = new[axis]
if n == -1 then
s[axis] = s[axis.."max"]
else
s[axis] = n
end
-- Absolute page movement
elseif rawget(new, axis.."page") then
s[axis] = math.ceil(s[axis.."page_size"] * new[axis.."page"])
-- Absolute percent movement
elseif rawget(new, axis .. "pct") then
s[axis] = math.ceil(s[axis.."max"] * (new[axis.."pct"]/100))
end
end
end
function webview.new(w)
local view = widget{type = "webview"}
view.show_scrollbars = false
view.enforce_96_dpi = false
-- Call webview init functions
for k, func in pairs(webview.init_funcs) do
func(view, w)
end
return view
end
-- Insert webview method lookup on window structure
table.insert(window.indexes, 1, function (w, k)
if k == "view" then
local view = w.tabs[w.tabs:current()]
if view and type(view) == "widget" and view.type == "webview" then
w.view = view
return view
end
end
-- Lookup webview method
local func = webview.methods[k]
if not func then return end
local view = w.view
if view then
return function (_, ...) return func(view, w, ...) end
end
end)
-- vim: et:sw=4:ts=8:sts=4:tw=80

View File

@ -0,0 +1,859 @@
------------------
-- Window class --
------------------
require "lfs"
-- Window class table
window = {}
-- List of active windows by window widget
window.bywidget = setmetatable({}, { __mode = "k" })
-- Widget construction aliases
local function entry() return widget{type="entry"} end
local function eventbox() return widget{type="eventbox"} end
local function hbox() return widget{type="hbox"} end
local function label() return widget{type="label"} end
local function notebook() return widget{type="notebook"} end
local function vbox() return widget{type="vbox"} end
-- Build and pack window widgets
function window.build()
-- Create a table for widgets and state variables for a window
local w = {
win = widget{type="window"},
ebox = eventbox(),
layout = vbox(),
paned = widget{type="vpaned"},
tabs = notebook(),
-- Tablist widget
tablist = lousy.widget.tablist(),
-- Status bar widgets
sbar = {
layout = hbox(),
ebox = eventbox(),
-- Left aligned widgets
l = {
layout = hbox(),
ebox = eventbox(),
uri = label(),
hist = label(),
loaded = label(),
},
-- Fills space between the left and right aligned widgets
sep = eventbox(),
-- Right aligned widgets
r = {
layout = hbox(),
ebox = eventbox(),
buf = label(),
ssl = label(),
tabi = label(),
scroll = label(),
},
},
-- Vertical menu window widget (completion results, bookmarks, qmarks, ..)
menu = lousy.widget.menu(),
-- Input bar widgets
ibar = {
layout = hbox(),
ebox = eventbox(),
prompt = label(),
input = entry(),
},
closed_tabs = {}
}
-- Assemble window
w.ebox.child = w.paned
w.paned:pack1(w.layout)
w.win.child = w.ebox
-- Pack tablist
w.layout:pack(w.tablist.widget)
-- Pack notebook
w.layout:pack(w.tabs, { expand = true, fill = true })
-- Pack left-aligned statusbar elements
local l = w.sbar.l
l.layout:pack(l.uri)
l.layout:pack(l.hist)
l.layout:pack(l.loaded)
l.ebox.child = l.layout
-- Pack right-aligned statusbar elements
local r = w.sbar.r
r.layout:pack(r.buf)
r.layout:pack(r.ssl)
r.layout:pack(r.tabi)
r.layout:pack(r.scroll)
r.ebox.child = r.layout
-- Pack status bar elements
local s = w.sbar
s.layout:pack(l.ebox)
s.layout:pack(s.sep, { expand = true, fill = true })
s.layout:pack(r.ebox)
s.ebox.child = s.layout
w.layout:pack(s.ebox)
-- Pack menu widget
w.layout:pack(w.menu.widget)
w.menu:hide()
-- Pack input bar
local i = w.ibar
i.layout:pack(i.prompt)
i.layout:pack(i.input, { expand = true, fill = true })
i.ebox.child = i.layout
w.layout:pack(i.ebox)
-- Other settings
i.input.show_frame = false
w.tabs.show_tabs = false
l.loaded:hide()
l.hist:hide()
l.uri.selectable = true
r.ssl:hide()
-- Allows indexing of window struct by window widget
window.bywidget[w.win] = w
return w
end
-- Table of functions to call on window creation. Normally used to add signal
-- handlers to the new windows widgets.
window.init_funcs = {
-- Attach notebook widget signals
notebook_signals = function (w)
w.tabs:add_signal("page-added", function (nbook, view, idx)
luakit.idle_add(function ()
w:update_tab_count()
w:update_tablist()
return false
end)
end)
w.tabs:add_signal("switch-page", function (nbook, view, idx)
w.view = nil
w:set_mode()
-- Update widgets after tab switch
luakit.idle_add(function ()
w:update_tab_count()
w:update_win_title()
w:update_uri()
w:update_progress()
w:update_tablist()
w:update_buf()
w:update_ssl()
w:update_hist()
return false
end)
end)
w.tabs:add_signal("page-reordered", function (nbook, view, idx)
w:update_tab_count()
w:update_tablist()
end)
end,
last_win_check = function (w)
w.win:add_signal("destroy", function ()
-- call the quit function if this was the last window left
if #luakit.windows == 0 then luakit.quit() end
if w.close_win then w:close_win() end
end)
end,
key_press_match = function (w)
w.win:add_signal("key-press", function (_, mods, key)
-- Match & exec a bind
local success, match = xpcall(
function () return w:hit(mods, key) end,
function (err) w:error(debug.traceback(err, 3)) end)
if success and match then
return true
end
end)
end,
tablist_tab_click = function (w)
w.tablist:add_signal("tab-clicked", function (_, index, mods, button)
if button == 1 then
w.tabs:switch(index)
return true
elseif button == 2 then
w:close_tab(w.tabs[index])
return true
end
end)
end,
apply_window_theme = function (w)
local s, i = w.sbar, w.ibar
-- Set foregrounds
for wi, v in pairs({
[s.l.uri] = theme.uri_sbar_fg,
[s.l.hist] = theme.hist_sbar_fg,
[s.l.loaded] = theme.sbar_loaded_fg,
[s.r.buf] = theme.buf_sbar_fg,
[s.r.tabi] = theme.tabi_sbar_fg,
[s.r.scroll] = theme.scroll_sbar_fg,
[i.prompt] = theme.prompt_ibar_fg,
[i.input] = theme.input_ibar_fg,
}) do wi.fg = v end
-- Set backgrounds
for wi, v in pairs({
[s.l.ebox] = theme.sbar_bg,
[s.r.ebox] = theme.sbar_bg,
[s.sep] = theme.sbar_bg,
[s.ebox] = theme.sbar_bg,
[i.ebox] = theme.ibar_bg,
[i.input] = theme.input_ibar_bg,
}) do wi.bg = v end
-- Set fonts
for wi, v in pairs({
[s.l.uri] = theme.uri_sbar_font,
[s.l.hist] = theme.hist_sbar_font,
[s.l.loaded] = theme.sbar_loaded_font,
[s.r.buf] = theme.buf_sbar_font,
[s.r.ssl] = theme.ssl_sbar_font,
[s.r.tabi] = theme.tabi_sbar_font,
[s.r.scroll] = theme.scroll_sbar_font,
[i.prompt] = theme.prompt_ibar_font,
[i.input] = theme.input_ibar_font,
}) do wi.font = v end
end,
set_default_size = function (w)
local size = globals.default_window_size or "800x600"
if string.match(size, "^%d+x%d+$") then
w.win:set_default_size(string.match(size, "^(%d+)x(%d+)$"))
else
warn("E: window.lua: invalid window size: %q", size)
end
end,
set_window_icon = function (w)
local path = (luakit.dev_paths and os.exists("./extras/luakit.png")) or
os.exists("/usr/share/pixmaps/luakit.png")
if path then w.win.icon = path end
end,
clear_urgency_hint = function (w)
w.win:add_signal("focus", function ()
w.win.urgency_hint = false
end)
end,
}
-- Helper functions which operate on the window widgets or structure.
window.methods = {
-- Wrapper around the bind plugin's hit method
hit = function (w, mods, key, opts)
local opts = lousy.util.table.join(opts or {}, {
enable_buffer = w:is_mode("normal"),
buffer = w.buffer,
})
local caught, newbuf = lousy.bind.hit(w, w.binds, mods, key, opts)
if w.win then -- Check binding didn't cause window to exit
w.buffer = newbuf
w:update_buf()
end
return caught
end,
-- Wrapper around the bind plugin's match_cmd method
match_cmd = function (w, buffer)
return lousy.bind.match_cmd(w, get_mode("command").binds, buffer)
end,
-- enter command or characters into command line
enter_cmd = function (w, cmd, opts)
w:set_mode("command")
w:set_input(cmd, opts)
end,
-- run command as if typed into the command line
run_cmd = function (w, cmd, opts)
w:enter_cmd(cmd, opts)
w:activate()
end,
-- insert a string into the command line at the current cursor position
insert_cmd = function (w, str)
if not str then return end
local i = w.ibar.input
local text = i.text
local pos = i.position
local left, right = string.sub(text, 1, pos), string.sub(text, pos+1)
i.text = left .. str .. right
i.position = pos + #str
end,
-- Emulates pressing the Return key in input field
activate = function (w)
w.ibar.input:emit_signal("activate")
end,
del_word = function (w)
local i = w.ibar.input
local text = i.text
local pos = i.position
if text and #text > 1 and pos > 1 then
local left, right = string.sub(text, 2, pos), string.sub(text, pos+1)
if not string.find(left, "%s") then
left = ""
elseif string.find(left, "%w+%s*$") then
left = string.sub(left, 0, string.find(left, "%w+%s*$") - 1)
elseif string.find(left, "%W+%s*$") then
left = string.sub(left, 0, string.find(left, "%W+%s*$") - 1)
end
i.text = string.sub(text, 1, 1) .. left .. right
i.position = #left + 1
end
end,
del_line = function (w)
local i = w.ibar.input
if not string.match(i.text, "^[:/?]$") then
i.text = string.sub(i.text, 1, 1)
i.position = -1
end
end,
del_backward_char = function (w)
local i = w.ibar.input
local text = i.text
local pos = i.position
if pos > 1 then
i.text = string.sub(text, 0, pos - 1) .. string.sub(text, pos + 1)
i.position = pos - 1
end
end,
del_forward_char = function (w)
local i = w.ibar.input
local text = i.text
local pos = i.position
i.text = string.sub(text, 0, pos) .. string.sub(text, pos + 2)
i.position = pos
end,
beg_line = function (w)
local i = w.ibar.input
i.position = 1
end,
end_line = function (w)
local i = w.ibar.input
i.position = -1
end,
forward_char = function (w)
local i = w.ibar.input
i.position = i.position + 1
end,
backward_char = function (w)
local i = w.ibar.input
local pos = i.position
if pos > 1 then
i.position = pos - 1
end
end,
forward_word = function (w)
local i = w.ibar.input
local text = i.text
local pos = i.position
if text and #text > 1 then
local right = string.sub(text, pos+1)
if string.find(right, "%w+") then
local _, move = string.find(right, "%w+")
i.position = pos + move
end
end
end,
backward_word = function (w)
local i = w.ibar.input
local text = i.text
local pos = i.position
if text and #text > 1 and pos > 1 then
local left = string.reverse(string.sub(text, 2, pos))
if string.find(left, "%w+") then
local _, move = string.find(left, "%w+")
i.position = pos - move
end
end
end,
-- Shows a notification until the next keypress of the user.
notify = function (w, msg, set_mode)
if set_mode ~= false then w:set_mode() end
w:set_prompt(msg, { fg = theme.notif_fg, bg = theme.notif_bg })
end,
warning = function (w, msg, set_mode)
if set_mode ~= false then w:set_mode() end
w:set_prompt(msg, { fg = theme.warning_fg, bg = theme.warning_bg })
end,
error = function (w, msg, set_mode)
if set_mode ~= false then w:set_mode() end
w:set_prompt("Error: "..msg, { fg = theme.error_fg, bg = theme.error_bg })
end,
-- Set and display the prompt
set_prompt = function (w, text, opts)
local prompt, ebox, opts = w.ibar.prompt, w.ibar.ebox, opts or {}
prompt:hide()
-- Set theme
fg, bg = opts.fg or theme.ibar_fg, opts.bg or theme.ibar_bg
if prompt.fg ~= fg then prompt.fg = fg end
if ebox.bg ~= bg then ebox.bg = bg end
-- Set text or remain hidden
if text then
prompt.text = lousy.util.escape(text)
prompt:show()
end
end,
-- Set display and focus the input bar
set_input = function (w, text, opts)
local input, opts = w.ibar.input, opts or {}
input:hide()
-- Set theme
fg, bg = opts.fg or theme.ibar_fg, opts.bg or theme.ibar_bg
if input.fg ~= fg then input.fg = fg end
if input.bg ~= bg then input.bg = bg end
-- Set text or remain hidden
if text then
input.text = ""
input:show()
input:focus()
input.text = text
input.position = opts.pos or -1
end
end,
-- GUI content update functions
update_tab_count = function (w)
w.sbar.r.tabi.text = string.format("[%d/%d]", w.tabs:current(), w.tabs:count())
end,
update_win_title = function (w)
local uri, title = w.view.uri, w.view.title
title = (title or "luakit") .. ((uri and " - " .. uri) or "")
local max = globals.max_title_len or 80
if #title > max then title = string.sub(title, 1, max) .. "..." end
w.win.title = title
end,
update_uri = function (w, link)
w.sbar.l.uri.text = lousy.util.escape((link and "Link: " .. link)
or (w.view and w.view.uri) or "about:blank")
end,
update_progress = function (w)
local p = w.view.progress
local loaded = w.sbar.l.loaded
if not w.view:loading() or p == 1 then
loaded:hide()
else
loaded:show()
loaded.text = string.format("(%d%%)", p * 100)
end
end,
update_scroll = function (w)
local scroll, label = w.view.scroll, w.sbar.r.scroll
local y, max, text = scroll.y, scroll.ymax
if max == 0 then text = "All"
elseif y == 0 then text = "Top"
elseif y == max then text = "Bot"
else text = string.format("%2d%%", (y / max) * 100)
end
if label.text ~= text then label.text = text end
end,
update_ssl = function (w)
local trusted = w.view:ssl_trusted()
local ssl = w.sbar.r.ssl
if trusted ~= nil and not w.checking_ssl then
ssl.fg = theme.notrust_fg
ssl.text = "(nocheck)"
ssl:show()
elseif trusted == true then
ssl.fg = theme.trust_fg
ssl.text = "(trust)"
ssl:show()
elseif trusted == false then
ssl.fg = theme.notrust_fg
ssl.text = "(notrust)"
ssl:show()
else
ssl:hide()
end
end,
update_hist = function (w)
local hist = w.sbar.l.hist
local back, forward = w.view:can_go_back(), w.view:can_go_forward()
local s = (back and "+" or "") .. (forward and "-" or "")
if s ~= "" then
hist.text = '['..s..']'
hist:show()
else
hist:hide()
end
end,
update_buf = function (w)
local buf = w.sbar.r.buf
if w.buffer then
buf.text = lousy.util.escape(string.format(" %-3s", w.buffer))
buf:show()
else
buf:hide()
end
end,
update_binds = function (w, mode)
-- Generate the list of active key & buffer binds for this mode
w.binds = lousy.util.table.join((get_mode(mode) or {}).binds or {}, get_mode('all').binds or {})
-- Clear & hide buffer
w.buffer = nil
w:update_buf()
end,
update_tablist = function (w)
local current = w.tabs:current()
local fg, bg, nfg, snfg = theme.tab_fg, theme.tab_bg, theme.tab_ntheme, theme.selected_ntheme
local lfg, bfg, gfg = theme.tab_loading_fg, theme.tab_notrust_fg, theme.tab_trust_fg
local escape = lousy.util.escape
local tabs, tfmt = {}, ' <span foreground="%s">%s</span> %s'
for i, view in ipairs(w.tabs.children) do
-- Get tab number theme
local ntheme = nfg
if view:loading() then -- Show loading on all tabs
ntheme = lfg
elseif current == i then -- Show ssl trusted/untrusted on current tab
local trusted = view:ssl_trusted()
ntheme = snfg
if trusted == false or (trusted ~= nil and not w.checking_ssl) then
ntheme = bfg
elseif trusted then
ntheme = gfg
end
end
local title = view.title or view.uri or "(Untitled)"
tabs[i] = {
title = string.format(tfmt, ntheme or fg, i, escape(title)),
fg = (current == i and theme.tab_selected_fg) or fg,
bg = (current == i and theme.tab_selected_bg) or bg,
}
end
if #tabs < 2 then tabs, current = {}, 0 end
w.tablist:update(tabs, current)
end,
new_tab = function (w, arg, switch, order)
local view
-- Use blank tab first
if w.has_blank and w.tabs:count() == 1 and w.tabs[1].uri == "about:blank" then
view = w.tabs[1]
end
w.has_blank = nil
-- Make new webview widget
if not view then
view = webview.new(w)
-- Get tab order function
if not order and taborder then
order = (switch == false and taborder.default_bg)
or taborder.default
end
pos = w.tabs:insert((order and order(w, view)) or -1, view)
if switch ~= false then w.tabs:switch(pos) end
end
-- Load uri or webview history table
if type(arg) == "string" then view.uri = arg
elseif type(arg) == "table" then view.history = arg end
-- Update statusbar widgets
w:update_tab_count()
w:update_tablist()
return view
end,
-- close the current tab
close_tab = function (w, view, blank_last)
view = view or w.view
-- Treat a blank last tab as an empty notebook (if blank_last=true)
if blank_last ~= false and w.tabs:count() == 1 then
if not view:loading() and view.uri == "about:blank" then return end
w:new_tab("about:blank", false)
w.has_blank = true
end
-- Save tab history
local tab = {hist = view.history,}
-- And relative location
local index = w.tabs:indexof(view)
if index ~= 1 then tab.after = w.tabs[index-1] end
table.insert(w.closed_tabs, tab)
view:destroy()
w:update_tab_count()
w:update_tablist()
end,
close_win = function (w, force)
-- Ask plugins if it's OK to close last window
if not force and (#luakit.windows == 1) then
local emsg = luakit.emit_signal("can-close", w)
if emsg then
assert(type(emsg) == "string", "invalid exit error message")
w:error(string.format("Can't close luakit: %s (force close "
.. "with :q! or :wq!)", emsg))
return false
end
end
w:emit_signal("close")
-- Close all tabs
while w.tabs:count() ~= 0 do
w:close_tab(nil, false)
end
-- Destroy tablist
w.tablist:destroy()
-- Remove from window index
window.bywidget[w.win] = nil
-- Clear window struct
w = setmetatable(w, {})
-- Recursively remove widgets from window
local children = lousy.util.recursive_remove(w.win)
-- Destroy all widgets
for i, c in ipairs(lousy.util.table.join(children, {w.win})) do
if c.hide then c:hide() end
c:destroy()
end
-- Remove all window table vars
for k, _ in pairs(w) do w[k] = nil end
-- Quit if closed last window
if #luakit.windows == 0 then luakit.quit() end
end,
-- Navigate current view or open new tab
navigate = function (w, uri, view)
view = view or w.view
if view then
local js = string.match(uri, "^javascript:(.+)$")
if js then
return view:eval_js(luakit.uri_decode(js))
end
view.uri = uri
else
return w:new_tab(uri)
end
end,
-- Save, restart luakit and reload session.
restart = function (w)
-- Generate luakit launch command.
local args = {({string.gsub(luakit.execpath, " ", "\\ ")})[1]}
if luakit.verbose then table.insert(args, "-v") end
-- Relaunch without libunique bindings?
if luakit.nounique then table.insert(args, "-U") end
-- Get new config path
local conf
if luakit.confpath ~= "/etc/xdg/luakit/rc.lua" and os.exists(luakit.confpath) then
conf = luakit.confpath
table.insert(args, string.format("-c %q", conf))
end
-- Check config has valid syntax
local cmd = table.concat(args, " ")
if luakit.spawn_sync(cmd .. " -k") ~= 0 then
return w:error("Cannot restart, syntax error in configuration file"..((conf and ": "..conf) or "."))
end
-- Save session.
local wins = {}
for _, w in pairs(window.bywidget) do table.insert(wins, w) end
session.save(wins)
-- Replace current process with new luakit instance.
luakit.exec(cmd)
end,
-- Intelligent open command which can detect a uri or search argument.
search_open = function (w, arg)
local lstring = lousy.util.string
local match, find = string.match, string.find
-- Detect blank uris
if not arg or match(arg, "^%s*$") then return "about:blank" end
-- Strip whitespace and split by whitespace into args table
local args = lstring.split(lstring.strip(arg))
-- Guess if first argument is an address, search engine, file
if #args == 1 then
local uri = args[1]
if uri == "about:blank" then return uri end
-- Check if search engine name
if search_engines[uri] then
return string.format(search_engines[uri], "")
end
-- Navigate if . or / in uri (I.e. domains, IP's, scheme://)
if find(uri, "%.") or find(uri, "/") then return uri end
-- Navigate if this is a javascript-uri
if find(uri, "^javascript:") then return uri end
-- Valid hostnames to check
local hosts = { "localhost" }
if globals.load_etc_hosts ~= false then
hosts = lousy.util.get_etc_hosts()
end
-- Check hostnames
for _, h in pairs(hosts) do
if h == uri or match(uri, "^"..h..":%d+$") then return uri end
end
-- Check for file in filesystem
if globals.check_filepath ~= false then
if lfs.attributes(uri) then return "file://" .. uri end
end
end
-- Find search engine (or use search_engines.default)
local engine = "default"
if args[1] and search_engines[args[1]] then
engine = args[1]
table.remove(args, 1)
end
-- URI encode search terms
local terms = luakit.uri_encode(table.concat(args, " "))
return string.format(search_engines[engine], terms)
end,
-- Increase (or decrease) the last found number in the current uri
inc_uri = function (w, arg)
local uri = string.gsub(w.view.uri, "(%d+)([^0-9]*)$", function (num, rest)
return string.format("%0"..#num.."d", tonumber(num) + (arg or 1)) .. rest
end)
return uri
end,
-- Tab traversing functions
next_tab = function (w, n)
w.tabs:switch((((n or 1) + w.tabs:current() -1) % w.tabs:count()) + 1)
end,
prev_tab = function (w, n)
w.tabs:switch(((w.tabs:current() - (n or 1) -1) % w.tabs:count()) + 1)
end,
goto_tab = function (w, n)
if n and (n == -1 or n > 0) then
return w.tabs:switch((n <= w.tabs:count() and n) or -1)
end
end,
-- For each tab, switches to that tab and calls the given function passing
-- it the view contained in the tab.
each_tab = function (w, fn)
for index = 1, w.tabs:count() do
w:goto_tab(index)
fn(w.tabs[index])
end
end,
-- If argument is form-active or root-active, emits signal. Ignores all
-- other signals.
emit_form_root_active_signal = function (w, s)
if s == "form-active" then
w.view:emit_signal("form-active")
elseif s == "root-active" then
w.view:emit_signal("root-active")
end
end,
}
-- Ordered list of class index functions. Other classes (E.g. webview) are able
-- to add their own index functions to this list.
window.indexes = {
-- Find function in window.methods first
function (w, k) return window.methods[k] end
}
-- Create new window
function window.new(uris)
local w = window.build()
-- Set window metatable
setmetatable(w, {
__index = function (_, k)
-- Check widget structure first
local v = rawget(w, k)
if v then return v end
-- Call each window index function
for _, index in ipairs(window.indexes) do
v = index(w, k)
if v then return v end
end
end,
})
-- Setup window widget for signals
lousy.signal.setup(w)
-- Call window init functions
for _, func in pairs(window.init_funcs) do
func(w)
end
-- Populate notebook with tabs
for _, uri in ipairs(uris or {}) do
w:new_tab(w:search_open(uri), false)
end
-- Make sure something is loaded
if w.tabs:count() == 0 then
w:new_tab(w:search_open(globals.homepage), false)
end
-- Set initial mode
w:set_mode()
-- Show window
w.win:show()
return w
end
-- vim: et:sw=4:ts=8:sts=4:tw=80

View File

@ -0,0 +1,31 @@
#! /bin/sh
# *** External Formatter (Indenter) for GNU Midnight Commander.
# arguments:
# $1 - Name of the file being edited
# $2 - Name of the file to be processed
exec >/dev/null
case `echo $1 |sed 's/^.*\.//'` in
c|h)
# ftp://ftp.gnu.org/pub/gnu/indent/
# Please add options to your ~/.indent.pro, not here.
indent "$2"
;;
C|cc|CC|cxx|CXX|cpp|CPP)
# http://astyle.sourceforge.net/
astyle "$2"
;;
java|JAVA)
# http://astyle.sourceforge.net/
astyle --style=java --mode=java "$2"
;;
htm|html|HTM|HTML)
# http://tidy.sourceforge.net/
tidy -q -m -ascii -wrap 80 "$2"
;;
*)
# http://www.gnu.org/software/coreutils/
fmt "$2" >"$2.tmp" && rm -f "$2" && mv -f "$2.tmp" "$2"
;;
esac

View File

@ -0,0 +1,47 @@
[executable]
type=FILE_EXE
[directory]
type=DIR
[device]
type=DEVICE
[special]
type=SPECIAL
[stalelink]
type=STALE_LINK
[symlink]
type=SYMLINK
[hardlink]
type=HARDLINK
[core]
regexp=^core\\.*\\d*$
[temp]
extensions=tmp;$$$;~;bak
extensions_case=false
regexp=(^#.*|.*~$)
[archive]
extensions=gz;bz2;tar;tgz;rpm;Z;rar;zip;arj;cab;lzh;lha;zoo;arc;ark;xz;tbz;tbz2;7z;ace
[doc]
extensions=txt;doc;rtf;diz;ctl;me;ps;pdf;xml;xsd;xslt;dtd;html;shtml;htm;mail;msg;lsm;po;nroff;man;tex;sgml;css;text;letter;chm;docx;docm;xlsx;xlsm;pptx;pptm
[source]
extensions=c;h;cc;hh;cpp;cxx;hpp;asm;py;pl;pm;inc;cgi;php;phps;js;java;jav;jasm;sh;bash;diff;patch;pas;tcl;tk;awk;m4;st;mak;sl;ada;caml;ml;mli;mly;mll;mlp;sas;prg;hs;hi;erl
[media]
extensions=mp2;mp3;mpg;ogg;ogv;mpeg;wav;avi;asf;mov;mol;mpl;xm;mod;it;med;mid;midi;s3m;umx;vob;mkv;flv;mp4;m3u;flac;ape;wma;wmv;3gp;webm
[graph]
extensions=jpg;jpeg;gif;png;tif;pcx;bmp;xpm;xbm;eps;pic;rle;ico;wmf;omf;ai;cdr
[database]
extensions=dbf;mdn;db;mdb;dat;fox;dbx;mdx;sql;mssql;msql;ssql;pgsql;xls;cdx;dbi

View File

@ -0,0 +1,14 @@
ENTRY "~/" URL "/home/collin"
ENTRY "/media" URL "/media"
ENTRY "/media/dm" URL "/media/dm"
ENTRY "/media/dm/Downloads" URL "/media/dm/Downloads"
ENTRY "/home/collin/.code" URL "/home/collin/.code"
ENTRY "/home/collin/.scratch" URL "/home/collin/.scratch"
GROUP "Network"
ENTRY "/sh://omicron/home/collin" URL "/sh://omicron/home/collin"
ENTRY "/sftp://rekah742@64.34.157.170:22/home/rekah742" URL "/sftp://rekah742@64.34.157.170:22/home/rekah742"
GROUP "Local Network"
ENTRY "sh:alpha/~" URL "/home/collin/#sh:alpha/~"
ENTRY "/ftp://rekah742@ftp.rekahsoft.ca/" URL "/ftp://rekah742@ftp.rekahsoft.ca/"
ENDGROUP
ENDGROUP

View File

@ -0,0 +1,212 @@
[Midnight-Commander]
verbose=true
pause_after_run=1
shell_patterns=true
auto_save_setup=true
auto_menu=false
use_internal_view=false
use_internal_edit=false
clear_before_exec=true
confirm_delete=true
confirm_overwrite=true
confirm_execute=false
confirm_history_cleanup=true
confirm_exit=true
confirm_directory_hotlist_delete=true
safe_delete=true
mouse_repeat_rate=100
double_click_speed=250
use_8th_bit_as_meta=false
confirm_view_dir=false
mouse_move_pages_viewer=true
mouse_close_dialog=false
fast_refresh=false
drop_menus=false
wrap_mode=true
old_esc_mode=true
old_esc_mode_timeout=1000000
cd_symlinks=true
show_all_if_ambiguous=false
max_dirt_limit=10
torben_fj_mode=0
use_file_to_guess_type=true
alternate_plus_minus=false
only_leading_plus_minus=true
show_output_starts_shell=false
xtree_mode=false
num_history_items_recorded=60
file_op_compute_totals=true
classic_progressbar=true
vfs_timeout=60
ftpfs_directory_timeout=900
use_netrc=true
ftpfs_retry_seconds=30
ftpfs_always_use_proxy=false
ftpfs_use_passive_connections=true
ftpfs_use_passive_connections_over_proxy=false
ftpfs_use_unix_list_options=true
ftpfs_first_cd_then_ls=true
fish_directory_timeout=900
editor_tab_spacing=8
editor_word_wrap_line_length=72
editor_fill_tabs_with_spaces=false
editor_return_does_auto_indent=true
editor_backspace_through_tabs=false
editor_fake_half_tabs=true
editor_option_save_mode=0
editor_option_save_position=true
editor_option_auto_para_formatting=false
editor_option_typewriter_wrap=false
editor_edit_confirm_save=true
editor_syntax_highlighting=true
editor_persistent_selections=true
editor_cursor_beyond_eol=false
editor_visible_tabs=true
editor_visible_spaces=true
editor_line_state=false
editor_simple_statusbar=false
editor_check_new_line=false
editor_show_right_margin=false
nice_rotating_dash=true
mcview_remember_file_position=false
auto_fill_mkdir_name=true
copymove_persistent_attr=true
select_flags=6
editor_backup_extension=~
mcview_eof=
kilobyte_si=0
mix_all_files=0
show_backups=1
show_dot_files=1
fast_reload=0
fast_reload_msg_shown=0
mark_moves_down=1
reverse_files_only=1
navigate_with_arrows=0
scroll_pages=1
mouse_move_pages=1
filetype_mode=1
permission_mode=0
quick_search_case_sensitive=2
ignore_ftp_chattr_errors=true
keymap=mc.keymap
skin=gotar-mod
filepos_max_saved_entries=1024
preallocate_space=false
editor_cursor_after_inserted_block=false
editor_group_undo=false
editor_ask_filename_before_edit=false
editor_filesize_threshold=64M
editor_drop_selection_on_copy=true
editor_stop_format_chars=-+*\\,.;:&>
editor_state_full_filename=false
safe_overwrite=false
[Layout]
message_visible=1
keybar_visible=1
xterm_title=1
output_lines=0
command_prompt=1
menubar_visible=1
show_mini_info=1
free_space=1
horizontal_split=0
vertical_equal=1
left_panel_size=84
horizontal_equal=1
top_panel_size=29
[Misc]
timeformat_recent=%b %e %H:%M
timeformat_old=%b %e %Y
ftp_proxy_host=gate
ftpfs_password=anonymous@
display_codepage=UTF-8
source_codepage=Other_8_bit
autodetect_codeset=
clipboard_store=
clipboard_paste=
[Colors]
base_color=
screen=
color_terminals=
rxvt-unicode-256color=
xterm=
color_terminals=
xterm-kitty=
[Panels]
kilobyte_si=false
mix_all_files=false
show_backups=true
show_dot_files=false
fast_reload=false
fast_reload_msg_shown=false
mark_moves_down=true
reverse_files_only=true
auto_save_setup_panels=true
navigate_with_arrows=false
panel_scroll_pages=true
mouse_move_pages=true
filetype_mode=true
permission_mode=false
quick_search_mode=2
simple_swap=false
show_mini_info=true
torben_fj_mode=false
select_flags=6
panel_scroll_center=false
[HotlistConfig]
expanded_view_of_groups=0
[FindFile]
ignore_dirs=
file_case_sens=true
file_shell_pattern=true
file_find_recurs=true
file_skip_hidden=false
file_all_charsets=false
content_use=true
content_case_sens=true
content_regexp=false
content_first_hit=false
content_whole_words=false
content_all_charsets=false
ignore_dirs_enable=true
[DiffView]
show_symbols=true
show_numbers=false
tab_size=8
diff_quality=0
diff_ignore_tws=false
diff_ignore_all_space=false
diff_ignore_space_change=false
diff_tab_expansion=false
diff_ignore_case=false
[Panelize]
Find *.orig after patching=find . -name \\*.orig -print
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm +011 \\) -o \\( -perm -02000 -a -perm +01 \\) \\) -print
Find rejects after patching=find . -name \\*.rej -print

View File

@ -0,0 +1,793 @@
# Midnight Commander 3.0 extension file
# Warning: Structure of this file has changed completely with version 3.0
#
# All lines starting with # or empty lines are thrown away.
# Lines starting in the first column should have following format:
#
# keyword/descNL, i.e. everything after keyword/ until new line is desc
#
# keyword can be:
#
# shell (desc is, when starting with a dot, any extension (no wildcars),
# i.e. matches all the files *desc . Example: .tar matches *.tar;
# if it doesn't start with a dot, it matches only a file of that name)
#
# shell/i (desc is, when starting with a dot, any extension (no wildcars),
# The same as shell but with case insensitive.
#
# regex (desc is an extended regular expression)
# Please note that we are using the GNU regex library and thus
# \| matches the literal | and | has special meaning (or) and
# () have special meaning and \( \) stand for literal ( ).
#
# regex/i (desc is an extended regular expression)
# The same as regex but with case insensitive.
#
# type (file matches this if `file %f` matches regular expression desc
# (the filename: part from `file %f` is removed))
#
# type/i (file matches this if `file %f` matches regular expression desc)
# The same as type but with case insensitive.
#
# directory (matches any directory matching regular expression desc)
#
# include (matches an include directive)
#
# default (matches any file no matter what desc is)
#
# Other lines should start with a space or tab and should be in the format:
#
# keyword=commandNL (with no spaces around =), where keyword should be:
#
# Open (if the user presses Enter or doubleclicks it),
#
# View (F3), Edit (F4)
#
# Include is the keyword used to add any further entries from an include/
# section
#
# command is any one-line shell command, with the following substitutions:
#
# %% -> % character
# %p -> name of the current file (without path, but pwd is its path).
# Also provided to external application as MC_EXT_BASENAME
# global variable
# %f -> name of the current file. Unlike %p, if file is located on a
# non-local virtual filesystem, i.e. either tarfs or ftpfs,
# then the file will be temporarily copied into a local directory
# and %f will be the full path to this local temporal file.
# If you don't want to get a local copy and want to get the
# virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
# use %d/%p instead of %f.
# Also provided to external application as MC_EXT_FILENAME
# global variable
# %d -> name of the current directory (pwd, without trailing slash)
# Also provided to external application as MC_EXT_CURRENTDIR
# global variable
# %s -> "selected files", i.e. space separated list of tagged files if any
# or name of the current file.
# Also provided to external application as MC_EXT_SELECTED
# global variable
# %t -> list of tagged files
# Also provided to external application as MC_EXT_ONLYTAGGED
# global variable
# %u -> list of tagged files (they'll be untaged after the command)
#
# (If these 6 letters are in uppercase, they refer to the other panel.
# But you shouldn't have to use it in this file.)
#
#
# %cd -> the rest is a path mc should change into (cd won't work, since it's
# a child process). %cd handles even vfs names.
#
# %view -> the command you type will be piped into mc's internal file viewer
# if you type only the %view and no command, viewer will load %f file
# instead (i.e. no piping, so it is different to %view cat %f)
# %view may be directly followed by {} with a list of any of
# ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
# text using backspace for bold and underscore) and unform
# (no highlighting for nroff sequences) separated by commas.
#
# %var -> You use it like this: %var{VAR:default}. This macro will expand
# to the value of the VAR variable in the environment if it's set
# otherwise the value in default will be used. This is similar to
# the Bourne shell ${VAR-default} construct.
#
# Rules are applied from top to bottom, thus the order is important.
# If some actions are missing, search continues as if this target didn't
# match (i.e. if a file matches the first and second entry and View action
# is missing in the first one, then on pressing F3 the View action from
# the second entry will be used. default should catch all the actions.
#
# Any new entries you develop for you are always welcome if they are
# useful on more than one system. You can post your modifications
# as tickets at www.midnight-commander.org
### Changes ###
#
# Reorganization: 2012-03-07 Slava Zanko <slavazanko@gmail.com>
### GIT Repo ###
# gitfs changeset
regex/^\[git\]
Open=%cd %p/changesetfs://
View=%cd %p/patchsetfs://
### Archives ###
# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk, .gem, .war
regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$|\.gem$|\.war$
Open=%cd %p/utar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.gz
shell/.tar.bz
# Open=%cd %p/utar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.bzip
regex/\.t(ar\.bz2|bz2?|b2)$
Open=%cd %p/utar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.bzip2
# .tar.lzma, .tlz
regex/\.t(ar\.lzma|lz)$
Open=%cd %p/utar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.lzma
# .tar.xz, .txz
regex/\.t(ar\.xz|xz)$
Open=%cd %p/utar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.xz
# .tar.F - used in QNX
shell/.tar.F
# Open=%cd %p/utar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.F
# .qpr/.qpk - QNX Neutrino package installer files
regex/\.qp[rk]$
Open=%cd %p/utar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.qpr
# tar
shell/i/.tar
Open=%cd %p/utar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar
# lha
type/^LHa\ .*archive
Open=%cd %p/ulha://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view lha
# arj
regex/i/\.a(rj|[0-9][0-9])$
Open=%cd %p/uarj://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view arj
# cab
shell/i/.cab
Open=%cd %p/ucab://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cab
# ha
shell/i/.ha
Open=%cd %p/uha://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view ha
# rar
regex/i/\.r(ar|[0-9][0-9])$
Open=%cd %p/urar://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view rar
# ALZip
shell/i/.alz
Open=%cd %p/ualz://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view alz
# cpio
shell/.cpio.Z
Open=%cd %p/ucpio://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.z
shell/.cpio.xz
Open=%cd %p/ucpio://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.xz
shell/.cpio.gz
Open=%cd %p/ucpio://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.gz
shell/i/.cpio
Open=%cd %p/ucpio://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio
# 7zip archives (they are not man pages)
shell/i/.7z
Open=%cd %p/u7z://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view 7z
# patch
regex/\.(diff|patch)(\.bz2)$
Open=%cd %p/patchfs://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view bz2
regex/\.(diff|patch)(\.(gz|Z))$
Open=%cd %p/patchfs://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view gz
# ls-lR
regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
Open=%cd %p/lslR://
# trpm
shell/.trpm
Open=%cd %p/trpm://
View=%view{ascii} /usr/lib/mc/ext.d/package.sh view trpm
# RPM packages (SuSE uses *.spm for source packages)
regex/\.(src\.rpm|spm)$
Open=%cd %p/rpm://
View=%view{ascii} /usr/lib/mc/ext.d/package.sh view src.rpm
shell/.rpm
Open=%cd %p/rpm://
View=%view{ascii} /usr/lib/mc/ext.d/package.sh view rpm
# deb
regex/\.u?deb$
Open=%cd %p/deb://
View=%view{ascii} /usr/lib/mc/ext.d/package.sh view deb
# dpkg
shell/.debd
Open=%cd %p/debd://
View=%view{ascii} /usr/lib/mc/ext.d/package.sh view debd
# apt
shell/.deba
Open=%cd %p/deba://
View=%view{ascii} /usr/lib/mc/ext.d/package.sh view deba
# ISO9660
shell/i/.iso
Open=%cd %p/iso9660://
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view iso9660
regex/\.(diff|patch)$
Open=%cd %p/patchfs://
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view cat
# ar library
regex/\.s?a$
Open=%cd %p/uar://
#Open=%view{ascii} ar tv %f
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view ar
# gplib
shell/i/.lib
Open=%cd %p/ulib://
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view lib
# Mailboxes
type/^ASCII\ mail\ text
Open=%cd %p/mailfs://
### Sources ###
# C/C++
regex/i/\.(c|cc|cpp)$
Include=editor
# C/C++ header
regex/i/\.(h|hh|hpp)$
Include=editor
# Fortran
shell/i/.f
Include=editor
# Assembler
regex/i/\.(s|asm)$
Include=editor
# Shell
regex/i/\.sh$
Include=editor
# Python
regex/i/\.py$
Include=editor
# Racket
regex/i/\.rkt$
Include=editor
# General Scheme
regex/i/\.scm$
Include=editor
# Lisp
regex/i/\.lisp$
Include=editor
# Haskell
regex/i/\.hs$
Include=editor
# OCaml
regex/i/\.ml$
Include=editor
# Standard ML
regex/i/\.sml$
Include=editor
# Ruby
regex/i/\.rb$
Include=editor
# Clojure
regex/i/\.clj$
Include=editor
# Lua
regex/i/\.lua$
Include=editor
# PHP
regex/i/\.php$
Include=editor
# Erlang
regex/i/\.erl$
Include=editor
include/editor
Open=%var{EDITOR:emacsclient -nw} %f
# .so libraries
regex/\.(so|so\.[0-9\.]*)$
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view so
# Object
type/^ELF
#Open=%var{PAGER:more} %f
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view elf
### Documentation ###
# Texinfo
#regex/\.(te?xi|texinfo)$
# GNU Info page
type/^Info\ text
Open=/usr/lib/mc/ext.d/text.sh open info
shell/.info
Open=/usr/lib/mc/ext.d/text.sh open info
# Exception: .3gp are video files not manual pages
shell/i/.3gp
Include=video
# Manual page
regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
Open=/usr/lib/mc/ext.d/text.sh open man %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man %var{PAGER:more}
# Perl pod page
shell/.pod
Open=/usr/lib/mc/ext.d/text.sh open pod %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view pod %var{PAGER:more}
# Troff with me macros.
# Exception - "read.me" is not a nroff file.
shell/read.me
Open=
View=
shell/.me
Open=/usr/lib/mc/ext.d/text.sh open nroff.me %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view nroff.me %var{PAGER:more}
# Troff with ms macros.
shell/.ms
Open=/usr/lib/mc/ext.d/text.sh open nroff.ms %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view nroff.ms %var{PAGER:more}
# Manual page - compressed
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
Open=/usr/lib/mc/ext.d/text.sh open man.gz %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.gz %var{PAGER:more}
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
Open=/usr/lib/mc/ext.d/text.sh open man.bz %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.bz %var{PAGER:more}
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
Open=/usr/lib/mc/ext.d/text.sh open man.bz2 %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.bz2 %var{PAGER:more}
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
Open=/usr/lib/mc/ext.d/text.sh open man.lzma %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.lzma %var{PAGER:more}
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
Open=/usr/lib/mc/ext.d/text.sh open man.xz %var{PAGER:more}
View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.xz %var{PAGER:more}
# CHM
shell/i/.chm
Open=/usr/lib/mc/ext.d/text.sh open chm
### Images ###
type/^GIF
Include=image
type/^JPEG
View=%view{ascii} /usr/lib/mc/ext.d/image.sh view jpeg
Include=image
type/^PC\ bitmap
Include=image
type/^PNG
Include=image
type/^JNG
Include=image
type/^MNG
Include=image
type/^TIFF
Include=image
type/^PBM
Include=image
type/^PGM
Include=image
type/^PPM
Include=image
type/^Netpbm
Include=image
shell/.xcf
Open=/usr/lib/mc/ext.d/image.sh open xcf
shell/.xbm
Open=/usr/lib/mc/ext.d/image.sh open xbm
shell/.xpm
Include=image
View=/usr/lib/mc/ext.d/image.sh view xpm %f
shell/.ico
Include=image
shell/i/.svg
View=%view{ascii} /usr/lib/mc/ext.d/image.sh view svg
Open=/usr/lib/mc/ext.d/image.sh open svg
include/image
Open=/usr/lib/mc/ext.d/image.sh open ALL_FORMATS
View=%view{ascii} /usr/lib/mc/ext.d/image.sh view ALL_FORMATS
### Sound files ###
regex/i/\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv)$
Open=/usr/lib/mc/ext.d/sound.sh open common
regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
Open=/usr/lib/mc/ext.d/sound.sh open mod
shell/i/.waw22
Open=/usr/lib/mc/ext.d/sound.sh open wav22
shell/i/.mp3
Open=/usr/lib/mc/ext.d/sound.sh open mp3
View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view mp3
regex/i/\.og[gax]$
Open=/usr/lib/mc/ext.d/sound.sh open ogg
View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view ogg
regex/i/\.(spx|flac)$
Open=/usr/lib/mc/ext.d/sound.sh open common
regex/i/\.(midi?|rmid?)$
Open=/usr/lib/mc/ext.d/sound.sh open midi
shell/i/.wma
Open=/usr/lib/mc/ext.d/sound.sh open wma
View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view wma
### Play lists ###
regex/i/\.(m3u|pls)$
Open=/usr/lib/mc/ext.d/sound.sh open playlist
### Video ###
shell/i/.avi
Include=video
regex/i/\.as[fx]$
Include=video
shell/i/.divx
Include=video
shell/i/.mkv
Include=video
regex/i/\.(mov|qt)$
Include=video
regex/i/\.(mp4|m4v|mpe?g)$
Include=video
# MPEG-2 TS container + H.264 codec
shell/i/.mts
Include=video
shell/i/.ts
Include=video
shell/i/.vob
Include=video
shell/i/.wmv
Include=video
regex/i/\.fl[icv]$
Include=video
shell/i/.ogv
Include=video
regex/i/\.ra?m$
Open=/usr/lib/mc/ext.d/video.sh open ram
# WebM
shell/i/.webm
Include=video
type/WebM
Include=video
include/video
Open=/usr/lib/mc/ext.d/video.sh open ALL_FORMATS
View=%view{ascii} /usr/lib/mc/ext.d/video.sh view ALL_FORMATS
### Documents ###
# Postscript
type/^PostScript
Open=/usr/lib/mc/ext.d/doc.sh open ps
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view ps
# PDF
type/^PDF
Open=/usr/lib/mc/ext.d/doc.sh open pdf
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view pdf
# html
regex/i/\.html?$
Open=/usr/lib/mc/ext.d/web.sh open html
View=%view{ascii} /usr/lib/mc/ext.d/web.sh view html
# StarOffice 5.2
shell/.sdw
Open=/usr/lib/mc/ext.d/doc.sh open ooffice
# StarOffice 6 and OpenOffice.org formats
regex/i/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
Open=/usr/lib/mc/ext.d/doc.sh open ooffice
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view odt
# AbiWord
shell/.abw
Open=/usr/lib/mc/ext.d/doc.sh open abw
# Gnumeric
shell/i/.gnumeric
Open=/usr/lib/mc/ext.d/doc.sh open gnumeric
# Microsoft Word Document
regex/i/\.(do[ct]|wri)$
Open=/usr/lib/mc/ext.d/doc.sh open msdoc
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msdoc
type/^Microsoft\ Word
Open=/usr/lib/mc/ext.d/doc.sh open msdoc
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msdoc
# RTF document
shell/i/.rtf
Open=/usr/lib/mc/ext.d/doc.sh open msdoc
# Microsoft Excel Worksheet
regex/i/\.xl[sw]$
Open=/usr/lib/mc/ext.d/doc.sh open msxls
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msxls
type/^Microsoft\ Excel
Open=/usr/lib/mc/ext.d/doc.sh open msxls
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msxls
regex/i/\.(ppt|pps)$
Open=/usr/lib/mc/ext.d/doc.sh open msppt
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msppt
# Use OpenOffice.org to open any MS Office documents
type/^Microsoft\ Office\ Document
Open=/usr/lib/mc/ext.d/doc.sh open ooffice
# Framemaker
type/^FrameMaker
Open=/usr/lib/mc/ext.d/doc.sh open framemaker
# DVI
shell/i/.dvi
Open=/usr/lib/mc/ext.d/doc.sh open dvi
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view dvi
# TeX
shell/i/.tex
Include=editor
# DjVu
regex/i/\.djvu?$
Open=/usr/lib/mc/ext.d/doc.sh open djvu
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view djvu
# Comic Books
regex/i/\.cb[zr]$
Open=/usr/lib/mc/ext.d/doc.sh open comic
# Epub
shell/i/.epub
Open=/usr/lib/mc/ext.d/doc.sh open epub
View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view epub
### Miscellaneous ###
# Compiled Java classes
shell/.class
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view javaclass
# Makefile
regex/[Mm]akefile$
Open=make -f %f %{Enter parameters}
# Imakefile
shell/Imakefile
Open=/usr/lib/mc/ext.d/misc.sh open imakefile
# Makefile.PL (MakeMaker)
regex/^Makefile.(PL|pl)$
Open=%var{PERL:perl} %f
# sqlite3.db
type/^SQLite 3.x database
Open=/usr/lib/mc/ext.d/misc.sh open sqlite
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view sqlite
# dbf
shell/i/.dbf
Open=/usr/lib/mc/ext.d/misc.sh open dbf
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view dbf
# REXX script
regex/\.(rexx?|cmd)$
Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
# Disk images for Commodore computers (VIC20, C64, C128)
shell/i/.d64
Open=%cd %p/uc1541://
View=%view{ascii} c1541 %f -list
Extract=c1541 %f -extract
# Glade, a user interface designer for GTK+ and GNOME
shell/i/.glade
Open=/usr/lib/mc/ext.d/misc.sh open glade
# Gettext Catalogs
shell/.mo
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view mo
# lyx
shell/i/.lyx
Open=/usr/lib/mc/ext.d/misc.sh open lyx
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view lyx
# torrent
shell/i/.torrent
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view torrent
### Plain compressed files ###
# ace
shell/i/.ace
Open=%cd %p/uace://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view ace
Extract=unace x %f
# arc
shell/i/.arc
Open=%cd %p/uarc://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view arc
Extract=arc x %f '*'
Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
# zip
type/i/^zip\ archive
Open=%cd %p/uzip://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip
# zoo
shell/i/.zoo
Open=%cd %p/uzoo://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zoo
# gzip
type/^gzip
Open=/usr/lib/mc/ext.d/archive.sh view gz %var{PAGER:more}
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view gz
regex/\.(gz|Z)$
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view gz
# bzip2
type/^bzip2
Open=/usr/lib/mc/ext.d/archive.sh view bzip2 %var{PAGER:more}
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view bz2
regex/\.bz2?$
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view bz2
# bzip
type/^bzip
Open=/usr/lib/mc/ext.d/archive.sh view bzip %var{PAGER:more}
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view bzip
# compress
type/^compress
Open=/usr/lib/mc/ext.d/archive.sh view gz %var{PAGER:more}
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view gz
# lzma
regex/\.lzma$
Open=/usr/lib/mc/ext.d/archive.sh view lzma %var{PAGER:more}
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view lzma
# xz
regex/\.xz$
Open=/usr/lib/mc/ext.d/archive.sh view xz %var{PAGER:more}
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view xz
# Parity Archive
type/^Parity\ Archive\ Volume\ Set
Open=/usr/lib/mc/ext.d/archive.sh open par2
### Default ###
# Default target for anything not described above
default/*
Open=
View=
### EOF ###

View File

@ -0,0 +1,456 @@
[main]
Help = f1
UserMenu = f2
View = f3
# ViewFile =
Edit = f4
# EditForceInternal =
Copy = f5
Move = f6
MakeDir = f7
Delete = f8
Menu = f9
Quit = f10
MenuLastSelected = f19
QuitQuiet = f20
Find = alt-question
CdQuick = alt-c
HotList = ctrl-backslash
Reread = ctrl-r
DirSize = ctrl-space
Suspend = ctrl-z
Swap = ctrl-u
History = alt-h
# PanelListing =
PanelListingSwitch = alt-t
# PanelListingChange =
ShowHidden = alt-dot
SplitVertHoriz = alt-comma
SplitEqual = alt-equal
SplitMore = alt-shift-right
SplitLess = alt-shift-left
Shell = ctrl-o
PutCurrentPath = alt-a
PutOtherPath = alt-shift-a
ViewFiltered = alt-exclamation
Select = kpplus
Unselect = kpminus
SelectInvert = kpasterisk
ScreenList = alt-prime
# OptionsLayout =
# OptionsPanel =
# OptionsConfirm =
# OptionsDisplayBits =
# OptionsVfs =
# LearnKeys =
# SaveSetup =
# EditExtensionsFile =
# EditFileHighlightFile =
# Filter =
# ConnectFish =
# ConnectFtp =
# ConnectSmb =
# Undelete =
ExtendedKeyMap = ctrl-x
[main:xmap]
ChangeMode = c
ChangeOwn = o
CompareDirs = d
CompareFiles = ctrl-d
HotListAdd = h
LinkSymbolicEdit = ctrl-s
Link = l
LinkSymbolic = s
LinkSymbolicRelative = v
PanelInfo = i
PanelQuickView = q
ExternalPanelize = exclamation
VfsList = a
Jobs = j
PutCurrentPath = p
PutOtherPath = ctrl-p
PutCurrentTagged = t
PutOtherTagged = ctrl-t
PutCurrentLink = r
PutOtherLink = ctrl-r
[panel]
Search = ctrl-s; alt-s
Mark = insert; ctrl-t
MarkUp = shift-up
MarkDown = shift-down
# MarkLeft =
# MarkRight =
Down = down; ctrl-n
Up = up; ctrl-p
Left = left
Right = right
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Enter = enter
PanelOtherCd = alt-o
PanelOtherCdLink = alt-l
ViewRaw = f13
EditNew = f14
CopySingle = f15
MoveSingle = f16
DeleteSingle = f18
Select = alt-plus
Unselect = alt-minus
SelectInvert = alt-asterisk
CdChild = ctrl-pgdn
CdParent = ctrl-pgup
# CdParentSmart =
# Panelize =
History = alt-shift-h
HistoryNext = alt-u
HistoryPrev = alt-y
BottomOnScreen = alt-j
MiddleOnScreen = alt-r
TopOnScreen = alt-g
PanelOtherSync = alt-i
SelectCodepage = alt-e
Top = alt-lt; home; a1
Bottom = alt-gt; end; c1
# Sort =
# SortPrev =
# SortNext =
# SortReverse =
# SortByName =
# SortByExt =
# SortBySize =
# SortByMTime =
# ScrollLeft =
# ScrollRight =
[dialog]
Ok = enter
Cancel = f10; esc
Up = left; up
#Left = left; up
Down = right; down
#Right = right; down
Help = f1
Suspend = ctrl-z
Refresh = ctrl-l
ScreenList = alt-prime
ScreenNext = alt-rbrace
ScreenPrev = alt-lbrace
[input]
Home = ctrl-a; alt-lt; home; a1
End = ctrl-e; alt-gt; end; c1
Left = left; alt-left; ctrl-b
Right = right; alt-right; ctrl-f
WordLeft = ctrl-left; alt-b
WordRight = ctrl-right; alt-f
Backspace = backspace
Delete = delete
DeleteToWordBegin = alt-backspace
DeleteToWordEnd = alt-d
# Mark =
Remove = ctrl-w
# Cut =
Store = alt-w
# Paste =
Yank = ctrl-y
DeleteToEnd = ctrl-k
HistoryPrev = alt-p; ctrl-down
HistoryNext = alt-n; ctrl-up
History = alt-h
Complete = alt-tab
# Clear =
# MarkLeft =
# MarkRight =
# MarkToWordBegin =
# MarkToWordEnd =
# MarkToHome =
# MarkToEnd =
[listbox]
Up = up; ctrl-p
Down = down; ctrl-n
Top = home; alt-lt; a1
Bottom = end; alt-gt; c1
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Delete = delete; d
Clear = shift-delete; shift-d
[tree]
Help = f1
Reread = f2; ctrl-r
Forget = f3
ToggleNavigation = f4
Copy = f5
Move = f6
Up = up; ctrl-p
Down = down; ctrl-n
Left = left
Right = right
Top = home; alt-lt; a1
Bottom = end; alt-gt; c1
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Enter = enter
Search = ctrl-s; alt-s
Delete = f8; delete
[help]
Help = f1
Index = f2; c
Back = f3; left; l
Quit = f10; esc; ctrl-g
Up = up; ctrl-p
Down = down; ctrl-n
PageDown = f; space; pgdn; ctrl-v
PageUp = b; pgup; alt-v; backspace
HalfPageDown = d
HalfPageUp = u
Top = home; ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g
Enter = right; enter
LinkNext = tab
LinkPrev = alt-tab
NodeNext = n
NodePrev = p
[editor]
Store = alt-w
Paste = ctrl-y
Cut = ctrl-w
Up = up; ctrl-p
Down = down; ctrl-n
Left = left; ctrl-b
Right = right; ctrl-f
WordLeft = ctrl-left; alt-b
WordRight = ctrl-right; alt-f
Enter = enter
Return = shift-enter
BackSpace = backspace
Delete = delete
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Home = home; ctrl-a
End = end; ctrl-e
Tab = tab
Undo = ctrl-u
# Redo =
Top = ctrl-home; alt-lt
Bottom = ctrl-end; alt-gt
ScrollUp = ctrl-up
ScrollDown = ctrl-down
TopOnScreen = ctrl-pgup
BottomOnScreen = ctrl-pgdn
DeleteToWordBegin = alt-backspace
DeleteToWordEnd = alt-d
DeleteLine = ctrl-y
DeleteToEnd = ctrl-k
# DeleteToHome =
# ParagraphUp =
# ParagraphDown =
Save = f2
# EditFile =
SaveAs = f12; ctrl-f2
# Close =
Mark = f3; ctrl-at
Copy = f5
Move = f6
Remove = f8
# MarkLine =
# MarkWord =
# MarkAll =
# Unmark =
Search = f7; ctrl-s
SearchContinue = f17
# BlockShiftLeft =
# BlockShiftRight =
MarkPageUp = shift-pgup
MarkPageDown = shift-pgdn
MarkLeft = shift-left
MarkRight = shift-right
MarkToWordBegin = ctrl-shift-left
MarkToWordEnd = ctrl-shift-right
MarkUp = shift-up
MarkDown = shift-down
MarkToHome = shift-home
MarkToEnd = shift-end
MarkToFileBegin = ctrl-shift-home
MarkToFileEnd = ctrl-shift-end
MarkToPageBegin = ctrl-shift-pgup
MarkToPageEnd = ctrl-shift-pgdn
MarkScrollUp = ctrl-shift-up
MarkScrollDown = ctrl-shift-down
# MarkParagraphUp =
# MarkParagraphDown =
MarkColumnPageUp = alt-pgup
MarkColumnPageDown = alt-pgdn
MarkColumnLeft = alt-left
MarkColumnRight = alt-right
MarkColumnUp = alt-up
MarkColumnDown = alt-down
# MarkColumnScrollUp =
# MarkColumnScrollDown =
# MarkColumnParagraphUp =
# MarkColumnParagraphDown =
# BlockSave =
MarkColumn = f13
Replace = f4
ReplaceContinue = f14
Complete = alt-tab
InsertFile = f15
Quit = f10; esc
InsertOverwrite = insert
Help = f1
# Date =
Refresh = ctrl-l
Goto = alt-l
Sort = alt-t
# Mail =
ParagraphFormat = alt-p
# MatchBracket =
ExternalCommand = alt-u
UserMenu = f11
Menu = f9
# Bookmark =
# BookmarkFlush =
# BookmarkNext =
# BookmarkPrev =
# History =
Shell = ctrl-o
InsertLiteral = ctrl-q
# MacroStartRecord =
# MacroStopRecord =
MacroStartStopRecord = ctrl-r
# MacroDelete =
ShowNumbers = alt-n
ShowTabTws = alt-underline
SyntaxOnOff = ctrl-s
# SyntaxChoose =
# ShowMargin =
Find = alt-enter
FilePrev = alt-minus
FileNext = alt-plus
# RepeatStartStopRecord =
SelectCodepage = alt-e
# Options =
# OptionsSaveMode =
# SpellCheck =
# SpellCheckCurrentWord =
# SpellCheckSelectLang =
# LearnKeys =
# WindowMove =
# WindowResize =
# WindowFullscreen =
# WindowList =
# WindowNext =
# WindowPrev =
ExtendedKeyMap = ctrl-x
[editor:xmap]
EditNew = k
[viewer]
Help = f1
WrapMode = f2
Quit = f3; f10; q; esc
HexMode = f4
Goto = f5
Search = f7
SearchForward = slash
SearchBackward = question
SearchContinue = f17; n
SearchForwardContinue = ctrl-s
SearchBackwardContinue = ctrl-r
MagicMode = f8
NroffMode = f9
Home = ctrl-a
End = ctrl-e
Left = h; left
Right = l; right
LeftQuick= ctrl-left
RightQuick = ctrl-right
Up = k; y; insert; up; ctrl-p
Down = j; e; delete; down; enter; ctrl-n
PageDown = f; space; pgdn; ctrl-v
PageUp = b; pgup; alt-v; backspace
HalfPageDown = d
HalfPageUp = u
Top = home; ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g
BookmarkGoto = m
Bookmark = r
FileNext = ctrl-f
FilePrev = ctrl-b
SelectCodepage = alt-e
Shell = ctrl-o
Ruler = alt-r
[viewer:hex]
Help = f1
HexEditMode = f2
Quit = f3; f10; q; esc
HexMode = f4
Goto = f5
Save = f6
Search = f7
SearchForward = slash
SearchBackward = question
SearchContinue = f17; n
SearchForwardContinue = ctrl-s
SearchBackwardContinue = ctrl-r
MagicMode = f8
NroffMode = f9
ToggleNavigation = tab
Home = ctrl-a; home
End = ctrl-e; end
Left = b; left
Right = f; right
Up = k; y; up
Down = j; delete; down
PageDown = pgdn; ctrl-v
PageUp = pgup; alt-v
Top = ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g
[diffviewer]
ShowSymbols = alt-s; s
ShowNumbers = alt-n; l
SplitFull = f
SplitEqual = equal
SplitMore = gt
SplitLess = lt
Tab2 = 2
Tab3 = 3
Tab4 = 4
Tab8 = 8
Swap = ctrl-u
Redo = ctrl-r
HunkNext = n; enter; space
HunkPrev = p; backspace
Goto = g; shift-g
Save = f2
Edit = f4
EditOther = f14
Merge = f5
MergeOther = f15
Search = f7
SearchContinue = f17
Options = f9
Top = ctrl-home
Bottom = ctrl-end
Down = down
Up = up
LeftQuick = ctrl-left
RightQuick = ctrl-right
Left = left
Right = right
PageDown = pgdn
PageUp = pgup
Home = home
End = end
Help = f1
Quit = f10; q; shift-q; esc
Shell = ctrl-o
SelectCodepage = alt-e

View File

@ -0,0 +1,365 @@
shell_patterns=0
+ ! t t
@ Do something on the current file
CMD=%{Enter command}
$CMD %f
+ t t
@ Do something on the tagged files
set %t; CMD=%{Enter command}
while [ -n "$1" ]; do
$CMD "$1"
shift
done
0 Edit a bug report and send it to root
I=`mktemp "${MC_TMPDIR:-/tmp}/mail.XXXXXX"` || exit 1
${EDITOR-vi} "$I"
test -r $I && mail root < $I
rm -f "$I"
=+ f \.1$ | f \.3$ | f \.4$ | f \.5$ | f \.6$ | f \.7$ | f \.8$ | f \.man$ & t r
1 Display the file with roff -man
nroff -man %f | less
2 Call the info hypertext browser
info
= t d
3 Compress the current subdirectory (tar.gz)
Pwd=`basename %d /`
echo -n "Name of the compressed file (without extension) [$Pwd]: "
read tar
if [ "$tar"x = x ]; then tar="$Pwd"; fi
cd .. && \
tar cf - "$Pwd" | gzip -f9 > "$tar.tar.gz" && \
echo "../$tar.tar.gz created."
4 Compress the current subdirectory (tar.bz2)
Pwd=`basename %d /`
echo -n "Name of the compressed file (without extension) [$Pwd]: "
read tar
if [ "$tar"x = x ]; then tar="$Pwd"; fi
cd .. && \
tar cf - "$Pwd" | bzip2 -f > "$tar.tar.bz2" && \
echo "../$tar.tar.bz2 created."
5 Compress the current subdirectory (tar.7z)
Pwd=`basename %d /`
echo -n "Name of the compressed file (without extension) [$Pwd]: "
read tar
if [ "$tar"x = x ]; then tar="$Pwd"; fi
cd .. && \
tar cf - "$Pwd" | 7za a -si "$tar.tar.7z" && \
echo "../$tar.tar.7z created."
6 Compress the current subdirectory (tar.xz)
Pwd=`basename %d /`
echo -n "Name of the compressed file (without extension) [$Pwd]: "
read tar
if [ "$tar"x = x ]; then tar="$Pwd"; fi
cd .. && \
tar cf - "$Pwd" | xz -f > "$tar.tar.xz" && \
echo "../$tar.tar.xz created."
= f \.c$ & t r
+ f \.c$ & t r & ! t t
с Compile and link current .c file
make `basename %f .c` 2>/dev/null || cc -O -o `basename %f .c` %f
+ t r & ! t t
a Append file to opposite
cat %f >> %D/%f
+ t t
A Append files to opposite files
set %t
while [ -n "$1" ]; do
cat "$1" >> "%D/$1"
shift
done
+ t r & ! t t
d Delete file if a copy exists in the other directory.
if [ "%d" = "%D" ]; then
echo "The two directories must be different."
exit 1
fi
if [ -f %D/%f ]; then # if two of them, then
if cmp -s %D/%f %f; then
rm %f && echo "%f: DELETED."
else
echo "%f and %D/%f differ: NOT deleted."
echo -n "Press RETURN "
read key
fi
else
echo "%f: No copy in %D/%f: NOT deleted."
fi
+ t t
D Delete tagged files if a copy exists in the other directory.
if [ "%d" = "%D" ]; then
echo "The two directores must be different."
exit 1
fi
for i in %t
do
if [ -f "%D/$i" ]; then
SUM1="`sum $i`"
SUM2="`sum %D/$i`"
if [ "$SUM1" = "$SUM2" ]; then
rm "$i" && echo "${i}: DELETED."
else
echo "$i and %D/$i differ: NOT deleted."
fi
else
echo "%i has no copy in %D: NOT deleted."
fi
done
m View manual page
MAN=%{Enter manual name}
%view man -P cat $MAN
= f \.gz$ & t r
+ ! t t
n Inspect gzip'ed newsbatch file
dd if=%f bs=1 skip=12|zcat|${PAGER-more}
# assuming the cunbatch header is 12 bytes long.
= t r &
+ ! t t
h Strip headers from current newsarticle
CHECK=`awk '{print $1 ; exit}' %f` 2>/dev/null
case "$CHECK" in
Newsgroups:|Path:)
I=`mktemp "${MC_TMPDIR:-/tmp}/news.XXXXXX"` || exit 1
cp %f "$I" && sed '/^'"$CHECK"' /,/^$/d' "$I" > %f
[ "$?" = "0" ] && rm "$I"
echo "%f: header removed."
;;
*)
echo "%f is not a news article."
;;
esac
+ t t
H Strip headers from the marked newsarticles
set %t
while [ -n "$1" ]; do
CHECK=`awk '{print $1 ; exit}' $1` 2>/dev/null
WFILE=`mktemp "${MC_TMPDIR:-/tmp}/news.XXXXXX"` || exit 1
case "$CHECK" in
Newsgroups:|Path:)
cp "$1" "$WFILE" && sed '/^'"$CHECK"' /,/^$/d' "$WFILE" > "$1"
if [ "$?" = "0" ]; then
rm "$WFILE"; echo "$1 header removed. OK."
else
echo "Oops! Please check $1 against $WFILE."
fi
;;
*)
echo "$1 skipped: Not a news article."
;;
esac
shift
done
= t r
+ ! t t
r Copy file to remote host
echo -n "To which host?: "
read Host
echo -n "To which directory on $Host?: "
read Dir
rcp -p %f "${Host}:$Dir"
+ t t
R Copy files to remote host (no error checking)
echo -n "Copy files to which host?: "
read Host
echo -n "To which directory on $Host? :"
read Dir
rcp -pr %u "${Host}:$Dir"
= f \.tex$ & t r
+ f \.tex$ & t r & ! t t
t Run latex on file and show it with xdvi
latex %f && xdvi `basename %f .tex`.dvi
=+ f ^part | f ^Part | f uue & t r
+ t t
U Uudecode marked news articles (needs work)
set %t
(
while [ -n "$1" ]; do # strip headers
FIRST=`awk '{print $1 ; exit}' "$1"`
cat "$1" | sed '/^'"$FIRST"' /,/^$/d'; shift
done
) |sed '/^$/d' |sed -n '/^begin 6/,/^end$/p' | uudecode
if [ "$?" != "0" ]; then
echo "Cannot decode %t."
fi
echo "Please test the output file before deleting anything."
=+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lzma$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.tar\.Z$ | f \.tar\.bz2$ & t r
x Extract the contents of a compressed tar file
unset PRG
case %f in
*.tar.bz2)
PRG="bunzip2 -c"
;;
*.tar.gz|*.tar.z|*.tgz|*.tpz|*.tar.Z)
PRG="gzip -dc"
;;
*.tar.lzma)
PRG="lzma -dc"
;;
*.tar.lz)
PRG="lzip -dc"
;;
*.tar.xz)
PRG="xz -dc"
;;
*.tar.7z)
PRG="7za e -so"
;;
*)
exit 1
;;
esac
$PRG %f | tar xvf -
= t r
+ ! t t
y Gzip or gunzip current file
unset DECOMP
case %f in
*.gz) DECOMP=-d;;
*.[zZ]) DECOMP=-d;;
esac
gzip $DECOMP -v %f
+ t t
Y Gzip or gunzip tagged files
for i in %t
do
unset DECOMP
case "$i" in
*.gz) DECOMP=-d;;
*.[zZ]) DECOMP=-d;;
esac
gzip $DECOMP -v "$i"
done
+ ! t t
b Bzip2 or bunzip2 current file
unset DECOMP
case %f in
*.bz2) DECOMP=-d;;
esac
bzip2 $DECOMP -v %f
+ t t
B Bzip2 or bunzip2 tagged files
for i in %t
do
unset DECOMP
case "$i" in
*.bz2) DECOMP=-d;;
esac
bzip2 $DECOMP -v "$i"
done
+ f \.tar.gz$ | f \.tgz$ | f \.tpz$ | f \.tar.Z$ | f \.tar.z$ | f \.tar.bz2$ | f \.tar.F$ & t r & ! t t
z Extract compressed tar file to subdirectory
unset D
set gzip -cd
case %f in
*.tar.gz) D="`basename %f .tar.gz`";;
*.tgz) D="`basename %f .tgz`";;
*.tpz) D="`basename %f .tpz`";;
*.tar.Z) D="`basename %f .tar.Z`";;
*.tar.z) D="`basename %f .tar.z`";;
*.tar.bz2) D="`basename %f .tar.bz2`"; set bunzip2 -c ;;
*.tar.F) D="`basename %f .tar.F`"; set freeze -dc;
esac
mkdir "$D"; cd "$D" && ("$1" "$2" ../%f | tar xvf -)
+ t t
Z Extract compressed tar files to subdirectories
for i in %t
do
set gzip -dc
unset D
case "$i" in
*.tar.gz) D="`basename $i .tar.gz`";;
*.tgz) D="`basename $i .tgz`";;
*.tpz) D="`basename $i .tpz`";;
*.tar.Z) D="`basename $i .tar.Z`";;
*.tar.z) D="`basename $i .tar.z`";;
*.tar.F) D="`basename $i .tar.F`"; set freeze -dc;;
*.tar.bz2) D="`basename $i .tar.bz2`"; set bunzip2 -c;;
esac
mkdir "$D"; (cd "$D" && "$1" "$2" "../$i" | tar xvf -)
done
+ f \.gz$ | f \.tgz$ | f \.tpz$ | f \.Z$ | f \.z$ | f \.bz2$ & t r & ! t t
c Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2
unset D
unset EXT
case %f in
*.tgz) EXT=tgz;;
*.tpz) EXT=tpz;;
*.Z) EXT=Z;;
*.z) EXT=z;;
*.gz) EXT=gz;;
*.bz2) EXT=bz2;;
esac
case $EXT in
tgz|tpz) D="`basename %f .$EXT`.tar";;
gz|Z|z) D="`basename %f .$EXT`";;
bz2) D="`basename %f .bz2`";;
esac
if [ "$EXT" = "bz2" ]; then
bunzip2 -v %f ; gzip -f9 -v "$D"
else
gunzip -v %f ; bzip2 -v "$D"
fi
+ t t
C Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2
set %t
while [ -n "$1" ]
do
unset D
unset EXT
case "$1" in
*.tgz) EXT=tgz;;
*.tpz) EXT=tpz;;
*.Z) EXT=Z;;
*.z) EXT=z;;
*.gz) EXT=gz;;
*.bz2) EXT=bz2;;
esac
case $EXT in
tgz) D="`basename $1 .tgz`.tar";;
tpz) D="`basename $1 .tpz`.tar";;
gz|Z|z) D="`basename $1 .$EXT`";;
bz2) D="`basename $1 .bz2`";;
esac
if [ "$EXT" = "bz2" ]; then
bunzip2 -v "$1"
gzip -f9 -v "$D"
else
gunzip -v "$1"
bzip2 -v "$D"
fi
shift
done
+ x /usr/bin/open | x /usr/local/bin/open & x /bin/sh
o Open next a free console
open -s -- sh

View File

@ -0,0 +1,344 @@
shell_patterns=0
+ ! t t
@ Ради нешто над текућом датотеком
CMD=%{Унесите наредбу}
$CMD %f
+ t t
@ Ради нешто над означеним датотекама
set %t; CMD=%{Унесите наредбу}
while [ -n "$1" ]; do
$CMD "$1"
shift
done
0 Уреди пријаву грешке и пошаљи је администратору
${EDITOR-vi} /tmp/mail.$$
test -r /tmp/mail.$$ && mail root < /tmp/mail.$$
rm -f /tmp/mail.$$
=+ f \.1$ | f \.3$ | f \.4$ | f \.5$ | f \.6$ | f \.7$ | f \.8$ | f \.man$ & t r
1 Прикажи датотеку уз помоћ roff -man
nroff -man %f | less
2 Позови читач хипертекста info
info
= t d
3 Компримуј текући поддиректоријум (tar.gz)
Pwd=`basename "%d" /`
echo -n "Назив компримоване датотеке (без врсте) [$Pwd]: "
read tar
if [ "$tar"x = x ]; then tar="$Pwd"; fi
cd .. && \
tar cf - "$Pwd" | gzip -f9 > "$tar.tar.gz" && \
echo "Датотека ../$tar.tar.gz је створена."
4 Компримуј текући поддиректоријум (tar.bz2)
Pwd=`basename %d /`
echo -n "Назив компримоване датотеке (без врсте) [$Pwd]: "
read tar
if [ "$tar"x = x ]; then tar="$Pwd"; fi
cd .. && \
tar cf - "$Pwd" | bzip2 -f > "$tar.tar.bz2" && \
echo "Датотека ../$tar.tar.bz2 је створена."
= f \.c$ & t r
+ f \.c$ & t r & ! t t
5 Преведи и повежи текућу датотеку врсте `.c'
make `basename %f .c` 2>/dev/null || cc -O -o `basename %f .c` %f
+ t r & ! t t
a Надовежи датотеку на ону из другог окна
cat %f >>%D/%f
+ t t
A Надовежи датотеке на оне из другог окна
set %t
while [ -n "$1" ]; do
cat "$1" >> "%D/$1"
shift
done
+ t r & ! t t
d Обриши датотеку ако њена копија постоји у другом окну.
if [ "%d" = "%D" ]; then
echo "Два директоријума морају да буду различити."
exit 1
fi
if [ -f %D/%f ]; then # if two of them, then
if cmp -s %D/%f %f; then
rm %f && echo "%f: ОБРИСАНА."
else
echo "%f и %D/%f се разликују: НИЈЕ обрисана."
echo -n "Притисните `RETURN' "
read тастер
fi
else
echo "%f: Нема копије у %D/%f: НИЈЕ обрисана."
fi
+ t t
D Обриши означене датотеке ако постоји копија у другом окну.
if [ "%d" = "%D" ]; then
echo "Два директоријума морају да буду различити."
exit 1
fi
for i in %t
do
if [ -f "%D/$i" ]; then
SUM1="`sum $i`"
SUM2="`sum %D/$i`"
if [ "$SUM1" = "$SUM2" ]; then
rm "$i" && echo "${i}: ОБРИСАНА."
else
echo "$i и %D/$i се разликују: НИЈЕ обрисана."
fi
else
echo "%f нема копију у %D: НИЈЕ обрисана."
fi
done
m Погледај страницу упутства
MAN=%{Унесите назив упутства}
%view man -P cat $MAN
= f \.gz$ & t r
+ ! t t
n Прегледај датотеку вести компримовану програмом gzip
dd if=%f bs=1 skip=12|zcat|${PAGER-more}
# assuming the cunbatch header is 12 bytes long.
= t r &
+ ! t t
h Скини заглавља из текућег чланка вести
CHECK=`awk '{print $1 ; exit}' %f` 2>/dev/null
case "$CHECK" in
Newsgroups:|Path:)
cp %f /tmp/%f.$$ && sed '/^'"$CHECK"' /,/^$/d' /tmp/%f.$$ > %f
[ "$?" = "0" ] && rm "/tmp/%f.$$"
echo "%f: уклоњено заглавље."
;;
*)
echo "%f није чланак вести."
;;
esac
+ t t
H Скини заглавља из означених чланака вести
set %t
while [ -n "$1" ]; do
CHECK=`awk '{print $1 ; exit}' "$1"` 2>/dev/null
WFILE=/tmp/${1}.$$
case "$CHECK" in
Newsgroups:|Path:)
cp "$1" "$WFILE" && sed '/^'"$CHECK"' /,/^$/d' "$WFILE" > "$1"
if [ "$?" = "0" ]; then
rm "$WFILE"; echo "$1 заглавље уклоњено. У реду."
else
echo "Уупс! Молим да проверите $1 са $WFILE."
fi
;;
*)
echo "$1 прескочена: Није чланак вести."
;;
esac
shift
done
= t r
+ ! t t
r Копирај датотеку на удаљеног домаћина
echo -n "На ког домаћина?: "
read Домаћин
echo -n "У који директоријум на $Домаћин?: "
read Дир
rcp -p %f "${Домаћин}:$Дир"
+ t t
R Копирај датотеке на удаљеног домаћина (без провере грешака)
echo -n "На ког домаћина да копирам датотеке?: "
read Домаћин
echo -n "У који директоријум на $Домаћин? :"
read Дир
rcp -pr %u "${Домаћин}:$Дир"
= f \.tex$ & t r
+ f \.tex$ & t r & ! t t
t Покрени ЛаТеХ над датотеком и прикажи је преко програма `xdvi'
latex %f && xdvi `basename %f .tex`.dvi
=+ f ^part | f ^Part | f uue & t r
+ t t
U Уудекодирај означени чланак вести (требало би разрадити)
set %t
(
while [ -n "$1" ]; do # strip headers
FIRST=`awk '{print $1 ; exit}' "$1"`
cat "$1" | sed '/^'"$FIRST"' /,/^$/d'; shift
done
) |sed '/^$/d' |sed -n '/^begin 6/,/^end$/p' | uudecode
if [ "$?" != "0" ]; then
echo "Не могу да декодирам %t."
fi
echo "Молим да проверите излазну датотеку пре било каквог брисања."
=+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lzma$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.tar\.Z$ | f \.tar\.bz2$ & t r
x Издвој садржај компримоване датотеке врсте `tar'
unset PRG
case %f in
*.tar.bz2)
PRG="bunzip2 -c"
;;
*.tar.gz|*.tar.z|*.tgz|*.tpz|*.tar.Z)
PRG="gzip -dc"
;;
*.tar.lzma)
PRG="lzma -dc"
;;
*.tar.lz)
PRG="lzip -dc"
;;
*.tar.xz)
PRG="xz -dc"
;;
*.tar.7z)
PRG="7za e -so"
;;
*)
exit 1
;;
esac
$PRG %f | tar xvf -
= t r
+ ! t t
y Пакуј или расп. тек. дат. програмима `gzip' или `gunzip'
unset DECOMP
case %f in
*.gz) DECOMP=-d;;
*.[zZ]) DECOMP=-d;;
esac
gzip $DECOMP -v %f
+ t t
Y Пакуј или расп. означ. дат. програмима `gzip' или `gunzip'
for i in %t
do
unset DECOMP
case "$i" in
*.gz) DECOMP=-d;;
*.[zZ]) DECOMP=-d;;
esac
gzip $DECOMP -v "$i"
done
+ ! t t
b Пакуј или расп. тек. дат. програмима `bzip2' или `bunzip2'
unset DECOMP
case %f in
*.bz2) DECOMP=-d;;
esac
bzip2 $DECOMP -v %f
+ t t
B Пакуј или расп. означ. дат. програмима `bzip2' или `bunzip2'
for i in %t
do
unset DECOMP
case "$i" in
*.bz2) DECOMP=-d;;
esac
bzip2 $DECOMP -v "$i"
done
+ f \.tar.gz$ | f \.tgz$ | f \.tpz$ | f \.tar.Z$ | f \.tar.z$ | f \.tar.bz2$ | f \.tar.F$ & t r & ! t t
z Издвој компримовану датотеку врсте `tar' у поддиректоријум
unset D
set gzip -cd
case %f in
*.tar.gz) D="`basename %f .tar.gz`";;
*.tgz) D="`basename %f .tgz`";;
*.tpz) D="`basename %f .tpz`";;
*.tar.Z) D="`basename %f .tar.Z`";;
*.tar.z) D="`basename %f .tar.z`";;
*.tar.bz2) D="`basename %f .tar.bz2`"; set bunzip2 -c ;;
*.tar.F) D="`basename %f .tar.F`"; set freeze -dc;
esac
mkdir "$D"; cd "$D" && ("$1" "$2" ../%f | tar xvf -)
+ t t
Z Издвој компримовану датотеке врсте `tar' у поддиректоријуме
for i in %t
do
set gzip -dc
unset D
case "$i" in
*.tar.gz) D="`basename $i .tar.gz`";;
*.tgz) D="`basename $i .tgz`";;
*.tpz) D="`basename $i .tpz`";;
*.tar.Z) D="`basename $i .tar.Z`";;
*.tar.z) D="`basename $i .tar.z`";;
*.tar.F) D="`basename $i .tar.F`"; set freeze -dc;;
*.tar.bz2) D="`basename $i .tar.bz2`"; set bunzip2 -c;;
esac
mkdir "$D"; (cd "$D" && "$1" "$2" "../$i" | tar xvf -)
done
+ f \.gz$ | f \.tgz$ | f \.tpz$ | f \.Z$ | f \.z$ | f \.bz2$ & t r & ! t t
c Пребаци gz<->bz2, tar.gz<->tar.bz2 и tgz->tar.bz2
unset D
case "%f" in
*.tgz) EXT=tgz;;
*.tpz) EXT=tpz;;
*.Z) EXT=Z;;
*.z) EXT=z;;
*.gz) EXT=gz;;
*.bz2) EXT=bz2;;
esac
case $EXT in
tgz|tpz) D="`basename %f .$EXT`.tar";;
gz|Z|z) D="`basename %f .$EXT`";;
bz2) D="`basename %f .bz2`";;
esac
if [ "$EXT" = "bz2" ]; then
bunzip2 -v "%f" ; gzip -f9 -v "$D"
else
gunzip -v "%f" ; bzip2 -v "$D"
fi
+ t t
C Пребаци gz<->bz2, tar.gz<->tar.bz2 и tgz->tar.bz2
set %t
while [ -n "$1" ]
do
unset D
case "$1" in
*.tgz) EXT=tgz;;
*.tpz) EXT=tpz;;
*.Z) EXT=Z;;
*.z) EXT=z;;
*.gz) EXT=gz;;
*.bz2) EXT=bz2;;
esac
case $EXT in
tgz) D="`basename $1 .tgz`.tar";;
tpz) D="`basename $1 .tpz`.tar";;
gz|Z|z) D="`basename $1 .$EXT`";;
bz2) D="`basename $1 .bz2`";;
esac
if [ "$EXT" = "bz2" ]; then
bunzip2 -v "$1"
gzip -f9 -v "$D"
else
gunzip -v "$1"
bzip2 -v "$D"
fi
shift
done
+ x /usr/bin/open | x /usr/local/bin/open & x /bin/sh
o Отвори следећу слободну конзолу
open -s -- sh

View File

@ -0,0 +1,486 @@
shell_patterns=0 # expression type
# The macros are:
#
# %c The cursor column position number. For edit menu only.
# %i The indent of blank space, equal the cursor column
# position. For edit menu only.
# %y The syntax type of current file. For edit menu only.
# %b The block file name.
# %f The current file name.
# %n Only the current file name without extension.
# %x The extension of current file name.
# %d The current directory name.
# %F The current file in the unselected panel.
# %D The directory name of the unselected panel.
# %t The currently tagged files.
# %T The tagged files in the unselected panel.
# %u and %U Similar to the %t and %T macros, but in
# addition the files are untagged. You can use this macro
# only once per menu file entry or extension file entry,
# because next time there will be no tagged files.
# %s and %S The selected files: The tagged files if
# there are any. Otherwise the current file.
#
# %% The % character
#
# %{some text} Prompt for the substitution. An input box
# is shown and the text inside the braces is used as a
# prompt. The macro is substituted by the text typed by the
# user. The user can press ESC or F10 to cancel. This macro
# doesn't work on the command line yet.
#----------------------- Begin [perl] language template -----------------------
+ y Perl\ Program | f \.pl$
1 Author description header
unset LANG
unset LANGUAGE
LC_ALL=
MY_UID="`id | sed 's/^.*uid=\([^(]*\).*$/\1/'`"
AUTHOR="`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`"
cat >>%b <<EOF
#----------------------------------------------------------------------
# Description:
# Author: $AUTHOR <$REPLYTO>
# Created at: `date`
# Computer: `uname -n`
# System: `uname -sr` on `uname -m`
#
# Copyright (c) `date +%%Y` $AUTHOR All rights reserved.
#
#----------------------------------------------------------------------
# Configure section:
#----------------------------------------------------------------------
#
# main()
EOF
+ y Perl\ Program | f \.pl$
2 while ()
cat <<EOF > %b
%iwhile() {
%i}
EOF
+ y Perl\ Program | f \.pl$
3 for ()
cat <<EOF > %b
%ifor ($i = ; $i < ; $i++) {
%i}
EOF
+ y Perl\ Program | f \.pl$
4 foreach ()
cat <<EOF > %b
%iforeach ($ ) {
%i}
EOF
+ y Perl\ Program | f \.pl$
5 if ()
cat <<EOF > %b
%iif () {
%i}
EOF
+ y Perl\ Program | f \.pl$
6 if () else
cat <<EOF > %b
%iif () {
%i} else {
%i}
EOF
+ y Perl\ Program | f \.pl$
7 if () elsif ()
cat <<EOF > %b
%iif () {
%i} elsif () {
%i}
EOF
+ y Perl\ Program | f \.pl$
8 substr ()
echo "%i$ = substr(\$str, \$off, \$cnt);" >%b
+ y Perl\ Program | f \.pl$
9 opendir ()
cat <<EOF > %b
%iopendir(DIR, \$dir) || die("\$0: can't open \$dir\n");
EOF
+ y Perl\ Program | f \.pl$
a sub ()
NAME=%{ Enter name of subroutine: }
cat <<EOF > %b
sub
$NAME ()
{
} # end of $NAME()
EOF
#----------------------- End [perl] language template -------------------------
#---------------------- Begin [shell] language template -----------------------
+ y Shell\ Script | f \.sh$
1 Author description header
unset LANG
unset LANGUAGE
LC_ALL=
MY_UID="`id | sed 's/^.*uid=\([^(]*\).*$/\1/'`"
AUTHOR="`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`"
cat >>%b <<EOF
#----------------------------------------------------------------------
# Description:
# Author: $AUTHOR <$REPLYTO>
# Created at: `date`
# Computer: `uname -n`
# System: `uname -sr` on `uname -m`
#
# Copyright (c) `date +%%Y` $AUTHOR All rights reserved.
#
#----------------------------------------------------------------------
# Configure section:
#----------------------------------------------------------------------
#
# main()
EOF
+ y Shell\ Script | f \.sh$
3 for
cat <<EOF > %b
%ifor i in \$
%ido
%idone
EOF
+ y Shell\ Script | f \.sh$
4 while
cat <<EOF > %b
%iwhile
%ido
%idone
EOF
+ y Shell\ Script | f \.sh$
5 if [] then else
cat <<EOF >> %b
%iif [ ];then
%ielse
%ifi
EOF
+ y Shell\ Script | f \.sh$
6 case
NUMBER=%{ Enter number elements of case:}
cat <<EOF > %b
%icase "\$" in
EOF
while [ "$NUMBER" -gt 0 ]
do
cat <<EOF >> %b
%i)
%i ;;
EOF
let NUMBER=$NUMBER-1
done
cat <<EOF >> %b
%i*)
%iesac
EOF
+ y Shell\ Script | f \.sh$
7 function
NAME=%{ Enter name of function:}
cat <<EOF >> %b
$NAME() {
} # end of $NAME()
EOF
+ y Shell\ Script | f \.sh$
8 select of bash
cat <<EOF >> %b
%iselect i in \$l
%ido
%i if [ -n "\$i" ];then
%i break
%i else
%i continue
%i fi
%idone
EOF
#----------------------- End [shell] language template ------------------------
#------------------------- Begin [c] language template ------------------------
+ f \.h$ | f \.c$ | f \.cc$
1 Author description header
unset LANG
unset LANGUAGE
LC_ALL=
MY_UID="`id | sed 's/^.*uid=\([^(]*\).*$/\1/'`"
AUTHOR="`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`"
cat >> %b <<EOF
/********************************************************************
* Description:
* Author: $AUTHOR <$REPLYTO>
* Created at: `date`
* Computer: `uname -n`
* System: `uname -sr` on `uname -m`
*
* Copyright (c) `date +%%Y` $AUTHOR All rights reserved.
*
********************************************************************/
EOF
+ f \.h$ | f \.c$ | f \.cc$
2 GPL description header
cat >>%b <<EOF
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
EOF
+ f \.c$ | f \.cc$
3 if ()
cat <<EOF > %b
%iif () {
%i}
EOF
+ f \.c$ | f \.cc$
4 if () else
cat <<EOF > %b
%iif () {
%i} else {
%i}
EOF
+ f \.c$ | f \.cc$
5 if () else if ()
cat <<EOF > %b
%iif ( ) {
%i} else if ( ) {
%i}
EOF
+ f \.c$ | f \.cc$
6 switch ()
NUMBER=%{ Enter number elements of switch:}
echo "%iswitch () {" >%b
while [ "$NUMBER" -gt 0 ]
do
echo "%icase '':" >>%b
echo "%i break;" >>%b
let NUMBER=$NUMBER-1
done
echo "%i default:" >>%b
echo "%i}" >>%b
+ f \.c$ | f \.cc$
7 for ()
cat <<EOF > %b
%ifor (i = ; i < ; i++) {
%i}
EOF
+ f \.c$ | f \.cc$
8 while ()
cat <<EOF > %b
%iwhile () {
%i}
EOF
+ f \.c$ | f \.cc$
9 do {} while ()
cat <<EOF > %b
%ido {
%i} while ()
EOF
+ f \.c$ | f \.cc$
a array
cat <<EOF > %b
%ichar const x[] = {
%i, ,
%i};
EOF
+ f \.c$ | f \.cc$
b enum
cat <<EOF > %b
%ienum x {
%i, ,
%i};
EOF
+ f \.c$ | f \.cc$
c struct
cat <<EOF > %b
%istruct ? {
%i;
%i};
EOF
+ f \.c$ | f \.cc$
d union
cat <<EOF > %b
%iunion ? {
%i;
%i};
EOF
+ f \.c$ | f \.cc$
e typedef struct
cat <<EOF > %b
%itypedef struct {
%i;
%i} ?;
EOF
+ f \.c$ | f \.cc$
f function
NAME=%{ Enter name of function:}
cat <<EOF >> %b
$NAME()
{
} /* end of $NAME() */
EOF
+ f \.c$ | f \.h$ | f \.cc$
g #include
INC=%{ Enter include name: }
if [ -r "$INC" ];then
echo \#include \"$INC\" >%b
else
echo \#include \<$INC\> >%b
fi
+ f \.c$ | f \.h$ | f \.cc$
d #define
echo "#define " >%b
+ f \.c$ | f \.h$ | f \.cc$
d #ifdef
cat <<EOF > %b
#ifdef
#else
#endif
EOF
+ f \.c$ | f \.h$ | f \.cc$
...............................................................................
+ f \.c$ | f \.h$ | f \.cc$
h View all *.h into current directory
cat *.h |less
+ f \.c$ | f \.cc$
d Run gdb for current file
[ -x "./%n" ] && gdb ./%n
= f \.c$ | f \.cc$
+ f \.c$ | f \.cc$
c Compile, link and run the current .c file
export CFLAGS="-g -Wall -O2"
make || make %n || cc $CFLAGS -o %n %f
[ -r "%n" ] && (echo "*** press any key for run... ***"; read)
[ -x "%n" ] && ./%n
(echo -ne "\n--- Press any key for return to edit. ---"; read)
+ f \.c$ | f \.h$
t Indent `C' formatter
indent -kr -pcs %b 1>/dev/null 2> %e
#--------------------- End [c/c++] language template --------------------------
#------------------------- Begin unknown template -----------------------------
+ y unknown & t r
s #! /bin/sh
echo "#! /bin/sh" >%b
+ y unknown & t r
p #! /usr/bin/perl
echo "#! /usr/bin/perl" >%b
+ y unknown & t r
a Author description header
unset LANG
unset LANGUAGE
LC_ALL=
MY_UID="`id | sed 's/^.*uid=\([^(]*\).*$/\1/'`"
AUTHOR="`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`"
cat >>%b <<EOF
----------------------------------------------------------------------
Description:
Author: $AUTHOR <$REPLYTO>
Created at: `date`
Computer: `uname -n`
System: `uname -sr` on `uname -m`
Copyright (c) `date +%%Y` $AUTHOR All rights reserved.
----------------------------------------------------------------------
EOF
#--------------------------- End unknown template -----------------------------
-------------------------------------------------------------------------------
#----------------------- Begin common section ---------------------------------
S Sort selection
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE
cat $TMPFILE| sort >%b
rm -f $TMPFILE
I Insert `Changelog' string
DATE="`date +%%Y-%%m-%%d`"
MY_UID="`id | sed 's/^.*uid=\([^(]*\).*$/\1/'`"
AUTHOR="`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`"
EMAIL="<$REPLYTO>"
echo "$DATE $AUTHOR $EMAIL" >%b
s Invoke `shell'
sh
m view `man'
MAN=%{Enter name of man:}
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/mcview.$MAN.XXXXXX` || exit 1
man -Pcat $MAN >$TMPFILE
mcview $TMPFILE
rm -f $TMPFILE
i Insert a out of command to cursor.
CMD=%{ Enter command: }
eval $CMD > %b
o Open bash to next free console
open -s -- /bin/bash
u Upper case selection
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE
cat $TMPFILE| sed 's/\(.*\)/\U\1/' >%b
rm -f $TMPFILE
l Lower case selection
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE
cat $TMPFILE| sed 's/\(.*\)/\U\1/' >%b
rm -f $TMPFILE
#-------------------------- End of common section -----------------------------

View File

@ -0,0 +1,28 @@
#
# This is config for Single File fileSystem
#
# Notice that output files (%3) are pre-created atomically in /tmp
# with 0600 rights, so it is safe to > %3
#
gz/1 gzip < %1 > %3
ugz/1 gzip -cdf < %1 > %3
bz/1 bzip < %1 > %3
ubz/1 bzip -d < %1 > %3
bz2/1 bzip2 < %1 > %3
ubz2/1 bzip2 -d < %1 > %3
lzma/1 lzma < %1 > %3
ulzma/1 lzma -d < %1 > %3
xz/1 xz < %1 > %3
uxz/1 xz -d < %1 > %3
tar/1 tar cf %3 %1
tgz/1 tar czf %3 %1
uhtml/1 lynx -force_html -dump %1 > %3
uman/1 groff -Tascii -man %1 > %3
uue/1 uuenpipe < %1 > %3
uude/1 uudepipe < %1 > %3
crlf/1 todos < %1 > %3
cr/1 fromdos < %1 > %3
# Fixme: we need it to fail whenever it should
url:2 lynx -source `echo "%2" | sed 's-|-/-g'` > %3
nop/1 cat %1 > %3
strings/1 strings %1 > %3

View File

@ -0,0 +1,522 @@
##########################################################
##
##### General rules #####
##
## 1) Because each action has runtime checks whether it's
## ok to run it, a few actions can be bound to one key.
## Actions will be bound in order given in configuration
## file. When a key is pressed, first action in order
## will test itself whether it's possible to run it. If
## test succeeds, action is executed and other actions
## bound to this key are ignored. If it doesn't, next
## action in order tests itself etc.
##
## 2) It's possible to bind more that one action at once
## to a key. It can be done using the following syntax:
##
## def_key "key"
## action1
## action2
## ...
##
## This creates chain of actions. When such chain is
## executed, each action in chain is run until the end of
## chain is reached or one of actions failed to execute
## due to its requirements not being met. Note that
## execution of chain of actions ALWAYS succeeds, no
## matter if one of actions from the chain failed (even
## if it was the first one in order and thus nothing
## was really executed). Because of that, if you decide
## to bind both actions and chains to a single key, make
## sure that chain is defined in the end. Otherwise, all
## actions bound to the key after chain will never be run.
##
## 3) When ncmpcpp starts, bindings configuration file is
## parsed and then ncmpcpp provides "missing pieces"
## of default keybindings. If you want to disable some
## bindings, there is a special action called 'dummy'
## for that purpose. Eg. if you want to disable ability
## to crop playlists, you need to put the following
## into configuration file:
##
## def_key "C"
## dummy
##
## After that ncmpcpp will not bind any default action
## to this key.
##
## 4) To let you write simple macros, the following special
## actions are provided:
##
## - push_character "character" - pushes given special
## character into input queue, so it will be immediately
## picked by ncmpcpp upon next call to readKey function.
## Accepted values: mouse, up, down, page_up, page_down,
## home, end, space, enter, insert, delete, left, right,
## tab, shift_tab, ctrl_a, ctrl_b, ..., ctrl_z, f1, f2,
## ..., f12, backspace, backspace_2.
##
## - push_characters "string" - pushes given string into
## input queue.
##
## - require_runnable "action" - checks whether given action
## is runnable and fails if it isn't. This is especially
## useful when mixed with previous two functions. Consider
## the following macro definition:
##
## def_key "key"
## push_characters "custom_filter"
## apply_filter
##
## If apply_filter can't be currently run, we end up with
## sequence of characters in input queue which will be
## treated just as we typed them. This may lead to unexpected
## results (in this case 'c' will most likely clear current
## playlist, 'u' will trigger database update, 's' will stop
## playback etc.). To prevent such thing from happening, we
## need to change above definition to this one:
##
## def_key "key"
## require_runnable "apply_filter"
## push_characters "custom_filter"
## apply_filter
##
## Here, first we test whether apply_filter can be actually run
## before we stuff characters into input queue, so if condition
## is not met, whole chain is aborted and we're fine.
##
## - require_screen "screen" - checks whether given screen is
## currently active. accepted values: browser, clock, help,
## media_library, outputs, playlist, playlist_editor,
## search_engine, tag_editor, visualizer, last_fm, lyrics,
## selected_items_adder, server_info, song_info,
## sort_playlist_dialog, tiny_tag_editor.
##
## - run_external_command "command" - runs given command using
## system() function.
##
## 5) In addition to binding to a key, you can also bind actions
## or chains of actions to a command. If it comes to commands,
## syntax is very similar to defining keys. Here goes example
## definition of a command:
##
## def_command "quit" [deferred]
## stop
## quit
##
## If you execute the above command (which can be done by
## invoking action execute_command, typing 'quit' and pressing
## enter), ncmpcpp will stop the player and then quit. Note the
## presence of word 'deferred' enclosed in square brackets. It
## tells ncmpcpp to wait for confirmation (ie. pressing enter)
## after you typed quit. Instead of 'deferred', 'immediate'
## could be used. Then ncmpcpp will not wait for confirmation
## (enter) and will execute the command the moment it sees it.
##
## Note: Both 'backspace' and 'backspace_2' are used because some
## terminals interpret backspace using keycode of 'backspace'
## and some the one of 'backspace_2'. You can get away with
## binding once if all your terminal emulators use the same
## value.
##
## Note: There is a difference between:
##
## def_key "key"
## action1
##
## def_key "key"
## action2
##
## and
##
## def_key "key"
## action1
## action2
##
## First one binds two single actions to the same key whilst
## second one defines a chain of actions. The behavior of
## these two is different and is described in (1) and (2).
##
## Note: Function def_key accepts non-ascii characters.
##
##### List of unbound actions #####
##
## The following actions are not bound to any key/command:
##
## - set_volume
## - filter_playlist_on_priorities
##
# Use j and k for scrolling up and down
def_key "j"
scroll_down
def_key "k"
scroll_up
def_key "d"
delete_playlist_items
#def_key "mouse"
# mouse_event
#
#def_key "up"
# scroll_up
#
#def_key "down"
# scroll_down
#
#def_key "["
# scroll_up_album
#
#def_key "]"
# scroll_down_album
#
#def_key "{"
# scroll_up_artist
#
#def_key "}"
# scroll_down_artist
#
#def_key "page_up"
# page_up
#
#def_key "page_down"
# page_down
#
#def_key "home"
# move_home
#
#def_key "end"
# move_end
#
#def_key "space"
# press_space
#
#def_key "enter"
# press_enter
#
#def_key "delete"
# delete_playlist_items
#
#def_key "delete"
# delete_stored_playlist
#
#def_key "right"
# next_column
#
#def_key "right"
# slave_screen
#
#def_key "right"
# volume_up
#
#def_key "+"
# volume_up
#
#def_key "left"
# previous_column
#
#def_key "left"
# master_screen
#
#def_key "left"
# volume_down
#
#def_key "-"
# volume_down
#
#def_key ":"
# execute_command
#
#def_key "tab"
# next_screen
#
#def_key "shift_tab"
# previous_screen
#
#def_key "f1"
# show_help
#
#def_key "1"
# show_playlist
#
#def_key "2"
# show_browser
#
#def_key "2"
# change_browse_mode
#
#def_key "3"
# show_search_engine
#
#def_key "3"
# reset_search_engine
#
#def_key "4"
# show_media_library
#
#def_key "4"
# toggle_media_library_columns_mode
#
#def_key "5"
# show_playlist_editor
#
#def_key "6"
# show_tag_editor
#
#def_key "7"
# show_outputs
#
#def_key "8"
# show_visualizer
#
#def_key "="
# show_clock
#
#def_key "@"
# show_server_info
#
#def_key "s"
# stop
#
#def_key "p"
# pause
#
#def_key ">"
# next
#
#def_key "<"
# previous
#
#def_key "ctrl_h"
# jump_to_parent_directory
#
#def_key "ctrl_h"
# replay_song
#
#def_key "backspace"
# jump_to_parent_directory
#
#def_key "backspace"
# replay_song
#
#def_key "backspace_2"
# jump_to_parent_directory
#
#def_key "backspace_2"
# replay_song
#
#def_key "f"
# seek_forward
#
#def_key "b"
# seek_backward
#
#def_key "r"
# toggle_repeat
#
#def_key "z"
# toggle_random
#
#def_key "y"
# save_tag_changes
#
#def_key "y"
# start_searching
#
#def_key "y"
# toggle_single
#
#def_key "R"
# toggle_consume
#
#def_key "Y"
# toggle_replay_gain_mode
#
#def_key "t"
# toggle_space_mode
#
#def_key "T"
# toggle_add_mode
#
#def_key "|"
# toggle_mouse
#
#def_key "#"
# toggle_bitrate_visibility
#
#def_key "Z"
# shuffle
#
#def_key "x"
# toggle_crossfade
#
#def_key "X"
# set_crossfade
#
#def_key "u"
# update_database
#
#def_key "ctrl_v"
# sort_playlist
#
#def_key "ctrl_r"
# reverse_playlist
#
#def_key "ctrl_f"
# apply_filter
#
#def_key "/"
# find
#
#def_key "/"
# find_item_forward
#
#def_key "?"
# find
#
#def_key "?"
# find_item_backward
#
#def_key "."
# next_found_item
#
#def_key ","
# previous_found_item
#
#def_key "w"
# toggle_find_mode
#
#def_key "e"
# edit_song
#
#def_key "e"
# edit_library_tag
#
#def_key "e"
# edit_library_album
#
#def_key "e"
# edit_directory_name
#
#def_key "e"
# edit_playlist_name
#
#def_key "e"
# edit_lyrics
#
#def_key "i"
# show_song_info
#
#def_key "I"
# show_artist_info
#
#def_key "g"
# jump_to_position_in_song
#
#def_key "l"
# show_lyrics
#
#def_key "v"
# reverse_selection
#
#def_key "V"
# remove_selection
#
#def_key "B"
# select_album
#
#def_key "a"
# add_selected_items
#
#def_key "c"
# clear_playlist
#
#def_key "c"
# clear_main_playlist
#
#def_key "C"
# crop_playlist
#
#def_key "C"
# crop_main_playlist
#
#def_key "m"
# move_sort_order_up
#
#def_key "m"
# move_selected_items_up
#
#def_key "m"
# toggle_media_library_sort_mode
#
#def_key "n"
# move_sort_order_down
#
#def_key "n"
# move_selected_items_down
#
#def_key "M"
# move_selected_items_to
#
#def_key "A"
# add
#
#def_key "S"
# save_playlist
#
#def_key "o"
# jump_to_playing_song
#
#def_key "G"
# jump_to_browser
#
#def_key "G"
# jump_to_playlist_editor
#
#def_key "~"
# jump_to_media_library
#
#def_key "E"
# jump_to_tag_editor
#
#def_key "U"
# toggle_playing_song_centering
#
#def_key "P"
# toggle_display_mode
#
#def_key "\\"
# toggle_interface
#
#def_key "!"
# toggle_separators_between_albums
#
#def_key "L"
# toggle_lyrics_fetcher
#
#def_key "F"
# toggle_fetching_lyrics_in_background
#
#def_key "ctrl_l"
# toggle_screen_lock
#
#def_key "`"
# toggle_browser_sort_mode
#
#def_key "`"
# toggle_library_tag_type
#
#def_key "`"
# refetch_lyrics
#
#def_key "`"
# add_random_items
#
#def_key "ctrl_p"
# set_selected_items_priority
#
#def_key "q"
# quit
#

View File

@ -0,0 +1,29 @@
####################################################
## this is example configuration file, copy it to ##
## ~/.ncmpcpp/config and set up your preferences ##
####################################################
#
##### connection settings #####
#
## set it in order to make tag editor and renaming files work properly
#
mpd_host = "patchMeIn@localhost"
#
mpd_port = "6600"
#
mpd_music_dir = "/home/collin/Music"
#
#mpd_connection_timeout = "5"
#execute_on_song_change = "notify-send -t 3000 \"$(ncmpcpp --now-playing '{%t\n%b - %a}|{%f}')\""
execute_on_song_change = "notify-send -t 3000 "$(mpc status | sed -n 1p | sed 's/ - /\n/g')""
playlist_display_mode = "columns"
browser_display_mode = "columns"
search_engine_display_mode = "columns"
#fancy_scrolling = "yes" #DEPRECIATED
user_interface = "alternative"
visualizer_fifo_path = "/home/collin/.mpd/mpd.fifo"
visualizer_output_name = "RekahSoft FIFO"
visualizer_sync_interval = "30"
visualizer_type = "spectrum" # (spectrum/wave/wave_filled/ellipse)

View File

@ -0,0 +1,13 @@
# OpenBox Menu Generator exclusions file
#
# Lines starting with a '#' character and empty lines are ignored.
# Put one exclusion per line.
# Exclusions are case sensitive and are matched against
# the 'Name' of the entry (the text that appears in menuitems).
#
# Exclusions format examples:
# ^example$ exact match with 'example'.
# ^example match any string that begins whith 'example'.
# example$ match any string that ends with 'example'.
# example match any string containing 'example'.

View File

@ -0,0 +1,35 @@
# OpenBox Menu Generator config file
#
# Lines starting with a '#' character and empty lines are ignored.
# Keys and values are case sensitive. Keep all keys lowercase.
# Removing or commenting any config line will cause an error.
# Top Menu section
# 'terminal' and 'editor' are REQUIRED
# 'filemanager', 'webbrowser' and 'run command' are optional.
# Leaving optional values empty causes the corresponding
# menu item to be hidden, no matter what show/hide option says.
terminal = urxvt
editor = emacs
filemanager = urxvt -e mc
webbrowser = firefox
instant messaging =
run command = gmrun
# Lock Screen menuitem
# Also leaving it empty causes menuitem to be hidden
lock command = xscreensaver-command -lock
# Exit menuitem
# Giving this an empty value don't hides the menuitem
# but uses the default OpenBox action "Exit"
exit command =
# OnlyShowIn Exclusions
# There is a 'OnlyShowIn' directive in .desktop files.
# This directive is self-descriptive :)
# You can put here (in lowercase) any directive's posible value
# you want to be excluded from the menu, comma-separeted.
# Leaving this value empty won't exclude any entry by this criteria.
exclude onlyshowin = kde,gnome

View File

@ -0,0 +1,43 @@
# OpenBox Menu Generator Schema file
# Each (non-empty or non-comment) line of this file must be in the form:
# 'type:options'
#
# 'type' could be one of the following values:
# 'item', 'submenu', 'sep', 'cat', 'raw', 'file'
#
# Posible values for each of this types are:
# For 'item': 'terminal', 'filemanager', 'webbrowser', 'instantmessaging', 'editor', 'runcommand', 'lock', 'exit'
# For 'submenu': 'windowsanddesktops', 'openbox'
# For 'sep': A string representing the LABEL for the separator or none
# For 'cat': Any of the posible categories. See obmenugen --help
# For 'raw': A hardcoded XML line in the OpenBox's menu.xml file format
# Example: raw:<item label="Linux Breakout 2"><action name="Execute"><execute>lbreakout2</execute></action></item>
# For file: The name of a file with a chunk of XML in the OpenBox's menu.xml file format.
# The file must be in ~/.config/obmenugen/
# Example: file:extras.xml
#
# Comments are lines begining with a # character, to the end of the line.
item:terminal
item:filemanager
item:webbrowser
item:instantmessaging
item:editor
item:runcommand
submenu:windowsanddesktops
sep:Applications
cat:accesories
cat:graphics
cat:audiovideo
cat:education
cat:office
cat:games
cat:network
cat:development
cat:settings
cat:system
submenu:openbox
sep:
item:lock
item:exit

View File

@ -0,0 +1 @@
#!/bin/bash

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/X11R6/share/openbox/menu.xsd">
<menu id="root-menu" label="openbox3">
<item label="Terminal"><action name="Execute"><execute>urxvt</execute></action></item>
<item label="File Manager"><action name="Execute"><execute>urxvt -e mc</execute></action></item>
<item label="Web Browser"><action name="Execute"><execute>firefox</execute></action></item>
<item label="Editor"><action name="Execute"><execute>emacs</execute></action></item>
<item label="Run Command"><action name="Execute"><execute>gmrun</execute></action></item>
<separator />
<menu id="client-list-combined-menu" />
<separator label="Applications"/>
<menu id="Accesories" label="Accesories">
<item label="File Manager"><action name="Execute"><execute>pcmanfm</execute></action></item>
<item label="Graveman"><action name="Execute"><execute>graveman</execute></action></item>
<item label="Parcellite"><action name="Execute"><execute>parcellite</execute></action></item>
<item label="SpeedCrunch"><action name="Execute"><execute>speedcrunch</execute></action></item>
</menu>
<menu id="Graphics" label="Graphics">
<item label="GNU Image Manipulation Program"><action name="Execute"><execute>gimp-2.6</execute></action></item>
<item label="Image Viewer"><action name="Execute"><execute>gpicview</execute></action></item>
</menu>
<menu id="Audio &amp; Video" label="Audio &amp; Video">
<item label="EasyTAG"><action name="Execute"><execute>easytag</execute></action></item>
<item label="Enqueue in SMPlayer"><action name="Execute"><execute>smplayer -add-to-playlist</execute></action></item>
<item label="MPlayer Media Player"><action name="Execute"><execute>mplayer -really-quiet</execute></action></item>
<item label="SMPlayer"><action name="Execute"><execute>smplayer</execute></action></item>
<item label="VLC media player"><action name="Execute"><execute>vlc</execute></action></item>
</menu>
<menu id="Office" label="Office">
<item label="HTMLDOC"><action name="Execute"><execute>htmldoc</execute></action></item>
<item label="OpenOffice.org 3.3 Base"><action name="Execute"><execute>openoffice -base</execute></action></item>
<item label="OpenOffice.org 3.3 Calc"><action name="Execute"><execute>openoffice -calc</execute></action></item>
<item label="OpenOffice.org 3.3 Draw"><action name="Execute"><execute>openoffice -draw</execute></action></item>
<item label="OpenOffice.org 3.3 Impress"><action name="Execute"><execute>openoffice -impress</execute></action></item>
<item label="OpenOffice.org 3.3 Math"><action name="Execute"><execute>openoffice -math</execute></action></item>
<item label="OpenOffice.org 3.3 Printer Administration"><action name="Execute"><execute>openoffice-printeradmin</execute></action></item>
<item label="OpenOffice.org 3.3 Writer"><action name="Execute"><execute>openoffice -writer</execute></action></item>
<item label="OpenOffice.org 3.3"><action name="Execute"><execute>openoffice</execute></action></item>
<item label="Zathura"><action name="Execute"><execute>zathura</execute></action></item>
</menu>
<menu id="Games" label="Games">
<item label="DOOM III"><action name="Execute"><execute>/usr/bin/doom3</execute></action></item>
</menu>
<menu id="Network" label="Network">
<item label="Avahi SSH Server Browser"><action name="Execute"><execute>/usr/bin/bssh</execute></action></item>
<item label="Avahi VNC Server Browser"><action name="Execute"><execute>/usr/bin/bvnc</execute></action></item>
<item label="Deluge BitTorrent Client"><action name="Execute"><execute>deluge-gtk</execute></action></item>
<item label="Firefox - Safe Mode"><action name="Execute"><execute>firefox -safe-mode</execute></action></item>
<item label="Firefox Beta - Safe Mode"><action name="Execute"><execute>firefox-beta-bin -safe-mode</execute></action></item>
<item label="Firefox Beta"><action name="Execute"><execute>firefox-beta-bin</execute></action></item>
<item label="Firefox"><action name="Execute"><execute>firefox</execute></action></item>
<item label="Zenmap (as root)"><action name="Execute"><execute>/usr/share/zenmap/su-to-zenmap.sh</execute></action></item>
<item label="Zenmap"><action name="Execute"><execute>zenmap</execute></action></item>
<item label="unison"><action name="Execute"><execute>unison-x11</execute></action></item>
</menu>
<menu id="Development" label="Development">
<item label="CMake"><action name="Execute"><execute>cmake-gui</execute></action></item>
<item label="DrRacket"><action name="Execute"><execute>drracket</execute></action></item>
<item label="Emacs Text Editor"><action name="Execute"><execute>emacs</execute></action></item>
<item label="Qt Assistant"><action name="Execute"><execute>/usr/bin/assistant</execute></action></item>
<item label="Qt Designer"><action name="Execute"><execute>/usr/bin/designer</execute></action></item>
<item label="Qt Linguist"><action name="Execute"><execute>/usr/bin/linguist</execute></action></item>
</menu>
<menu id="Settings" label="Settings">
<item label="NVIDIA X Server Settings"><action name="Execute"><execute>/usr/bin/nvidia-settings</execute></action></item>
<item label="Preferred Applications"><action name="Execute"><execute>libfm-pref-apps</execute></action></item>
<item label="Qt Config"><action name="Execute"><execute>/usr/bin/qtconfig</execute></action></item>
<item label="Screensaver"><action name="Execute"><execute>xscreensaver-demo</execute></action></item>
</menu>
<menu id="System Tools" label="System Tools">
<item label="Avahi Zeroconf Browser"><action name="Execute"><execute>/usr/bin/avahi-discover</execute></action></item>
<item label="Htop"><action name="Execute"><execute>urxvt -e htop</execute></action></item>
<item label="Ophcrack"><action name="Execute"><execute>ophcrack</execute></action></item>
<item label="Oracle VM VirtualBox"><action name="Execute"><execute>VirtualBox</execute></action></item>
<item label="rxvt-unicode"><action name="Execute"><execute>urxvt</execute></action></item>
</menu>
<separator />
<menu id="Openbox Settings" label="Openbox Settings">
<item label="Reconfigure Openbox"><action name="Reconfigure" /></item>
<item label="Configure Autostarted Applications"><action name="Execute"><execute>emacs /home/collin/.config/openbox/autostart.sh</execute></action></item>
<item label="Edit rc.xml"><action name="Execute"><execute>emacs /home/collin/.config/openbox/rc.xml</execute></action></item>
<separator label="obmenugen settings"/>
<item label="Edit obmenugen configuration"><action name="Execute"><execute>emacs /home/collin/.config/obmenugen/obmenugen.cfg</execute></action></item>
<item label="Edit obmenugen exclusions"><action name="Execute"><execute>emacs /home/collin/.config/obmenugen/exclusions</execute></action></item>
<item label="Edit obmenugen schema"><action name="Execute"><execute>emacs /home/collin/.config/obmenugen/obmenugen.schema</execute></action></item>
</menu>
<separator />
<item label="Lock Screen"><action name="Execute"><execute>xscreensaver-command -lock</execute></action></item>
<item label="Exit"><action name="Exit" /></item>
</menu>
</openbox_menu>

View File

@ -0,0 +1,732 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<!-- always try to focus new windows when they appear. other rules do
apply -->
<followMouse>no</followMouse>
<!-- move focus to a window when you move the mouse into it -->
<focusLast>yes</focusLast>
<!-- focus the last used window when changing desktops, instead of the one
under the mouse pointer. when followMouse is enabled -->
<underMouse>no</underMouse>
<!-- move focus under the mouse, even when the mouse is not moving -->
<focusDelay>200</focusDelay>
<!-- when followMouse is enabled, the mouse must be inside the window for
this many milliseconds (1000 = 1 sec) before moving focus to it -->
<raiseOnFocus>no</raiseOnFocus>
<!-- when followMouse is enabled, and a window is given focus by moving the
mouse into it, also raise the window -->
</focus>
<placement>
<policy>Smart</policy>
<!-- 'Smart' or 'UnderMouse' -->
<center>yes</center>
<!-- whether to place windows in the center of the free area found or
the top left corner -->
<monitor>Active</monitor>
<!-- with Smart placement on a multi-monitor system, try to place new windows
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
the active window is -->
<primaryMonitor>1</primaryMonitor>
<!-- The monitor where Openbox should place popup dialogs such as the
focus cycling popup, or the desktop switch popup. It can be an index
from 1, specifying a particular monitor. Or it can be one of the
following: 'Mouse' - where the mouse is, or
'Active' - where the active window is -->
</placement>
<theme>
<name>Clearlooks</name>
<titleLayout>NLIMC</titleLayout>
<!--
available characters are NDSLIMC, each can occur at most once.
N: window icon
L: window label (AKA title).
I: iconify
M: maximize
C: close
S: shade (roll up/down)
D: omnipresent (on all desktops).
-->
<keepBorder>yes</keepBorder>
<animateIconify>yes</animateIconify>
<font place="ActiveWindow">
<name>sans</name>
<size>8</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="InactiveWindow">
<name>sans</name>
<size>8</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="MenuHeader">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>normal</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="MenuItem">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>normal</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="OnScreenDisplay">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
</theme>
<desktops>
<!-- this stuff is only used at startup, pagers allow you to change them
during a session
these are default values to use when other ones are not already set
by other applications, or saved in your session
use obconf if you want to change these without having to log out
and back in -->
<number>4</number>
<firstdesk>1</firstdesk>
<names>
<!-- set names up here if you want to, like this:
<name>desktop 1</name>
<name>desktop 2</name>
-->
</names>
<popupTime>875</popupTime>
<!-- The number of milliseconds to show the popup for when switching
desktops. Set this to 0 to disable the popup. -->
</desktops>
<resize>
<drawContents>yes</drawContents>
<popupShow>Nonpixel</popupShow>
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
<popupPosition>Center</popupPosition>
<!-- 'Center', 'Top', or 'Fixed' -->
<popupFixedPosition>
<!-- these are used if popupPosition is set to 'Fixed' -->
<x>10</x>
<!-- positive number for distance from left edge, negative number for
distance from right edge, or 'Center' -->
<y>10</y>
<!-- positive number for distance from top edge, negative number for
distance from bottom edge, or 'Center' -->
</popupFixedPosition>
</resize>
<!-- You can reserve a portion of your screen where windows will not cover when
they are maximized, or when they are initially placed.
Many programs reserve space automatically, but you can use this in other
cases. -->
<margins>
<top>0</top>
<bottom>0</bottom>
<left>0</left>
<right>0</right>
</margins>
<dock>
<position>TopLeft</position>
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
<floatingX>0</floatingX>
<floatingY>0</floatingY>
<noStrut>no</noStrut>
<stacking>Above</stacking>
<!-- 'Above', 'Normal', or 'Below' -->
<direction>Vertical</direction>
<!-- 'Vertical' or 'Horizontal' -->
<autoHide>no</autoHide>
<hideDelay>300</hideDelay>
<!-- in milliseconds (1000 = 1 second) -->
<showDelay>300</showDelay>
<!-- in milliseconds (1000 = 1 second) -->
<moveButton>Middle</moveButton>
<!-- 'Left', 'Middle', 'Right' -->
</dock>
<keyboard>
<chainQuitKey>C-g</chainQuitKey>
<!-- GMRun keybinding -->
<keybind key="A-F2">
<action name="execute"><execute>gmrun</execute></action>
</keybind>
<!-- Keybindings for desktop switching -->
<keybind key="C-A-Left">
<action name="DesktopLeft"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="C-A-Right">
<action name="DesktopRight"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="C-A-Up">
<action name="DesktopUp"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="C-A-Down">
<action name="DesktopDown"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="S-A-Left">
<action name="SendToDesktopLeft"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="S-A-Right">
<action name="SendToDesktopRight"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="S-A-Up">
<action name="SendToDesktopUp"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="S-A-Down">
<action name="SendToDesktopDown"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="W-F1">
<action name="Desktop"><desktop>1</desktop></action>
</keybind>
<keybind key="W-F2">
<action name="Desktop"><desktop>2</desktop></action>
</keybind>
<keybind key="W-F3">
<action name="Desktop"><desktop>3</desktop></action>
</keybind>
<keybind key="W-F4">
<action name="Desktop"><desktop>4</desktop></action>
</keybind>
<keybind key="W-d">
<action name="ToggleShowDesktop"/>
</keybind>
<!-- Keybindings for windows -->
<keybind key="A-F4">
<action name="Close"/>
</keybind>
<keybind key="A-Escape">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</keybind>
<keybind key="A-space">
<action name="ShowMenu"><menu>client-menu</menu></action>
</keybind>
<!-- Keybindings for window switching -->
<keybind key="A-Tab">
<action name="NextWindow"/>
</keybind>
<keybind key="A-S-Tab">
<action name="PreviousWindow"/>
</keybind>
<keybind key="C-A-Tab">
<action name="NextWindow">
<panels>yes</panels><desktop>yes</desktop>
</action>
</keybind>
<!-- Keybindings for running applications -->
<keybind key="W-e">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Konqueror</name>
</startupnotify>
<command>kfmclient openProfile filemanagement</command>
</action>
</keybind>
</keyboard>
<mouse>
<dragThreshold>8</dragThreshold>
<!-- number of pixels the mouse must move before a drag begins -->
<doubleClickTime>200</doubleClickTime>
<!-- in milliseconds (1000 = 1 second) -->
<screenEdgeWarpTime>400</screenEdgeWarpTime>
<!-- Time before changing desktops when the pointer touches the edge of the
screen while moving a window, in milliseconds (1000 = 1 second).
Set this to 0 to disable warping -->
<context name="Frame">
<mousebind button="A-Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="A-Left" action="Click">
<action name="Unshade"/>
</mousebind>
<mousebind button="A-Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="A-Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="A-Right" action="Drag">
<action name="Resize"/>
</mousebind>
<mousebind button="A-Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="C-A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="C-A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-S-Up" action="Click">
<action name="SendToDesktopPrevious"/>
</mousebind>
<mousebind button="A-S-Down" action="Click">
<action name="SendToDesktopNext"/>
</mousebind>
</context>
<context name="Titlebar">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="Up" action="Click">
<action name="Shade"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
<action name="Lower"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="Unshade"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
<context name="Top">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>top</edge></action>
</mousebind>
</context>
<context name="Left">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>left</edge></action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
<context name="Right">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>right</edge></action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
<context name="Bottom">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>bottom</edge></action>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
<context name="BLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="BRCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="TLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="TRCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="Client">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Icon">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
<context name="AllDesktops">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleOmnipresent"/>
</mousebind>
</context>
<context name="Shade">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleShade"/>
</mousebind>
</context>
<context name="Iconify">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="Iconify"/>
</mousebind>
</context>
<context name="Maximize">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind button="Middle" action="Click">
<action name="ToggleMaximizeVert"/>
</mousebind>
<mousebind button="Right" action="Click">
<action name="ToggleMaximizeHorz"/>
</mousebind>
</context>
<context name="Close">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="Close"/>
</mousebind>
</context>
<context name="Desktop">
<mousebind button="Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="C-A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="C-A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Root">
<!-- Menus -->
<mousebind button="Middle" action="Press">
<action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="ShowMenu"><menu>root-menu</menu></action>
</mousebind>
</context>
<context name="MoveResize">
<mousebind button="Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
</context>
</mouse>
<menu>
<!-- You can specify more than one menu file in here and they are all loaded,
just don't make menu ids clash or, well, it'll be kind of pointless -->
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
<file>menu.xml</file>
<hideDelay>200</hideDelay>
<!-- if a press-release lasts longer than this setting (in milliseconds), the
menu is hidden again -->
<middle>no</middle>
<!-- center submenus vertically about the parent entry -->
<submenuShowDelay>100</submenuShowDelay>
<!-- time to delay before showing a submenu after hovering over the parent
entry.
if this is a negative value, then the delay is infinite and the
submenu will not be shown until it is clicked on -->
<submenuHideDelay>400</submenuHideDelay>
<!-- time to delay before hiding a submenu when selecting another
entry in parent menu -->
if this is a negative value, then the delay is infinite and the
submenu will not be hidden until a different submenu is opened -->
<applicationIcons>yes</applicationIcons>
<!-- controls if icons appear in the client-list-(combined-)menu -->
<manageDesktops>yes</manageDesktops>
<!-- show the manage desktops section in the client-list-(combined-)menu -->
</menu>
<applications>
<!--
# this is an example with comments through out. use these to make your
# own rules, but without the comments of course.
<application name="the window's _OB_APP_NAME property (see obxprop)"
class="the window's _OB_APP_CLASS property (see obxprop)"
role="the window's _OB_APP_ROLE property (see obxprop)"
type="the window's _OB_APP_TYPE property (see obxprob)..
(if unspecified, then it is 'dialog' for child windows)">
# you may set only one of name/class/role/type, or you may use more than one
# together to restrict your matches.
# the name, class, and role use simple wildcard matching such as those
# used by a shell. you can use * to match any characters and ? to match
# any single character.
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
# or desktop
# when multiple rules match a window, they will all be applied, in the
# order that they appear in this list
# each rule element can be left out or set to 'default' to specify to not
# change that attribute of the window
<decor>yes</decor>
# enable or disable window decorations
<shade>no</shade>
# make the window shaded when it appears, or not
<position force="no">
# the position is only used if both an x and y coordinate are provided
# (and not set to 'default')
# when force is "yes", then the window will be placed here even if it
# says you want it placed elsewhere. this is to override buggy
# applications who refuse to behave
<x>center</x>
# a number like 50, or 'center' to center on screen. use a negative number
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
# right edge (or bottom).
<y>200</y>
<monitor>1</monitor>
# specifies the monitor in a xinerama setup.
# 1 is the first head, or 'mouse' for wherever the mouse is
</position>
<focus>yes</focus>
# if the window should try be given focus when it appears. if this is set
# to yes it doesn't guarantee the window will be given focus. some
# restrictions may apply, but Openbox will try to
<desktop>1</desktop>
# 1 is the first desktop, 'all' for all desktops
<layer>normal</layer>
# 'above', 'normal', or 'below'
<iconic>no</iconic>
# make the window iconified when it appears, or not
<skip_pager>no</skip_pager>
# asks to not be shown in pagers
<skip_taskbar>no</skip_taskbar>
# asks to not be shown in taskbars. window cycling actions will also
# skip past such windows
<fullscreen>yes</fullscreen>
# make the window in fullscreen mode when it appears
<maximized>true</maximized>
# 'Horizontal', 'Vertical' or boolean (yes/no)
</application>
# end of the example
-->
</applications>
</openbox_config>

View File

@ -0,0 +1,108 @@
Files {
Keys = "~/.pekwm/keys"
Mouse = "~/.pekwm/mouse"
Menu = "~/.pekwm/menu"
Start = "~/.pekwm/start"
AutoProps = "~/.pekwm/autoproperties"
Theme = "$_PEKWM_THEME_PATH/<THEME>"
Icons = "~/.pekwm/icons/"
}
MoveResize {
EdgeAttract = "10"
EdgeResist = "10"
WindowAttract = "5"
WindowResist = "5"
OpaqueMove = "True"
OpaqueResize = "False"
}
Screen {
Workspaces = "9"
WorkspacesPerRow = "3"
WorkspaceNames = "Main;Web;E-mail;Music;Work 05;Work 06;Work 07;Work 08;Work 09"
ShowFrameList = "True"
ShowStatusWindow = "True"
ShowStatusWindowCenteredOnRoot = "False"
ShowClientID = "False"
ShowWorkspaceIndicator = "500"
PlaceNew = "True"
FocusNew = "True"
ReportAllClients = "False"
TrimTitle = "..."
FullscreenAbove = "True"
FullscreenDetect = "True"
HonourRandr = "True"
HonourAspectRatio = "True"
EdgeSize = "1 1 1 1"
EdgeIndent = "False"
PixmapCacheSize = "20"
DoubleClickTime = "250"
Placement {
Model = "CenteredOnParent Smart MouseNotUnder"
Smart {
Row = "True"
TopToBottom = "True"
LeftToRight = "True"
OffsetX = "0"
OffsetY = "0"
}
}
UniqueNames {
SetUnique = "False"
Pre = " #"
Post = ""
}
}
Menu {
DisplayIcons = "True"
Icons = "DEFAULT" {
Minimum = "16x16"
Maximum = "16x16"
}
# To enable make separate window have other icon size restrictions,
# for example wallpaper menu found in pekwm_menu_tools, set the following
# for each menu you want to "free".
# Icons = "Wallpaper" {
# Minimum = "64x64"
# Maximum = "64x64"
# }
# Defines how menus act on mouse input.
# Possible values are: "ButtonPress ButtonRelease DoubleClick Motion"
# To make submenus open on mouse over, comment the default Enter,
# uncomment the alternative, and reload pekwm.
Select = "Motion MotionPressed"
Enter = "MotionPressed ButtonPress"
# Enter = "Motion"
Exec = "ButtonRelease"
}
CmdDialog {
HistoryUnique = "True"
HistorySize = "1024"
HistoryFile = "~/.pekwm/history"
HistorySaveInterval = "16"
}
Harbour {
OnTop = "True"
MaximizeOver = "False"
Placement = "Right"
Orientation = "TopToBottom"
Head = "0"
DockApp {
SideMin = "64"
SideMax = "0"
}
}

View File

@ -0,0 +1,315 @@
INCLUDE = "vars"
Global {
# - - ----------------------------------------------- - -
# Simple bindings to most frequently used actions.
#
# Adding your own frequently used actions is easy -
# just copy it over from CHAINS and edit the keypress!
# Moving in frames
KeyPress = "Mod1 Tab" { Actions = "NextFrame EndRaise" }
KeyPress = "Mod1 Shift Tab" { Actions = "PrevFrame EndRaise" }
KeyPress = "Mod1 Ctrl Tab" { Actions = "NextFrameMRU EndRaise" }
KeyPress = "Mod1 Ctrl Shift Tab" { Actions = "PrevFrameMRU EndRaise" }
KeyPress = "Mod4 Tab" { Actions = "ActivateClientRel 1" }
KeyPress = "Mod4 Shift Tab" { Actions = "ActivateClientRel -1" }
KeyPress = "Mod4 Ctrl Right" { Actions = "MoveClientRel 1" }
KeyPress = "Mod4 Ctrl Left" { Actions = "MoveClientRel -1" }
KeyPress = "Mod4 Left" { Actions = "FocusDirectional Left" }
KeyPress = "Mod4 Right" { Actions = "FocusDirectional Right" }
KeyPress = "Mod4 Up" { Actions = "FocusDirectional Up" }
KeyPress = "Mod4 Down" { Actions = "FocusDirectional Down" }
# Moving in workspaces
KeyPress = "Ctrl Mod1 Left" { Actions = "GotoWorkspace Left" }
KeyPress = "Ctrl Mod1 Right" { Actions = "GotoWorkspace Right" }
KeyPress = "Ctrl Mod1 Up" { Actions = "GotoWorkspace Up" }
KeyPress = "Ctrl Mod1 Down" { Actions = "GotoWorkspace Down" }
KeyPress = "Mod4 1" { Actions = "GotoWorkspace 1" }
KeyPress = "Mod4 2" { Actions = "GotoWorkspace 2" }
KeyPress = "Mod4 3" { Actions = "GotoWorkspace 3" }
KeyPress = "Mod4 4" { Actions = "GotoWorkspace 4" }
KeyPress = "Mod4 5" { Actions = "GotoWorkspace 5" }
KeyPress = "Mod4 6" { Actions = "GotoWorkspace 6" }
KeyPress = "Mod4 7" { Actions = "GotoWorkspace 7" }
KeyPress = "Mod4 8" { Actions = "GotoWorkspace 8" }
KeyPress = "Mod4 9" { Actions = "GotoWorkspace 9" }
KeyPress = "Ctrl Mod1 Shift Left" { Actions = "SendToWorkspace Next; GoToWorkspace Next" }
KeyPress = "Ctrl Mod1 Shift Right" { Actions = "SendToWorkspace Prev; GoToWorkspace Prev" }
KeyPress = "Ctrl Mod1 Shift Up" { Actions = "SendToWorkspace NextV; GoToWorkspace NextV" }
KeyPress = "Ctrl Mod1 Shift Down" { Actions = "SendToWorkspace PrevV; GoToWorkspace PrevV" }
KeyPress = "Mod4 F1" { Actions = "SendToWorkspace 1" }
KeyPress = "Mod4 F2" { Actions = "SendToWorkspace 2" }
KeyPress = "Mod4 F3" { Actions = "SendToWorkspace 3" }
KeyPress = "Mod4 F4" { Actions = "SendToWorkspace 4" }
KeyPress = "Mod4 F5" { Actions = "SendToWorkspace 5" }
KeyPress = "Mod4 F6" { Actions = "SendToWorkspace 6" }
KeyPress = "Mod4 F7" { Actions = "SendToWorkspace 7" }
KeyPress = "Mod4 F8" { Actions = "SendToWorkspace 8" }
KeyPress = "Mod4 F9" { Actions = "SendToWorkspace 9" }
# Simple window management
KeyPress = "Mod4 M" { Actions = "Toggle Maximized True True" }
KeyPress = "Mod4 G" { Actions = "Maxfill True True" }
KeyPress = "Mod4 F" { Actions = "Toggle FullScreen" }
KeyPress = "Mod4 Return" { Actions = "MoveResize" }
KeyPress = "Mod4 Q" { Actions = "Close" }
KeyPress = "Mod4 S" { Actions = "Toggle Shaded" }
KeyPress = "Mod4 I" { Actions = "Toggle Iconified" }
# Marking
KeyPress = "Mod4 Z" { Actions = "Toggle Marked" }
KeyPress = "Mod4 A" { Actions = "AttachMarked" }
# Tagging
KeyPress = "Mod4 T" { Actions = "Toggle Tagged False" }
# Menus
KeyPress = "Mod4 R" { Actions = "ShowMenu Root" }
KeyPress = "Mod4 W" { Actions = "ShowMenu Window" }
KeyPress = "Mod4 L" { Actions = "ShowMenu Goto" }
KeyPress = "Mod4 C" { Actions = "ShowMenu GotoClient" }
KeyPress = "Mod4 Shift I" { Actions = "ShowMenu Icon" }
KeyPress = "Mod4 X" { Actions = "HideAllMenus" }
# External Commands
KeyPress = "Mod4 E" { Actions = "Exec $TERM" }
# Pekwm control
KeyPress = "Ctrl Mod1 Delete" { Actions = "Reload" }
KeyPress = "Mod4 D" { Actions = "ShowCmdDialog" }
KeyPress = "Mod4 V" { Actions = "ShowSearchDialog" }
KeyPress = "Mod4 H" { Actions = "Toggle HarbourHidden" }
# - - ----------------------------------------------- - -
# CHAINS. These give you access to just about everything.
# Move to Corner
Chain = "Ctrl Mod1 C" {
KeyPress = "Q" { Actions = "MoveToEdge TopLeft" }
KeyPress = "Y" { Actions = "MoveToEdge TopCenterEdge" }
KeyPress = "W" { Actions = "MoveToEdge TopCenterEdge" }
KeyPress = "Shift Y" { Actions = "MoveToEdge TopEdge" }
KeyPress = "Shift W" { Actions = "MoveToEdge TopEdge" }
KeyPress = "P" { Actions = "MoveToEdge TopRight" }
KeyPress = "E" { Actions = "MoveToEdge TopRight" }
KeyPress = "A" { Actions = "MoveToEdge LeftCenterEdge" }
KeyPress = "Shift A" { Actions = "MoveToEdge LeftEdge" }
KeyPress = "L" { Actions = "MoveToEdge RightCenterEdge" }
KeyPress = "D" { Actions = "MoveToEdge RightCenterEdge" }
KeyPress = "Shift L" { Actions = "MoveToEdge RightEdge" }
KeyPress = "Shift D" { Actions = "MoveToEdge RightEdge" }
KeyPress = "Z" { Actions = "MoveToEdge BottomLeft" }
KeyPress = "B" { Actions = "MoveToEdge BottomCenterEdge" }
KeyPress = "X" { Actions = "MoveToEdge BottomCenterEdge" }
KeyPress = "Shift B" { Actions = "MoveToEdge BottomEdge" }
KeyPress = "Shift X" { Actions = "MoveToEdge BottomEdge" }
KeyPress = "M" { Actions = "MoveToEdge BottomRight" }
KeyPress = "C" { Actions = "MoveToEdge BottomRight" }
KeyPress = "H" { Actions = "MoveToEdge Center" }
KeyPress = "S" { Actions = "MoveToEdge Center" }
}
# Menus
Chain = "Ctrl Mod1 M" {
KeyPress = "R" { Actions = "ShowMenu Root" }
KeyPress = "W" { Actions = "ShowMenu Window" }
KeyPress = "I" { Actions = "ShowMenu Icon" }
KeyPress = "G" { Actions = "ShowMenu Goto" }
KeyPress = "C" { Actions = "ShowMenu GotoClient" }
KeyPress = "D" { Actions = "ShowMenu Decor" }
KeyPress = "A" { Actions = "ShowMenu AttachClientInFrame" }
KeyPress = "F" { Actions = "ShowMenu AttachFrameInFrame" }
Keypress = "Shift A" { Actions = "ShowMenu AttachClient" }
Keypress = "Shift F" { Actions = "ShowMenu AttachFrame" }
KeyPress = "X" { Actions = "HideAllMenus" }
}
# Grouping
Chain = "Ctrl Mod1 T" {
KeyPress = "T" { Actions = "Toggle Tagged False" }
KeyPress = "B" { Actions = "Toggle Tagged True" }
KeyPress = "C" { Actions = "Unset Tagged" }
KeyPress = "G" { Actions = "Toggle GlobalGrouping" }
KeyPress = "M" { Actions = "Toggle Marked" }
KeyPress = "A" { Actions = "AttachMarked" }
KeyPress = "D" { Actions = "Detach" }
Keypress = "P" { Actions = "AttachClientInNextFrame" }
KeyPress = "O" { Actions = "AttachClientInPrevFrame" }
Keypress = "I" { Actions = "AttachFrameInNextFrame" }
KeyPress = "U" { Actions = "AttachFrameInPrevFrame" }
}
# Decor Toggles
Chain = "Ctrl Mod1 D" {
KeyPress = "B" { Actions = "Toggle DecorBorder" }
KeyPress = "T" { Actions = "Toggle DecorTitlebar" }
KeyPress = "D" { Actions = "Toggle DecorBorder; Toggle DecorTitlebar" }
}
# Window Actions
Chain = "Ctrl Mod1 A" {
Chain = "G" {
KeyPress = "G" { Actions = "MaxFill True True" }
KeyPress = "V" { Actions = "MaxFill False True" }
KeyPress = "H" { Actions = "MaxFill True False" }
}
Chain = "M" {
KeyPress = "M" { Actions = "Toggle Maximized True True" }
KeyPress = "V" { Actions = "Toggle Maximized False True" }
KeyPress = "H" { Actions = "Toggle Maximized True False" }
}
Chain = "Q" {
KeyPress = "Q" { Actions = "Close" }
KeyPress = "F" { Actions = "CloseFrame" }
KeyPress = "K" { Actions = "Kill" }
}
KeyPress = "S" { Actions = "Toggle Shaded" }
KeyPress = "A" { Actions = "Toggle Sticky" }
KeyPress = "O" { Actions = "Toggle AlwaysOnTop" }
KeyPress = "B" { Actions = "Toggle AlwaysBelow" }
KeyPress = "I" { Actions = "Set Iconified" }
KeyPress = "R" { Actions = "Raise" }
KeyPress = "Shift R" { Actions = "Raise True" }
KeyPress = "L" { Actions = "Lower" }
KeyPress = "Shift L" { Actions = "Lower True" }
KeyPress = "X" { Actions = "ActivateOrRaise" }
KeyPress = "Return" { Actions = "MoveResize" }
KeyPress = "F" { Actions = "Toggle Fullscreen" }
KeyPress = "Left" { Actions = "GrowDirection Left" }
KeyPress = "Right" { Actions = "GrowDirection Right" }
KeyPress = "Up" { Actions = "GrowDirection Up" }
KeyPress = "Down" { Actions = "GrowDirection Down" }
}
# Moving in Frames
Chain = "Ctrl Mod1 F" {
KeyPress = "P" { Actions = "NextFrame AlwaysRaise" }
KeyPress = "O" { Actions = "PrevFrame AlwaysRaise" }
KeyPress = "Shift P" { Actions = "NextFrameMRU EndRaise" }
KeyPress = "Shift O" { Actions = "PrevFrameMRU EndRaise" }
KeyPress = "I" { Actions = "ActivateClientRel 1" }
KeyPress = "U" { Actions = "ActivateClientRel -1" }
KeyPress = "Shift I" { Actions = "MoveClientRel 1" }
KeyPress = "Shift U" { Actions = "MoveClientRel -1" }
KeyPress = "Up" { Actions = "FocusDirectional Up" }
KeyPress = "Down" { Actions = "FocusDirectional Down" }
KeyPress = "Left" { Actions = "FocusDirectional Left" }
Keypress = "Right" { Actions = "FocusDirectional Right" }
KeyPress = "1" { Actions = "ActivateClientNum 1" }
KeyPress = "2" { Actions = "ActivateClientNum 2" }
KeyPress = "3" { Actions = "ActivateClientNum 3" }
KeyPress = "4" { Actions = "ActivateClientNum 4" }
KeyPress = "5" { Actions = "ActivateClientNum 5" }
KeyPress = "6" { Actions = "ActivateClientNum 6" }
KeyPress = "7" { Actions = "ActivateClientNum 7" }
KeyPress = "8" { Actions = "ActivateClientNum 8" }
KeyPress = "9" { Actions = "ActivateClientNum 9" }
KeyPress = "0" { Actions = "ActivateClientNum 10" }
KeyPress = "C" { Actions = "ShowCmdDialog GotoClientID " }
}
# Workspaces
Chain = "Ctrl Mod1 W" {
KeyPress = "Right" { Actions = "GoToWorkspace Right" }
KeyPress = "Left" { Actions = "GoToWorkspace Left" }
KeyPress = "N" { Actions = "GoToWorkspace Next" }
KeyPress = "P" { Actions = "GoToWorkspace Prev" }
KeyPress = "1" { Actions = "GoToWorkspace 1" }
KeyPress = "2" { Actions = "GoToWorkspace 2" }
KeyPress = "3" { Actions = "GoToWorkspace 3" }
KeyPress = "4" { Actions = "GoToWorkspace 4" }
KeyPress = "5" { Actions = "GoToWorkspace 5" }
KeyPress = "6" { Actions = "GoToWorkspace 6" }
KeyPress = "7" { Actions = "GoToWorkspace 7" }
KeyPress = "8" { Actions = "GoToWorkspace 8" }
KeyPress = "9" { Actions = "GoToWorkspace 9" }
KeyPress = "Up" { Actions = "SendToWorkspace Next; GoToWorkspace Next" }
KeyPress = "Down" { Actions = "SendToWorkspace Prev; GoToWorkspace Prev" }
KeyPress = "F1" { Actions = "SendToWorkspace 1" }
KeyPress = "F2" { Actions = "SendToWorkspace 2" }
KeyPress = "F3" { Actions = "SendToWorkspace 3" }
KeyPress = "F4" { Actions = "SendToWorkspace 4" }
KeyPress = "F5" { Actions = "SendToWorkspace 5" }
KeyPress = "F6" { Actions = "SendToWorkspace 6" }
KeyPress = "F7" { Actions = "SendToWorkspace 7" }
KeyPress = "F8" { Actions = "SendToWorkspace 8" }
KeyPress = "F9" { Actions = "SendToWorkspace 9" }
}
# External commands
Chain = "Ctrl Mod1 E" {
KeyPress = "E" { Actions = "Exec $TERM" }
KeyPress = "L" { Actions = "Exec xlock -mode blank &" }
KeyPress = "S" { Actions = "Exec scrot &" }
KeyPress = "C" { Actions = "ShowCmdDialog" }
}
# Wm actions
Chain = "Ctrl Mod1 P" {
KeyPress = "Delete" { Actions = "Reload" }
KeyPress = "Next" { Actions = "Restart" }
KeyPress = "End" { Actions = "Exit" }
KeyPress = "Prior" { Actions = "RestartOther twm" }
KeyPress = "D" { Actions = "ShowCmdDialog" }
KeyPress = "H" { Actions = "Toggle HarbourHidden" }
}
# Skipping
Chain = "Ctrl Mod1 S" {
Keypress = "M" { Actions = "Toggle Skip Menus" }
Keypress = "F" { Actions = "Toggle Skip FocusToggle" }
Keypress = "S" { Actions = "Toggle Skip Snap" }
}
}
# Keys when MoveResize is active
MoveResize {
KeyPress = "Left" { Actions = "MoveHorizontal -10" }
KeyPress = "Right" { Actions = "MoveHorizontal 10" }
KeyPress = "Up" { Actions = "MoveVertical -10" }
KeyPress = "Down" { Actions = "MoveVertical 10" }
Keypress = "Shift Left" { Actions = "MoveHorizontal -1" }
Keypress = "Shift Right" { Actions = "MoveHorizontal 1" }
Keypress = "Shift Up" { Actions = "MoveVertical -1" }
Keypress = "Shift Down" { Actions = "MoveVertical 1" }
Keypress = "Mod4 Left" { Actions = "ResizeHorizontal -10" }
Keypress = "Mod4 Right" { Actions = "ResizeHorizontal 10" }
Keypress = "Mod4 Up" { Actions = "ResizeVertical -10" }
Keypress = "Mod4 Down" { Actions = "ResizeVertical 10" }
Keypress = "Mod1 Left" { Actions = "ResizeHorizontal -10" }
Keypress = "Mod1 Right" { Actions = "ResizeHorizontal 10" }
Keypress = "Mod1 Up" { Actions = "ResizeVertical -10" }
Keypress = "Mod1 Down" { Actions = "ResizeVertical 10" }
Keypress = "Shift Mod4 Left" { Actions = "ResizeHorizontal -1" }
Keypress = "Shift Mod4 Right" { Actions = "ResizeHorizontal 1" }
Keypress = "Shift Mod4 Up" { Actions = "ResizeVertical -1" }
Keypress = "Shift Mod4 Down" { Actions = "ResizeVertical 1" }
Keypress = "Shift Mod1 Left" { Actions = "ResizeHorizontal -1" }
Keypress = "Shift Mod1 Right" { Actions = "ResizeHorizontal 1" }
Keypress = "Shift Mod1 Up" { Actions = "ResizeVertical -1" }
Keypress = "Shift Mod1 Down" { Actions = "ResizeVertical 1" }
Keypress = "s" { Actions = "MoveSnap" }
Keypress = "Escape" { Actions = "Cancel" }
Keypress = "q" { Actions = "Cancel" }
Keypress = "Return" { Actions = "End" }
}
# Keys for CmdDialog editing
InputDialog {
KeyPress = "Left" { Actions = "CursPrev" }
KeyPress = "Right" { Actions = "CursNext" }
KeyPress = "Ctrl A" { Actions = "CursBegin" }
KeyPress = "Ctrl E" { Actions = "CursEnd" }
KeyPress = "BackSpace" { Actions = "Erase;CompleteAbort" }
KeyPress = "Ctrl K" { Actions = "ClearFromCursor" }
KeyPress = "Ctrl C" { Actions = "Clear" }
KeyPress = "Return" { Actions = "Exec" }
KeyPress = "Escape" { Actions = "Close" }
KeyPress = "Up" { Actions = "HistPrev" }
KeyPress = "Down" { Actions = "HistNext" }
KeyPress = "Ctrl P" { Actions = "HistPrev" }
KeyPress = "Ctrl N" { Actions = "HistNext" }
KeyPress = "Ctrl B" { Actions = "CursPrev" }
KeyPress = "Ctrl F" { Actions = "CursNext" }
KeyPress = "Tab" { Actions = "Complete" }
KeyPress = "Any Any" { Actions = "Insert" }
}
# Keys working in menus
Menu {
KeyPress = "Down" { Actions = "NextItem" }
KeyPress = "Up" { Actions = "PrevItem" }
KeyPress = "Ctrl N" { Actions = "NextItem" }
KeyPress = "Ctrl P" { Actions = "PrevItem" }
KeyPress = "Left" { Actions = "LeaveSubmenu" }
KeyPress = "Right" { Actions = "EnterSubmenu" }
KeyPress = "Return" { Actions = "Select" }
KeyPress = "space" { Actions = "Select" }
KeyPress = "Escape" { Actions = "Close" }
KeyPress = "Q" { Actions = "Close" }
}

View File

@ -0,0 +1,147 @@
# Menu config for pekwm
# Variables
INCLUDE = "vars"
RootMenu = "Pekwm" {
Entry = "Terminal" { Actions = "Exec $TERM &" }
Entry = "Run.." { Actions = "ShowCmdDialog" }
Separator {}
Submenu = "Editors" {
Entry = "vim" { Actions = "Exec $TERM -title vim -e vim &" }
Entry = "gvim" { Actions = "Exec gvim &" }
Entry = "Emacs" { Actions = "Exec emacs &" }
Entry = "Emacs Terminal" { Actions = "Exec $TERM -title emacs -e emacs -nw &" }
Entry = "Kate" { Actions = "Exec kate &" }
}
Submenu = "Graphics" {
Entry = "display" { Actions = "Exec display &" }
Entry = "Gimp" { Actions = "Exec gimp &" }
Entry = "Gv" { Actions = "Exec gv &" }
Entry = "Xpdf" { Actions = "Exec xpdf &" }
Entry = "gqview" { Actions = "Exec gqview &" }
}
Submenu = "Multimedia" {
Entry = "Amarok" { Actions = "Exec amarok &" }
Entry = "Quod Libet" { Actions = "Exec quodlibet &" }
Entry = "Xmms" { Actions = "Exec xmms &" }
Entry = "MPlayer" { Actions = "Exec gnome-mplayer &" }
Entry = "Xine" { Actions = "Exec xine &" }
Entry = "xawtv" { Actions = "Exec xawtv &" }
Entry = "Totem" { actions = "exec totem &" }
Entry = "alsamixer" { Actions = "Exec $TERM -title alsamixer -e alsamixer &" }
}
Submenu = "Utils" {
Entry = "Calculator" { Actions = "Exec gcalctool &" }
Entry = "Xpdf" { Actions = "Exec xpdf &" }
Entry = "Evince" { Actions = "Exec evince &" }
Entry = "gucharmap" { Actions = "Exec gucharmap &" }
Entry = "Gkrellm" { Actions = "Exec gkrellm &" }
}
Submenu = "WWW" {
Entry = "Dillo" { Actions = "Exec dillo &" }
Entry = "Konqueror" { Actions = "Exec konqueror &" }
Entry = "Firefox" { Actions = "Exec firefox &" }
}
Submenu = "FTP" {
Entry = "gftp" { Actions = "Exec gftp &" }
Entry = "lftp" { Actions = "Exec $TERM -title lftp -e lftp &" }
}
Submenu = "Communication" {
Entry = "Mutt" { Actions = "Exec $TERM -title mutt -e mutt &" }
Entry = "Alpine" { Actions = "Exec $TERM -title alpine -e alpine &" }
Entry = "Thunderbird" { Actions = "Exec thunderbird &" }
Entry = "Evolution" { Actions = "Exec evolution &" }
Entry = "KMail" { Actions = "Exec kmail &" }
Entry = "Pidgin" { Actions = "Exec pidgin &" }
Entry = "Irssi" { Actions = "Exec $TERM -title irssi -e irssi &" }
Entry = "Kopete" { Actions = "Exec kopete &" }
}
Submenu = "Office" {
Entry = "KOffice Workspace" { Actions = "Exec koshell &" }
Entry = "OpenOffice" { Actions = "Exec ooffice &" }
}
Submenu = "Development" {
Entry = "Anjuta" { Actions = "Exec anjuta &" }
Entry = "Eclipse" { Actions = "Exec eclipse &" }
Entry = "KDevelop" { Actions = "Exec kdevelop &" }
}
Separator {}
Submenu = "Go to" {
SubMenu = "Workspace" {
# Create goto menu once per pekwm config reload. The fast way that
# will work for most if not all users.
COMMAND = "$_PEKWM_SCRIPT_PATH/pekwm_ws_menu.sh goto"
# Create goto menu every time the menu is opened. The slow way.
# This is what you want if you are using external tools to make
# the amount of workspaces something else than what you define in
# ~/.pekwm/config. You will know if you want this.
# Entry = "" { Actions = "Dynamic $_PEKWM_SCRIPT_PATH/pekwm_ws_menu.sh goto dynamic" }
}
Entry = "Window.." { Actions = "ShowMenu GotoClient True" }
}
Submenu = "Pekwm" {
Submenu = "Themes" {
Entry { Actions = "Dynamic $_PEKWM_SCRIPT_PATH/pekwm_themeset.sh $_PEKWM_THEME_PATH" }
Entry { Actions = "Dynamic $_PEKWM_SCRIPT_PATH/pekwm_themeset.sh ~/.pekwm/themes" }
}
Entry = "Reload" { Actions = "Reload" }
Entry = "Restart" { Actions = "Restart" }
Entry = "Exit" { Actions = "Exit" }
Submenu = "Exit to" {
Entry = "Xterm" { Actions = "RestartOther xterm" }
Entry = "TWM" { Actions = "RestartOther twm" }
}
}
}
WindowMenu = "Window Menu" {
Entry = "(Un)Stick" { Actions = "Toggle Sticky" }
Entry = "(Un)Shade" { Actions = "Toggle Shaded" }
Entry = "Iconify" { Actions = "Set Iconified" }
Entry = "Command.." { Actions = "ShowCmdDialog" }
Submenu = "Maximize" {
Entry = "Toggle Full" { Actions = "Toggle Maximized True True" }
Entry = "Toggle Horizontal" { Actions = "Toggle Maximized True False" }
Entry = "Toggle Vertical" { Actions = "Toggle Maximized False True" }
}
Submenu = "Fill" {
Entry = "Full" { Actions = "MaxFill True True" }
Entry = "Horizontal" { Actions = "MaxFill True False" }
Entry = "Vertical" { Actions = "MaxFill False True" }
}
Submenu = "Stacking" {
Entry = "Raise" { Actions = "Raise" }
Entry = "Lower" { Actions = "Lower" }
Entry = "Toggle Always On Top" { Actions = "Toggle AlwaysOnTop" }
Entry = "Toggle Always Below" { Actions = "Toggle AlwaysBelow" }
}
Submenu = "Decorations" {
Entry = "Toggle Decorations" { Actions = "Toggle DecorBorder; Toggle DecorTitlebar" }
Entry = "Toggle Borders" { Actions = "Toggle DecorBorder" }
Entry = "Toggle Titlebar" { Actions = "Toggle DecorTitlebar" }
}
Submenu = "Skip" {
Entry = "Toggle showing this frame in menus" { Actions = "Toggle Skip Menus" }
Entry = "Toggle including this frame in focus toggle" { Actions = "Toggle Skip FocusToggle" }
Entry = "Toggle if this frame snaps to other windows" { Actions = "Toggle Skip Snap" }
}
SubMenu = "Send To" {
# Create sendto menu once per pekwm config reload. The fast way that
# will work for most if not all users.
COMMAND = "$_PEKWM_SCRIPT_PATH/pekwm_ws_menu.sh send"
# Create sendto menu every time the menu is opened. The slow way.
# This is what you want if you are using external tools to make
# the amount of workspaces something else than what you define in
# ~/.pekwm/config. You will know if you want this.
# Entry = "" { Actions = "Dynamic $_PEKWM_SCRIPT_PATH/pekwm_ws_menu.sh send dynamic" }
}
Separator {}
Entry = "Close" { Actions = "Close" }
Submenu = "Kill" { Entry = "Kill application" { Actions = "Kill" } }
}

View File

@ -0,0 +1,182 @@
FrameTitle {
ButtonRelease = "1" { Actions = "Raise; Focus; ActivateClient" }
ButtonRelease = "Mod1 1" { Actions = "Focus; Raise" }
ButtonRelease = "Mod4 1" { Actions = "Focus; Raise" }
ButtonRelease = "2" { Actions = "ActivateClient" }
ButtonRelease = "Mod4 3" { Actions = "Close" }
ButtonRelease = "3" { Actions = "ShowMenu Window" }
ButtonRelease = "4" { Actions = "ActivateClientRel 1" }
ButtonRelease = "5" { Actions = "ActivateClientRel -1" }
ButtonRelease = "Mod1 4" { Actions = "SendToWorkspace Next; GotoWorkspace Next" }
ButtonRelease = "Mod1 5" { Actions = "SendToWorkspace Prev; GotoWorkspace Prev" }
ButtonRelease = "Mod1 Shift 4" { Actions = "SendToWorkspace PrevV; GotoWorkspace PrevV" }
ButtonRelease = "Mod1 Shift 5" { Actions = "SendToWorkspace NextV; GotoWorkspace NextV" }
ButtonRelease = "Ctrl 4" { Actions = "MoveClientRel 1" }
ButtonRelease = "Ctrl 5" { Actions = "MoveClientRel -1" }
ButtonRelease = "Ctrl Mod1 1" { Actions = "Focus; Raise True" }
DoubleClick = "2" { Actions = "Toggle Shaded" }
DoubleClick = "Mod1 2" { Actions = "Toggle Shaded" }
DoubleClick = "1" { Actions = "MaxFill True True" }
DoubleClick = "Mod1 1" { Actions = "Toggle Maximized True True" }
Motion = "1" { Threshold = "4"; Actions = "Raise; Move" }
Motion = "Mod1 1" { Threshold = "4"; Actions = "Raise; Move" }
Motion = "Mod4 1" { Threshold = "4"; Actions = "Raise; Move" }
Motion = "2" { Threshold = "4"; Actions = "GroupingDrag True" }
Motion = "Mod1 3" { Actions = "Resize" }
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
}
OtherTitle {
ButtonRelease = "1" { Actions = "Raise; Focus" }
ButtonRelease = "2" { Actions = "Focus" }
ButtonRelease = "3" { Actions = "Close" }
ButtonRelease = "Mod4 3" { Actions = "ShowMenu Window" }
ButtonRelease = "Mod1 4" { Actions = "SendToWorkspace Next; GotoWorkspace Next" }
ButtonRelease = "Mod1 5" { Actions = "SendToWorkspace Prev; GotoWorkspace Prev" }
ButtonRelease = "Mod1 Shift 4" { Actions = "SendToWorkspace PrevV; GotoWorkspace PrevV" }
ButtonRelease = "Mod1 Shift 5" { Actions = "SendToWorkspace NextV; GotoWorkspace NextV" }
Motion = "1" { Threshold = "4"; Actions = "Raise; Move" }
Motion = "Mod1 1" { Threshold = "4"; Actions = "Raise; Move" }
Motion = "Mod4 1" { Threshold = "4"; Actions = "Raise; Move" }
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
}
Border {
TopLeft {
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
ButtonPress = "1" { Actions = "Focus; Resize TopLeft" } }
Top {
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
ButtonPress = "1" { Actions = "Focus; Resize Top" } }
TopRight {
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
ButtonPress = "1" { Actions = "Focus; Resize TopRight" } }
Left {
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
ButtonPress = "1" { Actions = "Focus; Resize Left" } }
Right {
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
ButtonPress = "1" { Actions = "Focus; Resize Right" } }
BottomLeft {
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
ButtonPress = "1" { Actions = "Focus; Resize BottomLeft" } }
Bottom {
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
ButtonPress = "1" { Actions = "Focus; Resize Bottom" } }
BottomRight {
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
ButtonPress = "1" { Actions = "Focus; Resize BottomRight" } }
}
ScreenEdge {
Down {
Enter = "Mod1 Any" { Actions = "GoToWorkspace Down" }
ButtonRelease = "3" { Actions = "ShowMenu Root" }
ButtonRelease = "2" { Actions = "ShowMenu Goto" }
ButtonRelease = "1" { Actions = "GoToWorkspace Down" }
ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
ButtonRelease = "4" { Actions = "GoToWorkspace Up" }
ButtonRelease = "5" { Actions = "GoToWorkspace Down" }
ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace PrevV" }
ButtonRelease = "Mod1 5" { Actions = "GoToWorkspace NextV" }
EnterMoving = "Any Any" { Actions = "WarpToWorkspace Down" }
}
Up {
Enter = "Mod1 Any" { Actions = "GoToWorkspace Up" }
ButtonRelease = "3" { Actions = "ShowMenu Root" }
ButtonRelease = "2" { Actions = "ShowMenu Goto" }
ButtonRelease = "1" { Actions = "GoToWorkspace Up" }
ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
ButtonRelease = "4" { Actions = "GoToWorkspace Up" }
ButtonRelease = "5" { Actions = "GoToWorkspace Down" }
ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace PrevV" }
ButtonRelease = "Mod1 5" { Actions = "GoToWorkspace NextV" }
EnterMoving = "Any Any" { Actions = "WarpToWorkspace Up" }
}
Left {
Enter = "Mod1 Any" { Actions = "GoToWorkspace Left" }
ButtonRelease = "3" { Actions = "ShowMenu Root" }
ButtonRelease = "1" { Actions = "GoToWorkspace Left" }
DoubleClick = "1" { Actions = "GoToWorkspace Left" }
ButtonRelease = "2" { Actions = "ShowMenu Goto" }
ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
ButtonRelease = "4" { Actions = "GoToWorkspace Right" }
ButtonRelease = "5" { Actions = "GoToWorkspace Left" }
ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace Next" }
ButtonRelease = "Mod1 5" { Actions = "GoToWorkspace Prev" }
EnterMoving = "Any Any" { Actions = "WarpToWorkspace Left" }
}
Right {
Enter = "Mod1 Any" { Actions = "GoToWorkspace Right" }
ButtonRelease = "3" { Actions = "ShowMenu Root" }
ButtonRelease = "1" { Actions = "GoToWorkspace Right" }
DoubleClick = "1" { Actions = "GoToWorkspace Right" }
ButtonRelease = "2" { Actions = "ShowMenu Goto" }
ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
ButtonRelease = "4" { Actions = "GoToWorkspace Right" }
ButtonRelease = "5" { Actions = "GoToWorkspace Left" }
ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace Next" }
ButtonRelease = "Mod1 5" { Actions = "GoToWorkspace Prev" }
EnterMoving = "Any Any" { Actions = "WarpToWorkspace Right" }
}
}
Client {
# Remove the following line and uncomment the alternative if windows should raise when clicked.
ButtonPress = "1" { Actions = "Focus" }
# Uncomment the following line if windows should raise when clicked.
# ButtonPress = "1" { Actions = "Focus; Raise" }
ButtonRelease = "Mod1 1" { Actions = "Focus; Raise" }
ButtonRelease = "Mod4 1" { Actions = "Lower" }
ButtonRelease = "Mod1 4" { Actions = "SendToWorkspace Next; GotoWorkspace Next" }
ButtonRelease = "Mod1 5" { Actions = "SendToWorkspace Prev; GotoWorkspace Prev" }
ButtonRelease = "Mod1 Shift 4" { Actions = "SendToWorkspace PrevV; GotoWorkspace PrevV" }
ButtonRelease = "Mod1 Shift 5" { Actions = "SendToWorkspace NextV; GotoWorkspace NextV" }
ButtonRelease = "Ctrl Mod1 1" { Actions = "Focus; Raise True" }
Motion = "Mod1 1" { Threshold = "4"; Actions = "Focus; Raise; Move" }
Motion = "Mod4 1" { Threshold = "4"; Actions = "Focus; Raise; Move" }
Motion = "Mod1 2" { Threshold = "4"; Actions = "GroupingDrag True" }
Motion = "Mod1 3" { Actions = "Resize" }
# Remove the following line if you want to use click to focus.
Enter = "Any Any" { Actions = "Focus" }
}
Root {
ButtonRelease = "3" { Actions = "ShowMenu Root" }
ButtonRelease = "2" { Actions = "ShowMenu Goto" }
ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
# Horizontal movement
ButtonRelease = "4" { Actions = "GoToWorkspace Right" }
ButtonRelease = "5" { Actions = "GoToWorkspace Left" }
ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace Next" }
ButtonRelease = "Mod1 5" { Actions = "GoToWorkspace Prev" }
# Vertical movement
ButtonRelease = "Shift 4" { Actions = "GoToWorkspace Up" }
ButtonRelease = "Shift 5" { Actions = "GoToWorkspace Down" }
ButtonRelease = "Mod1 Shift 4" { Actions = "GoToWorkspace NextV" }
ButtonRelease = "Mod1 Shift 5" { Actions = "GoToWorkspace PrevV" }
ButtonRelease = "1" { Actions = "HideAllMenus" }
}
Menu {
Enter = "Any Any" { Actions = "Focus" }
Motion = "Mod1 1" { Threshold = "4"; Actions = "Focus; Raise; Move" }
}
Other {
Enter = "Any Any" { Actions = "Focus" }
ButtonRelease = "3" { Actions = "Close" }
Motion = "1" { Actions = "Focus; Raise; Move" }
Motion = "Mod1 1" { Threshold = "4"; Actions = "Focus; Raise; Move" }
}

View File

@ -0,0 +1,18 @@
#!/bin/sh
# PekWM start file
# This file is a simple shell script; It gets run on pekwm startup, after
# the theme and all config has loaded if it is set executable
# (chmod +x start).
#
# This is different from ~/.xinitrc because a normal configuration of
# .xinitrc you'll run all commands, then launch the window manager last.
#
# It also gets re-run every time pekwm is restarted.
#
# As for it's usefulness, well, it's up to you. I actually set my background
# from my start file; since it runs after the theme gets loaded, this
# effectively overrides whatever's in the theme.
#
# There's probably a few other good uses for it, too. I mainly pushed for it
# because when I was doing fluxbox's docs, people used to complain that there
# wasn't one, and I wanted to avoid that for pekwm. ;) --eyez

View File

@ -0,0 +1 @@
$TERM="xterm -fn fixed +sb -bg white -fg black"

View File

@ -0,0 +1,57 @@
#
# $XDG_HOME_CONFIG/psd/psd.conf
#
# For documentation, refer to the psd man page or the wiki page
# https://wiki.archlinux.org/index.php/Profile-sync-daemon
## NOTE the following:
## To protect data from corruption, in the event that you do make an edit while
## psd is active, any changes made will be applied the next time you start psd.
# Uncomment and set to "yes" to use overlayfs instead of a full copy to reduce
# the memory costs and to improve sync/unsync operations. Note that your kernel
# MUST have this module available in order to use this mode
#
USE_OVERLAYFS="yes"
# List browsers separated by spaces to include in the sync. Useful if you do not
# wish to have all possible browser profiles sync'ed which is the default if
# this variable is left commented.
#
# Possible values:
# chromium
# chromium-dev
# conkeror.mozdev.org
# epiphany
# firefox
# firefox-trunk
# google-chrome
# google-chrome-beta
# google-chrome-unstable
# heftig-aurora
# icecat
# inox
# luakit
# midori
# opera
# opera-beta
# opera-developer
# opera-legacy
# otter-browser
# qupzilla
# palemoon
# rekonq
# seamonkey
# surf
# vivaldi
# vivaldi-snapshot
#
BROWSERS="chromium conkeror.mozdev.org"
# Uncomment and set to "no" to completely disable the crash recovery feature.
#
# The default is to create crash recovery backups if the system is ungracefully
# powered-down due to a kernel panic, hitting the reset switch, battery going
# dead, etc. Some users keep very diligent backups and don't care to have this
# feature enabled.
#USE_BACKUPS="yes"

View File

@ -0,0 +1,28 @@
#File: ~/.ratpoisonrc
#Author: Collin J. Doering <rekahsoft@gmail.com>
#Date: Mar 25, 2011
#Description: ratpoison userland configuration file
#Note: it is imporant to have comments have a character immediately after the '#'
#turnoff startup messages
startup_message off
#escape C-z
#virtual desks
gnewbg one
gnewbg two
definekey top M-l exec ratpoison -c "select -" -c "gprev" -c "next"
definekey top M-h exec ratpoison -c "select -" -c "gnext" -c "next"
#switch between windows
definekey top M-j next
definekey top M-k prev
#apps
unbind c
bind c exec urxvt
bind e exec emacs
bind f exec firefox2

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=transmission-remote
Exec=transmission-remote -a %u
Icon=transmission
Terminal=false
Type=Application
Categories=Network;FileTransfer;P2P;
StartupNotify=false
MimeType=application/x-bittorrent;x-scheme-handler/magnet;

View File

@ -0,0 +1 @@
2cf226f6-0ec7-434c-b00a-b29d3d6dfa6b

View File

@ -0,0 +1,131 @@
[skin]
description=GoTaR @PLD Linux
[Lines]
horiz=
vert=
lefttop=
righttop=
leftbottom=
rightbottom=
topmiddle=
bottommiddle=
leftmiddle=
rightmiddle=
cross=
dhoriz=
dvert=
dlefttop=
drighttop=
dleftbottom=
drightbottom=
dtopmiddle=
dbottommiddle=
dleftmiddle=
drightmiddle=
[core]
_default_=green;default
selected=brightcyan;gray
marked=brightred;
markselect=yellow;
gauge=;yellow
input=brightgreen;
disabled=gray;default
reverse=brightgreen;default
header=brightred;
inputhistory=
commandhistory=
[dialog]
_default_=brightcyan;default
dfocus=brightred;default
dhotnormal=brightred;
dhotfocus=yellow;gray
dtitle=brightred;
[error]
_default_=white;red
errdfocus=brightgreen;default
errdhotnormal=yellow;
errdhotfocus=yellow;default
errdtitle=yellow;
[filehighlight]
directory=brightcyan;
executable=brightgreen;
symlink=red;
hardlink=
stalelink=yellow;default
device=green;
special=brightblue;
core=red;
temp=gray;
archive=cyan;
doc=brown;
source=green;
media=white;
graph=magenta;
database=;
[menu]
_default_=green;default
menuhot=brightred;
menusel=brightcyan;gray
menuhotsel=yellow;
menuinactive=lightgray;
[buttonbar]
hotkey=lightgray;default
button=green;default;bold+underline
[statusbar]
_default_=white;default
[help]
_default_=brightred;default
helpitalic=brightcyan;
helpbold=brightgreen;
helplink=white;
helpslink=yellow;default
helptitle=brightgreen;
[editor]
_default_=lightgray;default
editbold=yellow;default
editmarked=brightgreen;red
editwhitespace=brightblue;default
editlinestate=brightgreen
bookmark=white;red
bookmarkfound=black;green
editrightmargin=brightblue;default
# editbg=
# editframe=
editframeactive=white;
editframedrag=green;
window-state-char = *
window-close-char = X
[viewer]
viewbold=brightred;default
viewunderline=brightgreen;default
viewselected=yellow;default
[diffviewer]
_default_=lightgray;default
added=brightgreen;
changedline=cyan;
changednew=yellow;
changed=;brown
removed=;default
folder=brightblue;
error=white;red
[popupmenu]
_default_=brightgreen;default
menusel=brightcyan;default
menutitle=brightcyan;default
[widget-panel]
filename-scroll-left-char = {
filename-scroll-right-char = }

View File

@ -0,0 +1 @@
# Unison preferences file

View File

@ -0,0 +1,15 @@
root = /home/collin/.org
root = ssh://collin@rekahsoft.ca/.org
#ignore = Regex .*
ignore = BelowPath .git
ignore = BelowPath bugtracker/.git
ignore = Regex #.*#
backupcurrent = Name *.org
backuplocation = local
maxbackups = 0
#sshargs = -i /home/collin/.ssh/sync_id_rsa
merge = Name *.org -> emacsclient -c --eval '(ediff-merge-files-with-ancestor "CURRENT1" "CURRENT2" "CURRENTARCH" nil "NEW")'

View File

@ -0,0 +1,17 @@
" File: ~/.vimrc
" Date: May 26, 2011
" Author: Collin J. Doering <rekahsoft@gmail.com>
" strip off file menu and toolbar
set guioptions-=m
set guioptions-=T
" set color scheme to a dark one
colorscheme slate
" enable syntax highlighting
syntax enable
" number the lines
set number

View File

@ -0,0 +1,67 @@
#!/bin/sh
# (C) Copyright Collin Doering @!@YEAR@!@
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# File: .vnc/xstartup
# Author: Collin J. Doering <rekahsoft@gmail.com>
# Date: Jul 12, 2012
# Description: Acts as a window-manager selector for vnc/freenx sessions
# TODO: - use retval in the case that Xdialog fails to display some message/log
# - remove use of retval for window close and cancel button as they're disabled
# - support a nicer way to add wm's to the radiolist
# - a custom pekwm config so that there are no clicky menus and such
# Set desktop default size
xrandr --output default --mode 640x480
# Start pekwm and keep its pid
pekwm &
PEKWM_PID=$!
# Offer a Xdialog session selector
Xdialog --title "Session Selection" \
--no-cancel \
--no-close \
--radiolist "Choose a session to run:" 25 112 5 \
"XMonad" "a dynamically tiling X11 window manager" off \
"OpenBox" "a highly configurable, next generation WM with extensive standards support" off \
"PekWM" "a window manager that once up on a time was based on the aewm++ window manager" off \
"Awesome" "a highly configurable, next generation framework window manager for X" off \
"StumpWM" "a tiling, keyboard driven X11 Window Manager written entirely in Common Lisp" ON 2>/tmp/wmlist.tmp.$$
# Retain the return value of Xdialog and its choices saved in /tmp/wmlist.tmp.pid where pid is the pid of this shell
retval=$?
choice=`cat /tmp/wmlist.tmp.$$ | tr '[A-Z]' '[a-z]'`
# Remove the temporary file containing Xdialogs choices
rm -f /tmp/wmlist.tmp.$$
# Stop pekwm
kill $PEKWM_PID
# Run a session depending on the return value and choice from Xdialog
case $retval in
0)
exec $HOME/.xinitrc $choice remote
;;
# 1)
# echo "Cancel pressed."
# ;;
# 255)
# echo "Box closed."
# ;;
esac

View File

@ -0,0 +1,21 @@
# Open several named screens at startup and run different commands in each
screen -t zsh 0 zsh
#screen -t weechat 1 weechat-curses
#screen -t ncmpcpp 2 ncmpcpp
#screen -t alsamixer 3 alsamixer
#screen -t mc 4 mc
#screen -t cmus 5 cmus
#screen -t nvlc 5 nvlc
# Set default prefix from C-a to C-t
escape ^Tt
# Switch to window 1 (irssi) *TODO*
#screen -p select irssi
# Use 256 colors
terminfo rxvt-unicode 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# Set hard status line
hardstatus alwayslastline '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}[%{W}%n%f %t%?(%u)%?%{=b kR}]%{= kw}%?%+Lw%?%?%=%{g}][%{Y}%l%{g}]%{=b C}[ %D %m/%d %C%a ]%{W}'

View File

@ -0,0 +1,62 @@
;; (C) Copyright Collin Doering @!@YEAR@!@
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; File: .stumpwmrc
;; Author: Collin J. Doering <rekahsoft@gmail.com>
;; Date: Aug 11, 2011
;; TODO: write some nice custom config for stumpwm
;(set-contrib-dir "/usr/share/stumpwm")
;; Add the date to the modeline
;; (setf stumpwm:*screen-mode-line-format*
;; (list "%w | "
;; '(:eval (remove #\Newline (stumpwm:run-shell-command "date '+%a %b %_d %l:%M %p'" t)))))
;; Enable the modeline
(stumpwm:toggle-mode-line (stumpwm:current-screen) (stumpwm:current-head))
;; Disable some of the defaults
(stumpwm:undefine-key stumpwm:*root-map* (stumpwm:kbd "c"))
(stumpwm:undefine-key stumpwm:*root-map* (stumpwm:kbd "C-e"))
;; Create some keybindings to make life easier
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd ">") "gnext")
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "<") "gprev")
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "d") "gkill")
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "N") "gnew")
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "c") "exec kitty")
;;(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "C-e") "exec emacsclient -c")
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "P") "exec rofi -combi-modi window,drun -modi combi,drun,window,run,ssh,keys -show combi")
;; Center message and input windows
(setq stumpwm:*message-window-gravity* :center)
(setq stumpwm:*input-window-gravity* :center)
;; ;; Load swank for emacs to connect to stumpwm's lisp process
;; (load "/usr/share/emacs/site-lisp/slime/swank-loader.lisp")
;; (swank-loader:init)
;; (defcommand swank () ()
;; (setf stumpwm:*top-level-error-action* :break)
;; (swank:create-server :port 5005
;; :style swank:*communication-style*
;; :dont-close t)
;; (echo-string (current-screen)
;; "Starting swank. M-x slime-connect RET RET, then (in-package stumpwm)."))
;; ;; Start swank
;; (swank)

View File

@ -0,0 +1,3 @@
SURFRAW_graphical_browser=/usr/bin/firefox-developer-edition
#SURFRAW_text_browser=/usr/bin/elinks
SURFRAW_graphical=yes

View File

@ -0,0 +1,68 @@
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "Downloads",
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/home/collin/Downloads",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": true,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": false,
"rpc-host-whitelist": "",
"rpc-host-whitelist-enabled": true,
"rpc-password": "{a29bb9f4fb2729cd46809610c53b59ccd94091f4Aq5YHZYK",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": true,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-slots-per-torrent": 14,
"utp-enabled": true
}

View File

@ -0,0 +1,115 @@
# File: .xbindkeysrc
# Date: Sept 23, 2010
# Author: Collin J. Doering <rekahsoft@gmail.com>
# Description: File that contains key bindings independant of any DE (using xbindkeys). This file is in the following format:
## <generic functinality> (<geographical location on keyboard >)
# <key combination> = <functionality>
#"<command"
# m:<modifier state> + c:<keycode>
#< keycode name>
## END of <generic functinality>
# Power Button Key
"xmonadClose.sh"
m:0x0 + c:124
XF86PowerOff
## Multimedia keys
# play/pause key = toggle play pause
"mpc -h patchMeIn@localhost toggle"
m:0x10 + c:172
XF86AudioPlay
"mpc -h patchMeIn@localhost toggle"
m:0x58 + c:33
Alt+Mod2+Mod4 + p
# next key = next song
"mpc -h patchMeIn@localhost next"
m:0x10 + c:171
XF86AudioNext
"mpc -h patchMeIn@localhost next"
m:0x58 + c:60
Alt+Mod2+Mod4 + period
# prev key = previous song
"mpc -h patchMeIn@localhost prev"
m:0x10 + c:173
XF86AudioPrev
"mpc -h patchMeIn@localhost prev"
m:0x58 + c:59
Alt+Mod2+Mod4 + comma
# volume up key = Master volume up
"ponymix increase 3"
m:0x10 + c:123
XF86AudioRaiseVolume
"ponymix increase 3"
m:0x58 + c:30
Alt+Mod2+Mod4 + u
# volume down key = Master volume down 1
"ponymix decrease 3"
m:0x10 + c:122
XF86AudioLowerVolume
"ponymix decrease 3"
m:0x58 + c:40
Alt+Mod2+Mod4 + d
# mute volume key = mute alsa Master channel
"ponymix toggle"
m:0x10 + c:121
XF86AudioMute
"ponymix toggle"
m:0x58 + c:58
Alt+Mod2+Mod4 + m
## End of Multimedia keys
# Super + Calculator = (speed crunch)
#"speedcrunch"
# m:0x10 + c:148
# XF86Calculator
# Super + Calculator = mathematica
#"mathematica"
# m:0x50 + c:148
# XF86Calculator
# Sleep key = lock screen with xscreensaver
"xscreensaver-command -lock"
m:0x10 + c:150
XF86Sleep
# WWW key
"conkeror"
m:0x10 + c:158
XF86WWW
# Search PC key
#""
#m:0x10 + c:225
#XF86Search
## Monitor Brighness Keys
"xbacklight -inc 10"
m:0x0 + c:233
XF86MonBrightnessUp
"xbacklight -dec 10"
m:0x0 + c:232
XF86MonBrightnessDown
"screen-bright -set 100"
m:0x1 + c:50
Shift + Shift_L
"screen-bright -set 25"
m:0x1 + c:50
Shift + Shift_L
## End Monitory Brighness Keys
#"x86_energy_perf_policy performance"
#"x86_energy_perf_policy normal"
#"x86_energy_perf_policy powersave"

View File

@ -0,0 +1,76 @@
#!/bin/bash
# (C) Copyright Collin Doering 2011
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# File: xmonadClose.sh
# Author: Collin J. Doering <rekahsoft@gmail.com>
# Date: May 13, 2011
# Description: A simple script to allow a nice dmenu gui when logging out,
# shutting down, or rebooting
# TODO: * Support sleep and hibernate
# * Needs to check whether a reboot/shutdown is allowed (user must be in the group
# 'power' and must be the only user logged in or they will be prompted for sudo's
# password to override)
# * Add support for the user to specify a timer *needs some work yet*
# - Needs to provide a way to cancel the time
# - Would be nice if there was some notification when there's n min left in the timer
# * re-write in haskell direct into ~/.xmonad/xmonad.hs using the dmenu extension(?)
# - issue with that is then the script could only be used within xmonad
# - perhaps consider taking a second argument when logout is passed as the first
# so that the second argument could be used as a 'logout command' and thus
# this script could be used with any wm
actionNames=(logout suspend hibernate hybrid-sleep shutdown restart)
actionExecs=("xdotool key super+control+shift+End"
"~/.bin/keyboard.sh on && (xautolock -locknow &) && sleep 3s && systemctl suspend"
"~/.bin/keyboard.sh on && (xautolock -locknow &) && sleep 3s && systemctl hibernate"
"~/.bin/keyboard.sh on && (xautolock -locknow &) && sleep 3s && systemctl hybrid-sleep"
"shutdown -h now"
"reboot")
#dmenu_cmd="rofi -dmenu"
dmenu_cmd="dmenu -b -i -nb #040404 -nf #525252 -sf #ffa0ff -sb #000000 -fn FreeMono-12"
# Ask the user whether they want to logout, cancel, suspend, hibernate, hybrid-sleep, shutdown
ask=`echo "cancel ${actionNames[*]} timed-action" | tr ' ' '\n' | $dmenu_cmd`
case "$ask" in
logout|suspend|hibernate|hybrid-sleep|shutdown|restart|timed-action)
if [[ "$ask" == "timed-action" ]]; then
time=`echo "1m 3m 5m 10m 15m 20m 30m 45m 1h 1.5h 2h 3h" | tr ' ' '\n' | $dmenu_cmd -p "How long?"`
# TODO: validate input to ensure form: <digit>+(s|m|h|d)?
for ((i=0; i < ${#actionNames[*]}; i++)); do
actionExecs[$i]="sleep $time && notify-send 'WARNING! Computer set to ${actionNames[$i]} in 15 seconds!' -u critical && sleep 15s && ${actionExecs[$i]}"
done
ask=`echo "cancel ${actionNames[*]}" | tr ' ' '\n' | $dmenu_cmd`
fi
if [[ "$ask" != "cancel" && `echo "" | $dmenu_cmd -p "Are you sure you want to $ask? [yes/no] "` == 'yes' ]]; then
for ((i=0; i < ${#actionNames[*]}; i++)); do
if [[ "$ask" == "${actionNames[$i]}" ]]; then
sh -c "${actionExecs[$i]}"
break
fi
done
fi
;;
cancel|*)
# Do nothing; the user entered cancel or a invalid input
;;
esac
# Exit successfully
exit 0

View File

@ -0,0 +1,43 @@
-- (C) Copyright Collin Doering @!@YEAR@!@
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- File: .xmobarrc
-- Author: Collin J. Doering <rekahsoft@gmail.com>
-- Date: Jan 11, 2012
Config { font = "xft:FreeMono:size=10"
, bgColor = "#000000"
, fgColor = "#00FFFF"
, position = TopW L 100
, lowerOnStart = True
, commands = [ Run DynNetwork ["-L", "0", "-H", "32", "-l", "green", "--normal", "orange", "--high", "red"] 40
, Run Brightness ["-t", "Blght: <percent>%", "--", "-D", "intel_backlight"] 10
, Run Com "/home/collin/.bin/vol.sh" [] "vol" 10
, Run MultiCpu ["-t", "Cpu: <total>% : <total0> - <total1> - <total2> - <total3>", "-L", "3", "-H", "50", "--high", "#f0c040"] 10
, Run Memory ["-t", "Mem: <usedratio>%", "-l", "green", "--normal", "orange", "--high", "red"] 40
, Run Swap ["-t", "Swap: <usedratio>%", "-l", "green", "--normal", "orange", "--high", "red"] 60
, Run Date "%a %b %_d %l:%M %p" "date" 100
, Run Uptime ["-t", "Up: <days>d<hours>h<minutes>m", "-l", "green", "--normal", "orange", "--high", "red"] 100
, Run Battery ["-t", "<acstatus>: <left>% / <timeleft>",
"-L", "10", "-H", "80", "-p", "3",
"--", "-O", "<fc=green>AC</fc>", "-i", "<fc=green>Idle</fc>", "-o", "Batt",
"-L", "10", "-H", "12",
"-l", "red", "-m", "blue", "-h", "green"] 25
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = " %StdinReader% }{ %multicpu% <fc=#0033FF>|</fc> %memory% <fc=#0033FF>|</fc> %swap% <fc=#0033FF>|</fc> %dynnetwork% <fc=#0033FF>|</fc> %vol% <fc=#0033FF>|</fc> %bright% <fc=#0033FF>|</fc> %uptime% <fc=#0033FF>|</fc> %battery% <fc=#0033FF>|</fc> %date% <fc=#0033FF>|</fc> "
}

View File

@ -0,0 +1,615 @@
{-# LANGUAGE FlexibleContexts #-}
-- File: ~/.xmonad/xmonad.hs
-- Date: Sept 14, 2010
-- Description: User configuration file for xmonad
--
-- Based off of xmonad example config file for xmonad-0.9
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
-- NOTE: Those updating from earlier xmonad versions, who use
-- EwmhDesktops, safeSpawn, WindowGo, or the simple-status-bar
-- setup functions (dzen, xmobar) probably need to change
-- xmonad.hs, please see the notes below, or the following
-- link for more details:
--
-- http://www.haskell.org/haskellwiki/Xmonad/Notable_changes_since_0.8
--
import System.IO
import System.Exit
import qualified Data.Map as M
import XMonad
import XMonad.Actions.UpdatePointer
import XMonad.Actions.GridSelect
import XMonad.Actions.FloatKeys
import XMonad.Actions.Submap
import XMonad.Actions.SpawnOn
import XMonad.Actions.WindowBringer
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.NamedScratchpad
import XMonad.Layout.NoBorders(noBorders)
import XMonad.Layout.ResizableTile
import XMonad.Layout.Grid
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.Tabbed
import XMonad.Layout.Accordion
import XMonad.Layout.Spacing
import XMonad.Layout.SubLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.Simplest
import XMonad.Layout.BoringWindows
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.EwmhDesktops
import qualified XMonad.StackSet as W
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
--
myTerminal :: String
myTerminal = "kitty -1"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = False
-- Width of the window border in pixels.
--
myBorderWidth :: Dimension
myBorderWidth = 3
-- modMask lets you specify which modkey you want to use. The default
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
-- ("right alt"), which does not conflict with emacs keybindings. The
-- "windows key" is usually mod4Mask.
--
myModMask :: KeyMask
myModMask = mod4Mask
-- NOTE: from 0.9.1 on numlock mask is set automatically. The numlockMask
-- setting should be removed from configs.
--
-- You can safely remove this even on earlier xmonad versions unless you
-- need to set it to something other than the default mod2Mask, (e.g. OSX).
--
-- The mask for the numlock key. Numlock status is "masked" from the
-- current modifier status, so the keybindings will work with numlock on or
-- off. You may need to change this on some systems.
--
-- You can find the numlock modifier by running "xmodmap" and looking for a
-- modifier with Num_Lock bound to it:
--
-- > $ xmodmap | grep Num
-- > mod2 Num_Lock (0x4d)
--
-- Set numlockMask = 0 if you don't have a numlock key, or want to treat
-- numlock status separately.
--
-- myNumlockMask = mod2Mask -- deprecated in xmonad-0.9.1
------------------------------------------------------------
-- The default number of workspaces (virtual screens) and their names.
-- By default we use numeric strings, but any string may be used as a
-- workspace name. The number of workspaces is determined by the length
-- of this list.
--
-- A tagging example:
--
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
myWorkspaces :: [String]
myWorkspaces = ["1:web", "2:hack", "3:code", "4:prog", "5:emacs", "6:mail", "7:media", "8:www", "9:com", "0:net", "esc:emc", "-:11", "=:12", "\\:13", "`:14"]
-- Border colors for unfocused and focused windows, respectively.
--
myNormalBorderColor, myFocusedBorderColor :: String
myNormalBorderColor = "#3B615D" -- "#dddddd"
myFocusedBorderColor = "#2FED55" -- "#ff0000"
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here.
--
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
-- launch rofi
, ((modm, xK_p), spawn "rofi -combi-modi window,drun -modi combi,drun,window,run,ssh,keys -show combi")
-- OR
-- launch dmenu
--, ((modm, xK_p), spawn "dmenu_run -i -nb '#040404' -nf '#00FFFF' -sf '#ffa0ff' -sb '#000000' -fn 'FreeMono-12'")
-- launch passmenu (uses dmenu to access pass password store)
--, ((modm .|. shiftMask, xK_p), spawn "passmenu -i -nb '#040404' -nf '#00FFFF' -sf '#ffa0ff' -sb '#000000' -fn 'FreeMono-12'")
-- OR
-- launch rofi-pass (uses rofi to access pass password store)
, ((modm .|. shiftMask, xK_p), spawn "rofi-pass")
-- close focused window
, ((modm .|. shiftMask, xK_c), kill)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n), refresh)
-- Move focus to the next window
--, ((modm, xK_Tab), windows W.focusDown)
-- Move focus to the next window
--, ((modm, xK_j), windows W.focusDown)
-- Move focus to the previous window
--, ((modm, xK_k), windows W.focusUp)
-- Move focus to the master window
--, ((modm, xK_m), windows W.focusMaster)
-- Swap the focused window and the master window
, ((modm, xK_Return), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j), windows W.swapDown)
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k), windows W.swapUp)
-- Shrink the master area
, ((modm, xK_h), sendMessage Shrink)
-- Expand the master area
, ((modm, xK_l), sendMessage Expand)
-- Push window back into tiling
, ((modm, xK_t), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm, xK_comma), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm, xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
, ((modm, xK_b), sendMessage ToggleStruts)
-- Quit xmonad (no questions)
, ((modm .|. shiftMask .|. controlMask, xK_End), io (exitWith ExitSuccess))
-- Quit xmonad (user friendly)
, ((modm .|. shiftMask, xK_q), spawn "~/.bin/xmonadClose.sh")
-- Unmount automounted disks by udiskie
, ((modm .|. shiftMask .|. controlMask, xK_u), spawn "udiskie-umount -as && notify-send 'External media safely disconnected!'")
-- Restart xmonad
, ((modm, xK_q), spawn "pkill -9 xmobar; xmonad --recompile; xmonad --restart") ]
++
--
-- mod-[1..9], Switch to workspace N
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) ([xK_1 .. xK_9] ++ [xK_0, xK_Escape, xK_minus, xK_equal, xK_backslash, xK_grave])
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
-- Add custom key bindings
++ myGenericKeys
++
-- Modification due to xinerama screens being in the wrong order
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [1,0,2] -- was [1,0,2] *** change to match your screen order ***
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
-- Custom generic key bindings
-- Note: Use mod4Mask and controlMask to launch non-standard apps
myGenericKeys =
-- Lock the screen using i3lock-fancy via xautolock
[ ((modm .|. shiftMask, xK_v), spawn "xautolock -locknow")
-- Toggle full-screen mode
, ((modm .|. controlMask, xK_space), sendMessage (Toggle "Full"))
-- Use window bringer
, ((modm .|. shiftMask, xK_g), gotoMenu)
, ((modm .|. shiftMask, xK_b), bringMenu)
-- Enable switching of windows with gridselect
, ((modm, xK_g), goToSelected myGSConfig)
-- Launch kitty terminal
, ((modm .|. controlMask, xK_Return), spawn $ myTerminal ++ " --name default")
-- Launch tab-less urxvtc
, ((modm .|. controlMask .|. shiftMask, xK_Return), spawn "urxvtc -pe -tabbedex")
-- Launch a backup terminal
, ((modm, xK_BackSpace), spawn "xterm")
-- Launch firefox-developer
, ((modm .|. controlMask, xK_f), spawn "firefox-developer-edition")
-- Launch firefox-developer private window
, ((modm .|. controlMask .|. shiftMask, xK_f), spawn "firefox-developer-edition --private-window")
-- Launch emacs
, ((modm .|. controlMask, xK_e), spawn "emacsclient -c")
-- Launch tuxcmd
--, ((modm .|. controlMask, xK_t), spawn "tuxcmd")
-- Launch zathura
, ((modm .|. controlMask, xK_z), spawn "zathura")
-- Launch openoffice (now libreoffice)
, ((modm .|. controlMask, xK_o), spawn "libreoffice")
-- Launch vlc
, ((modm .|. controlMask, xK_v), spawn "vlc")
-- Launch a emacs scratchpad (key binding for HHKB)
, ((modm .|. controlMask, xK_Escape), namedScratchpadAction scratchpads "emacs-scratch")
-- Launch a emacs scratchpad (key binding for normal layout)
, ((modm .|. controlMask, xK_grave), namedScratchpadAction scratchpads "emacs-scratch")
-- Launch a screen scratchpad terminal
, ((modm .|. controlMask, xK_1), namedScratchpadAction scratchpads "screen-terminal")
-- Launch a maintainance scratchpad
, ((modm .|. controlMask, xK_2), namedScratchpadAction scratchpads "maintenance-terminal")
-- Launch another (smaller) emacs scratchpad
, ((modm .|. controlMask, xK_3), namedScratchpadAction scratchpads "emacs-mini-scratch")
-- Launch ncmpcpp scratchpad
, ((modm .|. controlMask, xK_4), namedScratchpadAction scratchpads "ncmpcpp-scratch")
-- Launch pavucontrol scratchpad
, ((modm .|. controlMask, xK_5), namedScratchpadAction scratchpads "pavucontrol-scratch")
-- Enable movement and resizing of floating windows
, ((modm, xK_d), withFocused (keysMoveWindow (10,0))) -- move floating window right
, ((modm, xK_a), withFocused (keysMoveWindow (-10,0))) -- move floating window left
, ((modm, xK_s), withFocused (keysMoveWindow (0,-10))) -- move floating window up
, ((modm, xK_x), withFocused (keysMoveWindow (0,10))) -- move floating window down
-- , ((modm .|. shiftMask, xK_a), withFocused (keysResizeWindow (-10,0) (0,0))) -- resize floating window (left)
-- , ((modm .|. shiftMask, xK_d), withFocused (keysResizeWindow (10,0) (0,0))) -- resize floating window (right)
-- , ((modm .|. shiftMask, xK_s), withFocused (keysResizeWindow (0,-10) (0,0))) -- resize floating window (up)
-- , ((modm .|. shiftMask, xK_x), withFocused (keysResizeWindow (0,-10) (0,1))) -- resize floating window (down)
-- Enable subLayouts
, ((modm .|. controlMask, xK_h), sendMessage $ pullGroup L)
, ((modm .|. controlMask, xK_l), sendMessage $ pullGroup R)
, ((modm .|. controlMask, xK_k), sendMessage $ pullGroup U)
, ((modm .|. controlMask, xK_j), sendMessage $ pullGroup D)
, ((modm .|. controlMask, xK_m), withFocused (sendMessage . MergeAll))
, ((modm .|. controlMask, xK_u), withFocused (sendMessage . UnMerge))
, ((modm .|. controlMask, xK_period), onGroup W.focusDown')
, ((modm .|. controlMask, xK_comma ), onGroup W.focusUp')
, ((modm, xK_Tab ), onGroup W.focusDown')
, ((modm, xK_j), focusDown)
, ((modm, xK_k), focusUp)
, ((modm, xK_m), focusMaster)
, ((modm, xK_z), asks config >>= submap . defaultSublMap)
-- Enable 2D directional movement from window to window
, ((modm, xK_Right), sendMessage $ Go R)
, ((modm, xK_Left ), sendMessage $ Go L)
, ((modm, xK_Up ), sendMessage $ Go U)
, ((modm, xK_Down ), sendMessage $ Go D)
, ((modm .|. controlMask, xK_Right), sendMessage $ Swap R)
, ((modm .|. controlMask, xK_Left ), sendMessage $ Swap L)
, ((modm .|. controlMask, xK_Up ), sendMessage $ Swap U)
, ((modm .|. controlMask, xK_Down ), sendMessage $ Swap D)
-- Expand a mirror pane
, ((modm .|. shiftMask, xK_l), sendMessage MirrorShrink)
-- Shrink a mirror pane
, ((modm .|. shiftMask, xK_h), sendMessage MirrorExpand)]
where modm = mod4Mask
myGSConfig = def { gs_font = "xft:FreeMono:size=13"
, gs_cellheight = 100
, gs_cellwidth = 1000
}
------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events
--
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
------------------------------------------------------------------------
-- Layouts:
-- You can specify and transform your layouts by modifying these values.
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
--
-- NOTE: XMonad.Hooks.EwmhDesktops users must remove the obsolete
-- ewmhDesktopsLayout modifier from layoutHook. It no longer exists.
-- Instead use the 'ewmh' function from that module to modify your
-- defaultConfig as a whole. (See also logHook, handleEventHook, and
-- startupHook ewmh notes.)
--
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
--
myLayout = avoidStruts .
toggleLayouts (noBorders Full) .
windowNavigation .
boringWindows .
subTabbedThemed .
smartSpacing 5 $
rztiled ||| (Mirror rztiled) ||| Accordion ||| Grid
where
-- TODO: addTabs (used by subTabbedThemed defined below, called above) breaks the top-level
-- tabbed layout (doesn't repaint properly). The tabbed layout (now disabled) can be
-- created using: "tabbed shrinkText myTabConfig"
-- TODO2: sublayouts remember their internal layout dependent upon their location (thus when moving
-- sublayout groups, the layout will change depending on where the group moves to. To
-- avoid this issue, simply don't have any other sublayouts
subTabbedThemed x = addTabs shrinkText myTabConfig $ subLayout [] Simplest x
-- default tiling algorithm pshamons the screen into two panes
tiled = Tall nmaster delta ratio
-- ResizeableTall arguments
rztiled = ResizableTall nmaster delta ratio []
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
myTabConfig = def { activeColor = "#7f718f"
, inactiveColor = "#2b2f3b"
, urgentColor = "#008000"
, activeBorderColor = "#57e3ff"
, inactiveBorderColor = "#00afff"
, urgentBorderColor = "#ff0000"
, activeTextColor = "#ffa0ff"
, inactiveTextColor = "#f2f2f2"
, urgentTextColor = "#ff0000"
, fontName = "xft:FreeMono:size=12"
, decoWidth = 200
, decoHeight = 35
, windowTitleAddons = []
, windowTitleIcons = []
}
------------------------------------------------------------------------
-- Thanks to OODavo from #haskell on freenode; used for applications
-- that do not doFullFloat well (they request a window size smaller
-- then the widgets they contain)
maxFloat = flip W.float $ rectWithBorder 0.05
where rectWithBorder x = let lt = x
wh = 1 - 2*x
in W.RationalRect lt lt wh wh
doMaxFloat = ask >>= doF . maxFloat
-- removes duplicate code in my manage hook following the pattern:
-- resource =? "a" <||> resource =? "b" <||> ...
resourceIsOneOf = foldl (<||>) (return False) . fmap (resource =?)
------------------------------------------------------------------------
-- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ resource =? "supertux2" --> doCenterFloat
, title =? "DOOM 3" --> doFullFloat
, resource =? "vncviewer" --> doCenterFloat
, resource =? "opennx" --> doMaxFloat
, resource =? "Steam" --> doCenterFloat
, title =? "Xnest" --> doCenterFloat
, resource =? "pinentry-gtk-2" --> doCenterFloat
, resource =? "pavucontrol" --> doMaxFloat
, resource =? "qemu-system-x86_64" --> doFullFloat
, resource =? "desktop_window" --> doIgnore
-- , resource =? "Qt-subapplication" <&&> title /=? "Oracle VM VirtualBox Manager" --> doFloat
-- , resource =? "Halo.exe" --> doCenterFloat
-- , resource =? "UnrealTournament.exe" --> doCenterFloat
-- , resource =? "hl2_linux" --> doFullFloat
, className =? "mpv" --> doShift "7:media"
, isFullscreen --> (doF W.focusDown <+> doFullFloat)
, resourceIsOneOf ["emacs","gvim"] --> ask >>= (liftX . flip setOpacity (15/16)) >> idHook
] <+> namedScratchpadManageHook scratchpads <+> manageDocks <+> manageSpawn
-- NamedScratchPad Hook
scratchpads = [ NS "emacs-scratch" spawnEmacsScratch findEmacsScratch manageEmacsScratch
, NS "maintenance-terminal" spawnMaintenanceTerminal findMaintenanceTerminal manageMaintenanceTerminal
, NS "screen-terminal" spawnScreenTerminal findScreenTerminal manageScreenTerminal
, NS "emacs-mini-scratch" spawnEmacsMiniScratch findEmacsMiniScratch manageEmacsMiniScratch
, NS "ncmpcpp-scratch" spawnNcmpcppScratch findNcmpcppScratch manageNcmpcppScratch
, NS "pavucontrol-scratch" spawnPavucontrolScratch findPavucontrolScratch managePavucontrolScratch ]
where
findEmacsScratch = title =? "emacs-scratch"
findMaintenanceTerminal = resource =? "scratchpad"
findScreenTerminal = title =? "screen-scratch"
findEmacsMiniScratch = resource =? "emacs-mini-scratch"
findNcmpcppScratch = resource =? "ncmpcpp-scratch"
findPavucontrolScratch = resource =? "pavucontrol"
spawnEmacsScratch = "emacsclient -c -F \"'(name . \\\"emacs-scratch\\\")\""
spawnMaintenanceTerminal = myTerminal ++ " --name scratchpad"
spawnScreenTerminal = "emacsclient -c -F \"'(name . \\\"screen-scratch\\\")\""
spawnEmacsMiniScratch = "emacsclient -c -F \"'(name . \\\"emacs-mini-scratch\\\")\""
spawnNcmpcppScratch = myTerminal ++ " --name ncmpcpp-scratch ncmpcpp"
spawnPavucontrolScratch = "pavucontrol"
manageEmacsScratch = doMaxFloat
manageMaintenanceTerminal = customFloating $ W.RationalRect 0 0.66 1 0.34
manageScreenTerminal = doFullFloat
manageEmacsMiniScratch = customFloating $ W.RationalRect 0.125 0.125 0.75 0.75
manageNcmpcppScratch = customFloating $ W.RationalRect 0.225 0.10 0.55 0.80
managePavucontrolScratch = doMaxFloat
-- manageScreenTerminal = customFloating $ W.RationalRect l t w h
-- where
-- h = 1 -- terminal height (%)
-- w = 1 -- terminal width (%)
-- t = 1 - h -- distance from top edge (%)
-- l = 1 - w -- distance from left edge (%)
------------------------------------------------------------------------
-- Event handling
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
-- NOTE: EwmhDesktops users should use the 'ewmh' function from
-- XMonad.Hooks.EwmhDesktops to modify their defaultConfig as a whole.
-- It will add EWMH event handling to your custom event hooks by
-- combining them with ewmhDesktopsEventHook.
--
myEventHook = handleEventHook defaultConfig <+> fullscreenEventHook
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
--
-- * NOTE: EwmhDesktops users should use the 'ewmh' function from
-- XMonad.Hooks.EwmhDesktops to modify their defaultConfig as a whole.
-- It will add EWMH logHook actions to your custom log hook by
-- combining it with ewmhDesktopsLogHook.
--
myLogHook h = do
fadeInactiveCurrentWSLogHook 0.95
dynamicLogWithPP . namedScratchpadFilterOutWorkspacePP $ xmobarPP
{ ppOutput = hPutStrLn h
, ppUrgent = xmobarColor "yellow" "red" . xmobarStrip
, ppHidden = (\ ws -> "") }
------------------------------------------------------------------------
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
--
-- * NOTE: EwmhDesktops users should use the 'ewmh' function from
-- XMonad.Hooks.EwmhDesktops to modify their defaultConfig as a whole.
-- It will add initialization of EWMH support to your custom startup
-- hook by combining it with ewmhDesktopsStartup.
--
myStartupHook = return ()
-- TODO: auto-spawn and setup desktop
-- spawnOn "1:web" "conkeror"
-- spawnOn "2:hack" "emacsclient -c"
-- spawnOn "3:code" "emacsclient -c"
-- spawnOn "4:prog" "emacsclient -c"
-- spawnOn "0:mail" "emacsclient -c -eval '(mu4e)'"
------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this.
--
main :: IO ()
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ docks $ withUrgencyHook (borderUrgencyHook "#000000") $ defaults xmproc
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
defaults sxmproc = ewmh defaultConfig {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
borderWidth = myBorderWidth,
modMask = myModMask,
-- numlockMask deprecated in 0.9.1
-- numlockMask = myNumlockMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = myLayout,
manageHook = myManageHook,
handleEventHook = myEventHook,
logHook = myLogHook sxmproc, -- >> updatePointer (Relative 0.5 0.5), -- TODO: Investigate why Relative is out of scope?
startupHook = myStartupHook
}

View File

@ -0,0 +1,697 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
#TERM: alacritty
window:
# Window dimensions (changes require restart)
#
# Specified in number of columns/lines, not pixels.
# If both are `0`, this setting is ignored.
#dimensions:
# columns: 0
# lines: 0
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
#position:
# x: 0
# y: 0
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
#padding:
# x: 0
# y: 0
# Spread additional padding evenly around the terminal content.
#dynamic_padding: false
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
#
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background, but no title bar buttons
decorations: full
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
startup_mode: Windowed
# Window title
#title: Alacritty
# Allow terminal applications to change Alacritty's window title.
#dynamic_title: true
# Window class (Linux/BSD only):
#class:
# Application instance name
#instance: Alacritty
# General application class
#general: Alacritty
# GTK theme variant (Linux/BSD only)
#
# Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
# Set this to `None` to use the default theme variant.
#gtk_theme_variant: None
scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
history: 10000
# Scrolling distance multiplier.
#multiplier: 3
# Font configuration
font:
# Normal (roman) font face
normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
family: FreeMono
# The `style` can be specified to pick a specific face.
#style: Regular
# Bold font face
#bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Bold
# Italic font face
#italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Italic
# Bold italic font face
#bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Bold Italic
# Point size
#size: 11.0
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
#offset:
# x: 0
# y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the right,
# increasing `y` moves the glyph upward.
#glyph_offset:
# x: 0
# y: 0
# Thin stroke font rendering (macOS only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`.
#use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: false
# Colors (Tomorrow Night)
#colors:
# Default colors
#primary:
# background: '#1d1f21'
# foreground: '#c5c8c6'
# Bright and dim foreground colors
#
# The dimmed foreground color is calculated automatically if it is not present.
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
# is `false`, the normal foreground color will be used.
#dim_foreground: '#828482'
#bright_foreground: '#eaeaea'
# Cursor colors
#
# Colors which should be used to draw the terminal cursor.
#
# Allowed values are CellForeground and CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#cursor:
# text: CellBackground
# cursor: CellForeground
# Vi mode cursor colors
#
# Colors for the cursor when the vi mode is active.
#
# Allowed values are CellForeground and CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#vi_mode_cursor:
# text: CellBackground
# cursor: CellForeground
# Selection colors
#
# Colors which should be used to draw the selection area.
#
# Allowed values are CellForeground and CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#selection:
# text: CellBackground
# background: CellForeground
# Search colors
#
# Colors used for the search bar and match highlighting.
#search:
# Allowed values are CellForeground and CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#matches:
# foreground: '#000000'
# background: '#ffffff'
#bar:
# background: '#c5c8c6'
# foreground: '#1d1f21'
# Normal colors
#normal:
# black: '#1d1f21'
# red: '#cc6666'
# green: '#b5bd68'
# yellow: '#f0c674'
# blue: '#81a2be'
# magenta: '#b294bb'
# cyan: '#8abeb7'
# white: '#c5c8c6'
# Bright colors
#bright:
# black: '#666666'
# red: '#d54e53'
# green: '#b9ca4a'
# yellow: '#e7c547'
# blue: '#7aa6da'
# magenta: '#c397d8'
# cyan: '#70c0b1'
# white: '#eaeaea'
# Dim colors
#
# If the dim colors are not set, they will be calculated automatically based
# on the `normal` colors.
#dim:
# black: '#131415'
# red: '#864343'
# green: '#777c44'
# yellow: '#9e824c'
# blue: '#556a7d'
# magenta: '#75617b'
# cyan: '#5b7d78'
# white: '#828482'
# Indexed Colors
#
# The indexed colors include all colors from 16 to 256.
# When these are not set, they're filled with sensible defaults.
#
# Example:
# `- { index: 16, color: '#ff00ff' }`
#
#indexed_colors: []
# Bell
#
# The bell is rung every time the BEL control character is received.
#bell:
# Visual Bell Animation
#
# Animation effect for flashing the screen when the visual bell is rung.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#animation: EaseOutExpo
# Duration of the visual bell flash. A `duration` of `0` will disable the
# visual bell animation.
#duration: 0
# Visual bell animation color.
#color: '#ffffff'
# Bell Command
#
# This program is executed whenever the bell is rung.
#
# When set to `command: None`, no command will be executed.
#
# Example:
# command:
# program: notify-send
# args: ["Hello, World!"]
#
#command: None
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
#background_opacity: 1.0
#selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
#save_to_clipboard: false
#cursor:
# Cursor style
#
# Values for `style`:
# - ▇ Block
# - _ Underline
# - | Beam
#style: Block
# Vi mode cursor style
#
# If the vi mode cursor style is `None` or not specified, it will fall back to
# the style of the active value of the normal cursor.
#
# See `cursor.style` for available options.
#vi_mode_style: None
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
#unfocused_hollow: true
# Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `1.0`.
#thickness: 0.15
# Live config reload (changes require restart)
#live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
# Entries in `shell.args` are passed unmodified as arguments to the shell.
#
# Default:
# - (macOS) /bin/bash --login
# - (Linux/BSD) user login shell
# - (Windows) powershell
#shell:
# program: /bin/bash
# args:
# - --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
#working_directory: None
# WinPTY backend (Windows only)
#
# Alacritty defaults to using the newer ConPTY backend if it is available,
# since it resolves a lot of bugs and is quite a bit faster. If it is not
# available, the WinPTY backend will be used instead.
#
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
# even if the ConPTY backend is available.
#winpty_backend: false
# Send ESC (\x1b) before characters when alt is pressed.
#alt_send_esc: true
#mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
#double_click: { threshold: 300 }
#triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
#hide_when_typing: false
#url:
# URL launcher
#
# This program is executed when clicking on a text which is recognized as a URL.
# The URL is always added to the command as the last parameter.
#
# When set to `launcher: None`, URL launching will be disabled completely.
#
# Default:
# - (macOS) open
# - (Linux/BSD) xdg-open
# - (Windows) explorer
#launcher:
# program: xdg-open
# args: []
# URL modifiers
#
# These are the modifiers that need to be held down for opening URLs when clicking
# on them. The available modifiers are documented in the key binding section.
#modifiers: None
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty captures the mouse, the
# `Shift` modifier is automatically added as a requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings)
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Middle, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - ToggleViMode
# - SearchForward
# - SearchBackward
# - Copy
# - Paste
# - PasteSelection
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollHalfPageUp
# - ScrollHalfPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# - Hide
# - Minimize
# - Quit
# - ToggleFullscreen
# - SpawnNewInstance
# - ClearLogNotice
# - ClearSelection
# - ReceiveChar
# - None
#
# (`mode: Vi` only):
# - Open
# - Up
# - Down
# - Left
# - Right
# - First
# - Last
# - FirstOccupied
# - High
# - Middle
# - Low
# - SemanticLeft
# - SemanticRight
# - SemanticLeftEnd
# - SemanticRightEnd
# - WordRight
# - WordLeft
# - WordRightEnd
# - WordLeftEnd
# - Bracket
# - ToggleNormalSelection
# - ToggleLineSelection
# - ToggleBlockSelection
# - ToggleSemanticSelection
# - SearchNext
# - SearchPrevious
# - SearchStart
# - SearchEnd
#
# (macOS only):
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
#
# (Linux/BSD only):
# - CopySelection: Copies into selection buffer
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Alt
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
#key_bindings:
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, mode: ~Vi, chars: "\x0c" }
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Vi Mode
#- { key: Space, mods: Shift|Control, mode: Vi, action: ScrollToBottom }
#- { key: Space, mods: Shift|Control, action: ToggleViMode }
#- { key: Escape, mode: Vi, action: ClearSelection }
#- { key: I, mode: Vi, action: ScrollToBottom }
#- { key: I, mode: Vi, action: ToggleViMode }
#- { key: Y, mods: Control, mode: Vi, action: ScrollLineUp }
#- { key: E, mods: Control, mode: Vi, action: ScrollLineDown }
#- { key: G, mode: Vi, action: ScrollToTop }
#- { key: G, mods: Shift, mode: Vi, action: ScrollToBottom }
#- { key: B, mods: Control, mode: Vi, action: ScrollPageUp }
#- { key: F, mods: Control, mode: Vi, action: ScrollPageDown }
#- { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp }
#- { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown }
#- { key: Y, mode: Vi, action: Copy }
#- { key: Y, mode: Vi, action: ClearSelection }
#- { key: Copy, mode: Vi, action: ClearSelection }
#- { key: V, mode: Vi, action: ToggleNormalSelection }
#- { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection }
#- { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection }
#- { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection }
#- { key: Return, mode: Vi, action: Open }
#- { key: K, mode: Vi, action: Up }
#- { key: J, mode: Vi, action: Down }
#- { key: H, mode: Vi, action: Left }
#- { key: L, mode: Vi, action: Right }
#- { key: Up, mode: Vi, action: Up }
#- { key: Down, mode: Vi, action: Down }
#- { key: Left, mode: Vi, action: Left }
#- { key: Right, mode: Vi, action: Right }
#- { key: Key0, mode: Vi, action: First }
#- { key: Key4, mods: Shift, mode: Vi, action: Last }
#- { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied }
#- { key: H, mods: Shift, mode: Vi, action: High }
#- { key: M, mods: Shift, mode: Vi, action: Middle }
#- { key: L, mods: Shift, mode: Vi, action: Low }
#- { key: B, mode: Vi, action: SemanticLeft }
#- { key: W, mode: Vi, action: SemanticRight }
#- { key: E, mode: Vi, action: SemanticRightEnd }
#- { key: B, mods: Shift, mode: Vi, action: WordLeft }
#- { key: W, mods: Shift, mode: Vi, action: WordRight }
#- { key: E, mods: Shift, mode: Vi, action: WordRightEnd }
#- { key: Key5, mods: Shift, mode: Vi, action: Bracket }
#- { key: Slash, mode: Vi, action: SearchForward }
#- { key: Slash, mods: Shift, mode: Vi, action: SearchBackward }
#- { key: N, mode: Vi, action: SearchNext }
#- { key: N, mods: Shift, mode: Vi, action: SearchPrevious }
# (Windows, Linux, and BSD only)
#- { key: V, mods: Control|Shift, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: F, mods: Control|Shift, action: SearchForward }
#- { key: B, mods: Control|Shift, action: SearchBackward }
#- { key: C, mods: Control|Shift, mode: Vi, action: ClearSelection }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Add, mods: Control, action: IncreaseFontSize }
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
#- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" }
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Add, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: K, mods: Command, action: ClearHistory }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: C, mods: Command, mode: Vi, action: ClearSelection }
#- { key: H, mods: Command, action: Hide }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: N, mods: Command, action: SpawnNewInstance }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: F, mods: Command, action: SearchForward }
#- { key: B, mods: Command, action: SearchBackward }
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - None
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Print all received window events.
#print_events: false

View File

@ -0,0 +1,4 @@
[[ -f ~/.bashrc ]] && . ~/.bashrc
# Create variable GENERAL_SCREEN which is the pid of one or more screens called "general"
export GENERAL_SCREEN=`screen -ls | grep general | cut -f1 -d'.' | sed 's/\W//g'`

15
user-config/bash/.bashrc Normal file
View File

@ -0,0 +1,15 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias ll='ls -l'
alias la='ls -a'
alias lal='ls -al'
PS1='[\u@\h \W]\$ '
source /usr/share/nvm/init-nvm.sh

View File

@ -0,0 +1,3 @@
#!/bin/sh
exec emacsclient -c --eval "(browse-url-mail \"$@\")"

View File

@ -0,0 +1,13 @@
#!/bin/sh
exec emacsclient -e '
(progn
(when (= (length (window-list)) 0)
(split-window-vertically))
(other-window 1)
(org-roam--find-file
(substring
(url-filename
(url-generic-parse-url
(url-unhex-string "'"$@"'")))
6)))'

View File

@ -0,0 +1,16 @@
;; This file is automatically generated by the multiple-cursors extension.
;; It keeps track of your preferences for running commands with multiple cursors.
(setq mc/cmds-to-run-for-all
'(
backward-sexp
forward-sexp
kill-region
org-beginning-of-line
org-delete-char
org-self-insert-command
))
(setq mc/cmds-to-run-once
'(
))

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

View File

@ -0,0 +1,6 @@
alias modspeed sudo tc qdisc $2 dev $1 root netem delay 300ms
alias ms magit-status $1
alias mss magit-status .
alias ssudo /usr/bin/sudo
alias d dired $1
alias ffo find-file-other-window $1

View File

@ -0,0 +1,7 @@
# File: ~/.eshell/profile
# Author: Collin J. Doering
# Date: Nov 12, 2011
# Description:
# Set commands that use a Term buffer instead of the eshell dumbterm
setq eshell-visual-commands (list "vi" "screen" "top" "less" "more" "lynx" "ncftp" "pine" "tin" "trn" "elm" "vim" "ncmpcpp" "irssi" "mc" "vim" "ncmpcpp" "irssi" "mc" "vim" "ncmpcpp" "irssi" "mc" "/usr/bin/sudo") >> /dev/null

View File

@ -0,0 +1,8 @@
;;; Compiled snippets and support files for `latex-mode'
;;; Snippet definitions:
;;;
(yas-define-snippets 'latex-mode
'(("begin" "\\begin{$1}\n\n $0\n\n\\end{$1}\n" "begin" nil nil nil nil nil nil)))
;;; Do not edit! File generated at Mon Jun 2 06:32:05 2014

View File

@ -0,0 +1 @@
text-mode

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor : Mads D. Kristensen <madsdk@gmail.com>
# key : abs
# group: sections
# name : \abstract
# --
\begin{abstract}
$0
\end{abstract}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor : Rasmus Borgsmidt <rasmus@borgsmidt.dk>
# key : align
# group: environments
# name : \begin{align} ... \end{align}
# --
\begin{align}
$0
\end{align}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor : Rasmus Borgsmidt <rasmus@borgsmidt.dk>
# key : align*
# group: environments
# name : \begin{align*} ... \end{align*}
# --
\begin{align*}
$0
\end{align*}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor : Peter Urbak <peter@dragonwasrobot.com>
# key : arr
# group: environments
# name : \begin{array} ... \end{array}
# --
\begin{array}{$1}
$0
\end{array}

View File

@ -0,0 +1,28 @@
# -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# contributor : Song Qiang <tsiangsung@gmail.com>
# key: article
# group: skeleton
# name: \documentclass{article} ...
# --
\documentclass[11pt]{article}
\usepackage{graphicx,amsmath,amssymb,subfigure,url,xspace}
\newcommand{\eg}{e.g.,\xspace}
\newcommand{\bigeg}{E.g.,\xspace}
\newcommand{\etal}{\textit{et~al.\xspace}}
\newcommand{\etc}{etc.\@\xspace}
\newcommand{\ie}{i.e.,\xspace}
\newcommand{\bigie}{I.e.,\xspace}
\title{${1:title}}
\author{${2:Author Name}}
\begin{document}
\maketitle
\bibliographystyle{${3:plain}}
\bibliography{${4:literature.bib}}
\end{document}

View File

@ -0,0 +1,37 @@
# -*- mode: snippet -*-
# contributor: Claudio Marforio <marforio@gmail.com>
# key: beamer
# group: skeleton
# name: \documentclass{beamer} ...
# --
\documentclass[xcolor=dvipsnames]{beamer}
\usepackage{graphicx,subfigure,url}
% example themes
\usetheme{Frankfurt}
\usecolortheme{seahorse}
\usecolortheme{rose}
% put page numbers
% \setbeamertemplate{footline}[frame number]{}
% remove navigation symbols
% \setbeamertemplate{navigation symbols}{}
\title{${1:Presentation Title}}
\author{${2:Author Name}}
\begin{document}
\frame[plain]{\titlepage}
\begin{frame}[plain]{Outline}
\tableofcontents
\end{frame}
\section{${3:Example Section}}
\begin{frame}{${4:Frame Title}}
\end{frame}
\end{document}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: begin
# key: begin
# --
\begin{$1}
$0
\end{$1}

View File

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# contributor : Bjorn Reese <breese@users.sourceforge.net>
# key: begin
# group: environments
# name: \begin{environment} ... \end{environment}
# --
\begin{${1:$$(yas/choose-value (mapcar 'car (LaTeX-environment-list)))}}
$0
\end{$1}

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# key: bib
# group: misc
# name: \bibliography
# --
\bibliographystyle{plain}
\bibliography{$1}$0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# contributor: Song Qiang <tsiangsung@gmail.com>
# key: big
# group: math
# name: \bigl( ... \bigr)
# --
\\${1:$$(yas/choose-value '("big" "Big" "bigg" "Bigg"))}l( $0 \\$1r)

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# contributor: François Garillot <francois@garillot.net>
# key: bigop
# group: math
# name: \bigop_{n}^{}
# --
\\big${1:$$(yas/choose-value '("oplus" "otimes" "odot" "cup" "cap" "uplus" "sqcup" "vee" "wedge"))}_{$2}^{$3}$0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# contributor: Song Qiang <tsiangsung@gmail.com>
# key: binom
# group: math
# name: \binom{n}{k}
# --
\binom{${1:n}}{${2:k}}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor: Claudio Marforio <marforio@gmail.com>
# key: block
# group: environments
# name : \begin{*block} ... \end{*block}
# --
\begin{${1:$$(yas/choose-value '("block" "exampleblock" "alertblock"))}}{${2:Block Title}}
\end{$1}

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# contributor: Márcio M. Ribeiro <marcio.mr@gmail.com>
# key: bf
# group: font
# name: {\bf ... }
# --
{\bf $1}$0

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# key: case
# group: math
# name: \begin{cases} ... \end{cases}
# --
\begin{cases}
$0 \\\\
\end{cases}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor : Mads D. Kristensen <madsdk@gmail.com>
# key : cha
# group: sections
# name : \chapter
# --
\chapter{${1:name}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0

Some files were not shown because too many files have changed in this diff Show More