Move home-manager config into nixos config
This commit is contained in:
parent
ad21638fd6
commit
ed60efc759
|
@ -12,7 +12,8 @@ let
|
|||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
[
|
||||
<home-manager/nixos>
|
||||
./hardware-configuration.nix
|
||||
./local.nix
|
||||
]
|
||||
|
@ -32,6 +33,8 @@ in
|
|||
users.groups.jez = { };
|
||||
users.users.elly.isNormalUser = true;
|
||||
|
||||
home-manager.users.jez = import ./home/jez/home.nix;
|
||||
|
||||
environment.shells = with pkgs; [ bashInteractive bash fish zsh ];
|
||||
|
||||
# Networking ###############################################################
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
;;; Directory Local Variables
|
||||
;;; For more information see (info "(emacs) Directory Variables")
|
||||
|
||||
((nil . ((compile-command . "home-manager switch"))))
|
|
@ -0,0 +1,44 @@
|
|||
*.swp
|
||||
*.swo
|
||||
vim/view
|
||||
*.pyc
|
||||
vim/.netrwhist
|
||||
*.hi
|
||||
*.o
|
||||
xmonad-i386-linux
|
||||
xmonad-x86_64-linux
|
||||
*.errors
|
||||
pentadactyl/info/default/command-history
|
||||
pentadactyl/info/default/local-marks
|
||||
pentadactyl/info/default/registers
|
||||
pentadactyl/info/default/register-ring
|
||||
/emacs.d/ac-comphist.dat
|
||||
/emacs.d/image-dired
|
||||
/emacs.d/init-local.org
|
||||
/emacs.d/init-local-pre.org
|
||||
/emacs.d/bbdb
|
||||
/texmf/ls-R
|
||||
/emacs.d/el-get-local.el
|
||||
/emacs.d/snippets-local/
|
||||
/emacs.d/recentf
|
||||
/emacs.d/projectile-bookmarks.eld
|
||||
/emacs.d/projectile.cache
|
||||
/emacs.d/request/
|
||||
/emacs.d/var/
|
||||
/emacs.d/init-mu4e.org
|
||||
/pentadactyl/info/default/cache
|
||||
/vimperator/info/default/quickmarks
|
||||
/vimperator/info/default/history-command
|
||||
/vimperator/info/default/history-search
|
||||
/vimperator/info/default/local-marks
|
||||
/vimperator/info/default/macros
|
||||
/emacs.d/.cask/
|
||||
/emacs.d/.python-environments/
|
||||
emacs.d/abbrev_defs
|
||||
*.retry
|
||||
/emacs.d/.persistent-scratch
|
||||
/emacs.d/eshell
|
||||
/emacs.d/magithub
|
||||
/emacs.d/network-security.data
|
||||
/emacs.d/persp-confs
|
||||
result
|
|
@ -0,0 +1,154 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
util = import ../util.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs;
|
||||
let
|
||||
gn = pkgs.gnome3;
|
||||
in [
|
||||
wofi dmenu swayidle grim slurp light wl-clipboard
|
||||
|
||||
gn.gnome-tweaks gmrun
|
||||
mate.atril mate.caja libreoffice-fresh abiword
|
||||
inkscape gimp
|
||||
|
||||
openshot-qt blender obs-studio gn.cheese vlc v4l-utils
|
||||
pamixer playerctl pavucontrol vorbis-tools audacity
|
||||
pulseaudio jack2 cadence non
|
||||
|
||||
atom element-desktop slack zoom-us teams tdesktop
|
||||
|
||||
# Fonts
|
||||
iosevka fira fira-code merriweather gentium gentium-book-basic open-sans
|
||||
joypixels noto-fonts-emoji font-awesome
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/i3".source = ../dotfiles/i3;
|
||||
".config/alacritty".source = ../dotfiles/alacritty;
|
||||
".config/sway".source = ../dotfiles/sway;
|
||||
".config/wofi".source = ../dotfiles/wofi;
|
||||
".config/waybar".source = ../dotfiles/waybar;
|
||||
".config/kitty" = {
|
||||
source = ../dotfiles/kitty;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
".face".source = ../dotfiles/images/cat.jpg;
|
||||
};
|
||||
|
||||
home.activation = {
|
||||
updateFcCache = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
$DRY_RUN_CMD fc-cache -f
|
||||
'';
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme.name = "Equilux";
|
||||
theme.package = pkgs.equilux-theme;
|
||||
font.name = "Fira Sans Condensed Regular 10";
|
||||
font.package = pkgs.fira;
|
||||
iconTheme.name = "Flat-Remix-Green-Dark";
|
||||
iconTheme.package = pkgs.flat-remix-icon-theme;
|
||||
|
||||
gtk3.extraConfig = {
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintmedium";
|
||||
gtk-xft-rgba = "rgb";
|
||||
};
|
||||
};
|
||||
|
||||
programs.mako = {
|
||||
enable = true;
|
||||
defaultTimeout = 10000;
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
provider = "geoclue2";
|
||||
tray = true;
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = "Iosevka Medium";
|
||||
font.package = pkgs.iosevka;
|
||||
settings = {
|
||||
font_size = "11.0";
|
||||
|
||||
allow_remote_control = true;
|
||||
listen_on = "unix:\${XDG_RUNTIME_DIR}/kitty.sock";
|
||||
|
||||
enable_audio_bell = false;
|
||||
visual_bell_duration = "0.1";
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
# Base16 Gruvbox dark, hard - kitty color config
|
||||
# Scheme by Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
|
||||
background #1d2021
|
||||
foreground #d5c4a1
|
||||
selection_background #d5c4a1
|
||||
selection_foreground #1d2021
|
||||
url_color #bdae93
|
||||
cursor #d5c4a1
|
||||
active_border_color #665c54
|
||||
inactive_border_color #3c3836
|
||||
active_tab_background #1d2021
|
||||
active_tab_foreground #d5c4a1
|
||||
inactive_tab_background #3c3836
|
||||
inactive_tab_foreground #bdae93
|
||||
tab_bar_background #3c3836
|
||||
|
||||
# normal
|
||||
color0 #1d2021
|
||||
color1 #fb4934
|
||||
color2 #b8bb26
|
||||
color3 #fabd2f
|
||||
color4 #83a598
|
||||
color5 #d3869b
|
||||
color6 #8ec07c
|
||||
color7 #d5c4a1
|
||||
|
||||
# bright
|
||||
color8 #665c54
|
||||
color9 #fb4934
|
||||
color10 #b8bb26
|
||||
color11 #fabd2f
|
||||
color12 #83a598
|
||||
color13 #d3869b
|
||||
color14 #8ec07c
|
||||
color15 #fbf1c7
|
||||
|
||||
# extended base16 colors
|
||||
color16 #fe8019
|
||||
color17 #d65d0e
|
||||
color18 #3c3836
|
||||
color19 #504945
|
||||
color20 #bdae93
|
||||
color21 #ebdbb2
|
||||
'';
|
||||
};
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
enableGnomeExtensions = true;
|
||||
};
|
||||
programs.chromium.enable = true;
|
||||
|
||||
programs.ncmpcpp.settings = {
|
||||
user_interface = "alternative";
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
editorconfig-core-c
|
||||
];
|
||||
|
||||
home.file = let
|
||||
spacemacs = builtins.fetchGit {
|
||||
url = "https://github.com/syl20bnr/spacemacs";
|
||||
ref = "develop";
|
||||
};
|
||||
in {
|
||||
# TODO: work out how to do this properly
|
||||
# ".emacs.d" = {
|
||||
# source = spacemacs;
|
||||
# recursive = true;
|
||||
# };
|
||||
".spacemacs".source = ../dotfiles/spacemacs;
|
||||
".spacemacs.d/private" = {
|
||||
source = ../dotfiles/spacemacs-private;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
".local/share/applications/org-protocol.desktop".source = let
|
||||
org-protocol-desktop = pkgs.makeDesktopItem {
|
||||
name = "org-protocol";
|
||||
desktopName = "Emacs org-protocol handler";
|
||||
exec = "${pkgs.emacs}/bin/emacsclient %u";
|
||||
terminal = "false";
|
||||
categories = "System;";
|
||||
mimeType = "x-scheme-handler/org-protocol;";
|
||||
};
|
||||
in org-protocol-desktop + /share/applications/org-protocol.desktop;
|
||||
};
|
||||
|
||||
programs.emacs.enable = true;
|
||||
|
||||
services.gpg-agent.extraConfig = ''
|
||||
allow-emacs-pinentry
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
util = import ../util.nix { inherit pkgs; };
|
||||
settingsFormat = pkgs.formats.json { };
|
||||
hostname = lib.strings.fileContents /etc/hostname;
|
||||
in {
|
||||
home.packages = [ pkgs.resilio-sync ];
|
||||
home.file.".cache/rslsync/debug.txt".text = ''
|
||||
80000000
|
||||
0
|
||||
'';
|
||||
|
||||
systemd.user.services = let
|
||||
confFile = settingsFormat.generate "rslsync.conf" {
|
||||
device_name = util.capitalise hostname;
|
||||
storage_path = toString ~/.cache/rslsync;
|
||||
pid_file = toString ~/.cache/rslsync/rslsync.pid;
|
||||
|
||||
use_upnp = true;
|
||||
|
||||
download_limit = 0;
|
||||
upload_limit = 0;
|
||||
|
||||
directory_root = toString ~/.;
|
||||
|
||||
webui.listen = "0.0.0.0:8888";
|
||||
};
|
||||
in {
|
||||
rslsync = {
|
||||
Unit = {
|
||||
Description = "Resilio Sync per-user service";
|
||||
After = "network.target";
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.resilio-sync}/bin/rslsync --nodaemon --config ${confFile}";
|
||||
Restart = "on-abort";
|
||||
};
|
||||
Install = { WantedBy = [ "default.target" ]; };
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.file = {
|
||||
".zsh" = {
|
||||
source = ../dotfiles/zsh;
|
||||
recursive = true;
|
||||
};
|
||||
".zsh/omz-custom/plugins/zsh-syntax-highlighting" = {
|
||||
source = fetchGit {
|
||||
url = "https://github.com/zsh-users/zsh-syntax-highlighting.git";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
ripgrep fd fasd unzip rsync pv unison file tree
|
||||
|
||||
curl jq
|
||||
|
||||
shellcheck rmlint progress
|
||||
colordiff screenfetch termdown
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
enableAutosuggestions = true;
|
||||
|
||||
shellAliases = {
|
||||
sc = "systemctl";
|
||||
scu = "systemctl --user";
|
||||
|
||||
hm = "home-manager";
|
||||
hmsw = "home-manager switch";
|
||||
hmbld = "home-manager build";
|
||||
hmnews = "home-manager news";
|
||||
nixupd = "nix-channel --update";
|
||||
nixupg = "nix-env --upgrade --leq";
|
||||
nixq = "noglob nix-env --query --available";
|
||||
|
||||
e = "emacsclient -t"; # Terminal
|
||||
ew = "emacsclient -c"; # New window (and wait)
|
||||
en = "emacsclient -nc"; # New window (and return immediately)
|
||||
};
|
||||
|
||||
envExtra = ''
|
||||
[[ -r /etc/profile.d/nix.sh ]] && source /etc/profile.d/nix.sh
|
||||
[[ -r $HOME/.nix-profile/etc/profile.d/nix.sh ]] && source $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||
|
||||
export LOCALE_ARCHIVE="$(nix-build --no-out-link "<nixpkgs>" -A glibcLocales)/lib/locale/locale-archive"
|
||||
ZSH_CUSTOM=$HOME/.zsh/omz-custom
|
||||
|
||||
unset LIBGL_DRIVERS_PATH LD_LIBRARY_PATH
|
||||
'';
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"vi-mode"
|
||||
"git" "git-flow"
|
||||
"fd" "fasd"
|
||||
"virtualenv" "rvm"
|
||||
"extract"
|
||||
"vagrant" "docker"
|
||||
"archlinux"
|
||||
"kitty"
|
||||
"zsh-syntax-highlighting"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf.enable = true;
|
||||
programs.lesspipe.enable = true;
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
time.disabled = false;
|
||||
hostname.ssh_only = false;
|
||||
format = builtins.concatStringsSep "" [
|
||||
"$username" "$hostname"
|
||||
"$kubernetes" "$directory"
|
||||
"$git_branch" "$git_commit" "$git_state" "$git_status"
|
||||
"$hg_branch"
|
||||
"$docker_context"
|
||||
"$package"
|
||||
"$dotnet" "$elixir" "$elm" "$erlang" "$golang" "$java" "$julia" "$nim"
|
||||
"$nodejs" "$ocaml" "$php" "$purescript" "$python" "$ruby" "$rust" "$terraform"
|
||||
"$zig"
|
||||
"$nix_shell" "$conda"
|
||||
"$memory_usage"
|
||||
# "$aws"
|
||||
"$env_var" "$crystal" "$cmd_duration"
|
||||
"$custom" "$time"
|
||||
"$line_break"
|
||||
"$jobs" "$battery" "$character"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableNixDirenvIntegration = true;
|
||||
};
|
||||
|
||||
services.lorri.enable = true;
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
julia-vim vim-toml
|
||||
];
|
||||
settings = {
|
||||
expandtab = true;
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
allowUnfree = true;
|
||||
|
||||
packageOverrides = pkgs:
|
||||
let
|
||||
util = import ./util.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
kitty = util.nixGLWrapMaybe pkgs.kitty "kitty";
|
||||
};
|
||||
|
||||
joypixels.acceptLicense = true;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
# Set default CRAN mirror
|
||||
options(repos=structure(c(CRAN="https://www.stats.bris.ac.uk/R/")))
|
||||
|
||||
Rprofile.local <- "~/.Rprofile.local"
|
||||
if (file.exists(Rprofile.local)) {
|
||||
source(Rprofile.local)
|
||||
}
|
||||
|
||||
## Local Variables:
|
||||
## mode: ess-r
|
||||
## End:
|
|
@ -0,0 +1,2 @@
|
|||
--type-set
|
||||
markdown=.md,.mkd,.markdown,.pdk
|
|
@ -0,0 +1,569 @@
|
|||
# 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: xterm-256color
|
||||
|
||||
#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
|
||||
|
||||
# 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
|
||||
|
||||
# Number of lines the viewport will move for every line scrolled when
|
||||
# scrollback is enabled (history > 0).
|
||||
#multiplier: 3
|
||||
|
||||
# Scroll to the bottom when new text is written to the terminal.
|
||||
#auto_scroll: false
|
||||
|
||||
# Spaces per Tab (changes require restart)
|
||||
#
|
||||
# This setting defines the width of a tab in cells.
|
||||
#
|
||||
# Some applications, like Emacs, rely on knowing about the width of a tab.
|
||||
# To prevent unexpected behavior in these applications, it's also required to
|
||||
# change the `it` value in terminfo when altering this setting.
|
||||
#tabspaces: 8
|
||||
|
||||
# Font configuration
|
||||
font:
|
||||
# Normal (roman) font face
|
||||
normal:
|
||||
# Font family
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) Menlo
|
||||
# - (Linux/BSD) monospace
|
||||
# - (Windows) Consolas
|
||||
family: Iosevka SS01
|
||||
|
||||
# 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 upwards.
|
||||
#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`
|
||||
#
|
||||
# macOS >= 10.14.x:
|
||||
#
|
||||
# If the font quality on non-retina display looks bad then set
|
||||
# `use_thin_strokes` to `true` and enable font smoothing by running the
|
||||
# following command:
|
||||
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
|
||||
#
|
||||
# This is a global setting and will require a log out or restart to take
|
||||
# effect.
|
||||
#use_thin_strokes: true
|
||||
|
||||
# If `true`, bold text is drawn using the bright color variants.
|
||||
#draw_bold_text_with_bright_colors: true
|
||||
|
||||
# Colors (Tomorrow Night Bright)
|
||||
#colors:
|
||||
# Default colors
|
||||
#primary:
|
||||
# background: '0x000000'
|
||||
# foreground: '0xeaeaea'
|
||||
|
||||
# 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: '0x9a9a9a'
|
||||
#bright_foreground: '0xffffff'
|
||||
|
||||
# Cursor colors
|
||||
#
|
||||
# Colors which should be used to draw the terminal cursor. If these are unset,
|
||||
# the cursor color will be the inverse of the cell color.
|
||||
#cursor:
|
||||
# text: '0x000000'
|
||||
# cursor: '0xffffff'
|
||||
|
||||
# Selection colors
|
||||
#
|
||||
# Colors which should be used to draw the selection area. If selection
|
||||
# background is unset, selection color will be the inverse of the cell colors.
|
||||
# If only text is unset the cell text color will remain the same.
|
||||
#selection:
|
||||
# text: '0xeaeaea'
|
||||
# background: '0x404040'
|
||||
|
||||
# Normal colors
|
||||
#normal:
|
||||
# black: '0x000000'
|
||||
# red: '0xd54e53'
|
||||
# green: '0xb9ca4a'
|
||||
# yellow: '0xe6c547'
|
||||
# blue: '0x7aa6da'
|
||||
# magenta: '0xc397d8'
|
||||
# cyan: '0x70c0ba'
|
||||
# white: '0xeaeaea'
|
||||
|
||||
# Bright colors
|
||||
#bright:
|
||||
# black: '0x666666'
|
||||
# red: '0xff3334'
|
||||
# green: '0x9ec400'
|
||||
# yellow: '0xe7c547'
|
||||
# blue: '0x7aa6da'
|
||||
# magenta: '0xb77ee0'
|
||||
# cyan: '0x54ced6'
|
||||
# white: '0xffffff'
|
||||
|
||||
# Dim colors
|
||||
#
|
||||
# If the dim colors are not set, they will be calculated automatically based
|
||||
# on the `normal` colors.
|
||||
#dim:
|
||||
# black: '0x000000'
|
||||
# red: '0x8c3336'
|
||||
# green: '0x7a8530'
|
||||
# yellow: '0x97822e'
|
||||
# blue: '0x506d8f'
|
||||
# magenta: '0x80638e'
|
||||
# cyan: '0x497e7a'
|
||||
# white: '0x9a9a9a'
|
||||
|
||||
# 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: '0xff00ff' }`
|
||||
#
|
||||
#indexed_colors: []
|
||||
|
||||
# Visual Bell
|
||||
#
|
||||
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||
# rung, the terminal background will be set to white and transition back to the
|
||||
# default background color. You can control the rate of this transition by
|
||||
# setting the `duration` property (represented in milliseconds). You can also
|
||||
# configure the transition function by setting the `animation` property.
|
||||
#
|
||||
# Values for `animation`:
|
||||
# - Ease
|
||||
# - EaseOut
|
||||
# - EaseOutSine
|
||||
# - EaseOutQuad
|
||||
# - EaseOutCubic
|
||||
# - EaseOutQuart
|
||||
# - EaseOutQuint
|
||||
# - EaseOutExpo
|
||||
# - EaseOutCirc
|
||||
# - Linear
|
||||
#
|
||||
# Specifying a `duration` of `0` will disable the visual bell.
|
||||
#visual_bell:
|
||||
# animation: EaseOutExpo
|
||||
# duration: 0
|
||||
# color: '0xffffff'
|
||||
|
||||
# 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
|
||||
|
||||
# Allow terminal applications to change Alacritty's window title.
|
||||
#dynamic_title: true
|
||||
|
||||
#cursor:
|
||||
# Cursor style
|
||||
#
|
||||
# Values for `style`:
|
||||
# - ▇ Block
|
||||
# - _ Underline
|
||||
# - | Beam
|
||||
#style: Block
|
||||
|
||||
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||
# window is not focused.
|
||||
#unfocused_hollow: true
|
||||
|
||||
# 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 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
|
||||
|
||||
#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
|
||||
|
||||
# Record all characters and escape sequences as test data.
|
||||
#ref_test: false
|
||||
|
||||
#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 `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.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# - Copy
|
||||
# - Paste
|
||||
# - PasteSelection
|
||||
# - IncreaseFontSize
|
||||
# - DecreaseFontSize
|
||||
# - ResetFontSize
|
||||
# - ScrollPageUp
|
||||
# - ScrollPageDown
|
||||
# - ScrollLineUp
|
||||
# - ScrollLineDown
|
||||
# - ScrollToTop
|
||||
# - ScrollToBottom
|
||||
# - ClearHistory
|
||||
# - Hide
|
||||
# - Minimize
|
||||
# - Quit
|
||||
# - ToggleFullscreen
|
||||
# - SpawnNewInstance
|
||||
# - ClearLogNotice
|
||||
# - ReceiveChar
|
||||
# - None
|
||||
#
|
||||
# (macOS only):
|
||||
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
|
||||
#
|
||||
# - `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.
|
||||
#key_bindings:
|
||||
# (Windows, Linux, and BSD only)
|
||||
#- { key: V, mods: Control|Shift, action: Paste }
|
||||
#- { key: C, mods: Control|Shift, action: Copy }
|
||||
#- { 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: 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: K, mods: Command, chars: "\x0c" }
|
||||
#- { key: V, mods: Command, action: Paste }
|
||||
#- { key: C, mods: Command, action: Copy }
|
||||
#- { 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: F, mods: Command|Control, action: ToggleFullscreen }
|
||||
|
||||
#- { key: Paste, action: Paste }
|
||||
#- { key: Copy, action: Copy }
|
||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||
#- { key: L, mods: Control, chars: "\x0c" }
|
||||
#- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
|
||||
#- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
|
||||
#- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt }
|
||||
#- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt }
|
|
@ -0,0 +1,237 @@
|
|||
-- This is the configuration file for the 'cabal' command line tool.
|
||||
--
|
||||
-- The available configuration options are listed below.
|
||||
-- Some of them have default values listed.
|
||||
--
|
||||
-- Lines (like this one) beginning with '--' are comments.
|
||||
-- Be careful with spaces and indentation because they are
|
||||
-- used to indicate layout for nested sections.
|
||||
--
|
||||
-- This config file was generated using the following versions
|
||||
-- of Cabal and cabal-install:
|
||||
-- Cabal library version: 3.2.0.0
|
||||
-- cabal-install version: 3.2.0.0
|
||||
|
||||
|
||||
repository hackage.haskell.org
|
||||
url: http://hackage.haskell.org/
|
||||
-- secure: True
|
||||
-- root-keys:
|
||||
-- key-threshold: 3
|
||||
|
||||
-- default-user-config:
|
||||
-- require-sandbox: False
|
||||
-- ignore-sandbox: False
|
||||
-- ignore-expiry: False
|
||||
-- http-transport:
|
||||
-- nix: False
|
||||
-- local-no-index-repo:
|
||||
remote-repo-cache: /home/jez/.local/lib/languages/Haskell/cabal/packages
|
||||
-- local-repo:
|
||||
-- logs-dir: /home/jez/.local/lib/languages/Haskell/cabal/logs
|
||||
world-file: /home/jez/.local/lib/languages/Haskell/cabal/world
|
||||
-- store-dir:
|
||||
-- verbose: 1
|
||||
-- compiler: ghc
|
||||
-- cabal-file:
|
||||
-- with-compiler:
|
||||
-- with-hc-pkg:
|
||||
-- program-prefix:
|
||||
-- program-suffix:
|
||||
-- library-vanilla: True
|
||||
-- library-profiling:
|
||||
-- shared:
|
||||
-- static:
|
||||
-- executable-dynamic: False
|
||||
-- executable-static: False
|
||||
-- profiling:
|
||||
-- executable-profiling:
|
||||
-- profiling-detail:
|
||||
-- library-profiling-detail:
|
||||
-- optimization: True
|
||||
-- debug-info: False
|
||||
-- library-for-ghci:
|
||||
-- split-sections: False
|
||||
-- split-objs: False
|
||||
-- executable-stripping:
|
||||
-- library-stripping:
|
||||
-- configure-option:
|
||||
-- user-install: True
|
||||
-- package-db:
|
||||
-- flags:
|
||||
-- extra-include-dirs:
|
||||
-- deterministic:
|
||||
-- cid:
|
||||
-- extra-lib-dirs:
|
||||
-- extra-framework-dirs:
|
||||
extra-prog-path: /home/jez/.local/lib/languages/Haskell/cabal/bin
|
||||
-- instantiate-with:
|
||||
-- tests: False
|
||||
-- coverage: False
|
||||
-- library-coverage:
|
||||
-- exact-configuration: False
|
||||
-- benchmarks: False
|
||||
-- relocatable: False
|
||||
-- response-files:
|
||||
-- allow-depending-on-private-libs:
|
||||
-- cabal-lib-version:
|
||||
-- constraint:
|
||||
-- preference:
|
||||
-- solver: modular
|
||||
-- allow-older: False
|
||||
-- allow-newer: False
|
||||
-- write-ghc-environment-files:
|
||||
-- documentation: False
|
||||
-- doc-index-file: $datadir/doc/$arch-$os-$compiler/index.html
|
||||
-- target-package-db:
|
||||
-- max-backjumps: 4000
|
||||
-- reorder-goals: False
|
||||
-- count-conflicts: True
|
||||
-- fine-grained-conflicts: True
|
||||
-- minimize-conflict-set: False
|
||||
-- independent-goals: False
|
||||
-- shadow-installed-packages: False
|
||||
-- strong-flags: False
|
||||
-- allow-boot-library-installs: False
|
||||
-- reject-unconstrained-dependencies: none
|
||||
-- reinstall: False
|
||||
-- avoid-reinstalls: False
|
||||
-- force-reinstalls: False
|
||||
-- upgrade-dependencies: False
|
||||
-- index-state:
|
||||
-- root-cmd:
|
||||
-- symlink-bindir:
|
||||
build-summary: /home/jez/.local/lib/languages/Haskell/cabal/logs/build.log
|
||||
-- build-log:
|
||||
remote-build-reporting: anonymous
|
||||
-- report-planning-failure: False
|
||||
-- per-component: True
|
||||
-- one-shot: False
|
||||
-- run-tests:
|
||||
jobs: $ncpus
|
||||
-- keep-going: False
|
||||
-- offline: False
|
||||
-- project-file:
|
||||
-- lib: False
|
||||
-- ignore-project: False
|
||||
-- package-env:
|
||||
-- overwrite-policy:
|
||||
-- install-method:
|
||||
installdir: /home/jez/.local/lib/languages/Haskell/cabal/bin
|
||||
-- username:
|
||||
-- password:
|
||||
-- password-command:
|
||||
-- builddir:
|
||||
|
||||
haddock
|
||||
-- keep-temp-files: False
|
||||
-- hoogle: False
|
||||
-- html: False
|
||||
-- html-location:
|
||||
-- executables: False
|
||||
-- tests: False
|
||||
-- benchmarks: False
|
||||
-- foreign-libraries: False
|
||||
-- all:
|
||||
-- internal: False
|
||||
-- css:
|
||||
-- hyperlink-source: False
|
||||
-- quickjump: False
|
||||
-- hscolour-css:
|
||||
-- contents-location:
|
||||
|
||||
init
|
||||
-- interactive: False
|
||||
-- cabal-version: 1.10
|
||||
-- license: BSD3
|
||||
-- tests:
|
||||
-- test-dir:
|
||||
-- language: Haskell2010
|
||||
-- application-dir:
|
||||
-- source-dir:
|
||||
|
||||
install-dirs user
|
||||
-- prefix: /home/jez/.local/lib/languages/Haskell/cabal/
|
||||
-- bindir: $prefix/bin
|
||||
-- libdir: $prefix/lib
|
||||
-- libsubdir: $abi/$libname
|
||||
-- dynlibdir: $libdir/$abi
|
||||
-- libexecdir: $prefix/libexec
|
||||
-- libexecsubdir: $abi/$pkgid
|
||||
-- datadir: $prefix/share
|
||||
-- datasubdir: $abi/$pkgid
|
||||
-- docdir: $datadir/doc/$abi/$pkgid
|
||||
-- htmldir: $docdir/html
|
||||
-- haddockdir: $htmldir
|
||||
-- sysconfdir: $prefix/etc
|
||||
|
||||
install-dirs global
|
||||
-- prefix: /usr/local
|
||||
-- bindir: $prefix/bin
|
||||
-- libdir: $prefix/lib
|
||||
-- libsubdir: $abi/$libname
|
||||
-- dynlibdir: $libdir/$abi
|
||||
-- libexecdir: $prefix/libexec
|
||||
-- libexecsubdir: $abi/$pkgid
|
||||
-- datadir: $prefix/share
|
||||
-- datasubdir: $abi/$pkgid
|
||||
-- docdir: $datadir/doc/$abi/$pkgid
|
||||
-- htmldir: $docdir/html
|
||||
-- haddockdir: $htmldir
|
||||
-- sysconfdir: $prefix/etc
|
||||
|
||||
program-locations
|
||||
-- alex-location:
|
||||
-- ar-location:
|
||||
-- c2hs-location:
|
||||
-- cpphs-location:
|
||||
-- doctest-location:
|
||||
-- gcc-location:
|
||||
-- ghc-location:
|
||||
-- ghc-pkg-location:
|
||||
-- ghcjs-location:
|
||||
-- ghcjs-pkg-location:
|
||||
-- greencard-location:
|
||||
-- haddock-location:
|
||||
-- happy-location:
|
||||
-- haskell-suite-location:
|
||||
-- haskell-suite-pkg-location:
|
||||
-- hmake-location:
|
||||
-- hpc-location:
|
||||
-- hsc2hs-location:
|
||||
-- hscolour-location:
|
||||
-- jhc-location:
|
||||
-- ld-location:
|
||||
-- pkg-config-location:
|
||||
-- runghc-location:
|
||||
-- strip-location:
|
||||
-- tar-location:
|
||||
-- uhc-location:
|
||||
|
||||
program-default-options
|
||||
-- alex-options:
|
||||
-- ar-options:
|
||||
-- c2hs-options:
|
||||
-- cpphs-options:
|
||||
-- doctest-options:
|
||||
-- gcc-options:
|
||||
-- ghc-options:
|
||||
-- ghc-pkg-options:
|
||||
-- ghcjs-options:
|
||||
-- ghcjs-pkg-options:
|
||||
-- greencard-options:
|
||||
-- haddock-options:
|
||||
-- happy-options:
|
||||
-- haskell-suite-options:
|
||||
-- haskell-suite-pkg-options:
|
||||
-- hmake-options:
|
||||
-- hpc-options:
|
||||
-- hsc2hs-options:
|
||||
-- hscolour-options:
|
||||
-- jhc-options:
|
||||
-- ld-options:
|
||||
-- pkg-config-options:
|
||||
-- runghc-options:
|
||||
-- strip-options:
|
||||
-- tar-options:
|
||||
-- uhc-options:
|
|
@ -0,0 +1 @@
|
|||
ref: refs/heads/main
|
|
@ -0,0 +1,46 @@
|
|||
[alias]
|
||||
st = status
|
||||
a = add
|
||||
ci = commit
|
||||
h = help
|
||||
co = checkout
|
||||
d = diff
|
||||
b = branch
|
||||
m = merge
|
||||
l = log
|
||||
graph = log --oneline --graph
|
||||
shl = log --oneline --graph --decorate
|
||||
ignore = update-index --assume-unchanged
|
||||
unignore = update-index --no-assume-unchanged
|
||||
ignored = !git ls-files -v | grep \"^[[:lower:]]\"
|
||||
[color]
|
||||
ui = auto
|
||||
[giggle]
|
||||
main-window-maximized = false
|
||||
main-window-geometry = 943x632+66+24
|
||||
history-view-vpane-position = 357
|
||||
main-window-view = HistoryView
|
||||
file-view-vpane-position = 582
|
||||
[core]
|
||||
excludesfile = ~/.gitignore.global
|
||||
[include]
|
||||
path = .gitconfig.local
|
||||
[difftool "sourcetree"]
|
||||
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||
path =
|
||||
[push]
|
||||
default = simple
|
||||
[url "git@github.com:"]
|
||||
insteadOf = gh:
|
||||
[url "git@gitlab.com:"]
|
||||
insteadOf = gl:
|
||||
[github]
|
||||
user = jezcope
|
||||
[fetch]
|
||||
recurseSubmodules = true
|
||||
[init]
|
||||
templateDir = /home/jez/.config/dotfiles/git/template
|
||||
[pull]
|
||||
rebase = false
|
||||
[pager]
|
||||
branch = false
|
|
@ -0,0 +1,34 @@
|
|||
.*.sw[op]
|
||||
.DS_Store
|
||||
._*
|
||||
.sconsign.dblite
|
||||
*.pyc
|
||||
doc/tags
|
||||
|
||||
# TeX output cruft
|
||||
*.log
|
||||
*.aux
|
||||
*.lol
|
||||
*.out
|
||||
*.toc
|
||||
*.bcf
|
||||
*.bbl
|
||||
*.blg
|
||||
*.nav
|
||||
*.run.xml
|
||||
*.snm
|
||||
*.fdb_latexmk
|
||||
*.fls
|
||||
*.vrb
|
||||
|
||||
.sass-cache
|
||||
~$*
|
||||
.*.un~
|
||||
*~
|
||||
\#*
|
||||
.\#*
|
||||
*.bak
|
||||
.ipynb_checkpoints
|
||||
.~lock.*\#
|
||||
.stfolder
|
||||
.vscode
|
|
@ -0,0 +1,4 @@
|
|||
quiet: yes
|
||||
indent: auto
|
||||
wrap: 79
|
||||
char-encoding: utf8
|
|
@ -0,0 +1,224 @@
|
|||
# -*- mode: conf-space; -*-
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
set $ws1 1:main
|
||||
set $ws2 2:emacs
|
||||
set $ws3 3:aux
|
||||
set $ws4 4:misc
|
||||
set $ws5 5:misc
|
||||
set $ws6 6:misc
|
||||
set $ws7 7:games
|
||||
set $ws8 8:messaging
|
||||
set $ws9 9:music
|
||||
set $ws10 10:term
|
||||
|
||||
set $terminal alacritty
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:Iosevka SS01 10
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
bindsym --release $mod+Shift+space exec rofi -show window
|
||||
bindsym --release $mod+e exec rofimoji
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec $terminal
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+c kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
# bindsym $mod+d exec dmenu_run
|
||||
bindsym $mod+space exec rofi -show drun
|
||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||
# installed.
|
||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+t floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+t focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# lock the screen
|
||||
bindsym $mod+l --release exec "mate-screensaver-command -l"
|
||||
bindsym $mod+Control+l --release exec "mate-screensaver-command -l && systemctl suspend"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
bindsym --whole-window $mod+button4 workspace prev
|
||||
bindsym --whole-window $mod+button5 workspace next
|
||||
bindsym --whole-window $mod+Prior workspace prev
|
||||
bindsym --whole-window $mod+Next workspace next
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
|
||||
bindsym $mod+Ctrl+Right move workspace to output right
|
||||
bindsym $mod+Ctrl+Left move workspace to output left
|
||||
# bindsym $mod+Shift+O move container to output right
|
||||
|
||||
# reload the configuration file
|
||||
# bindsym $mod+Shift+r reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym t resize grow height 10 px or 10 ppt
|
||||
bindsym n resize shrink height 10 px or 10 ppt
|
||||
bindsym s resize grow width 10 px or 10 ppt
|
||||
bindsym Shift+h resize shrink width 2 px or 2 ppt
|
||||
bindsym Shift+t resize grow height 2 px or 2 ppt
|
||||
bindsym Shift+n resize shrink height 2 px or 2 ppt
|
||||
bindsym Shift+s resize grow width 2 px or 2 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
bindsym Shift+Left resize shrink width 2 px or 2 ppt
|
||||
bindsym Shift+Down resize grow height 2 px or 2 ppt
|
||||
bindsym Shift+Up resize shrink height 2 px or 2 ppt
|
||||
bindsym Shift+Right resize grow width 2 px or 2 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
# bar {
|
||||
# status_command i3status
|
||||
# }
|
||||
|
||||
set_from_resource $gapsize i3wm.gaps 10
|
||||
gaps inner $gapsize
|
||||
|
||||
# Set colors from Xresources
|
||||
# Change 'color7' and 'color2' to whatever colors you want i3 to use
|
||||
# from the generated scheme.
|
||||
# NOTE: The '#f0f0f0' in the lines below is the color i3 will use if
|
||||
# it fails to get colors from Xresources for some reason.
|
||||
# set_from_resource $fg i3wm.color0 #f0f0f0
|
||||
# set_from_resource $bg i3wm.color2 #f0f0f0
|
||||
# set_from_resource $foc i3wm.color4 #f0f0f0
|
||||
# set_from_resource $unf i3wm.color1 #f0f0f0
|
||||
# set_from_resource $fin i3wm.color1 #f0f0f0
|
||||
|
||||
set $foc #007D78
|
||||
set $unf #7D2F05
|
||||
set $bg #CA5010
|
||||
set $fg #10C9C2
|
||||
|
||||
# class border backgr. text indicator child_border
|
||||
client.focused $foc $foc $fg $foc $foc
|
||||
# client.focused_inactive $fin $fin $fg $fin $fin
|
||||
client.focused_inactive $fg $fg $foc $fg $fg
|
||||
client.unfocused $unf $unf $bg $unf $unf
|
||||
client.urgent $bg $bg $fg $bg $bg
|
||||
client.placeholder $bg $bg $fg $bg $bg
|
||||
|
||||
client.background $bg
|
||||
|
||||
# Automatically handle some windows differently
|
||||
|
||||
for_window [class="Yubico Authenticator"] floating enable
|
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
|
@ -0,0 +1,7 @@
|
|||
layout vertical
|
||||
cd ~
|
||||
|
||||
launch ncmpcpp
|
||||
launch bpytop
|
||||
|
||||
new_tab
|
|
@ -0,0 +1,3 @@
|
|||
layout tall
|
||||
cd ~
|
||||
launch /home/jez/bin/shared/tma
|
|
@ -0,0 +1,62 @@
|
|||
# This is a sample commands.py. You can add your own commands here.
|
||||
#
|
||||
# Please refer to commands_full.py for all the default commands and a complete
|
||||
# documentation. Do NOT add them all here, or you may end up with defunct
|
||||
# commands when upgrading ranger.
|
||||
|
||||
# A simple command for demonstration purposes follows.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
# You can import any python module as needed.
|
||||
import os
|
||||
|
||||
# You always need to import ranger.api.commands here to get the Command class:
|
||||
from ranger.api.commands import Command
|
||||
|
||||
|
||||
# Any class that is a subclass of "Command" will be integrated into ranger as a
|
||||
# command. Try typing ":my_edit<ENTER>" in ranger!
|
||||
class my_edit(Command):
|
||||
# The so-called doc-string of the class will be visible in the built-in
|
||||
# help that is accessible by typing "?c" inside ranger.
|
||||
""":my_edit <filename>
|
||||
|
||||
A sample command for demonstration purposes that opens a file in an editor.
|
||||
"""
|
||||
|
||||
# The execute method is called when you run this command in ranger.
|
||||
def execute(self):
|
||||
# self.arg(1) is the first (space-separated) argument to the function.
|
||||
# This way you can write ":my_edit somefilename<ENTER>".
|
||||
if self.arg(1):
|
||||
# self.rest(1) contains self.arg(1) and everything that follows
|
||||
target_filename = self.rest(1)
|
||||
else:
|
||||
# self.fm is a ranger.core.filemanager.FileManager object and gives
|
||||
# you access to internals of ranger.
|
||||
# self.fm.thisfile is a ranger.container.file.File object and is a
|
||||
# reference to the currently selected file.
|
||||
target_filename = self.fm.thisfile.path
|
||||
|
||||
# This is a generic function to print text in ranger.
|
||||
self.fm.notify("Let's edit the file " + target_filename + "!")
|
||||
|
||||
# Using bad=True in fm.notify allows you to print error messages:
|
||||
if not os.path.exists(target_filename):
|
||||
self.fm.notify("The given file does not exist!", bad=True)
|
||||
return
|
||||
|
||||
# This executes a function from ranger.core.acitons, a module with a
|
||||
# variety of subroutines that can help you construct commands.
|
||||
# Check out the source, or run "pydoc ranger.core.actions" for a list.
|
||||
self.fm.edit_file(target_filename)
|
||||
|
||||
# The tab method is called when you press tab, and should return a list of
|
||||
# suggestions that the user will tab through.
|
||||
# tabnum is 1 for <TAB> and -1 for <S-TAB> by default
|
||||
def tab(self, tabnum):
|
||||
# This is a generic tab-completion function that iterates through the
|
||||
# content of the current directory.
|
||||
return self._tab_directory_content()
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,759 @@
|
|||
# ===================================================================
|
||||
# This file contains the default startup commands for ranger.
|
||||
# To change them, it is recommended to create either /etc/ranger/rc.conf
|
||||
# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom
|
||||
# commands there.
|
||||
#
|
||||
# If you copy this whole file there, you may want to set the environment
|
||||
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
|
||||
#
|
||||
# The purpose of this file is mainly to define keybindings and settings.
|
||||
# For running more complex python code, please create a plugin in "plugins/" or
|
||||
# a command in "commands.py".
|
||||
#
|
||||
# Each line is a command that will be run before the user interface
|
||||
# is initialized. As a result, you can not use commands which rely
|
||||
# on the UI such as :delete or :mark.
|
||||
# ===================================================================
|
||||
|
||||
# ===================================================================
|
||||
# == Options
|
||||
# ===================================================================
|
||||
|
||||
# Which viewmode should be used? Possible values are:
|
||||
# miller: Use miller columns which show multiple levels of the hierarchy
|
||||
# multipane: Midnight-commander like multipane view showing all tabs next
|
||||
# to each other
|
||||
set viewmode miller
|
||||
#set viewmode multipane
|
||||
|
||||
# How many columns are there, and what are their relative widths?
|
||||
set column_ratios 1,3,4
|
||||
|
||||
# Which files should be hidden? (regular expression)
|
||||
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
|
||||
|
||||
# Show hidden files? You can toggle this by typing 'zh'
|
||||
set show_hidden false
|
||||
|
||||
# Ask for a confirmation when running the "delete" command?
|
||||
# Valid values are "always", "never", "multiple" (default)
|
||||
# With "multiple", ranger will ask only if you delete multiple files at once.
|
||||
set confirm_on_delete multiple
|
||||
|
||||
# Use non-default path for file preview script?
|
||||
# ranger ships with scope.sh, a script that calls external programs (see
|
||||
# README.md for dependencies) to preview images, archives, etc.
|
||||
#set preview_script ~/.config/ranger/scope.sh
|
||||
|
||||
# Use the external preview script or display simple plain text or image previews?
|
||||
set use_preview_script true
|
||||
|
||||
# Automatically count files in the directory, even before entering them?
|
||||
set automatically_count_files true
|
||||
|
||||
# Open all images in this directory when running certain image viewers
|
||||
# like feh or sxiv? You can still open selected files by marking them.
|
||||
set open_all_images true
|
||||
|
||||
# Be aware of version control systems and display information.
|
||||
set vcs_aware false
|
||||
|
||||
# State of the four backends git, hg, bzr, svn. The possible states are
|
||||
# disabled, local (only show local info), enabled (show local and remote
|
||||
# information).
|
||||
set vcs_backend_git enabled
|
||||
set vcs_backend_hg disabled
|
||||
set vcs_backend_bzr disabled
|
||||
set vcs_backend_svn disabled
|
||||
|
||||
# Truncate the long commit messages to this length when shown in the statusbar.
|
||||
set vcs_msg_length 50
|
||||
|
||||
# Use one of the supported image preview protocols
|
||||
set preview_images true
|
||||
|
||||
# Set the preview image method. Supported methods:
|
||||
#
|
||||
# * w3m (default):
|
||||
# Preview images in full color with the external command "w3mimgpreview"?
|
||||
# This requires the console web browser "w3m" and a supported terminal.
|
||||
# It has been successfully tested with "xterm" and "urxvt" without tmux.
|
||||
#
|
||||
# * iterm2:
|
||||
# Preview images in full color using iTerm2 image previews
|
||||
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
|
||||
# with image preview support.
|
||||
#
|
||||
# This feature relies on the dimensions of the terminal's font. By default, a
|
||||
# width of 8 and height of 11 are used. To use other values, set the options
|
||||
# iterm2_font_width and iterm2_font_height to the desired values.
|
||||
#
|
||||
# * terminology:
|
||||
# Previews images in full color in the terminology terminal emulator.
|
||||
# Supports a wide variety of formats, even vector graphics like svg.
|
||||
#
|
||||
# * urxvt:
|
||||
# Preview images in full color using urxvt image backgrounds. This
|
||||
# requires using urxvt compiled with pixbuf support.
|
||||
#
|
||||
# * urxvt-full:
|
||||
# The same as urxvt but utilizing not only the preview pane but the
|
||||
# whole terminal window.
|
||||
#
|
||||
# * kitty:
|
||||
# Preview images in full color using kitty image protocol.
|
||||
# Requires python PIL or pillow library.
|
||||
# If ranger does not share the local filesystem with kitty
|
||||
# the transfer method is changed to encode the whole image;
|
||||
# while slower, this allows remote previews,
|
||||
# for example during an ssh session.
|
||||
# Tmux is unsupported.
|
||||
#
|
||||
# * ueberzug:
|
||||
# Preview images in full color with the external command "ueberzug".
|
||||
# Images are shown by using a child window.
|
||||
# Only for users who run X11 in GNU/Linux.
|
||||
set preview_images_method kitty
|
||||
|
||||
# Delay in seconds before displaying an image with the w3m method.
|
||||
# Increase it in case of experiencing display corruption.
|
||||
set w3m_delay 0.02
|
||||
|
||||
# Manually adjust the w3mimg offset when using a terminal which needs this
|
||||
set w3m_offset 0
|
||||
|
||||
# Default iTerm2 font size (see: preview_images_method: iterm2)
|
||||
set iterm2_font_width 8
|
||||
set iterm2_font_height 11
|
||||
|
||||
# Use a unicode "..." character to mark cut-off filenames?
|
||||
set unicode_ellipsis false
|
||||
|
||||
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
|
||||
# Requires the python-bidi pip package
|
||||
set bidi_support false
|
||||
|
||||
# Show dotfiles in the bookmark preview box?
|
||||
set show_hidden_bookmarks true
|
||||
|
||||
# Which colorscheme to use? These colorschemes are available by default:
|
||||
# default, jungle, snow, solarized
|
||||
set colorscheme default
|
||||
|
||||
# Preview files on the rightmost column?
|
||||
# And collapse (shrink) the last column if there is nothing to preview?
|
||||
set preview_files true
|
||||
set preview_directories true
|
||||
set collapse_preview true
|
||||
|
||||
# Wrap long lines in plain text previews?
|
||||
set wrap_plaintext_previews false
|
||||
|
||||
# Save the console history on exit?
|
||||
set save_console_history true
|
||||
|
||||
# Draw the status bar on top of the browser window (default: bottom)
|
||||
set status_bar_on_top false
|
||||
|
||||
# Draw a progress bar in the status bar which displays the average state of all
|
||||
# currently running tasks which support progress bars?
|
||||
set draw_progress_bar_in_status_bar true
|
||||
|
||||
# Draw borders around columns? (separators, outline, both, or none)
|
||||
# Separators are vertical lines between columns.
|
||||
# Outline draws a box around all the columns.
|
||||
# Both combines the two.
|
||||
set draw_borders none
|
||||
|
||||
# Display the directory name in tabs?
|
||||
set dirname_in_tabs false
|
||||
|
||||
# Enable the mouse support?
|
||||
set mouse_enabled true
|
||||
|
||||
# Display the file size in the main column or status bar?
|
||||
set display_size_in_main_column true
|
||||
set display_size_in_status_bar true
|
||||
|
||||
# Display the free disk space in the status bar?
|
||||
set display_free_space_in_status_bar true
|
||||
|
||||
# Display files tags in all columns or only in main column?
|
||||
set display_tags_in_all_columns true
|
||||
|
||||
# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
|
||||
set update_title false
|
||||
|
||||
# Set the tmux/screen window-name to "ranger"?
|
||||
set update_tmux_title true
|
||||
|
||||
# Shorten the title if it gets long? The number defines how many
|
||||
# directories are displayed at once, 0 turns off this feature.
|
||||
set shorten_title 3
|
||||
|
||||
# Show hostname in titlebar?
|
||||
set hostname_in_titlebar true
|
||||
|
||||
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
|
||||
set tilde_in_titlebar false
|
||||
|
||||
# How many directory-changes or console-commands should be kept in history?
|
||||
set max_history_size 20
|
||||
set max_console_history_size 50
|
||||
|
||||
# Try to keep so much space between the top/bottom border when scrolling:
|
||||
set scroll_offset 8
|
||||
|
||||
# Flush the input after each key hit? (Noticeable when ranger lags)
|
||||
set flushinput true
|
||||
|
||||
# Padding on the right when there's no preview?
|
||||
# This allows you to click into the space to run the file.
|
||||
set padding_right true
|
||||
|
||||
# Save bookmarks (used with mX and `X) instantly?
|
||||
# This helps to synchronize bookmarks between multiple ranger
|
||||
# instances but leads to *slight* performance loss.
|
||||
# When false, bookmarks are saved when ranger is exited.
|
||||
set autosave_bookmarks true
|
||||
|
||||
# Save the "`" bookmark to disk. This can be used to switch to the last
|
||||
# directory by typing "``".
|
||||
set save_backtick_bookmark true
|
||||
|
||||
# You can display the "real" cumulative size of directories by using the
|
||||
# command :get_cumulative_size or typing "dc". The size is expensive to
|
||||
# calculate and will not be updated automatically. You can choose
|
||||
# to update it automatically though by turning on this option:
|
||||
set autoupdate_cumulative_size false
|
||||
|
||||
# Turning this on makes sense for screen readers:
|
||||
set show_cursor false
|
||||
|
||||
# One of: size, natural, basename, atime, ctime, mtime, type, random
|
||||
set sort natural
|
||||
|
||||
# Additional sorting options
|
||||
set sort_reverse false
|
||||
set sort_case_insensitive true
|
||||
set sort_directories_first true
|
||||
set sort_unicode false
|
||||
|
||||
# Enable this if key combinations with the Alt Key don't work for you.
|
||||
# (Especially on xterm)
|
||||
set xterm_alt_key false
|
||||
|
||||
# Whether to include bookmarks in cd command
|
||||
set cd_bookmarks true
|
||||
|
||||
# Changes case sensitivity for the cd command tab completion
|
||||
set cd_tab_case sensitive
|
||||
|
||||
# Use fuzzy tab completion with the "cd" command. For example,
|
||||
# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
|
||||
set cd_tab_fuzzy false
|
||||
|
||||
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
|
||||
# disable this feature.
|
||||
set preview_max_size 0
|
||||
|
||||
# The key hint lists up to this size have their sublists expanded.
|
||||
# Otherwise the submaps are replaced with "...".
|
||||
set hint_collapse_threshold 10
|
||||
|
||||
# Add the highlighted file to the path in the titlebar
|
||||
set show_selection_in_titlebar true
|
||||
|
||||
# The delay that ranger idly waits for user input, in milliseconds, with a
|
||||
# resolution of 100ms. Lower delay reduces lag between directory updates but
|
||||
# increases CPU load.
|
||||
set idle_delay 2000
|
||||
|
||||
# When the metadata manager module looks for metadata, should it only look for
|
||||
# a ".metadata.json" file in the current directory, or do a deep search and
|
||||
# check all directories above the current one as well?
|
||||
set metadata_deep_search false
|
||||
|
||||
# Clear all existing filters when leaving a directory
|
||||
set clear_filters_on_dir_change false
|
||||
|
||||
# Disable displaying line numbers in main column.
|
||||
# Possible values: false, absolute, relative.
|
||||
set line_numbers false
|
||||
|
||||
# When line_numbers=relative show the absolute line number in the
|
||||
# current line.
|
||||
set relative_current_zero false
|
||||
|
||||
# Start line numbers from 1 instead of 0
|
||||
set one_indexed false
|
||||
|
||||
# Save tabs on exit
|
||||
set save_tabs_on_exit false
|
||||
|
||||
# Enable scroll wrapping - moving down while on the last item will wrap around to
|
||||
# the top and vice versa.
|
||||
set wrap_scroll false
|
||||
|
||||
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
|
||||
# directories, files and symlinks respectively.
|
||||
set global_inode_type_filter
|
||||
|
||||
# This setting allows to freeze the list of files to save I/O bandwidth. It
|
||||
# should be 'false' during start-up, but you can toggle it by pressing F.
|
||||
set freeze_files false
|
||||
|
||||
# Print file sizes in bytes instead of the default human-readable format.
|
||||
set size_in_bytes false
|
||||
|
||||
# Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
|
||||
# give a warning when you nest ranger in a subshell started by ranger.
|
||||
# Special value "error" makes the warning more visible.
|
||||
set nested_ranger_warning true
|
||||
|
||||
# ===================================================================
|
||||
# == Local Options
|
||||
# ===================================================================
|
||||
# You can set local options that only affect a single directory.
|
||||
|
||||
# Examples:
|
||||
# setlocal path=~/downloads sort mtime
|
||||
|
||||
# ===================================================================
|
||||
# == Command Aliases in the Console
|
||||
# ===================================================================
|
||||
|
||||
alias e edit
|
||||
alias q quit
|
||||
alias q! quit!
|
||||
alias qa quitall
|
||||
alias qa! quitall!
|
||||
alias qall quitall
|
||||
alias qall! quitall!
|
||||
alias setl setlocal
|
||||
|
||||
alias filter scout -prts
|
||||
alias find scout -aets
|
||||
alias mark scout -mr
|
||||
alias unmark scout -Mr
|
||||
alias search scout -rs
|
||||
alias search_inc scout -rts
|
||||
alias travel scout -aefklst
|
||||
|
||||
# ===================================================================
|
||||
# == Define keys for the browser
|
||||
# ===================================================================
|
||||
|
||||
# Basic
|
||||
map Q quitall
|
||||
map q quit
|
||||
copymap q ZZ ZQ
|
||||
|
||||
map R reload_cwd
|
||||
map F set freeze_files!
|
||||
map <C-r> reset
|
||||
map <C-l> redraw_window
|
||||
map <C-c> abort
|
||||
map <esc> change_mode normal
|
||||
map ~ set viewmode!
|
||||
|
||||
map i display_file
|
||||
map <A-j> scroll_preview 1
|
||||
map <A-k> scroll_preview -1
|
||||
map ? help
|
||||
map W display_log
|
||||
map w taskview_open
|
||||
map S shell $SHELL
|
||||
|
||||
map : console
|
||||
map ; console
|
||||
map ! console shell%space
|
||||
map @ console -p6 shell %%s
|
||||
map # console shell -p%space
|
||||
map s console shell%space
|
||||
map r chain draw_possible_programs; console open_with%space
|
||||
map f console find%space
|
||||
map cd console cd%space
|
||||
|
||||
map <C-p> chain console; eval fm.ui.console.history_move(-1)
|
||||
|
||||
# Change the line mode
|
||||
map Mf linemode filename
|
||||
map Mi linemode fileinfo
|
||||
map Mm linemode mtime
|
||||
map Mh linemode humanreadablemtime
|
||||
map Mp linemode permissions
|
||||
map Ms linemode sizemtime
|
||||
map MH linemode sizehumanreadablemtime
|
||||
map Mt linemode metatitle
|
||||
|
||||
# Tagging / Marking
|
||||
map t tag_toggle
|
||||
map ut tag_remove
|
||||
map "<any> tag_toggle tag=%any
|
||||
map <Space> mark_files toggle=True
|
||||
map v mark_files all=True toggle=True
|
||||
map uv mark_files all=True val=False
|
||||
map V toggle_visual_mode
|
||||
map uV toggle_visual_mode reverse=True
|
||||
|
||||
# For the nostalgics: Midnight Commander bindings
|
||||
map <F1> help
|
||||
map <F2> rename_append
|
||||
map <F3> display_file
|
||||
map <F4> edit
|
||||
map <F5> copy
|
||||
map <F6> cut
|
||||
map <F7> console mkdir%space
|
||||
map <F8> console delete
|
||||
#map <F8> console trash
|
||||
map <F10> exit
|
||||
|
||||
# In case you work on a keyboard with dvorak layout
|
||||
map <UP> move up=1
|
||||
map <DOWN> move down=1
|
||||
map <LEFT> move left=1
|
||||
map <RIGHT> move right=1
|
||||
map <HOME> move to=0
|
||||
map <END> move to=-1
|
||||
map <PAGEDOWN> move down=1 pages=True
|
||||
map <PAGEUP> move up=1 pages=True
|
||||
map <CR> move right=1
|
||||
#map <DELETE> console delete
|
||||
map <INSERT> console touch%space
|
||||
|
||||
# VIM-like
|
||||
copymap <UP> k
|
||||
copymap <DOWN> j
|
||||
copymap <LEFT> h
|
||||
copymap <RIGHT> l
|
||||
copymap <HOME> gg
|
||||
copymap <END> G
|
||||
copymap <PAGEDOWN> <C-F>
|
||||
copymap <PAGEUP> <C-B>
|
||||
|
||||
map J move down=0.5 pages=True
|
||||
map K move up=0.5 pages=True
|
||||
copymap J <C-D>
|
||||
copymap K <C-U>
|
||||
|
||||
# Jumping around
|
||||
map H history_go -1
|
||||
map L history_go 1
|
||||
map ] move_parent 1
|
||||
map [ move_parent -1
|
||||
map } traverse
|
||||
map { traverse_backwards
|
||||
map ) jump_non
|
||||
|
||||
map gh cd ~
|
||||
map ge cd /etc
|
||||
map gu cd /usr
|
||||
map gd cd /dev
|
||||
map gl cd -r .
|
||||
map gL cd -r %f
|
||||
map go cd /opt
|
||||
map gv cd /var
|
||||
map gm cd /media
|
||||
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
|
||||
map gM cd /mnt
|
||||
map gs cd /srv
|
||||
map gp cd /tmp
|
||||
map gr cd /
|
||||
map gR eval fm.cd(ranger.RANGERDIR)
|
||||
map g/ cd /
|
||||
map g? cd /usr/share/doc/ranger
|
||||
|
||||
# External Programs
|
||||
map E edit
|
||||
map du shell -p du --max-depth=1 -h --apparent-size
|
||||
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
|
||||
map yp yank path
|
||||
map yd yank dir
|
||||
map yn yank name
|
||||
map y. yank name_without_extension
|
||||
|
||||
# Filesystem Operations
|
||||
map = chmod
|
||||
|
||||
map cw console rename%space
|
||||
map a rename_append
|
||||
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
|
||||
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
|
||||
|
||||
map pp paste
|
||||
map po paste overwrite=True
|
||||
map pP paste append=True
|
||||
map pO paste overwrite=True append=True
|
||||
map pl paste_symlink relative=False
|
||||
map pL paste_symlink relative=True
|
||||
map phl paste_hardlink
|
||||
map pht paste_hardlinked_subtree
|
||||
map pd console paste dest=
|
||||
map p`<any> paste dest=%any_path
|
||||
map p'<any> paste dest=%any_path
|
||||
|
||||
map dD console delete
|
||||
map dT console trash
|
||||
|
||||
map dd cut
|
||||
map ud uncut
|
||||
map da cut mode=add
|
||||
map dr cut mode=remove
|
||||
map dt cut mode=toggle
|
||||
|
||||
map yy copy
|
||||
map uy uncut
|
||||
map ya copy mode=add
|
||||
map yr copy mode=remove
|
||||
map yt copy mode=toggle
|
||||
|
||||
# Temporary workarounds
|
||||
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
|
||||
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
|
||||
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
|
||||
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
|
||||
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
|
||||
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
|
||||
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
|
||||
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
|
||||
|
||||
# Searching
|
||||
map / console search%space
|
||||
map n search_next
|
||||
map N search_next forward=False
|
||||
map ct search_next order=tag
|
||||
map cs search_next order=size
|
||||
map ci search_next order=mimetype
|
||||
map cc search_next order=ctime
|
||||
map cm search_next order=mtime
|
||||
map ca search_next order=atime
|
||||
|
||||
# Tabs
|
||||
map <C-n> tab_new
|
||||
map <C-w> tab_close
|
||||
map <TAB> tab_move 1
|
||||
map <S-TAB> tab_move -1
|
||||
map <A-Right> tab_move 1
|
||||
map <A-Left> tab_move -1
|
||||
map gt tab_move 1
|
||||
map gT tab_move -1
|
||||
map gn tab_new
|
||||
map gc tab_close
|
||||
map uq tab_restore
|
||||
map <a-1> tab_open 1
|
||||
map <a-2> tab_open 2
|
||||
map <a-3> tab_open 3
|
||||
map <a-4> tab_open 4
|
||||
map <a-5> tab_open 5
|
||||
map <a-6> tab_open 6
|
||||
map <a-7> tab_open 7
|
||||
map <a-8> tab_open 8
|
||||
map <a-9> tab_open 9
|
||||
map <a-r> tab_shift 1
|
||||
map <a-l> tab_shift -1
|
||||
|
||||
# Sorting
|
||||
map or set sort_reverse!
|
||||
map oz set sort=random
|
||||
map os chain set sort=size; set sort_reverse=False
|
||||
map ob chain set sort=basename; set sort_reverse=False
|
||||
map on chain set sort=natural; set sort_reverse=False
|
||||
map om chain set sort=mtime; set sort_reverse=False
|
||||
map oc chain set sort=ctime; set sort_reverse=False
|
||||
map oa chain set sort=atime; set sort_reverse=False
|
||||
map ot chain set sort=type; set sort_reverse=False
|
||||
map oe chain set sort=extension; set sort_reverse=False
|
||||
|
||||
map oS chain set sort=size; set sort_reverse=True
|
||||
map oB chain set sort=basename; set sort_reverse=True
|
||||
map oN chain set sort=natural; set sort_reverse=True
|
||||
map oM chain set sort=mtime; set sort_reverse=True
|
||||
map oC chain set sort=ctime; set sort_reverse=True
|
||||
map oA chain set sort=atime; set sort_reverse=True
|
||||
map oT chain set sort=type; set sort_reverse=True
|
||||
map oE chain set sort=extension; set sort_reverse=True
|
||||
|
||||
map dc get_cumulative_size
|
||||
|
||||
# Settings
|
||||
map zc set collapse_preview!
|
||||
map zd set sort_directories_first!
|
||||
map zh set show_hidden!
|
||||
map <C-h> set show_hidden!
|
||||
copymap <C-h> <backspace>
|
||||
copymap <backspace> <backspace2>
|
||||
map zI set flushinput!
|
||||
map zi set preview_images!
|
||||
map zm set mouse_enabled!
|
||||
map zp set preview_files!
|
||||
map zP set preview_directories!
|
||||
map zs set sort_case_insensitive!
|
||||
map zu set autoupdate_cumulative_size!
|
||||
map zv set use_preview_script!
|
||||
map zf console filter%space
|
||||
copymap zf zz
|
||||
|
||||
# Filter stack
|
||||
map .d filter_stack add type d
|
||||
map .f filter_stack add type f
|
||||
map .l filter_stack add type l
|
||||
map .m console filter_stack add mime%space
|
||||
map .n console filter_stack add name%space
|
||||
map .# console filter_stack add hash%space
|
||||
map ." filter_stack add duplicate
|
||||
map .' filter_stack add unique
|
||||
map .| filter_stack add or
|
||||
map .& filter_stack add and
|
||||
map .! filter_stack add not
|
||||
map .r filter_stack rotate
|
||||
map .c filter_stack clear
|
||||
map .* filter_stack decompose
|
||||
map .p filter_stack pop
|
||||
map .. filter_stack show
|
||||
|
||||
# Bookmarks
|
||||
map `<any> enter_bookmark %any
|
||||
map '<any> enter_bookmark %any
|
||||
map m<any> set_bookmark %any
|
||||
map um<any> unset_bookmark %any
|
||||
|
||||
map m<bg> draw_bookmarks
|
||||
copymap m<bg> um<bg> `<bg> '<bg>
|
||||
|
||||
# Generate all the chmod bindings with some python help:
|
||||
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
|
||||
|
||||
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
|
||||
|
||||
# ===================================================================
|
||||
# == Define keys for the console
|
||||
# ===================================================================
|
||||
# Note: Unmapped keys are passed directly to the console.
|
||||
|
||||
# Basic
|
||||
cmap <tab> eval fm.ui.console.tab()
|
||||
cmap <s-tab> eval fm.ui.console.tab(-1)
|
||||
cmap <ESC> eval fm.ui.console.close()
|
||||
cmap <CR> eval fm.ui.console.execute()
|
||||
cmap <C-l> redraw_window
|
||||
|
||||
copycmap <ESC> <C-c>
|
||||
copycmap <CR> <C-j>
|
||||
|
||||
# Move around
|
||||
cmap <up> eval fm.ui.console.history_move(-1)
|
||||
cmap <down> eval fm.ui.console.history_move(1)
|
||||
cmap <left> eval fm.ui.console.move(left=1)
|
||||
cmap <right> eval fm.ui.console.move(right=1)
|
||||
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
|
||||
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
|
||||
cmap <a-b> eval fm.ui.console.move_word(left=1)
|
||||
cmap <a-f> eval fm.ui.console.move_word(right=1)
|
||||
|
||||
copycmap <a-b> <a-left>
|
||||
copycmap <a-f> <a-right>
|
||||
|
||||
# Line Editing
|
||||
cmap <backspace> eval fm.ui.console.delete(-1)
|
||||
cmap <delete> eval fm.ui.console.delete(0)
|
||||
cmap <C-w> eval fm.ui.console.delete_word()
|
||||
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
|
||||
cmap <C-k> eval fm.ui.console.delete_rest(1)
|
||||
cmap <C-u> eval fm.ui.console.delete_rest(-1)
|
||||
cmap <C-y> eval fm.ui.console.paste()
|
||||
|
||||
# And of course the emacs way
|
||||
copycmap <ESC> <C-g>
|
||||
copycmap <up> <C-p>
|
||||
copycmap <down> <C-n>
|
||||
copycmap <left> <C-b>
|
||||
copycmap <right> <C-f>
|
||||
copycmap <home> <C-a>
|
||||
copycmap <end> <C-e>
|
||||
copycmap <delete> <C-d>
|
||||
copycmap <backspace> <C-h>
|
||||
|
||||
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
|
||||
# and <backspace2> (code 127). To be sure, use both.
|
||||
copycmap <backspace> <backspace2>
|
||||
|
||||
# This special expression allows typing in numerals:
|
||||
cmap <allow_quantifiers> false
|
||||
|
||||
# ===================================================================
|
||||
# == Pager Keybindings
|
||||
# ===================================================================
|
||||
|
||||
# Movement
|
||||
pmap <down> pager_move down=1
|
||||
pmap <up> pager_move up=1
|
||||
pmap <left> pager_move left=4
|
||||
pmap <right> pager_move right=4
|
||||
pmap <home> pager_move to=0
|
||||
pmap <end> pager_move to=-1
|
||||
pmap <pagedown> pager_move down=1.0 pages=True
|
||||
pmap <pageup> pager_move up=1.0 pages=True
|
||||
pmap <C-d> pager_move down=0.5 pages=True
|
||||
pmap <C-u> pager_move up=0.5 pages=True
|
||||
|
||||
copypmap <UP> k <C-p>
|
||||
copypmap <DOWN> j <C-n> <CR>
|
||||
copypmap <LEFT> h
|
||||
copypmap <RIGHT> l
|
||||
copypmap <HOME> g
|
||||
copypmap <END> G
|
||||
copypmap <C-d> d
|
||||
copypmap <C-u> u
|
||||
copypmap <PAGEDOWN> n f <C-F> <Space>
|
||||
copypmap <PAGEUP> p b <C-B>
|
||||
|
||||
# Basic
|
||||
pmap <C-l> redraw_window
|
||||
pmap <ESC> pager_close
|
||||
copypmap <ESC> q Q i <F3>
|
||||
pmap E edit_file
|
||||
|
||||
# ===================================================================
|
||||
# == Taskview Keybindings
|
||||
# ===================================================================
|
||||
|
||||
# Movement
|
||||
tmap <up> taskview_move up=1
|
||||
tmap <down> taskview_move down=1
|
||||
tmap <home> taskview_move to=0
|
||||
tmap <end> taskview_move to=-1
|
||||
tmap <pagedown> taskview_move down=1.0 pages=True
|
||||
tmap <pageup> taskview_move up=1.0 pages=True
|
||||
tmap <C-d> taskview_move down=0.5 pages=True
|
||||
tmap <C-u> taskview_move up=0.5 pages=True
|
||||
|
||||
copytmap <UP> k <C-p>
|
||||
copytmap <DOWN> j <C-n> <CR>
|
||||
copytmap <HOME> g
|
||||
copytmap <END> G
|
||||
copytmap <C-u> u
|
||||
copytmap <PAGEDOWN> n f <C-F> <Space>
|
||||
copytmap <PAGEUP> p b <C-B>
|
||||
|
||||
# Changing priority and deleting tasks
|
||||
tmap J eval -q fm.ui.taskview.task_move(-1)
|
||||
tmap K eval -q fm.ui.taskview.task_move(0)
|
||||
tmap dd eval -q fm.ui.taskview.task_remove()
|
||||
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
|
||||
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
|
||||
tmap <delete> eval -q fm.ui.taskview.task_remove()
|
||||
|
||||
# Basic
|
||||
tmap <C-l> redraw_window
|
||||
tmap <ESC> taskview_close
|
||||
copytmap <ESC> q Q w <C-c>
|
|
@ -0,0 +1,284 @@
|
|||
# vim: ft=cfg
|
||||
#
|
||||
# This is the configuration file of "rifle", ranger's file executor/opener.
|
||||
# Each line consists of conditions and a command. For each line the conditions
|
||||
# are checked and if they are met, the respective command is run.
|
||||
#
|
||||
# Syntax:
|
||||
# <condition1> , <condition2> , ... = command
|
||||
#
|
||||
# The command can contain these environment variables:
|
||||
# $1-$9 | The n-th selected file
|
||||
# $@ | All selected files
|
||||
#
|
||||
# If you use the special command "ask", rifle will ask you what program to run.
|
||||
#
|
||||
# Prefixing a condition with "!" will negate its result.
|
||||
# These conditions are currently supported:
|
||||
# match <regexp> | The regexp matches $1
|
||||
# ext <regexp> | The regexp matches the extension of $1
|
||||
# mime <regexp> | The regexp matches the mime type of $1
|
||||
# name <regexp> | The regexp matches the basename of $1
|
||||
# path <regexp> | The regexp matches the absolute path of $1
|
||||
# has <program> | The program is installed (i.e. located in $PATH)
|
||||
# env <variable> | The environment variable "variable" is non-empty
|
||||
# file | $1 is a file
|
||||
# directory | $1 is a directory
|
||||
# number <n> | change the number of this command to n
|
||||
# terminal | stdin, stderr and stdout are connected to a terminal
|
||||
# X | A graphical environment is available (darwin, Xorg, or Wayland)
|
||||
#
|
||||
# There are also pseudo-conditions which have a "side effect":
|
||||
# flag <flags> | Change how the program is run. See below.
|
||||
# label <label> | Assign a label or name to the command so it can
|
||||
# | be started with :open_with <label> in ranger
|
||||
# | or `rifle -p <label>` in the standalone executable.
|
||||
# else | Always true.
|
||||
#
|
||||
# Flags are single characters which slightly transform the command:
|
||||
# f | Fork the program, make it run in the background.
|
||||
# | New command = setsid $command >& /dev/null &
|
||||
# r | Execute the command with root permissions
|
||||
# | New command = sudo $command
|
||||
# t | Run the program in a new terminal. If $TERMCMD is not defined,
|
||||
# | rifle will attempt to extract it from $TERM.
|
||||
# | New command = $TERMCMD -e $command
|
||||
# Note: The "New command" serves only as an illustration, the exact
|
||||
# implementation may differ.
|
||||
# Note: When using rifle in ranger, there is an additional flag "c" for
|
||||
# only running the current file even if you have marked multiple files.
|
||||
|
||||
#-------------------------------------------
|
||||
# Websites
|
||||
#-------------------------------------------
|
||||
# Rarely installed browsers get higher priority; It is assumed that if you
|
||||
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
|
||||
# other hand are often only installed as fallback browsers.
|
||||
ext x?html?, has surf, X, flag f = surf -- file://"$1"
|
||||
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
|
||||
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
|
||||
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
|
||||
ext x?html?, has dwb, X, flag f = dwb -- "$@"
|
||||
ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
|
||||
ext x?html?, has luakit, X, flag f = luakit -- "$@"
|
||||
ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
|
||||
ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
|
||||
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
|
||||
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
|
||||
ext x?html?, has midori, X, flag f = midori -- "$@"
|
||||
ext x?html?, has opera, X, flag f = opera -- "$@"
|
||||
ext x?html?, has firefox, X, flag f = firefox -- "$@"
|
||||
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
|
||||
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
|
||||
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
||||
ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
||||
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
||||
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
|
||||
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
|
||||
ext x?html?, has elinks, terminal = elinks "$@"
|
||||
ext x?html?, has links2, terminal = links2 "$@"
|
||||
ext x?html?, has links, terminal = links "$@"
|
||||
ext x?html?, has lynx, terminal = lynx -- "$@"
|
||||
ext x?html?, has w3m, terminal = w3m "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
# Define the "editor" for text files as first action
|
||||
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
|
||||
mime ^text, label pager = "$PAGER" -- "$@"
|
||||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
ext 1 = man "$1"
|
||||
ext s[wmf]c, has zsnes, X = zsnes "$1"
|
||||
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
|
||||
ext nes, has fceux, X = fceux "$1"
|
||||
ext exe = wine "$1"
|
||||
name ^[mM]akefile$ = make
|
||||
|
||||
#--------------------------------------------
|
||||
# Scripts
|
||||
#-------------------------------------------
|
||||
ext py = python -- "$1"
|
||||
ext pl = perl -- "$1"
|
||||
ext rb = ruby -- "$1"
|
||||
ext js = node -- "$1"
|
||||
ext sh = sh -- "$1"
|
||||
ext php = php -- "$1"
|
||||
|
||||
#--------------------------------------------
|
||||
# Audio without X
|
||||
#-------------------------------------------
|
||||
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
|
||||
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
|
||||
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
|
||||
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video/Audio with a GUI
|
||||
#-------------------------------------------
|
||||
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
|
||||
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv -- "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
|
||||
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
|
||||
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
|
||||
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
|
||||
mime ^video|audio, has totem, X, flag f = totem -- "$@"
|
||||
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video without X
|
||||
#-------------------------------------------
|
||||
mime ^video, terminal, !X, has mpv = mpv -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Documents
|
||||
#-------------------------------------------
|
||||
ext pdf, has llpp, X, flag f = llpp "$@"
|
||||
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
||||
ext pdf, has mupdf, X, flag f = mupdf "$@"
|
||||
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
|
||||
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
|
||||
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
|
||||
ext pdf, has evince, X, flag f = evince -- "$@"
|
||||
ext pdf, has atril, X, flag f = atril -- "$@"
|
||||
ext pdf, has okular, X, flag f = okular -- "$@"
|
||||
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
|
||||
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
|
||||
ext pdf, has open, X, flag f = open "$@"
|
||||
|
||||
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
|
||||
|
||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
|
||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
|
||||
|
||||
ext djvu, has zathura,X, flag f = zathura -- "$@"
|
||||
ext djvu, has evince, X, flag f = evince -- "$@"
|
||||
ext djvu, has atril, X, flag f = atril -- "$@"
|
||||
ext djvu, has djview, X, flag f = djview -- "$@"
|
||||
|
||||
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
ext epub, has zathura, X, flag f = zathura -- "$@"
|
||||
ext epub, has mupdf, X, flag f = mupdf -- "$@"
|
||||
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
|
||||
ext cbr, has zathura, X, flag f = zathura -- "$@"
|
||||
ext cbz, has zathura, X, flag f = zathura -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Images
|
||||
#-------------------------------------------
|
||||
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
||||
mime ^image/svg, has display, X, flag f = display -- "$@"
|
||||
|
||||
mime ^image, has imv, X, flag f = imv -- "$@"
|
||||
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
||||
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
||||
mime ^image, has feh, X, flag f = feh -- "$@"
|
||||
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
||||
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
||||
mime ^image, has eog, X, flag f = eog -- "$@"
|
||||
mime ^image, has eom, X, flag f = eom -- "$@"
|
||||
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
|
||||
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
|
||||
mime ^image, has gpicview, X, flag f = gpicview -- "$@"
|
||||
mime ^image, has gwenview, X, flag f = gwenview -- "$@"
|
||||
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
||||
ext xcf, X, flag f = gimp -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Archives
|
||||
#-------------------------------------------
|
||||
|
||||
# avoid password prompt by providing empty password
|
||||
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
|
||||
# This requires atool
|
||||
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
|
||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
|
||||
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
|
||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
|
||||
|
||||
# Listing and extracting archives without atool:
|
||||
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
|
||||
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
|
||||
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
|
||||
ext zip, has unzip = unzip -l "$1" | less
|
||||
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
|
||||
ext ace, has unace = unace l "$1" | less
|
||||
ext ace, has unace = for file in "$@"; do unace e "$file"; done
|
||||
ext rar, has unrar = unrar l "$1" | less
|
||||
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
|
||||
|
||||
#-------------------------------------------
|
||||
# Fonts
|
||||
#-------------------------------------------
|
||||
mime ^font, has fontforge, X, flag f = fontforge "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Flag t fallback terminals
|
||||
#-------------------------------------------
|
||||
# Rarely installed terminal emulators get higher priority; It is assumed that
|
||||
# if you install a rare terminal emulator, you probably use it.
|
||||
# gnome-terminal/konsole/xterm on the other hand are often installed as part of
|
||||
# a desktop environment or as fallback terminal emulators.
|
||||
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
|
||||
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@"
|
||||
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'
|
||||
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@"
|
||||
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@"
|
||||
mime ^ranger/x-terminal-emulator, has st = st -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@"
|
||||
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
|
||||
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
|
||||
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
|
||||
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
||||
|
||||
#-------------------------------------------
|
||||
# Generic file openers
|
||||
#-------------------------------------------
|
||||
label open, has xdg-open = xdg-open -- "$@"
|
||||
label open, has open = open -- "$@"
|
||||
|
||||
# Define the editor for non-text files + pager as last action
|
||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
|
||||
######################################################################
|
||||
# The actions below are left so low down in this file on purpose, so #
|
||||
# they are never triggered accidentally. #
|
||||
######################################################################
|
||||
|
||||
# Execute a file as program/script.
|
||||
mime application/x-executable = "$1"
|
||||
|
||||
# Move the file to trash using trash-cli.
|
||||
label trash, has trash-put = trash-put -- "$@"
|
||||
label trash = mkdir -p -- ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash; mv -- "$@" ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash
|
|
@ -0,0 +1,350 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o noclobber -o noglob -o nounset -o pipefail
|
||||
IFS=$'\n'
|
||||
|
||||
## If the option `use_preview_script` is set to `true`,
|
||||
## then this script will be called and its output will be displayed in ranger.
|
||||
## ANSI color codes are supported.
|
||||
## STDIN is disabled, so interactive scripts won't work properly
|
||||
|
||||
## This script is considered a configuration file and must be updated manually.
|
||||
## It will be left untouched if you upgrade ranger.
|
||||
|
||||
## Because of some automated testing we do on the script #'s for comments need
|
||||
## to be doubled up. Code that is commented out, because it's an alternative for
|
||||
## example, gets only one #.
|
||||
|
||||
## Meanings of exit codes:
|
||||
## code | meaning | action of ranger
|
||||
## -----+------------+-------------------------------------------
|
||||
## 0 | success | Display stdout as preview
|
||||
## 1 | no preview | Display no preview at all
|
||||
## 2 | plain text | Display the plain content of the file
|
||||
## 3 | fix width | Don't reload when width changes
|
||||
## 4 | fix height | Don't reload when height changes
|
||||
## 5 | fix both | Don't ever reload
|
||||
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
|
||||
## 7 | image | Display the file directly as an image
|
||||
|
||||
## Script arguments
|
||||
FILE_PATH="${1}" # Full path of the highlighted file
|
||||
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
|
||||
## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused
|
||||
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
|
||||
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
|
||||
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
|
||||
|
||||
FILE_EXTENSION="${FILE_PATH##*.}"
|
||||
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
## Settings
|
||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
||||
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
|
||||
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
|
||||
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
|
||||
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
|
||||
OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000}
|
||||
OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night}
|
||||
|
||||
handle_extension() {
|
||||
case "${FILE_EXTENSION_LOWER}" in
|
||||
## Archive
|
||||
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
||||
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
||||
atool --list -- "${FILE_PATH}" && exit 5
|
||||
bsdtar --list --file "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
rar)
|
||||
## Avoid password prompt by providing empty password
|
||||
unrar lt -p- -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
7z)
|
||||
## Avoid password prompt by providing empty password
|
||||
7z l -p -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## PDF
|
||||
pdf)
|
||||
## Preview as text conversion
|
||||
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | \
|
||||
fmt -w "${PV_WIDTH}" && exit 5
|
||||
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | \
|
||||
fmt -w "${PV_WIDTH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## BitTorrent
|
||||
torrent)
|
||||
transmission-show -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## OpenDocument
|
||||
odt|ods|odp|sxw)
|
||||
## Preview as text conversion
|
||||
odt2txt "${FILE_PATH}" && exit 5
|
||||
## Preview as markdown conversion
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## XLSX
|
||||
xlsx)
|
||||
## Preview as csv conversion
|
||||
## Uses: https://github.com/dilshod/xlsx2csv
|
||||
xlsx2csv -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## HTML
|
||||
htm|html|xhtml)
|
||||
## Preview as text conversion
|
||||
w3m -dump "${FILE_PATH}" && exit 5
|
||||
lynx -dump -- "${FILE_PATH}" && exit 5
|
||||
elinks -dump "${FILE_PATH}" && exit 5
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
;;
|
||||
|
||||
## JSON
|
||||
json)
|
||||
jq --color-output . "${FILE_PATH}" && exit 5
|
||||
python -m json.tool -- "${FILE_PATH}" && exit 5
|
||||
;;
|
||||
|
||||
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
|
||||
## by file(1).
|
||||
dff|dsf|wv|wvc)
|
||||
mediainfo "${FILE_PATH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
;; # Continue with next handler on failure
|
||||
esac
|
||||
}
|
||||
|
||||
handle_image() {
|
||||
## Size of the preview if there are multiple options or it has to be
|
||||
## rendered from vector graphics. If the conversion program allows
|
||||
## specifying only one dimension while keeping the aspect ratio, the width
|
||||
## will be used.
|
||||
local DEFAULT_SIZE="1920x1080"
|
||||
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
## SVG
|
||||
# image/svg+xml|image/svg)
|
||||
# convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## DjVu
|
||||
# image/vnd.djvu)
|
||||
# ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \
|
||||
# - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \
|
||||
# && exit 6 || exit 1;;
|
||||
|
||||
## Image
|
||||
image/*)
|
||||
local orientation
|
||||
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
|
||||
## If orientation data is present and the image actually
|
||||
## needs rotating ("1" means no rotation)...
|
||||
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
|
||||
## ...auto-rotate the image according to the EXIF data.
|
||||
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
|
||||
fi
|
||||
|
||||
## `w3mimgdisplay` will be called for all images (unless overriden
|
||||
## as above), but might fail for unsupported types.
|
||||
exit 7;;
|
||||
|
||||
## Video
|
||||
# video/*)
|
||||
# # Thumbnail
|
||||
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## PDF
|
||||
# application/pdf)
|
||||
# pdftoppm -f 1 -l 1 \
|
||||
# -scale-to-x "${DEFAULT_SIZE%x*}" \
|
||||
# -scale-to-y -1 \
|
||||
# -singlefile \
|
||||
# -jpeg -tiffcompression jpeg \
|
||||
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
||||
# && exit 6 || exit 1;;
|
||||
|
||||
|
||||
## ePub, MOBI, FB2 (using Calibre)
|
||||
# application/epub+zip|application/x-mobipocket-ebook|\
|
||||
# application/x-fictionbook+xml)
|
||||
# # ePub (using https://github.com/marianosimone/epub-thumbnailer)
|
||||
# epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \
|
||||
# "${DEFAULT_SIZE%x*}" && exit 6
|
||||
# ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \
|
||||
# >/dev/null && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## Font
|
||||
application/font*|application/*opentype)
|
||||
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
|
||||
if fontimage -o "${preview_png}" \
|
||||
--pixelsize "120" \
|
||||
--fontname \
|
||||
--pixelsize "80" \
|
||||
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
|
||||
--text " abcdefghijklmnopqrstuvwxyz " \
|
||||
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
|
||||
--text " The quick brown fox jumps over the lazy dog. " \
|
||||
"${FILE_PATH}";
|
||||
then
|
||||
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \
|
||||
&& rm "${preview_png}" \
|
||||
&& exit 6
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
## Preview archives using the first image inside.
|
||||
## (Very useful for comic book collections for example.)
|
||||
# application/zip|application/x-rar|application/x-7z-compressed|\
|
||||
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
|
||||
# local fn=""; local fe=""
|
||||
# local zip=""; local rar=""; local tar=""; local bsd=""
|
||||
# case "${mimetype}" in
|
||||
# application/zip) zip=1 ;;
|
||||
# application/x-rar) rar=1 ;;
|
||||
# application/x-7z-compressed) ;;
|
||||
# *) tar=1 ;;
|
||||
# esac
|
||||
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
|
||||
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
|
||||
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
|
||||
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
|
||||
#
|
||||
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
|
||||
# [ print(l, end='') for l in sys.stdin if \
|
||||
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
|
||||
# sort -V | head -n 1)
|
||||
# [ "$fn" = "" ] && return
|
||||
# [ "$bsd" ] && fn=$(printf '%b' "$fn")
|
||||
#
|
||||
# [ "$tar" ] && tar --extract --to-stdout \
|
||||
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
|
||||
# [ "$bsd" ] && bsdtar --extract --to-stdout \
|
||||
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
|
||||
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
|
||||
# "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
|
||||
# "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
|
||||
# ;;
|
||||
esac
|
||||
|
||||
# openscad_image() {
|
||||
# TMPPNG="$(mktemp -t XXXXXX.png)"
|
||||
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
|
||||
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
|
||||
# -o "${TMPPNG}" "${1}"
|
||||
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
|
||||
# }
|
||||
|
||||
# case "${FILE_EXTENSION_LOWER}" in
|
||||
# ## 3D models
|
||||
# ## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
|
||||
# ## is hardcoded as jpeg. So we make a tempfile.png and just
|
||||
# ## move/rename it to jpg. This works because image libraries are
|
||||
# ## smart enough to handle it.
|
||||
# csg|scad)
|
||||
# openscad_image "${FILE_PATH}" && exit 6
|
||||
# ;;
|
||||
# 3mf|amf|dxf|off|stl)
|
||||
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
|
||||
# ;;
|
||||
# esac
|
||||
}
|
||||
|
||||
handle_mime() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
## RTF and DOC
|
||||
text/rtf|*msword)
|
||||
## Preview as text conversion
|
||||
## note: catdoc does not always work for .doc files
|
||||
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
|
||||
catdoc -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## DOCX, ePub, FB2 (using markdown)
|
||||
## You might want to remove "|epub" and/or "|fb2" below if you have
|
||||
## uncommented other methods to preview those formats
|
||||
*wordprocessingml.document|*/epub+zip|*/x-fictionbook+xml)
|
||||
## Preview as markdown conversion
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## XLS
|
||||
*ms-excel)
|
||||
## Preview as csv conversion
|
||||
## xls2csv comes with catdoc:
|
||||
## http://www.wagner.pp.ru/~vitus/software/catdoc/
|
||||
xls2csv -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Text
|
||||
text/* | */xml)
|
||||
## Syntax highlight
|
||||
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
|
||||
exit 2
|
||||
fi
|
||||
if [[ "$( tput colors )" -ge 256 ]]; then
|
||||
local pygmentize_format='terminal256'
|
||||
local highlight_format='xterm256'
|
||||
else
|
||||
local pygmentize_format='terminal'
|
||||
local highlight_format='ansi'
|
||||
fi
|
||||
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
|
||||
--out-format="${highlight_format}" \
|
||||
--force -- "${FILE_PATH}" && exit 5
|
||||
env COLORTERM=8bit bat --color=always --style="plain" \
|
||||
-- "${FILE_PATH}" && exit 5
|
||||
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\
|
||||
-- "${FILE_PATH}" && exit 5
|
||||
exit 2;;
|
||||
|
||||
## DjVu
|
||||
image/vnd.djvu)
|
||||
## Preview as text conversion (requires djvulibre)
|
||||
djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Image
|
||||
image/*)
|
||||
## Preview as text conversion
|
||||
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Video and audio
|
||||
video/* | audio/*)
|
||||
mediainfo "${FILE_PATH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
handle_fallback() {
|
||||
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
||||
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
|
||||
handle_image "${MIMETYPE}"
|
||||
fi
|
||||
handle_extension
|
||||
handle_mime "${MIMETYPE}"
|
||||
handle_fallback
|
||||
|
||||
exit 1
|
|
@ -0,0 +1,290 @@
|
|||
! -*- mode: conf-xdefaults; -*-
|
||||
|
||||
! "Enabled modi" Set from: File
|
||||
rofi.modi: run,drun,window
|
||||
! "New style theme file" Set from: File
|
||||
rofi.theme: ~/.cache/wal/colors-rofi-light.rasi
|
||||
! "Font to use" Set from: Default
|
||||
rofi.font: Iosevka SS01 11
|
||||
|
||||
|
||||
! "Window width" Set from: Default
|
||||
! rofi.width: 50
|
||||
! "Number of lines" Set from: Default
|
||||
! rofi.lines: 15
|
||||
! "Number of columns" Set from: Default
|
||||
! rofi.columns: 1
|
||||
! "Border width" Set from: Default
|
||||
! rofi.bw: 1
|
||||
! "Location on screen" Set from: Default
|
||||
! rofi.location: 0
|
||||
! "Padding" Set from: Default
|
||||
! rofi.padding: 5
|
||||
! "Y-offset relative to location" Set from: Default
|
||||
! rofi.yoffset: 0
|
||||
! "X-offset relative to location" Set from: Default
|
||||
! rofi.xoffset: 0
|
||||
! "Always show number of lines" Set from: Default
|
||||
! rofi.fixed-num-lines: true
|
||||
! "Whether to load and show icons" Set from: Default
|
||||
! rofi.show-icons: false
|
||||
! "Terminal to use" Set from: Default
|
||||
! rofi.terminal: rofi-sensible-terminal
|
||||
! "Ssh client to use" Set from: Default
|
||||
! rofi.ssh-client: ssh
|
||||
! "Ssh command to execute" Set from: Default
|
||||
! rofi.ssh-command: {terminal} -e {ssh-client} {host} [-p {port}]
|
||||
! "Run command to execute" Set from: Default
|
||||
! rofi.run-command: {cmd}
|
||||
! "Command to get extra run targets" Set from: Default
|
||||
! rofi.run-list-command:
|
||||
! "Run command to execute that runs in shell" Set from: Default
|
||||
! rofi.run-shell-command: {terminal} -e {cmd}
|
||||
! "Command executed on accep-entry-custom for window modus" Set from: Default
|
||||
! rofi.window-command: wmctrl -i -R {window}
|
||||
! "Window fields to match in window mode" Set from: Default
|
||||
! rofi.window-match-fields: all
|
||||
! "Theme to use to look for icons" Set from: Default
|
||||
! rofi.icon-theme:
|
||||
! "Desktop entry fields to match in drun" Set from: Default
|
||||
! rofi.drun-match-fields: name,generic,exec,categories
|
||||
! "Desktop entry show actions." Set from: Default
|
||||
! rofi.drun-show-actions: false
|
||||
! "DRUN format string. (Supports: generic,name,comment,exec,categories)" Set from: Default
|
||||
! rofi.drun-display-format: {name} [<span weight='light' size='small'><i>({generic})</i></span>]
|
||||
! "Disable history in run/ssh" Set from: Default
|
||||
! rofi.disable-history: false
|
||||
! "Programs ignored for history" Set from: Default
|
||||
! rofi.ignored-prefixes:
|
||||
! "Use sorting" Set from: Default
|
||||
! rofi.sort: false
|
||||
! "Choose the strategy used for sorting: normal (levenshtein) or fzf." Set from: Default
|
||||
! rofi.sorting-method:
|
||||
! "Set case-sensitivity" Set from: Default
|
||||
! rofi.case-sensitive: false
|
||||
! "Cycle through the results list" Set from: Default
|
||||
! rofi.cycle: true
|
||||
! "Enable sidebar-mode" Set from: Default
|
||||
! rofi.sidebar-mode: false
|
||||
! "Row height (in chars)" Set from: Default
|
||||
! rofi.eh: 1
|
||||
! "Enable auto select mode" Set from: Default
|
||||
! rofi.auto-select: false
|
||||
! "Parse hosts file for ssh mode" Set from: Default
|
||||
! rofi.parse-hosts: false
|
||||
! "Parse known_hosts file for ssh mode" Set from: Default
|
||||
! rofi.parse-known-hosts: true
|
||||
! "Set the modi to combine in combi mode" Set from: Default
|
||||
! rofi.combi-modi: window,run
|
||||
! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Default
|
||||
! rofi.matching: normal
|
||||
! "Tokenize input string" Set from: Default
|
||||
! rofi.tokenize: true
|
||||
! "Monitor id to show on" Set from: Default
|
||||
! rofi.m: -5
|
||||
! "Margin between rows *DEPRECATED*" Set from: Default
|
||||
! rofi.line-margin: 2
|
||||
! "Padding within rows *DEPRECATED*" Set from: Default
|
||||
! rofi.line-padding: 1
|
||||
! "Pre-set filter" Set from: Default
|
||||
! rofi.filter:
|
||||
! "Separator style (none, dash, solid) *DEPRECATED*" Set from: Default
|
||||
! rofi.separator-style: dash
|
||||
! "Hide scroll-bar *DEPRECATED*" Set from: Default
|
||||
! rofi.hide-scrollbar: false
|
||||
! "Fullscreen" Set from: Default
|
||||
! rofi.fullscreen: false
|
||||
! "Fake transparency *DEPRECATED*" Set from: Default
|
||||
! rofi.fake-transparency: false
|
||||
! "DPI" Set from: Default
|
||||
! rofi.dpi: -1
|
||||
! "Threads to use for string matching" Set from: Default
|
||||
! rofi.threads: 0
|
||||
! "Scrollbar width *DEPRECATED*" Set from: Default
|
||||
! rofi.scrollbar-width: 8
|
||||
! "Scrolling method. (0: Page, 1: Centered)" Set from: Default
|
||||
! rofi.scroll-method: 0
|
||||
! "Background to use for fake transparency. (background or screenshot) *DEPRECATED*" Set from: Default
|
||||
! rofi.fake-background: screenshot
|
||||
! "Window Format. w (desktop name), t (title), n (name), r (role), c (class)" Set from: Default
|
||||
! rofi.window-format: {w} {c} {t}
|
||||
! "Click outside the window to exit" Set from: Default
|
||||
! rofi.click-to-exit: true
|
||||
! "Indicate how it match by underlining it." Set from: Default
|
||||
! rofi.show-match: true
|
||||
! "Color scheme for normal row" Set from: Default
|
||||
! rofi.color-normal:
|
||||
! "Color scheme for urgent row" Set from: Default
|
||||
! rofi.color-urgent:
|
||||
! "Color scheme for active row" Set from: Default
|
||||
! rofi.color-active:
|
||||
! "Color scheme window" Set from: Default
|
||||
! rofi.color-window:
|
||||
! "Max history size (WARNING: can cause slowdowns when set to high)." Set from: Default
|
||||
! rofi.max-history-size: 25
|
||||
! "Hide the prefix mode prefix on the combi view." Set from: Default
|
||||
! rofi.combi-hide-mode-prefix: false
|
||||
! "Set the character used to negate the matching. ('\0' to disable)" Set from: Default
|
||||
! rofi.matching-negate-char: -
|
||||
! "Directory where history and temporary files are stored." Set from: Default
|
||||
! rofi.cache-dir:
|
||||
! "Pidfile location" Set from: Default
|
||||
! rofi.pid: /run/user/1000/rofi.pid
|
||||
! "The display name of this browser" Set from: Default
|
||||
! rofi.display-window:
|
||||
! "The display name of this browser" Set from: Default
|
||||
! rofi.display-windowcd:
|
||||
! "The display name of this browser" Set from: Default
|
||||
! rofi.display-run:
|
||||
! "The display name of this browser" Set from: Default
|
||||
! rofi.display-ssh:
|
||||
! "The display name of this browser" Set from: Default
|
||||
! rofi.display-drun:
|
||||
! "The display name of this browser" Set from: Default
|
||||
! rofi.display-combi:
|
||||
! "The display name of this browser" Set from: Default
|
||||
! rofi.display-keys:
|
||||
! "Paste primary selection" Set from: Default
|
||||
! rofi.kb-primary-paste: Control+V,Shift+Insert
|
||||
! "Paste clipboard" Set from: Default
|
||||
! rofi.kb-secondary-paste: Control+v,Insert
|
||||
! "Clear input line" Set from: Default
|
||||
! rofi.kb-clear-line: Control+w
|
||||
! "Beginning of line" Set from: Default
|
||||
! rofi.kb-move-front: Control+a
|
||||
! "End of line" Set from: Default
|
||||
! rofi.kb-move-end: Control+e
|
||||
! "Move back one word" Set from: Default
|
||||
! rofi.kb-move-word-back: Alt+b,Control+Left
|
||||
! "Move forward one word" Set from: Default
|
||||
! rofi.kb-move-word-forward: Alt+f,Control+Right
|
||||
! "Move back one char" Set from: Default
|
||||
! rofi.kb-move-char-back: Left,Control+b
|
||||
! "Move forward one char" Set from: Default
|
||||
! rofi.kb-move-char-forward: Right,Control+f
|
||||
! "Delete previous word" Set from: Default
|
||||
! rofi.kb-remove-word-back: Control+Alt+h,Control+BackSpace
|
||||
! "Delete next word" Set from: Default
|
||||
! rofi.kb-remove-word-forward: Control+Alt+d
|
||||
! "Delete next char" Set from: Default
|
||||
! rofi.kb-remove-char-forward: Delete,Control+d
|
||||
! "Delete previous char" Set from: Default
|
||||
! rofi.kb-remove-char-back: BackSpace,Shift+BackSpace,Control+h
|
||||
! "Delete till the end of line" Set from: Default
|
||||
! rofi.kb-remove-to-eol: Control+k
|
||||
! "Delete till the start of line" Set from: Default
|
||||
! rofi.kb-remove-to-sol: Control+u
|
||||
! "Accept entry" Set from: Default
|
||||
! rofi.kb-accept-entry: Control+j,Control+m,Return,KP_Enter
|
||||
! "Use entered text as command (in ssh/run modi)" Set from: Default
|
||||
! rofi.kb-accept-custom: Control+Return
|
||||
! "Use alternate accept command." Set from: Default
|
||||
! rofi.kb-accept-alt: Shift+Return
|
||||
! "Delete entry from history" Set from: Default
|
||||
! rofi.kb-delete-entry: Shift+Delete
|
||||
! "Switch to the next mode." Set from: Default
|
||||
! rofi.kb-mode-next: Shift+Right,Control+Tab
|
||||
! "Switch to the previous mode." Set from: Default
|
||||
! rofi.kb-mode-previous: Shift+Left,Control+ISO_Left_Tab
|
||||
! "Go to the previous column" Set from: Default
|
||||
! rofi.kb-row-left: Control+Page_Up
|
||||
! "Go to the next column" Set from: Default
|
||||
! rofi.kb-row-right: Control+Page_Down
|
||||
! "Select previous entry" Set from: Default
|
||||
! rofi.kb-row-up: Up,Control+p,ISO_Left_Tab
|
||||
! "Select next entry" Set from: Default
|
||||
! rofi.kb-row-down: Down,Control+n
|
||||
! "Go to next row, if one left, accept it, if no left next mode." Set from: Default
|
||||
! rofi.kb-row-tab: Tab
|
||||
! "Go to the previous page" Set from: Default
|
||||
! rofi.kb-page-prev: Page_Up
|
||||
! "Go to the next page" Set from: Default
|
||||
! rofi.kb-page-next: Page_Down
|
||||
! "Go to the first entry" Set from: Default
|
||||
! rofi.kb-row-first: Home,KP_Home
|
||||
! "Go to the last entry" Set from: Default
|
||||
! rofi.kb-row-last: End,KP_End
|
||||
! "Set selected item as input text" Set from: Default
|
||||
! rofi.kb-row-select: Control+space
|
||||
! "Take a screenshot of the rofi window" Set from: Default
|
||||
! rofi.kb-screenshot: Alt+S
|
||||
! "Toggle between ellipsize modes for displayed data" Set from: Default
|
||||
! rofi.kb-ellipsize: Alt+period
|
||||
! "Toggle case sensitivity" Set from: Default
|
||||
! rofi.kb-toggle-case-sensitivity: grave,dead_grave
|
||||
! "Toggle sort" Set from: Default
|
||||
! rofi.kb-toggle-sort: Alt+grave
|
||||
! "Quit rofi" Set from: Default
|
||||
! rofi.kb-cancel: Escape,Control+g,Control+bracketleft
|
||||
! "Custom keybinding 1" Set from: Default
|
||||
! rofi.kb-custom-1: Alt+1
|
||||
! "Custom keybinding 2" Set from: Default
|
||||
! rofi.kb-custom-2: Alt+2
|
||||
! "Custom keybinding 3" Set from: Default
|
||||
! rofi.kb-custom-3: Alt+3
|
||||
! "Custom keybinding 4" Set from: Default
|
||||
! rofi.kb-custom-4: Alt+4
|
||||
! "Custom Keybinding 5" Set from: Default
|
||||
! rofi.kb-custom-5: Alt+5
|
||||
! "Custom keybinding 6" Set from: Default
|
||||
! rofi.kb-custom-6: Alt+6
|
||||
! "Custom Keybinding 7" Set from: Default
|
||||
! rofi.kb-custom-7: Alt+7
|
||||
! "Custom keybinding 8" Set from: Default
|
||||
! rofi.kb-custom-8: Alt+8
|
||||
! "Custom keybinding 9" Set from: Default
|
||||
! rofi.kb-custom-9: Alt+9
|
||||
! "Custom keybinding 10" Set from: Default
|
||||
! rofi.kb-custom-10: Alt+0
|
||||
! "Custom keybinding 11" Set from: Default
|
||||
! rofi.kb-custom-11: Alt+exclam
|
||||
! "Custom keybinding 12" Set from: Default
|
||||
! rofi.kb-custom-12: Alt+at
|
||||
! "Csutom keybinding 13" Set from: Default
|
||||
! rofi.kb-custom-13: Alt+numbersign
|
||||
! "Custom keybinding 14" Set from: Default
|
||||
! rofi.kb-custom-14: Alt+dollar
|
||||
! "Custom keybinding 15" Set from: Default
|
||||
! rofi.kb-custom-15: Alt+percent
|
||||
! "Custom keybinding 16" Set from: Default
|
||||
! rofi.kb-custom-16: Alt+dead_circumflex
|
||||
! "Custom keybinding 17" Set from: Default
|
||||
! rofi.kb-custom-17: Alt+ampersand
|
||||
! "Custom keybinding 18" Set from: Default
|
||||
! rofi.kb-custom-18: Alt+asterisk
|
||||
! "Custom Keybinding 19" Set from: Default
|
||||
! rofi.kb-custom-19: Alt+parenleft
|
||||
! "Select row 1" Set from: Default
|
||||
! rofi.kb-select-1: Super+1
|
||||
! "Select row 2" Set from: Default
|
||||
! rofi.kb-select-2: Super+2
|
||||
! "Select row 3" Set from: Default
|
||||
! rofi.kb-select-3: Super+3
|
||||
! "Select row 4" Set from: Default
|
||||
! rofi.kb-select-4: Super+4
|
||||
! "Select row 5" Set from: Default
|
||||
! rofi.kb-select-5: Super+5
|
||||
! "Select row 6" Set from: Default
|
||||
! rofi.kb-select-6: Super+6
|
||||
! "Select row 7" Set from: Default
|
||||
! rofi.kb-select-7: Super+7
|
||||
! "Select row 8" Set from: Default
|
||||
! rofi.kb-select-8: Super+8
|
||||
! "Select row 9" Set from: Default
|
||||
! rofi.kb-select-9: Super+9
|
||||
! "Select row 10" Set from: Default
|
||||
! rofi.kb-select-10: Super+0
|
||||
! "Go to the previous column" Set from: Default
|
||||
! rofi.ml-row-left: ScrollLeft
|
||||
! "Go to the next column" Set from: Default
|
||||
! rofi.ml-row-right: ScrollRight
|
||||
! "Select previous entry" Set from: Default
|
||||
! rofi.ml-row-up: ScrollUp
|
||||
! "Select next entry" Set from: Default
|
||||
! rofi.ml-row-down: ScrollDown
|
||||
! "Select hovered row" Set from: Default
|
||||
! rofi.me-select-entry: MousePrimary
|
||||
! "Accept hovered row" Set from: Default
|
||||
! rofi.me-accept-entry: MouseDPrimary
|
||||
! "Accept hovered row with custom action" Set from: Default
|
||||
! rofi.me-accept-custom: Control+MouseDPrimary
|
|
@ -0,0 +1,63 @@
|
|||
#!/usr/bin/zsh
|
||||
|
||||
#set -ex
|
||||
|
||||
zparseopts -a opts u
|
||||
|
||||
update_git_repo() {
|
||||
local repo=$1
|
||||
|
||||
cd $repo
|
||||
|
||||
git remote update
|
||||
|
||||
local=$(git rev-parse @)
|
||||
remote=$(git rev-parse @{u})
|
||||
if [[ $local = $remote ]]; then
|
||||
echo "Already up to date"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! (git diff-files --quiet --ignore-submodules -- && git diff-index --cached --quiet HEAD --ignore-submodules --); then
|
||||
echo "Saving uncommitted changes in $repo..."
|
||||
stash=$(git stash create "Uncommitted changes on box-update")
|
||||
git reset --hard HEAD
|
||||
fi
|
||||
|
||||
echo "Updating $repo..."
|
||||
git pull && git submodule update
|
||||
|
||||
if [[ -n "$stash" ]]; then
|
||||
echo "Reapplying saved changes..."
|
||||
git stash apply "$stash"
|
||||
fi
|
||||
}
|
||||
|
||||
if (( ${+opts[(r)-u]} )); then
|
||||
if which pacman &> /dev/null; then
|
||||
echo "Performing pacman system upgrade"
|
||||
echo "================================"
|
||||
sudo pacman -Syu
|
||||
elif which apt-get &> /dev/null; then
|
||||
echo "Performing apt-get system upgrade"
|
||||
echo "================================"
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
fi
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "Updating puppet configuration"
|
||||
echo "============================="
|
||||
update_git_repo /etc/box-config
|
||||
puppet_updated=$status
|
||||
|
||||
echo "\nUpdating dotfiles"
|
||||
echo "================="
|
||||
update_git_repo ~/.dotfiles
|
||||
|
||||
if (( $puppet_updated == 0 )); then
|
||||
echo "\nApplying updated puppet configuration"
|
||||
echo "====================================="
|
||||
box-config apply
|
||||
fi
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
emacsclient -c $*
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
emacs -Q -nw $*
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
git add .
|
||||
git ls-files --deleted -z | xargs -0r git rm
|
|
@ -0,0 +1,364 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
HELP = <<EOS
|
||||
git-wtf displays the state of your repository in a readable, easy-to-scan
|
||||
format. It's useful for getting a summary of how a branch relates to a remote
|
||||
server, and for wrangling many topic branches.
|
||||
|
||||
git-wtf can show you:
|
||||
- How a branch relates to the remote repo, if it's a tracking branch.
|
||||
- How a branch relates to integration branches, if it's a feature branch.
|
||||
- How a branch relates to the feature branches, if it's an integration
|
||||
branch.
|
||||
|
||||
git-wtf is best used before a git push, or between a git fetch and a git
|
||||
merge. Be sure to set color.ui to auto or yes for maximum viewing pleasure.
|
||||
EOS
|
||||
|
||||
KEY = <<EOS
|
||||
KEY:
|
||||
() branch only exists locally
|
||||
{} branch only exists on a remote repo
|
||||
[] branch exists locally and remotely
|
||||
|
||||
x merge occurs both locally and remotely
|
||||
~ merge occurs only locally
|
||||
(space) branch isn't merged in
|
||||
|
||||
(It's possible for merges to occur remotely and not locally, of course, but
|
||||
that's a less common case and git-wtf currently doesn't display anything
|
||||
special for it.)
|
||||
EOS
|
||||
|
||||
USAGE = <<EOS
|
||||
Usage: git wtf [branch+] [options]
|
||||
|
||||
If [branch] is not specified, git-wtf will use the current branch. The possible
|
||||
[options] are:
|
||||
|
||||
-l, --long include author info and date for each commit
|
||||
-a, --all show all branches across all remote repos, not just
|
||||
those from origin
|
||||
-A, --all-commits show all commits, not just the first 5
|
||||
-s, --short don't show commits
|
||||
-k, --key show key
|
||||
-r, --relations show relation to features / integration branches
|
||||
--dump-config print out current configuration and exit
|
||||
|
||||
git-wtf uses some heuristics to determine which branches are integration
|
||||
branches, and which are feature branches. (Specifically, it assumes the
|
||||
integration branches are named "master", "next" and "edge".) If it guesses
|
||||
incorrectly, you will have to create a .git-wtfrc file.
|
||||
|
||||
To start building a configuration file, run "git-wtf --dump-config >
|
||||
.git-wtfrc" and edit it. The config file is a YAML file that specifies the
|
||||
integration branches, any branches to ignore, and the max number of commits to
|
||||
display when --all-commits isn't used. git-wtf will look for a .git-wtfrc file
|
||||
starting in the current directory, and recursively up to the root.
|
||||
|
||||
IMPORTANT NOTE: all local branches referenced in .git-wtfrc must be prefixed
|
||||
with heads/, e.g. "heads/master". Remote branches must be of the form
|
||||
remotes/<remote>/<branch>.
|
||||
EOS
|
||||
|
||||
COPYRIGHT = <<EOS
|
||||
git-wtf Copyright 2008--2009 William Morgan <wmorgan at the masanjin dot nets>.
|
||||
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 can find the GNU General Public License at: http://www.gnu.org/licenses/
|
||||
EOS
|
||||
|
||||
require 'yaml'
|
||||
CONFIG_FN = ".git-wtfrc"
|
||||
|
||||
class Numeric; def pluralize s; "#{to_s} #{s}" + (self != 1 ? "s" : "") end end
|
||||
|
||||
if ARGV.delete("--help") || ARGV.delete("-h")
|
||||
puts USAGE
|
||||
exit
|
||||
end
|
||||
|
||||
## poor man's trollop
|
||||
$long = ARGV.delete("--long") || ARGV.delete("-l")
|
||||
$short = ARGV.delete("--short") || ARGV.delete("-s")
|
||||
$all = ARGV.delete("--all") || ARGV.delete("-a")
|
||||
$all_commits = ARGV.delete("--all-commits") || ARGV.delete("-A")
|
||||
$dump_config = ARGV.delete("--dump-config")
|
||||
$key = ARGV.delete("--key") || ARGV.delete("-k")
|
||||
$show_relations = ARGV.delete("--relations") || ARGV.delete("-r")
|
||||
ARGV.each { |a| abort "Error: unknown argument #{a}." if a =~ /^--/ }
|
||||
|
||||
## search up the path for a file
|
||||
def find_file fn
|
||||
while true
|
||||
return fn if File.exist? fn
|
||||
fn2 = File.join("..", fn)
|
||||
return nil if File.expand_path(fn2) == File.expand_path(fn)
|
||||
fn = fn2
|
||||
end
|
||||
end
|
||||
|
||||
want_color = `git config color.wtf`
|
||||
want_color = `git config color.ui` if want_color.empty?
|
||||
$color = case want_color.chomp
|
||||
when "true"; true
|
||||
when "auto"; $stdout.tty?
|
||||
end
|
||||
|
||||
def red s; $color ? "\033[31m#{s}\033[0m" : s end
|
||||
def green s; $color ? "\033[32m#{s}\033[0m" : s end
|
||||
def yellow s; $color ? "\033[33m#{s}\033[0m" : s end
|
||||
def cyan s; $color ? "\033[36m#{s}\033[0m" : s end
|
||||
def grey s; $color ? "\033[1;30m#{s}\033[0m" : s end
|
||||
def purple s; $color ? "\033[35m#{s}\033[0m" : s end
|
||||
|
||||
## the set of commits in 'to' that aren't in 'from'.
|
||||
## if empty, 'to' has been merged into 'from'.
|
||||
def commits_between from, to
|
||||
if $long
|
||||
`git log --pretty=format:"- %s [#{yellow "%h"}] (#{purple "%ae"}; %ar)" #{from}..#{to}`
|
||||
else
|
||||
`git log --pretty=format:"- %s [#{yellow "%h"}]" #{from}..#{to}`
|
||||
end.split(/[\r\n]+/)
|
||||
end
|
||||
|
||||
def show_commits commits, prefix=" "
|
||||
if commits.empty?
|
||||
puts "#{prefix} none"
|
||||
else
|
||||
max = $all_commits ? commits.size : $config["max_commits"]
|
||||
max -= 1 if max == commits.size - 1 # never show "and 1 more"
|
||||
commits[0 ... max].each { |c| puts "#{prefix}#{c}" }
|
||||
puts grey("#{prefix}... and #{commits.size - max} more (use -A to see all).") if commits.size > max
|
||||
end
|
||||
end
|
||||
|
||||
def ahead_behind_string ahead, behind
|
||||
[ahead.empty? ? nil : "#{ahead.size.pluralize 'commit'} ahead",
|
||||
behind.empty? ? nil : "#{behind.size.pluralize 'commit'} behind"].
|
||||
compact.join("; ")
|
||||
end
|
||||
|
||||
def widget merged_in, remote_only=false, local_only=false, local_only_merge=false
|
||||
left, right = case
|
||||
when remote_only; %w({ })
|
||||
when local_only; %w{( )}
|
||||
else %w([ ])
|
||||
end
|
||||
middle = case
|
||||
when merged_in && local_only_merge; green("~")
|
||||
when merged_in; green("x")
|
||||
else " "
|
||||
end
|
||||
print left, middle, right
|
||||
end
|
||||
|
||||
def show b
|
||||
have_both = b[:local_branch] && b[:remote_branch]
|
||||
|
||||
pushc, pullc, oosync = if have_both
|
||||
[x = commits_between(b[:remote_branch], b[:local_branch]),
|
||||
y = commits_between(b[:local_branch], b[:remote_branch]),
|
||||
!x.empty? && !y.empty?]
|
||||
end
|
||||
|
||||
if b[:local_branch]
|
||||
puts "Local branch: " + green(b[:local_branch].sub(/^heads\//, ""))
|
||||
|
||||
if have_both
|
||||
if pushc.empty?
|
||||
puts "#{widget true} in sync with remote"
|
||||
else
|
||||
action = oosync ? "push after rebase / merge" : "push"
|
||||
puts "#{widget false} NOT in sync with remote (you should #{action})"
|
||||
show_commits pushc unless $short
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if b[:remote_branch]
|
||||
puts "Remote branch: #{cyan b[:remote_branch]} (#{b[:remote_url]})"
|
||||
|
||||
if have_both
|
||||
if pullc.empty?
|
||||
puts "#{widget true} in sync with local"
|
||||
else
|
||||
action = pushc.empty? ? "merge" : "rebase / merge"
|
||||
puts "#{widget false} NOT in sync with local (you should #{action})"
|
||||
show_commits pullc unless $short
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
puts "\n#{red "WARNING"}: local and remote branches have diverged. A merge will occur unless you rebase." if oosync
|
||||
end
|
||||
|
||||
def show_relations b, all_branches
|
||||
ibs, fbs = all_branches.partition { |name, br| $config["integration-branches"].include?(br[:local_branch]) || $config["integration-branches"].include?(br[:remote_branch]) }
|
||||
if $config["integration-branches"].include? b[:local_branch]
|
||||
puts "\nFeature branches:" unless fbs.empty?
|
||||
fbs.each do |name, br|
|
||||
next if $config["ignore"].member?(br[:local_branch]) || $config["ignore"].member?(br[:remote_branch])
|
||||
next if br[:ignore]
|
||||
local_only = br[:remote_branch].nil?
|
||||
remote_only = br[:local_branch].nil?
|
||||
name = if local_only
|
||||
purple br[:name]
|
||||
elsif remote_only
|
||||
cyan br[:name]
|
||||
else
|
||||
green br[:name]
|
||||
end
|
||||
|
||||
## for remote_only branches, we'll compute wrt the remote branch head. otherwise, we'll
|
||||
## use the local branch head.
|
||||
head = remote_only ? br[:remote_branch] : br[:local_branch]
|
||||
|
||||
remote_ahead = b[:remote_branch] ? commits_between(b[:remote_branch], head) : []
|
||||
local_ahead = b[:local_branch] ? commits_between(b[:local_branch], head) : []
|
||||
|
||||
if local_ahead.empty? && remote_ahead.empty?
|
||||
puts "#{widget true, remote_only, local_only} #{name} #{local_only ? "(local-only) " : ""}is merged in"
|
||||
elsif local_ahead.empty?
|
||||
puts "#{widget true, remote_only, local_only, true} #{name} merged in (only locally)"
|
||||
else
|
||||
behind = commits_between head, (br[:local_branch] || br[:remote_branch])
|
||||
ahead = remote_only ? remote_ahead : local_ahead
|
||||
puts "#{widget false, remote_only, local_only} #{name} #{local_only ? "(local-only) " : ""}is NOT merged in (#{ahead_behind_string ahead, behind})"
|
||||
show_commits ahead unless $short
|
||||
end
|
||||
end
|
||||
else
|
||||
puts "\nIntegration branches:" unless ibs.empty? # unlikely
|
||||
ibs.sort_by { |v, br| v }.each do |v, br|
|
||||
next if $config["ignore"].member?(br[:local_branch]) || $config["ignore"].member?(br[:remote_branch])
|
||||
next if br[:ignore]
|
||||
local_only = br[:remote_branch].nil?
|
||||
remote_only = br[:local_branch].nil?
|
||||
name = remote_only ? cyan(br[:name]) : green(br[:name])
|
||||
|
||||
ahead = commits_between v, (b[:local_branch] || b[:remote_branch])
|
||||
if ahead.empty?
|
||||
puts "#{widget true, local_only} merged into #{name}"
|
||||
else
|
||||
#behind = commits_between b[:local_branch], v
|
||||
puts "#{widget false, local_only} NOT merged into #{name} (#{ahead.size.pluralize 'commit'} ahead)"
|
||||
show_commits ahead unless $short
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#### EXECUTION STARTS HERE ####
|
||||
|
||||
## find config file and load it
|
||||
$config = { "integration-branches" => %w(heads/master heads/next heads/edge), "ignore" => [], "max_commits" => 5 }.merge begin
|
||||
fn = find_file CONFIG_FN
|
||||
if fn && (h = YAML::load_file(fn)) # yaml turns empty files into false
|
||||
h["integration-branches"] ||= h["versions"] # support old nomenclature
|
||||
h
|
||||
else
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
||||
if $dump_config
|
||||
puts $config.to_yaml
|
||||
exit
|
||||
end
|
||||
|
||||
## first, index registered remotes
|
||||
remotes = `git config --get-regexp ^remote\.\*\.url`.split(/[\r\n]+/).inject({}) do |hash, l|
|
||||
l =~ /^remote\.(.+?)\.url (.+)$/ or next hash
|
||||
hash[$1] ||= $2
|
||||
hash
|
||||
end
|
||||
|
||||
## next, index followed branches
|
||||
branches = `git config --get-regexp ^branch\.`.split(/[\r\n]+/).inject({}) do |hash, l|
|
||||
case l
|
||||
when /branch\.(.*?)\.remote (.+)/
|
||||
name, remote = $1, $2
|
||||
|
||||
hash[name] ||= {}
|
||||
hash[name].merge! :remote => remote, :remote_url => remotes[remote]
|
||||
when /branch\.(.*?)\.merge ((refs\/)?heads\/)?(.+)/
|
||||
name, remote_branch = $1, $4
|
||||
hash[name] ||= {}
|
||||
hash[name].merge! :remote_mergepoint => remote_branch
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
## finally, index all branches
|
||||
remote_branches = {}
|
||||
`git show-ref`.split(/[\r\n]+/).each do |l|
|
||||
sha1, ref = l.chomp.split " refs/"
|
||||
|
||||
if ref =~ /^heads\/(.+)$/ # local branch
|
||||
name = $1
|
||||
next if name == "HEAD"
|
||||
branches[name] ||= {}
|
||||
branches[name].merge! :name => name, :local_branch => ref
|
||||
elsif ref =~ /^remotes\/(.+?)\/(.+)$/ # remote branch
|
||||
remote, name = $1, $2
|
||||
remote_branches["#{remote}/#{name}"] = true
|
||||
next if name == "HEAD"
|
||||
ignore = !($all || remote == "origin")
|
||||
|
||||
branch = name
|
||||
if branches[name] && branches[name][:remote] == remote
|
||||
# nothing
|
||||
else
|
||||
name = "#{remote}/#{branch}"
|
||||
end
|
||||
|
||||
branches[name] ||= {}
|
||||
branches[name].merge! :name => name, :remote => remote, :remote_branch => "#{remote}/#{branch}", :remote_url => remotes[remote], :ignore => ignore
|
||||
end
|
||||
end
|
||||
|
||||
## assemble remotes
|
||||
branches.each do |k, b|
|
||||
next unless b[:remote] && b[:remote_mergepoint]
|
||||
b[:remote_branch] = if b[:remote] == "."
|
||||
b[:remote_mergepoint]
|
||||
else
|
||||
t = "#{b[:remote]}/#{b[:remote_mergepoint]}"
|
||||
remote_branches[t] && t # only if it's still alive
|
||||
end
|
||||
end
|
||||
|
||||
show_dirty = ARGV.empty?
|
||||
targets = if ARGV.empty?
|
||||
[`git symbolic-ref HEAD`.chomp.sub(/^refs\/heads\//, "")]
|
||||
else
|
||||
ARGV.map { |x| x.sub(/^heads\//, "") }
|
||||
end.map { |t| branches[t] or abort "Error: can't find branch #{t.inspect}." }
|
||||
|
||||
targets.each do |t|
|
||||
show t
|
||||
show_relations t, branches if $show_relations || t[:remote_branch].nil?
|
||||
end
|
||||
|
||||
modified = show_dirty && `git ls-files -m` != ""
|
||||
uncommitted = show_dirty && `git diff-index --cached HEAD` != ""
|
||||
|
||||
if $key
|
||||
puts
|
||||
puts KEY
|
||||
end
|
||||
|
||||
puts if modified || uncommitted
|
||||
puts "#{red "NOTE"}: working directory contains modified files." if modified
|
||||
puts "#{red "NOTE"}: staging area contains staged but uncommitted files." if uncommitted
|
||||
|
||||
# the end!
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/zsh
|
||||
|
||||
keygrips=(24AA22419E75635219F844DEC275B4916FD5EFD8 5B90C11D639432D229FF8CBEAD80FA4040153C89 86016D70000B1A6908656866A5AB1DAE5204EF77)
|
||||
|
||||
for grip in $keygrips; do
|
||||
rm ~/.gnupg/private-keys-v1.d/${grip}.key
|
||||
done
|
||||
|
||||
gpg --card-status|grep card-no|head -1|cut -c 35-
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
foreach $fname (@ARGV) {
|
||||
$tags = `fgrep \\label $fname`;
|
||||
@tagsList = split('\n', $tags);
|
||||
foreach $tag (@tagsList) {
|
||||
$tag =~ /.*\\label{([^}]*)}/;
|
||||
$tagName = $1;
|
||||
print "$tagName\t$fname\t/label{$tagName}/\n";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
#!/usr/bin/perl
|
||||
# Author: Dimitri Antoniou <dimitri@risc2.aecom.yu.edu>
|
||||
# usage: ltags filename
|
||||
# handles: \label and \cite{ } with one or more arguments
|
||||
# fails if arguments of cite spread over more than one line
|
||||
# also searches in files that are \include or \input in the main file
|
||||
|
||||
# get main LaTeX source file from command line:
|
||||
$mainfile = shift;
|
||||
|
||||
# get names of included files and store them in an array
|
||||
open MAIN, $mainfile or die "$!" ;
|
||||
@mainfile=<MAIN>;
|
||||
@allsrcfiles = map{ /^\\(?:input|include){(.*?)}/ } @mainfile;
|
||||
unshift @allsrcfiles, $mainfile;
|
||||
|
||||
# loop over all source files
|
||||
for $srcfile (@allsrcfiles) {
|
||||
# if \input{fname} append .tex to fname
|
||||
unless ( $srcfile =~ m/\.tex/ ) { $srcfile = $srcfile . "\.tex" }
|
||||
open SRC, $srcfile or die "$!" ;
|
||||
# store contents of source file in array @texfile
|
||||
@texfile=<SRC>;
|
||||
|
||||
# store lines with \label and \cite (or \citeonline) in arrays
|
||||
@labelList = grep{ /\\label{/ } @texfile;
|
||||
@citeList = grep{ /\\(cite|citeonline){/ } @texfile;
|
||||
|
||||
# see if we use an external database; if yes, store its name in $bibfile
|
||||
($dbase) = grep{ /^\\bibliography{/ } @texfile;
|
||||
if ($dbase) {
|
||||
$dbase =~ m/\\bibliography{(.*?)}/;
|
||||
$bibfile = $1;
|
||||
}
|
||||
|
||||
# write \bibitem in tags file
|
||||
@mrefs=();
|
||||
@refs=();
|
||||
@multirefs=();
|
||||
foreach (@citeList) {
|
||||
while ( m/\\(?:cite|citeonline){(.*?)}/g ) {
|
||||
$refs = $1;
|
||||
# if \cite has more than one argument, split them:
|
||||
if ($refs =~ /,/) {
|
||||
@mrefs = split /,/, $refs;
|
||||
# there might be more than one \cite in a line:
|
||||
push (@multirefs, @mrefs);
|
||||
}
|
||||
else {
|
||||
@refs = ($refs);
|
||||
push (@multirefs, @refs);
|
||||
}
|
||||
}
|
||||
# in BibTeX, format is @ARTICLE{Name, }; in source file, \bibitem{Name}
|
||||
for $ref (@multirefs) {
|
||||
if ( $dbase ) {
|
||||
push @unsorttag, "$ref\t$bibfile\t/{$ref,/\n"
|
||||
}
|
||||
else {
|
||||
push @unsorttag, "$ref\t$srcfile\t/bibitem{$ref}/\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# write \label in tag file
|
||||
foreach (@labelList) {
|
||||
m/\\label{(.*?)}/;
|
||||
push @unsorttag, "$1\t$srcfile\t/label{$1}/\n";
|
||||
}
|
||||
}
|
||||
|
||||
# sort tag file; then, eliminate duplicates
|
||||
@sortedtag = sort @unsorttag;
|
||||
%seen = ();
|
||||
@uniqtag = grep { ! $seen{$_} ++ } @sortedtag;
|
||||
|
||||
open(TAGS, "> tags");
|
||||
print TAGS @uniqtag;
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
=begin rdoc
|
||||
Very simple (simplistic) script to convert VimOutliner files to
|
||||
Emacs org-mode.
|
||||
=end
|
||||
|
||||
require 'pp'
|
||||
|
||||
ARGF.each_line do |line|
|
||||
match = /^(\t*)(.*)$/.match(line)
|
||||
if match[2].start_with? ': ' # Text lines start with a colon
|
||||
puts match[2][2..-1]
|
||||
else # Everything else is a heading
|
||||
puts ('*' * match[1].length) + '* ' + match[2]
|
||||
end
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
mu cfind \
|
||||
| sed 's/\([^ ]\+@[^ ]\+\)$/<\1>/' \
|
||||
| rofi -multi-select -dmenu \
|
||||
| perl -pe 'chomp if eof' \
|
||||
| tr '\n' ',' \
|
||||
| xclip -selection clipboard
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
TMUX=$(which tmux)
|
||||
SESSION=default
|
||||
|
||||
$TMUX new-session -s $SESSION || $TMUX attach-session -t $SESSION
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
su -c 'pass show TUoS/RATS' jez
|
|
@ -0,0 +1,842 @@
|
|||
;; -*- mode: emacs-lisp; lexical-binding: t -*-
|
||||
;; This file is loaded by Spacemacs at startup.
|
||||
;; It must be stored in your home directory.
|
||||
|
||||
(defun dotspacemacs/layers ()
|
||||
"Layer configuration:
|
||||
This function should only modify configuration layer settings."
|
||||
(setq-default
|
||||
;; Base distribution to use. This is a layer contained in the directory
|
||||
;; `+distribution'. For now available distributions are `spacemacs-base'
|
||||
;; or `spacemacs'. (default 'spacemacs)
|
||||
dotspacemacs-distribution 'spacemacs
|
||||
|
||||
;; Lazy installation of layers (i.e. layers are installed only when a file
|
||||
;; with a supported type is opened). Possible values are `all', `unused'
|
||||
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
|
||||
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
|
||||
;; lazy install any layer that support lazy installation even the layers
|
||||
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
|
||||
;; installation feature and you have to explicitly list a layer in the
|
||||
;; variable `dotspacemacs-configuration-layers' to install it.
|
||||
;; (default 'unused)
|
||||
dotspacemacs-enable-lazy-installation 'unused
|
||||
|
||||
;; If non-nil then Spacemacs will ask for confirmation before installing
|
||||
;; a layer lazily. (default t)
|
||||
dotspacemacs-ask-for-lazy-installation t
|
||||
|
||||
;; List of additional paths where to look for configuration layers.
|
||||
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
|
||||
dotspacemacs-configuration-layer-path (list configuration-layer-private-directory)
|
||||
|
||||
;; List of configuration layers to load.
|
||||
dotspacemacs-configuration-layers
|
||||
'(
|
||||
(ivy :variables
|
||||
aw-keys (string-to-list "aoeuhtns")
|
||||
avy-keys aw-keys)
|
||||
|
||||
(colors :variables
|
||||
colors-colorize-identifiers 'variables)
|
||||
|
||||
helpful
|
||||
treemacs
|
||||
auto-completion
|
||||
spell-checking
|
||||
syntax-checking
|
||||
emoji
|
||||
git github
|
||||
(ranger :variables
|
||||
ranger-parent-depth 2)
|
||||
(shell :variables
|
||||
shell-default-height 30
|
||||
shell-default-position 'bottom
|
||||
shell-default-shell 'eshell)
|
||||
lsp
|
||||
(org :variables
|
||||
org-enable-reveal-js-support t
|
||||
org-enable-bootstrap-support t
|
||||
org-enable-org-journal-support t)
|
||||
org-agendas
|
||||
(markdown :variables
|
||||
markdown-list-indent-width 2
|
||||
markdown-asymmetric-header t)
|
||||
restructuredtext asciidoc
|
||||
pandoc
|
||||
pdf
|
||||
latex html csv json
|
||||
emacs-lisp python haskell rust
|
||||
c-c++ ruby yaml javascript ess
|
||||
tidalcycles
|
||||
windows-scripts
|
||||
nixos docker systemd ansible
|
||||
)
|
||||
;; List of additional packages that will be installed without being
|
||||
;; wrapped in a layer. If you need some configuration for these
|
||||
;; packages, then consider creating a layer. You can also put the
|
||||
;; configuration in `dotspacemacs/user-config'.
|
||||
;; To use a local version of a package, use the `:location' property:
|
||||
;; '(your-package :location "~/path/to/your-package/")
|
||||
;; Also include the dependencies as they will not be resolved automatically.
|
||||
dotspacemacs-additional-packages '(focus
|
||||
direnv
|
||||
wc-mode
|
||||
org-noter
|
||||
ox-reveal)
|
||||
;; A list of packages that cannot be updated.
|
||||
dotspacemacs-frozen-packages '()
|
||||
|
||||
;; A list of packages that will not be installed and loaded.
|
||||
dotspacemacs-excluded-packages '()
|
||||
|
||||
;; Defines the behaviour of Spacemacs when installing packages.
|
||||
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
|
||||
;; `used-only' installs only explicitly used packages and deletes any unused
|
||||
;; packages as well as their unused dependencies. `used-but-keep-unused'
|
||||
;; installs only the used packages but won't delete unused ones. `all'
|
||||
;; installs *all* packages supported by Spacemacs and never uninstalls them.
|
||||
;; (default is `used-only')
|
||||
dotspacemacs-install-packages 'used-only))
|
||||
|
||||
(defun dotspacemacs/init ()
|
||||
"Initialization:
|
||||
This function is called at the very beginning of Spacemacs startup,
|
||||
before layer configuration.
|
||||
It should only modify the values of Spacemacs settings."
|
||||
;; This setq-default sexp is an exhaustive list of all the supported
|
||||
;; spacemacs settings.
|
||||
(setq-default
|
||||
;; If non-nil then enable support for the portable dumper. You'll need
|
||||
;; to compile Emacs 27 from source following the instructions in file
|
||||
;; EXPERIMENTAL.org at to root of the git repository.
|
||||
;; (default nil)
|
||||
dotspacemacs-enable-emacs-pdumper nil
|
||||
|
||||
;; Name of executable file pointing to emacs 27+. This executable must be
|
||||
;; in your PATH.
|
||||
;; (default "emacs")
|
||||
dotspacemacs-emacs-pdumper-executable-file "emacs"
|
||||
|
||||
;; Name of the Spacemacs dump file. This is the file will be created by the
|
||||
;; portable dumper in the cache directory under dumps sub-directory.
|
||||
;; To load it when starting Emacs add the parameter `--dump-file'
|
||||
;; when invoking Emacs 27.1 executable on the command line, for instance:
|
||||
;; ./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp
|
||||
;; (default spacemacs-27.1.pdmp)
|
||||
dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version)
|
||||
|
||||
;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
|
||||
;; possible. Set it to nil if you have no way to use HTTPS in your
|
||||
;; environment, otherwise it is strongly recommended to let it set to t.
|
||||
;; This variable has no effect if Emacs is launched with the parameter
|
||||
;; `--insecure' which forces the value of this variable to nil.
|
||||
;; (default t)
|
||||
dotspacemacs-elpa-https t
|
||||
|
||||
;; Maximum allowed time in seconds to contact an ELPA repository.
|
||||
;; (default 5)
|
||||
dotspacemacs-elpa-timeout 5
|
||||
|
||||
;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
|
||||
;; This is an advanced option and should not be changed unless you suspect
|
||||
;; performance issues due to garbage collection operations.
|
||||
;; (default '(100000000 0.1))
|
||||
dotspacemacs-gc-cons '(100000000 0.1)
|
||||
|
||||
;; Set `read-process-output-max' when startup finishes.
|
||||
;; This defines how much data is read from a foreign process.
|
||||
;; Setting this >= 1 MB should increase performance for lsp servers
|
||||
;; in emacs 27.
|
||||
;; (default (* 1024 1024))
|
||||
dotspacemacs-read-process-output-max (* 1024 1024)
|
||||
|
||||
;; If non-nil then Spacelpa repository is the primary source to install
|
||||
;; a locked version of packages. If nil then Spacemacs will install the
|
||||
;; latest version of packages from MELPA. (default nil)
|
||||
dotspacemacs-use-spacelpa nil
|
||||
|
||||
;; If non-nil then verify the signature for downloaded Spacelpa archives.
|
||||
;; (default t)
|
||||
dotspacemacs-verify-spacelpa-archives t
|
||||
|
||||
;; If non-nil then spacemacs will check for updates at startup
|
||||
;; when the current branch is not `develop'. Note that checking for
|
||||
;; new versions works via git commands, thus it calls GitHub services
|
||||
;; whenever you start Emacs. (default nil)
|
||||
dotspacemacs-check-for-update nil
|
||||
|
||||
;; If non-nil, a form that evaluates to a package directory. For example, to
|
||||
;; use different package directories for different Emacs versions, set this
|
||||
;; to `emacs-version'. (default 'emacs-version)
|
||||
dotspacemacs-elpa-subdirectory 'emacs-version
|
||||
|
||||
;; One of `vim', `emacs' or `hybrid'.
|
||||
;; `hybrid' is like `vim' except that `insert state' is replaced by the
|
||||
;; `hybrid state' with `emacs' key bindings. The value can also be a list
|
||||
;; with `:variables' keyword (similar to layers). Check the editing styles
|
||||
;; section of the documentation for details on available variables.
|
||||
;; (default 'vim)
|
||||
dotspacemacs-editing-style 'vim
|
||||
|
||||
;; If non-nil show the version string in the Spacemacs buffer. It will
|
||||
;; appear as (spacemacs version)@(emacs version)
|
||||
;; (default t)
|
||||
dotspacemacs-startup-buffer-show-version t
|
||||
|
||||
;; Specify the startup banner. Default value is `official', it displays
|
||||
;; the official spacemacs logo. An integer value is the index of text
|
||||
;; banner, `random' chooses a random text banner in `core/banners'
|
||||
;; directory. A string value must be a path to an image format supported
|
||||
;; by your Emacs build.
|
||||
;; If the value is nil then no banner is displayed. (default 'official)
|
||||
dotspacemacs-startup-banner 'official
|
||||
|
||||
;; List of items to show in startup buffer or an association list of
|
||||
;; the form `(list-type . list-size)`. If nil then it is disabled.
|
||||
;; Possible values for list-type are:
|
||||
;; `recents' `bookmarks' `projects' `agenda' `todos'.
|
||||
;; List sizes may be nil, in which case
|
||||
;; `spacemacs-buffer-startup-lists-length' takes effect.
|
||||
dotspacemacs-startup-lists '((bookmarks . 5)
|
||||
(recents . 5)
|
||||
(projects . 7))
|
||||
|
||||
;; True if the home buffer should respond to resize events. (default t)
|
||||
dotspacemacs-startup-buffer-responsive t
|
||||
|
||||
;; Default major mode for a new empty buffer. Possible values are mode
|
||||
;; names such as `text-mode'; and `nil' to use Fundamental mode.
|
||||
;; (default `text-mode')
|
||||
dotspacemacs-new-empty-buffer-major-mode 'text-mode
|
||||
|
||||
;; Default major mode of the scratch buffer (default `text-mode')
|
||||
dotspacemacs-scratch-mode 'org-mode
|
||||
|
||||
dotspacemacs-initial-scratch-message "#+STARTUP: showall\n\n* Scratch\n\nUse this buffer for quick, throwaway notes\n\n#+begin_src emacs-lisp\n\n#+end_src"
|
||||
|
||||
;; List of themes, the first of the list is loaded when spacemacs starts.
|
||||
;; Press `SPC T n' to cycle to the next theme in the list (works great
|
||||
;; with 2 themes variants, one dark and one light)
|
||||
dotspacemacs-themes
|
||||
'(doom-molokai
|
||||
doom-one
|
||||
base16-darktooth
|
||||
base16-monokai
|
||||
base16-tomorrow-night
|
||||
base16-dracula
|
||||
base16-nord
|
||||
base16-grayscale-dark
|
||||
base16-grayscale-light
|
||||
base16-materia
|
||||
base16-gruvbox-dark-hard
|
||||
base16-gruvbox-light-hard
|
||||
base16-outrun-dark
|
||||
base16-atelier-savanna
|
||||
base16-solarized-dark
|
||||
solarized-dark
|
||||
base16-solarized-light
|
||||
solarized-light
|
||||
poet)
|
||||
|
||||
;; Set the theme for the Spaceline. Supported themes are `spacemacs',
|
||||
;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The
|
||||
;; first three are spaceline themes. `doom' is the doom-emacs mode-line.
|
||||
;; `vanilla' is default Emacs mode-line. `custom' is a user defined themes,
|
||||
;; refer to the DOCUMENTATION.org for more info on how to create your own
|
||||
;; spaceline theme. Value can be a symbol or list with additional properties.
|
||||
;; (default '(spacemacs :separator wave :separator-scale 1.5))
|
||||
dotspacemacs-mode-line-theme '(spacemacs :separator arrow)
|
||||
|
||||
;; If non-nil the cursor color matches the state color in GUI Emacs.
|
||||
;; (default t)
|
||||
dotspacemacs-colorize-cursor-according-to-state t
|
||||
|
||||
;; Default font or prioritized list of fonts.
|
||||
dotspacemacs-default-font
|
||||
(let* ((height (display-pixel-height))
|
||||
(font-size
|
||||
(cond ((<= height 720) 12.0)
|
||||
((<= height 1080) 13.0)
|
||||
(t 14.0))))
|
||||
`(("Iosevka" :size ,font-size :weight light)
|
||||
("Fira Code" :size ,font-size)
|
||||
("Fira Mono" :size ,font-size)
|
||||
("Consolas" :size ,font-size)))
|
||||
|
||||
;; The leader key (default "SPC")
|
||||
dotspacemacs-leader-key "SPC"
|
||||
|
||||
;; The key used for Emacs commands `M-x' (after pressing on the leader key).
|
||||
;; (default "SPC")
|
||||
dotspacemacs-emacs-command-key "SPC"
|
||||
|
||||
;; The key used for Vim Ex commands (default ":")
|
||||
dotspacemacs-ex-command-key ":"
|
||||
|
||||
;; The leader key accessible in `emacs state' and `insert state'
|
||||
;; (default "M-m")
|
||||
dotspacemacs-emacs-leader-key "M-m"
|
||||
|
||||
;; Major mode leader key is a shortcut key which is the equivalent of
|
||||
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
|
||||
dotspacemacs-major-mode-leader-key ","
|
||||
|
||||
;; Major mode leader key accessible in `emacs state' and `insert state'.
|
||||
;; (default "C-M-m" for terminal mode, "<M-return>" for GUI mode).
|
||||
;; Thus M-RET should work as leader key in both GUI and terminal modes.
|
||||
;; C-M-m also should work in terminal mode, but not in GUI mode.
|
||||
dotspacemacs-major-mode-emacs-leader-key (if window-system "<M-return>" "C-M-m")
|
||||
|
||||
;; These variables control whether separate commands are bound in the GUI to
|
||||
;; the key pairs `C-i', `TAB' and `C-m', `RET'.
|
||||
;; Setting it to a non-nil value, allows for separate commands under `C-i'
|
||||
;; and TAB or `C-m' and `RET'.
|
||||
;; In the terminal, these pairs are generally indistinguishable, so this only
|
||||
;; works in the GUI. (default nil)
|
||||
dotspacemacs-distinguish-gui-tab nil
|
||||
|
||||
;; Name of the default layout (default "Default")
|
||||
dotspacemacs-default-layout-name "Default"
|
||||
|
||||
;; If non-nil the default layout name is displayed in the mode-line.
|
||||
;; (default nil)
|
||||
dotspacemacs-display-default-layout t
|
||||
|
||||
;; If non-nil then the last auto saved layouts are resumed automatically upon
|
||||
;; start. (default nil)
|
||||
dotspacemacs-auto-resume-layouts nil
|
||||
|
||||
;; If non-nil, auto-generate layout name when creating new layouts. Only has
|
||||
;; effect when using the "jump to layout by number" commands. (default nil)
|
||||
dotspacemacs-auto-generate-layout-names nil
|
||||
|
||||
;; Size (in MB) above which spacemacs will prompt to open the large file
|
||||
;; literally to avoid performance issues. Opening a file literally means that
|
||||
;; no major mode or minor modes are active. (default is 1)
|
||||
dotspacemacs-large-file-size 1
|
||||
|
||||
;; Location where to auto-save files. Possible values are `original' to
|
||||
;; auto-save the file in-place, `cache' to auto-save the file to another
|
||||
;; file stored in the cache directory and `nil' to disable auto-saving.
|
||||
;; (default 'cache)
|
||||
dotspacemacs-auto-save-file-location 'cache
|
||||
|
||||
;; Maximum number of rollback slots to keep in the cache. (default 5)
|
||||
dotspacemacs-max-rollback-slots 5
|
||||
|
||||
;; If non-nil, the paste transient-state is enabled. While enabled, after you
|
||||
;; paste something, pressing `C-j' and `C-k' several times cycles through the
|
||||
;; elements in the `kill-ring'. (default nil)
|
||||
dotspacemacs-enable-paste-transient-state nil
|
||||
|
||||
;; Which-key delay in seconds. The which-key buffer is the popup listing
|
||||
;; the commands bound to the current keystroke sequence. (default 0.4)
|
||||
dotspacemacs-which-key-delay 0.4
|
||||
|
||||
;; Which-key frame position. Possible values are `right', `bottom' and
|
||||
;; `right-then-bottom'. right-then-bottom tries to display the frame to the
|
||||
;; right; if there is insufficient space it displays it at the bottom.
|
||||
;; (default 'bottom)
|
||||
dotspacemacs-which-key-position 'bottom
|
||||
|
||||
;; Control where `switch-to-buffer' displays the buffer. If nil,
|
||||
;; `switch-to-buffer' displays the buffer in the current window even if
|
||||
;; another same-purpose window is available. If non-nil, `switch-to-buffer'
|
||||
;; displays the buffer in a same-purpose window even if the buffer can be
|
||||
;; displayed in the current window. (default nil)
|
||||
dotspacemacs-switch-to-buffer-prefers-purpose nil
|
||||
|
||||
;; If non-nil a progress bar is displayed when spacemacs is loading. This
|
||||
;; may increase the boot time on some systems and emacs builds, set it to
|
||||
;; nil to boost the loading time. (default t)
|
||||
dotspacemacs-loading-progress-bar t
|
||||
|
||||
;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
|
||||
;; (Emacs 24.4+ only)
|
||||
dotspacemacs-fullscreen-at-startup nil
|
||||
|
||||
;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
|
||||
;; Use to disable fullscreen animations in OSX. (default nil)
|
||||
dotspacemacs-fullscreen-use-non-native nil
|
||||
|
||||
;; If non-nil the frame is maximized when Emacs starts up.
|
||||
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
|
||||
;; (default nil) (Emacs 24.4+ only)
|
||||
dotspacemacs-maximized-at-startup nil
|
||||
|
||||
;; If non-nil the frame is undecorated when Emacs starts up. Combine this
|
||||
;; variable with `dotspacemacs-maximized-at-startup' in OSX to obtain
|
||||
;; borderless fullscreen. (default nil)
|
||||
dotspacemacs-undecorated-at-startup nil
|
||||
|
||||
;; A value from the range (0..100), in increasing opacity, which describes
|
||||
;; the transparency level of a frame when it's active or selected.
|
||||
;; Transparency can be toggled through `toggle-transparency'. (default 90)
|
||||
dotspacemacs-active-transparency 90
|
||||
|
||||
;; A value from the range (0..100), in increasing opacity, which describes
|
||||
;; the transparency level of a frame when it's inactive or deselected.
|
||||
;; Transparency can be toggled through `toggle-transparency'. (default 90)
|
||||
dotspacemacs-inactive-transparency 90
|
||||
|
||||
;; If non-nil show the titles of transient states. (default t)
|
||||
dotspacemacs-show-transient-state-title t
|
||||
|
||||
;; If non-nil show the color guide hint for transient state keys. (default t)
|
||||
dotspacemacs-show-transient-state-color-guide t
|
||||
|
||||
;; If non-nil unicode symbols are displayed in the mode line.
|
||||
;; If you use Emacs as a daemon and wants unicode characters only in GUI set
|
||||
;; the value to quoted `display-graphic-p'. (default t)
|
||||
dotspacemacs-mode-line-unicode-symbols t
|
||||
|
||||
;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
|
||||
;; scrolling overrides the default behavior of Emacs which recenters point
|
||||
;; when it reaches the top or bottom of the screen. (default t)
|
||||
dotspacemacs-smooth-scrolling t
|
||||
|
||||
;; Control line numbers activation.
|
||||
;; If set to `t', `relative' or `visual' then line numbers are enabled in all
|
||||
;; `prog-mode' and `text-mode' derivatives. If set to `relative', line
|
||||
;; numbers are relative. If set to `visual', line numbers are also relative,
|
||||
;; but lines are only visual lines are counted. For example, folded lines
|
||||
;; will not be counted and wrapped lines are counted as multiple lines.
|
||||
;; This variable can also be set to a property list for finer control:
|
||||
;; '(:relative nil
|
||||
;; :visual nil
|
||||
;; :disabled-for-modes dired-mode
|
||||
;; doc-view-mode
|
||||
;; markdown-mode
|
||||
;; org-mode
|
||||
;; pdf-view-mode
|
||||
;; text-mode
|
||||
;; :size-limit-kb 1000)
|
||||
;; When used in a plist, `visual' takes precedence over `relative'.
|
||||
;; (default nil)
|
||||
dotspacemacs-line-numbers t
|
||||
|
||||
;; Code folding method. Possible values are `evil' and `origami'.
|
||||
;; (default 'evil)
|
||||
dotspacemacs-folding-method 'evil
|
||||
|
||||
;; If non-nil `smartparens-strict-mode' will be enabled in programming modes.
|
||||
;; (default nil)
|
||||
dotspacemacs-smartparens-strict-mode nil
|
||||
|
||||
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
|
||||
;; over any automatically added closing parenthesis, bracket, quote, etc...
|
||||
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
|
||||
dotspacemacs-smart-closing-parenthesis t
|
||||
|
||||
;; Select a scope to highlight delimiters. Possible values are `any',
|
||||
;; `current', `all' or `nil'. Default is `all' (highlight any scope and
|
||||
;; emphasis the current one). (default 'all)
|
||||
dotspacemacs-highlight-delimiters 'all
|
||||
|
||||
;; If non-nil, start an Emacs server if one is not already running.
|
||||
;; (default nil)
|
||||
dotspacemacs-enable-server t
|
||||
|
||||
;; Set the emacs server socket location.
|
||||
;; If nil, uses whatever the Emacs default is, otherwise a directory path
|
||||
;; like \"~/.emacs.d/server\". It has no effect if
|
||||
;; `dotspacemacs-enable-server' is nil.
|
||||
;; (default nil)
|
||||
dotspacemacs-server-socket-dir nil
|
||||
|
||||
;; If non-nil, advise quit functions to keep server open when quitting.
|
||||
;; (default nil)
|
||||
dotspacemacs-persistent-server nil
|
||||
|
||||
;; List of search tool executable names. Spacemacs uses the first installed
|
||||
;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'.
|
||||
;; (default '("rg" "ag" "pt" "ack" "grep"))
|
||||
dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
|
||||
|
||||
;; Format specification for setting the frame title.
|
||||
;; %a - the `abbreviated-file-name', or `buffer-name'
|
||||
;; %t - `projectile-project-name'
|
||||
;; %I - `invocation-name'
|
||||
;; %S - `system-name'
|
||||
;; %U - contents of $USER
|
||||
;; %b - buffer name
|
||||
;; %f - visited file name
|
||||
;; %F - frame name
|
||||
;; %s - process status
|
||||
;; %p - percent of buffer above top of window, or Top, Bot or All
|
||||
;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
|
||||
;; %m - mode name
|
||||
;; %n - Narrow if appropriate
|
||||
;; %z - mnemonics of buffer, terminal, and keyboard coding systems
|
||||
;; %Z - like %z, but including the end-of-line format
|
||||
;; (default "%I@%S")
|
||||
dotspacemacs-frame-title-format "%I@%S"
|
||||
|
||||
;; Format specification for setting the icon title format
|
||||
;; (default nil - same as frame-title-format)
|
||||
dotspacemacs-icon-title-format nil
|
||||
|
||||
;; Delete whitespace while saving buffer. Possible values are `all'
|
||||
;; to aggressively delete empty line and long sequences of whitespace,
|
||||
;; `trailing' to delete only the whitespace at end of lines, `changed' to
|
||||
;; delete only whitespace for changed lines or `nil' to disable cleanup.
|
||||
;; (default nil)
|
||||
dotspacemacs-whitespace-cleanup 'changed
|
||||
|
||||
;; If non nil activate `clean-aindent-mode' which tries to correct
|
||||
;; virtual indentation of simple modes. This can interfer with mode specific
|
||||
;; indent handling like has been reported for `go-mode'.
|
||||
;; If it does deactivate it here.
|
||||
;; (default t)
|
||||
dotspacemacs-use-clean-aindent-mode t
|
||||
|
||||
;; If non-nil shift your number row to match the entered keyboard layout
|
||||
;; (only in insert state). Currently supported keyboard layouts are:
|
||||
;; `qwerty-us', `qwertz-de' and `querty-ca-fr'.
|
||||
;; New layouts can be added in `spacemacs-editing' layer.
|
||||
;; (default nil)
|
||||
dotspacemacs-swap-number-row nil
|
||||
|
||||
;; Either nil or a number of seconds. If non-nil zone out after the specified
|
||||
;; number of seconds. (default nil)
|
||||
dotspacemacs-zone-out-when-idle nil
|
||||
|
||||
;; Run `spacemacs/prettify-org-buffer' when
|
||||
;; visiting README.org files of Spacemacs.
|
||||
;; (default nil)
|
||||
dotspacemacs-pretty-docs nil
|
||||
|
||||
;; If nil the home buffer shows the full path of agenda items
|
||||
;; and todos. If non nil only the file name is shown.
|
||||
dotspacemacs-home-shorten-agenda-source nil
|
||||
|
||||
vim-style-visual-feedback t))
|
||||
|
||||
(defun dotspacemacs/user-env ()
|
||||
"Environment variables setup.
|
||||
This function defines the environment variables for your Emacs session. By
|
||||
default it calls `spacemacs/load-spacemacs-env' which loads the environment
|
||||
variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'.
|
||||
See the header of this file for more information."
|
||||
(spacemacs/load-spacemacs-env))
|
||||
|
||||
(defun dotspacemacs/user-init ()
|
||||
"Initialization for user code:
|
||||
This function is called immediately after `dotspacemacs/init', before layer
|
||||
configuration.
|
||||
It is mostly for variables that should be set before packages are loaded.
|
||||
If you are unsure, try setting them in `dotspacemacs/user-config' first."
|
||||
(setq jc/dotfiles-dir (expand-file-name ".config/dotfiles" user-home-directory)
|
||||
jc/notes-dir (expand-file-name "Notes" user-home-directory)
|
||||
|
||||
configuration-layer-elpa-archives '(("melpa" . "melpa.org/packages/")
|
||||
("org" . "orgmode.org/elpa/")
|
||||
("gnu" . "elpa.gnu.org/packages/"))
|
||||
configuration-layer-private-directory (expand-file-name ".spacemacs.d/private" user-home-directory))
|
||||
(make-directory configuration-layer-private-directory t)
|
||||
|
||||
(when (equal (system-name) "WXLT203936")
|
||||
(setq url-proxy-services '(("no_proxy" . "bl\\.uk")
|
||||
("http" . "public-cache.bl.uk:3128")
|
||||
("https" . "public-cache.bl.uk:3128"))
|
||||
|
||||
spell-checking-enable-by-default nil
|
||||
|
||||
jc/notes-dir "f:/Notes")))
|
||||
|
||||
(defun dotspacemacs/user-load ()
|
||||
"Library to load while dumping.
|
||||
This function is called only while dumping Spacemacs configuration. You can
|
||||
`require' or `load' the libraries of your choice that will be included in the
|
||||
dump."
|
||||
)
|
||||
|
||||
(defun dotspacemacs/user-config ()
|
||||
"Configuration for user code:
|
||||
This function is called at the very end of Spacemacs startup, after layer
|
||||
configuration.
|
||||
Put your configuration code here, except for variables that should be set
|
||||
before packages are loaded."
|
||||
|
||||
(require 'org-protocol)
|
||||
|
||||
(setq org-directory jc/notes-dir
|
||||
jc/logbook-file (f-expand "logbook.org" jc/notes-dir))
|
||||
|
||||
(with-eval-after-load 'projectile
|
||||
(add-to-list 'projectile-globally-ignored-directories ".sync"))
|
||||
|
||||
(add-hook 'focus-out-hook (lambda () (evil-write-all nil)))
|
||||
|
||||
(add-hook 'markdown-mode-hook
|
||||
(lambda ()
|
||||
(local-set-key (kbd "<C-return>") 'markdown-insert-list-item)))
|
||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.org_archive\\'" . org-mode))
|
||||
|
||||
(setq jc/agenda-file-home (f-expand "Todo/todo-home.org" jc/notes-dir)
|
||||
jc/agenda-file-work (f-expand "Todo/todo-work.org" jc/notes-dir)
|
||||
|
||||
org-archive-location "%s_archive::datetree/"
|
||||
jc/agenda-file-home-archive (concat jc/agenda-file-home "_archive")
|
||||
jc/agenda-file-work-archive (concat jc/agenda-file-work "_archive")
|
||||
|
||||
jc/agenda-files-all (list jc/agenda-file-work jc/agenda-file-home)
|
||||
org-agenda-files jc/agenda-files-all
|
||||
|
||||
org-journal-dir (f-expand "Journal" jc/notes-dir)
|
||||
org-journal-file-type 'weekly
|
||||
org-journal-file-format "%Y/%Y-%m-%d.org"
|
||||
|
||||
org-refile-targets `((,jc/agenda-files-all . (:maxlevel . 3)))
|
||||
org-refile-use-outline-path nil
|
||||
|
||||
org-capture-templates
|
||||
'(("t" "Task" entry
|
||||
(file "/home/jez/Notes/Todo/inbox.org")
|
||||
"* TODO %?")
|
||||
("n" "Note" entry
|
||||
(file "/home/jez/Notes/Todo/inbox.org")
|
||||
"* %?")
|
||||
("l" "Logbook entry" entry
|
||||
(file+olp+datetree "/home/jez/Notes/Org/logbook.org")
|
||||
"* %?")
|
||||
("L" "Logbook entry (date prompt)" entry
|
||||
(file+olp+datetree "/home/jez/Notes/Org/logbook.org")
|
||||
"* %?"
|
||||
:time-prompt t))
|
||||
|
||||
org-enforce-todo-dependencies t
|
||||
org-agenda-dim-blocked-tasks t
|
||||
org-tags-exclude-from-inheritance '("track" "project")
|
||||
|
||||
org-brain-path (f-expand "Brain" jc/notes-dir)
|
||||
org-id-track-globally t
|
||||
|
||||
org-superstar-headline-bullets-list '("◉" "○" "●" "⋄" "►")
|
||||
org-superstar-item-bullet-alist '((?- . ?•)
|
||||
(?+ . ?▪)
|
||||
(?* . ?★))
|
||||
|
||||
org-super-agenda-groups
|
||||
'((:name "Future"
|
||||
:and (:todo t :scheduled future)
|
||||
:order 6)
|
||||
(:name "Active projects"
|
||||
:and (:todo t :children ("TODO" "COOL" "WARM" "HOT" "DOING"))
|
||||
:order 15)
|
||||
(:name "Waiting projects"
|
||||
:and (:todo t :children ("WAITING" "DELEGATED"))
|
||||
:order 14)
|
||||
(:name "On-hold projcts"
|
||||
:and (:todo t :children ("ONHOLD"))
|
||||
:todo "ONHOLD"
|
||||
:order 14)
|
||||
(:name "Stuck projects"
|
||||
:tag "project"
|
||||
:and (:todo t :children t)
|
||||
:order 13)
|
||||
(:name "Overdue"
|
||||
:and (:todo t :deadline past)
|
||||
:face (:foreground "red"))
|
||||
(:name "Due today"
|
||||
:and (:todo t :deadline today)
|
||||
:face (:foreground "orange"))
|
||||
(:name "Due tomorrow"
|
||||
:and (:todo t :deadline +2))
|
||||
(:name "Blocked"
|
||||
:and (:todo t :pred jc/agenda-line-blocked-p)
|
||||
:order 8)
|
||||
(:name "Doing (2)"
|
||||
:todo "DOING")
|
||||
(:name "Hot (3)"
|
||||
:todo "HOT")
|
||||
(:name "Warm (5)"
|
||||
:todo "WARM")
|
||||
(:name "Cool (8)"
|
||||
:todo "COOL")
|
||||
(:name "Backlog"
|
||||
:todo "TODO"
|
||||
:order 1)
|
||||
(:name "Waiting"
|
||||
:todo "WAITING"
|
||||
:order 2)
|
||||
(:name "Delegated"
|
||||
:todo "DELEGATED"
|
||||
:order 4)
|
||||
(:name "On hold"
|
||||
:todo "ONHOLD"
|
||||
:order 4))
|
||||
|
||||
org-ql-views
|
||||
`(("Working: Contexts"
|
||||
:title "Tasks by context"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (not (or (done) (todo "ONHOLD" "WAITING" "DELEGATED")) )
|
||||
(not (scheduled :from tomorrow))
|
||||
(tags "email" "phone" "online"))
|
||||
:sort todo
|
||||
:super-groups ((:auto-tags t)))
|
||||
("Working: Kanban"
|
||||
:title "Kanban"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo "DOING" "HOT" "WARM" "COOL" "TODO")
|
||||
(not (or (scheduled :from tomorrow)
|
||||
(property "Project" "t")
|
||||
(children))))
|
||||
:super-groups org-super-agenda-groups)
|
||||
("Working: Focus"
|
||||
:title "Focus"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo "DOING" "HOT")
|
||||
(not (or (scheduled :from tomorrow)
|
||||
(property "Project" "t")
|
||||
(children))))
|
||||
:super-groups org-super-agenda-groups)
|
||||
("Working: People agendas"
|
||||
:title "Agendas"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo "DELEGATED" "WAITING" "DISCUSS")
|
||||
(tags "BM" "RK" "TR"))
|
||||
:super-groups ((:auto-tags t)))
|
||||
("Process: Inbox"
|
||||
:buffers-files ,(f-expand "Todo/inbox.org" jc/notes-dir))
|
||||
("Review: Recently closed"
|
||||
:title "Closed in the last 2 weeks"
|
||||
:buffers-files ,(list jc/agenda-file-work jc/agenda-file-work-archive)
|
||||
:query (closed :from -14)
|
||||
:super-groups ((:auto-ts t)))
|
||||
("Review: Stuck projects"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo)
|
||||
(or (tags "project")
|
||||
(children))
|
||||
(not (children (not (done))))))
|
||||
("Review: Strategic areas"
|
||||
:buffers-files org-agenda-files
|
||||
:query (property "Track")
|
||||
:super-groups ((:name "Progressing"
|
||||
:order 5
|
||||
:children ("TODO" "COOL" "WARM" "HOT" "DOING"))
|
||||
(:name "Discussion needed"
|
||||
:order 4
|
||||
:children ("DISCUSS"))
|
||||
(:name "Waiting"
|
||||
:order 10
|
||||
:children ("WAITING" "DELEGATED"))
|
||||
(:name "On hold"
|
||||
:order 10
|
||||
:children ("ONHOLD"))
|
||||
(:name "Stalled"
|
||||
:order 0
|
||||
:anything t))))
|
||||
|
||||
org-journal-dir (f-expand "Journal" jc/notes-dir)
|
||||
org-journal-file-type 'weekly
|
||||
)
|
||||
|
||||
(spacemacs/set-leader-keys-for-major-mode 'org-mode
|
||||
"TAB" 'org-cycle-agenda-files)
|
||||
|
||||
(define-minor-mode writing-mode
|
||||
"Preferred writing setup"
|
||||
:lighter " wr"
|
||||
|
||||
(if writing-mode
|
||||
(writing-mode-on)
|
||||
(writing-mode-off)))
|
||||
|
||||
(defun writing-mode-on ()
|
||||
(text-scale-set 2)
|
||||
(writeroom-mode 1)
|
||||
(display-line-numbers-mode 0)
|
||||
(focus-mode 1)
|
||||
(centered-cursor-mode 1))
|
||||
|
||||
(defun writing-mode-off ()
|
||||
(text-scale-set 0)
|
||||
(writeroom-mode 0)
|
||||
(display-line-numbers-mode 1)
|
||||
(focus-mode 0)
|
||||
(centered-cursor-mode 0))
|
||||
|
||||
(setq focus-mode-to-thing '((prog-mode . defun)
|
||||
(text-mode . paragraph)))
|
||||
(spacemacs/set-leader-keys
|
||||
"t C-f" #'focus-mode
|
||||
"t R" #'writing-mode
|
||||
|
||||
"j b" #'org-brain-visualize)
|
||||
|
||||
(spacemacs/toggle-visual-line-navigation-globally-on)
|
||||
|
||||
(defun jc/fix-python-date (str)
|
||||
(replace-regexp-in-string "\\([+-][0-9][0-9]\\)\\([0-9][0-9]\\)"
|
||||
"\\1:\\2"
|
||||
str))
|
||||
|
||||
(defun jc/update-post-date ()
|
||||
(interactive)
|
||||
(save-mark-and-excursion
|
||||
(goto-char (point-min))
|
||||
(re-search-forward "^date: ")
|
||||
(kill-line)
|
||||
(insert (jc/fix-python-date (format-time-string "%FT%T%z")))))
|
||||
|
||||
(add-hook 'org-mode-hook #'org-indent-mode)
|
||||
|
||||
(defun jc/agenda-line-blocked-p (item)
|
||||
(get-text-property 0 'org-todo-blocked item))
|
||||
|
||||
(spacemacs/declare-prefix "o" "custom")
|
||||
|
||||
(defmacro jc/org-ql-view-command (name)
|
||||
`(lambda () (interactive)
|
||||
(org-ql-view ,name)))
|
||||
|
||||
(spacemacs/set-leader-keys
|
||||
"oc" 'org-capture
|
||||
"ot" 'org-todo-list
|
||||
"oq" 'org-ql-view
|
||||
"ok" (jc/org-ql-view-command "Working: Kanban")
|
||||
"of" (jc/org-ql-view-command "Working: Focus")
|
||||
|
||||
"&" 'async-shell-command
|
||||
)
|
||||
|
||||
(direnv-mode 1)
|
||||
|
||||
; Fix git-gutter+ errors with tramp incompatibility
|
||||
(with-eval-after-load 'git-gutter+
|
||||
(defun git-gutter+-remote-default-directory (dir file)
|
||||
(let* ((vec (tramp-dissect-file-name file))
|
||||
(method (tramp-file-name-method vec))
|
||||
(user (tramp-file-name-user vec))
|
||||
(domain (tramp-file-name-domain vec))
|
||||
(host (tramp-file-name-host vec))
|
||||
(port (tramp-file-name-port vec)))
|
||||
(tramp-make-tramp-file-name method user domain host port dir)))
|
||||
|
||||
(defun git-gutter+-remote-file-path (dir file)
|
||||
(let ((file (tramp-file-name-localname (tramp-dissect-file-name file))))
|
||||
(replace-regexp-in-string (concat "\\`" dir) "" file))))
|
||||
|
||||
(evil-set-initial-state 'org-brain-visualize-mode 'emacs)
|
||||
(add-hook 'org-capture-mode-hook 'evil-insert-state t)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
|
||||
(setq web-mode-enable-engine-detection t)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("Pipfile\\'" . toml-mode)))
|
||||
|
||||
(defun dotspacemacs/emacs-custom-settings ()
|
||||
"Emacs custom settings.
|
||||
This is an auto-generated function, do not modify its content directly, use
|
||||
Emacs customize menu instead.
|
||||
This function is called at the very end of Spacemacs initialization."
|
||||
(setq custom-file (f-expand "custom.el" configuration-layer-private-directory))
|
||||
(unless (f-file? custom-file)
|
||||
(f-touch custom-file))
|
||||
(load custom-file)
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
/custom.el
|
|
@ -0,0 +1,21 @@
|
|||
# Private directory
|
||||
|
||||
The content of this directory is ignored by Git. This is the default place
|
||||
where to store your private configuration layers.
|
||||
|
||||
To create a new configuration layer:
|
||||
|
||||
SPC SPC configuration-layer/create-layer RET
|
||||
|
||||
Then enter the name of your configuration in the prompt.
|
||||
|
||||
A directory named after the created configuration layer will be created here
|
||||
along with template files within it (packages.el and extensions.el, more info
|
||||
on the meaning of those files can be found in the [documentation][conf_layers]).
|
||||
|
||||
Each created file has further guidance written in them.
|
||||
|
||||
Once the configuration is done, restart Emacs to load, install and configure
|
||||
your layer.
|
||||
|
||||
[conf_layers]: https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#extensions-and-packages
|
|
@ -0,0 +1,6 @@
|
|||
# Private directory for local packages
|
||||
|
||||
The content of this directory is ignored by Git.
|
||||
|
||||
This is the place to store the local packages that you define in
|
||||
the `dotspacemacs-additional-packages` variable of your dotfile.
|
|
@ -0,0 +1 @@
|
|||
(configuration-layer/declare-layer 'org)
|
|
@ -0,0 +1,75 @@
|
|||
;;; packages.el --- org-agendas layer packages file for Spacemacs.
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Jez Cope <jez@erwin>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; See the Spacemacs documentation and FAQs for instructions on how to implement
|
||||
;; a new layer:
|
||||
;;
|
||||
;; SPC h SPC layers RET
|
||||
;;
|
||||
;;
|
||||
;; Briefly, each package to be installed or configured by this layer should be
|
||||
;; added to `org-agendas-packages'. Then, for each package PACKAGE:
|
||||
;;
|
||||
;; - If PACKAGE is not referenced by any other Spacemacs layer, define a
|
||||
;; function `org-agendas/init-PACKAGE' to load and initialize the package.
|
||||
|
||||
;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so
|
||||
;; define the functions `org-agendas/pre-init-PACKAGE' and/or
|
||||
;; `org-agendas/post-init-PACKAGE' to customize the package as it is loaded.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defconst org-agendas-packages
|
||||
'(org-ql org-super-agenda org-sidebar)
|
||||
"The list of Lisp packages required by the org-agendas layer.
|
||||
|
||||
Each entry is either:
|
||||
|
||||
1. A symbol, which is interpreted as a package to be installed, or
|
||||
|
||||
2. A list of the form (PACKAGE KEYS...), where PACKAGE is the
|
||||
name of the package to be installed or loaded, and KEYS are
|
||||
any number of keyword-value-pairs.
|
||||
|
||||
The following keys are accepted:
|
||||
|
||||
- :excluded (t or nil): Prevent the package from being loaded
|
||||
if value is non-nil
|
||||
|
||||
- :location: Specify a custom installation location.
|
||||
The following values are legal:
|
||||
|
||||
- The symbol `elpa' (default) means PACKAGE will be
|
||||
installed using the Emacs package manager.
|
||||
|
||||
- The symbol `local' directs Spacemacs to load the file at
|
||||
`./local/PACKAGE/PACKAGE.el'
|
||||
|
||||
- A list beginning with the symbol `recipe' is a melpa
|
||||
recipe. See: https://github.com/milkypostman/melpa#recipe-format")
|
||||
|
||||
(defun org-agendas/init-org-ql ()
|
||||
(use-package org-ql
|
||||
:defer t))
|
||||
|
||||
(defun org-agendas/init-org-super-agenda ()
|
||||
(use-package org-super-agenda
|
||||
:defer t
|
||||
:init (with-eval-after-load 'org-agenda
|
||||
(org-super-agenda-mode 1))))
|
||||
|
||||
(defun org-agendas/init-org-sidebar ()
|
||||
(use-package org-sidebar
|
||||
:defer t))
|
||||
|
||||
;;; packages.el ends here
|
|
@ -0,0 +1,6 @@
|
|||
# Private directory for Yasnippets snippets
|
||||
|
||||
The content of this directory is ignored by Git. This is the default place
|
||||
where to store your private yasnippets.
|
||||
|
||||
This path will be loaded automatically and used whenever Yasnippets loads.
|
|
@ -0,0 +1,9 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: el-get github recipe
|
||||
# key: rcp
|
||||
# --
|
||||
(:name ${1:name}
|
||||
:description "$2"
|
||||
:website "$3"
|
||||
:type github
|
||||
:pkgname "${4:user/repo}")
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Date/Time stamp
|
||||
# key: _dts
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
`(format-time-string "%c")`
|
|
@ -0,0 +1,4 @@
|
|||
# key: mx:
|
||||
# name: matrix.to link
|
||||
# --
|
||||
https://matrix.to/#/
|
|
@ -0,0 +1 @@
|
|||
markdown-mode
|
|
@ -0,0 +1 @@
|
|||
text-mode
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: block
|
||||
# key: block
|
||||
# --
|
||||
\begin{block}{${1:Block title}}
|
||||
$0
|
||||
\end{block}
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Beamer column
|
||||
# --
|
||||
\begin{column}{${1:width}}
|
||||
$0
|
||||
\end{column}
|
|
@ -0,0 +1,10 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Beamer columns
|
||||
# --
|
||||
\begin{columns}
|
||||
|
||||
\begin{column}{${1:width}}
|
||||
$0
|
||||
\end{column}
|
||||
|
||||
\end{columns}
|
|
@ -0,0 +1,10 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Beamer frame
|
||||
# --
|
||||
\begin{frame} %===============================================================
|
||||
\frametitle{${1:Title}}${2:
|
||||
\framesubtitle{${3:Subtitle}}}
|
||||
|
||||
$0
|
||||
|
||||
\end{frame}
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: LaTeX itemize
|
||||
# key: it
|
||||
# --
|
||||
\begin{itemize}
|
||||
\item $0
|
||||
\end{itemize}
|
|
@ -0,0 +1 @@
|
|||
text-mode
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: NOTE
|
||||
# key: N
|
||||
# --
|
||||
***NOTE: $1***$0
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: TODO
|
||||
# key: T
|
||||
# --
|
||||
***TODO${1:$(when (> (length yas-text) 0) ": ")}$1***$0
|
|
@ -0,0 +1,16 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Blog post metadata
|
||||
# key: postmeta
|
||||
# expand-env: ((yas-indent-line 'fixed))
|
||||
# --
|
||||
---
|
||||
title: "${1:Title}"
|
||||
description: "${2:Description}"
|
||||
slug: ${3:${1:$(replace-regexp-in-string "[^a-z0-9]+" "-" (downcase yas-text))}}
|
||||
date: ${4:`(replace-regexp-in-string "\\([+-][[:digit:]][[:digit:]]\\)\\([[:digit:]][[:digit:]]\\)" "\\1:\\2" (format-time-string "%FT%T%z"))`}
|
||||
type: post
|
||||
tags:
|
||||
- $5
|
||||
---
|
||||
|
||||
$0
|
|
@ -0,0 +1,81 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: ProjectLite definition (markdown)
|
||||
# key: projectlite
|
||||
# --
|
||||
---
|
||||
title: $1
|
||||
subtitle: Project Definition
|
||||
author: ${2:Jez Cope}
|
||||
---
|
||||
|
||||
Version: 1
|
||||
Date: ${3:`(format-time-string "%e %b %Y")`}
|
||||
|
||||
$0This project is about changing this by looking at that and doing the
|
||||
other.
|
||||
|
||||
## Project Outline ##
|
||||
|
||||
### Background and Why the Project Needs Doing ###
|
||||
|
||||
Something or other isn’t working well and so-and-so asked us to sort it
|
||||
out.
|
||||
|
||||
### Scope ###
|
||||
|
||||
- We’ll be doing this for so-and-so.
|
||||
- We won’t be doing that.
|
||||
|
||||
### Objectives ###
|
||||
|
||||
- Produce a widget.
|
||||
- Train the users in using it.
|
||||
|
||||
### Strategy ###
|
||||
|
||||
1. The team will discuss with users what they’d like, and review what
|
||||
is available off the shelf.
|
||||
2. We’ll then agree exactly what we’re going to deliver.
|
||||
3. CiCS will then do whatever and the users will test it.
|
||||
4. The users will sort out how their processes will need to change and
|
||||
we’ll all agree a time for go-live.
|
||||
|
||||
### Costs ###
|
||||
|
||||
The software is likely to be open source but we’ll probably need a
|
||||
server, though a virtual server may do.
|
||||
|
||||
### Concerns and Risks ###
|
||||
|
||||
This project depends on some other thing being completed on time.
|
||||
|
||||
The suppliers are unreliable.
|
||||
|
||||
There is a deadline of whenever and timescales are tight. If necessary
|
||||
we can drop whatever and maybe pick it up after go-live.
|
||||
|
||||
## Who is Involved ##
|
||||
|
||||
Sponsor:
|
||||
|
||||
Project Manager:
|
||||
|
||||
Customers:
|
||||
|
||||
Technical:
|
||||
|
||||
Roll-out:
|
||||
|
||||
Other interested parties:
|
||||
|
||||
## Project Schedule ##
|
||||
|
||||
| Phase | Start | End | Done? | Resource needs |
|
||||
|-----------------------------------------------+-------+-----+-------+----------------|
|
||||
| 1\. Review the state of play and agree a spec | | | | |
|
||||
| 2\. Do the work | | | | |
|
||||
| 3\. Create documentation | | | | |
|
||||
| 4\. Rollout and handover | | | | |
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: SWC/DC - page metadata
|
||||
# key: swc
|
||||
# --
|
||||
---
|
||||
layout: page
|
||||
title: ${1:Discussion}
|
||||
permalink: ${3:/${2:discuss}/}
|
||||
---
|
||||
$0
|
|
@ -0,0 +1,16 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: SWC/DC - section metadata
|
||||
# key: swc
|
||||
# --
|
||||
---
|
||||
title: "${1:Title of the section}"
|
||||
teaching: ${2:Time in minutes}
|
||||
exercises: ${3:Time in minutes}
|
||||
questions:
|
||||
- "${4:TODO: add questions}"
|
||||
objectives:
|
||||
- "${5:TODO: add objectives}"
|
||||
keypoints:
|
||||
- "${6:TODO: add key points}"
|
||||
---
|
||||
$0
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: TODO: citation
|
||||
# key: T
|
||||
# --
|
||||
***TODO: ${1:citation - } $2***$0
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Wikipedia link
|
||||
# key: wp
|
||||
# --
|
||||
[${1:Wikipedia topic}](http://en.wikipedia.org/wiki/${1:$(url-hexify-string (replace-regexp-in-string " " "_" yas-text))})
|
|
@ -0,0 +1 @@
|
|||
text-mode
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Leaving Sheffield
|
||||
# key: Leaving
|
||||
# --
|
||||
I will be leaving the University of Sheffield on 9 November to start a new job as Research Data Lead at the British Library in Boston Spa.
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: All the best
|
||||
# key: atb
|
||||
# --
|
||||
All the best,
|
||||
Jez
|
|
@ -0,0 +1,5 @@
|
|||
# name: Best wishes
|
||||
# key: bw
|
||||
# --
|
||||
Best wishes,
|
||||
Jez
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Cheers
|
||||
# key: ch
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
Cheers,
|
||||
Jez
|
|
@ -0,0 +1,9 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Done
|
||||
# key: done
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
Done.${ :\)}
|
||||
|
||||
Cheers,
|
||||
Jez
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: For reference
|
||||
# key: fr
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
For reference.
|
||||
|
||||
Jez
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Email introduction 1
|
||||
# key: intro
|
||||
# --
|
||||
My name is Jez Cope, and I'm the University's Research Data Manager,
|
||||
based in the library. In brief, my role is to help researchers to look
|
||||
after their data, archive and share it appropriately, including
|
||||
compliance with funder policies on data management.
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Regards
|
||||
# key: reg
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
Regards,
|
||||
Jez
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Thanks for getting in touch
|
||||
# key: tfgit
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
Hi ${1:name}, thanks for getting in touch.
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Brief thanks message
|
||||
# key: ta
|
||||
# --
|
||||
Thanks${ PERSON}, that's great.
|
||||
|
||||
Cheers,
|
||||
Jez
|
|
@ -0,0 +1 @@
|
|||
text-mode
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Generic org-mode block
|
||||
# key: <b
|
||||
# --
|
||||
#+BEGIN_${1:info}
|
||||
$0
|
||||
#+END_$1
|
|
@ -0,0 +1,5 @@
|
|||
# key: frag
|
||||
# name: org-reveal fragment
|
||||
# --
|
||||
#+ATTR_REVEAL: :frag ${1:t}
|
||||
$0
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: package declaration
|
||||
# key: package
|
||||
# --
|
||||
package { '$1':
|
||||
ensure => ${2:installed},
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Gemfile template
|
||||
# key: gemfile
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
source '${1:https://rubygems.org}'
|
||||
|
||||
gem '${2:thor}'${3:, '~>${4:0.19.1}'}
|
||||
$0
|
|
@ -0,0 +1,4 @@
|
|||
# key: debug
|
||||
# name: println!("{:?}", value);
|
||||
# --
|
||||
println!("{:?}", $0);
|
|
@ -0,0 +1,13 @@
|
|||
# key: systemd
|
||||
# name: systemd service unit
|
||||
# --
|
||||
[Unit]
|
||||
Description=$1
|
||||
|
||||
[Service]
|
||||
Type=${2:oneshot}
|
||||
ExecStart=$3
|
||||
WorkingDirectory=$4
|
||||
|
||||
[Install]
|
||||
WantedBy=${5:default.target}
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: FontAwesome icon
|
||||
# key: fa
|
||||
# --
|
||||
<i class="fa fa-$1" aria-hidden="true"></i>$0
|
|
@ -0,0 +1,4 @@
|
|||
# key: key
|
||||
# name: 「Key」
|
||||
# --
|
||||
「${1:K}」$0
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: YAML front matter for nanoc
|
||||
# key: yfm
|
||||
# --
|
||||
---
|
||||
$0
|
||||
---
|
|
@ -0,0 +1,10 @@
|
|||
# key: pkg
|
||||
# name: Install package
|
||||
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil))# key: pkg
|
||||
# name: Install package
|
||||
# expand-env: ((yas-indent-line (quote fixed)) (yas-wrap-around-region (quote nil)))
|
||||
# --
|
||||
- name: ${1:install ${2:...}}
|
||||
${3:apt}: pkg=${4:{{ item }}} state=${5:latest}${6: more options}
|
||||
${7:with_items:
|
||||
- }
|
|
@ -0,0 +1,6 @@
|
|||
# Private directory for Yatemplate templates
|
||||
|
||||
The content of this directory is ignored by Git. This is the default place
|
||||
where to store your private templates.
|
||||
|
||||
This path will be loaded automatically and used whenever Yatemplate loads.
|
|
@ -0,0 +1,355 @@
|
|||
# Default config for sway
|
||||
#
|
||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Variables
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod4
|
||||
|
||||
# Home row direction keys, like vim
|
||||
set $lt h
|
||||
set $dn t
|
||||
set $up n
|
||||
set $rt s
|
||||
|
||||
# Your preferred terminal emulator
|
||||
set $term kitty --single-instance
|
||||
set $initial_term kitty --session ~/.config/kitty/sessions/default.conf
|
||||
set $tmux_attach kitty --session ~/.config/kitty/sessions/tmux.conf
|
||||
|
||||
# Your preferred application launcher
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
# set $menu dmenu_path | bemenu | xargs swaymsg exec --
|
||||
# set $menu wofi -D drun-print_command=true --show drun | sed 's/%[uU]//g' | xargs swaymsg exec --
|
||||
set $menu wofi --show drun
|
||||
|
||||
set $volinc 5
|
||||
set $media_ppse playerctl play-pause
|
||||
set $media_next playerctl next
|
||||
set $media_prev playerctl prev
|
||||
set $media_stop playerctl stop
|
||||
set $media_volu pamixer --increase 5
|
||||
set $media_vold pamixer --decrease 5
|
||||
|
||||
set $lock_timeout 300
|
||||
set $doff_timeout 600
|
||||
|
||||
set $bg_image ~/Pictures/Wallpapers/Unsplash/ales-krivec-n4rF9mEEzNg-unsplash.jpg
|
||||
set $lock_image $bg_image
|
||||
set $bg_normal $bg_image fill
|
||||
set $bg_boring #444444 solid_color
|
||||
|
||||
output * bg $bg_normal
|
||||
gaps inner 16
|
||||
# gaps outer 8
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
|
||||
set $output_main 'Samsung Electric Company C27JG5x H4ZMA00132'
|
||||
set $output_alt 'Unknown HP E233 CNC7500L7Q'
|
||||
|
||||
output $output_main {
|
||||
resolution 2560x1440@144Hz
|
||||
position 0 0
|
||||
}
|
||||
output $output_alt {
|
||||
resolution 1920x1080@60Hz
|
||||
transform 270
|
||||
}
|
||||
|
||||
workspace 10 output $output_alt $output_main
|
||||
|
||||
### Idle configuration
|
||||
exec swayidle -w \
|
||||
timeout $lock_timeout 'swaylock -f -i $lock_image' \
|
||||
timeout $doff_timeout 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep 'swaylock -f -i $lock_image'
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
# your displays after another 300 seconds, and turn your screens back on when
|
||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||
|
||||
### Pause foldingathome on login
|
||||
# The idle config above will restart it on idle
|
||||
exec FAHClient --send-pause
|
||||
|
||||
### PolKit authentication agent
|
||||
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
|
||||
### Unlock encrypted Windows 10 VM volume
|
||||
exec zfs load-key trough/vms/win10
|
||||
|
||||
### Load Xresources
|
||||
exec xrdb -load ~/.Xresources
|
||||
|
||||
### Open a terminal
|
||||
exec $initial_term
|
||||
|
||||
### Appearance (fonts & colours)
|
||||
font "pango:Fira Sans Condensed, 12"
|
||||
titlebar_padding 7 7
|
||||
titlebar_border_thickness 3
|
||||
|
||||
set $def_border normal 0
|
||||
default_border $def_border
|
||||
|
||||
client.focused #007D78bb #007D78bb #E9EDF0 #CA5010aa #007D78bb
|
||||
# client.focused #000000bb #000000bb #ffffff
|
||||
client.focused_inactive #00000088 #00000088 #ffffff
|
||||
client.unfocused #00000088 #00000088 #ffffff
|
||||
|
||||
title_align right
|
||||
for_window [title="."] title_format '%title'
|
||||
# for_window [title="."] title_format '%title <i>(%app_id:%class)</i>'
|
||||
|
||||
### Input configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
||||
# dwt enabled
|
||||
# tap enabled
|
||||
# natural_scroll enabled
|
||||
# middle_emulation enabled
|
||||
# }
|
||||
#
|
||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
||||
# Read `man 5 sway-input` for more information about this section.
|
||||
|
||||
input "51984:4439:Keebio_The_Viterbi_Keyboard" {
|
||||
xkb_layout us
|
||||
xkb_options compose:ralt
|
||||
}
|
||||
|
||||
exec mako
|
||||
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
bindsym $mod+Shift+Return exec $tmux_attach
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+c kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+r reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$lt focus left
|
||||
bindsym $mod+$dn focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$rt focus right
|
||||
# Or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$lt move left
|
||||
bindsym $mod+Shift+$dn move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$rt move right
|
||||
# Ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
# Switch to workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
|
||||
# Outputs:
|
||||
|
||||
# Toggle second monitor
|
||||
bindsym $mod+Ctrl+a output $output_alt toggle
|
||||
|
||||
# Move current workspace
|
||||
bindsym $mod+Ctrl+$lt move workspace to output left
|
||||
bindsym $mod+Ctrl+$rt move workspace to output right
|
||||
bindsym $mod+Ctrl+Left move workspace to output left
|
||||
bindsym $mod+Ctrl+Right move workspace to output right
|
||||
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+j layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Switch between borderless and not
|
||||
bindsym $mod+Comma border toggle
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
bindsym $mod+a focus parent
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
|
||||
# Move the currently focused window to the scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
bindsym $mod+minus scratchpad show
|
||||
|
||||
#bindsym $mod+l exec swaylock -c $lock_colour
|
||||
bindsym $mod+l exec pkill -USR1 swayidle
|
||||
|
||||
#
|
||||
# Useful key bindings
|
||||
#
|
||||
|
||||
# Toggle sticky status for current (floating) window
|
||||
bindsym $mod+p sticky toggle
|
||||
|
||||
# Take screen grab
|
||||
set $date_fmt "+%Y-%m-%d-%H%M%S"
|
||||
bindsym $mod+g exec grim -g "$(slurp)" "Downloads/screenshot-$(date $date_fmt).png"
|
||||
|
||||
bindsym $mod+apostrophe output * background $bg_boring
|
||||
bindsym $mod+quotedbl output * background $bg_normal
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $lt resize shrink width 10px
|
||||
bindsym $dn resize grow height 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $rt resize grow width 10px
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Down resize grow height 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Multimedia control
|
||||
bindsym XF86AudioPlay exec $media_ppse
|
||||
bindsym XF86AudioNext exec $media_next
|
||||
bindsym XF86AudioPrev exec $media_prev
|
||||
bindsym XF86AudioStop exec $media_stop
|
||||
bindsym XF86AudioRaiseVolume exec $media_volu
|
||||
bindsym XF86AudioLowerVolume exec $media_vold
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
# bar {
|
||||
# position top
|
||||
# swaybar_command waybar
|
||||
|
||||
# When the status_command prints a new line to stdout, swaybar updates.
|
||||
# The default just shows the current date and time.
|
||||
# status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
|
||||
|
||||
# colors {
|
||||
# statusline #ffffff
|
||||
# background #323232
|
||||
# inactive_workspace #323232 #323232 #5c5c5c
|
||||
# }
|
||||
# }
|
||||
exec_always systemctl --user import-environment SWAYSOCK && systemctl --user start waybar
|
||||
|
||||
set $opacity 0.95
|
||||
|
||||
for_window [class="zoom"] floating enable
|
||||
for_window [title=".*Zoom meeting"] \
|
||||
floating disable
|
||||
for_window [class="Keepassx2"] floating enable
|
||||
for_window [class="Sonata"] floating enable
|
||||
for_window [app_id="pavucontrol"] floating enable
|
||||
for_window [app_id="blueman-manager"] \
|
||||
floating enable
|
||||
for_window [app_id="ario"] floating enable
|
||||
for_window [app_id="zenity"] floating enable
|
||||
for_window [app_id="yubico.com.yubioath-desktop"] \
|
||||
floating enable
|
||||
for_window [title="Picture-in-Picture"] \
|
||||
floating enable, sticky enable, move window position 0 px 0 px
|
||||
for_window [title=".* - Sharing Indicator"] \
|
||||
floating enable, move window position 0px 0px
|
||||
|
||||
for_window [class="t-engine64"] fullscreen enable
|
||||
|
||||
for_window [class="Emacs"] opacity $opacity
|
||||
for_window [app_id="Alacritty"] opacity $opacity
|
||||
|
||||
include /etc/sway/config.d/*
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Start gpg-agent
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/gpg-agent --daemon --enable-ssh-support --write-env-file=<%= @box_homedir %>/.gnupg/gpg-agent.env
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
|
@ -0,0 +1,316 @@
|
|||
% Copyright 2007 by
|
||||
% Philippe Dreuw <dreuw@cs.rwth-aachen.de> and
|
||||
% Thomas Deselaers <deselaers@cs.rwth-aachen.de>
|
||||
%
|
||||
% This file may be distributed and/or modified
|
||||
%
|
||||
% 1. under the LaTeX Project Public License and/or
|
||||
% 2. under the GNU Public License.
|
||||
%
|
||||
%
|
||||
% ChangeLog:
|
||||
% 1.12 - bugfixed fontscale/myfontscale indention calculation
|
||||
% - added beamerposterarticle icon format
|
||||
% 1.11 - removed incompatible paralist package, used beamer's leftmargin lengths instead for indention
|
||||
% 1.10 - improved PackageWarning and PackageInfo outputs
|
||||
% 1.09 - bugfixed the list indention problem, can be overwritten by user with the \setdefaultleftmargin command.
|
||||
% - added 'printer' option for external printer definition files
|
||||
% 1.08 - supports external printer definition files
|
||||
% - added grid mode option
|
||||
% - renamed beamer specific variables
|
||||
% - added font size normalization, so that scale=1.0 is the default font size for all DIN-A(n) sizes
|
||||
% 1.07 - bugfixed custom size handling, portrait or landscape settings are ignored now
|
||||
% 1.06 - added the type1cm package for scalable math fonts
|
||||
% 1.05 - added version check for xkeyval package
|
||||
% 1.04 - added custom size handling
|
||||
% 1.03 - improved predefined size handling
|
||||
% 1.02 - minor bugfixes
|
||||
% 1.01 - bugfixed size handling
|
||||
% 1.00 - first beamerposter release
|
||||
%
|
||||
\def\beamerposter@name{beamerposter}
|
||||
\def\beamerposter@version{1.12}
|
||||
\def\beamerposter@date{2010/11/18}
|
||||
\def\beamerposter@msg{latex-beamer poster extension}
|
||||
\def\beamerposter@releaseinfo{\beamerposter@date \space v.\beamerposter@version \space \beamerposter@msg}
|
||||
\def\beamerposter@Error#1#2{\PackageError{\beamerposter@name}{#1}{#2}}
|
||||
\def\beamerposter@Warning#1{\PackageWarning{\beamerposter@name}{#1}}
|
||||
\def\beamerposter@Info#1{\PackageInfo{\beamerposter@name}{#1}}
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{\beamerposter@name}[\beamerposter@releaseinfo]
|
||||
\RequirePackage{xkeyval}[2006/11/18]
|
||||
\RequirePackage{type1cm} %% get it from ftp://cam.ctan.org/tex-archive/macros/latex/contrib/type1cm.zip
|
||||
\RequirePackage{fp}
|
||||
|
||||
\newif\if@beamerposter@portrait
|
||||
\newif\if@beamerposter@customsize
|
||||
\newif\if@beamerposter@extern
|
||||
\newif\if@beamerposter@debug
|
||||
|
||||
|
||||
\DeclareOptionX{size}[a0]{
|
||||
\beamerposter@Info{checking size input, please wait.}
|
||||
\XKV@cc*+[\val\nr]{#1}{a0b,a0,a1,a2,a3,a4,custom}{%
|
||||
\beamerposter@Info{the input \val\ \nr\ was correct, we proceed.}
|
||||
\ifcase\nr\relax
|
||||
%a0b
|
||||
\edef\paperwidthValue{119}
|
||||
\edef\paperheightValue{88}
|
||||
\edef\textwidthValue{116}
|
||||
\edef\textheightValue{88}
|
||||
\edef\fontscale{1.0}
|
||||
\or
|
||||
%a0
|
||||
\edef\paperwidthValue{118.82}
|
||||
\edef\paperheightValue{83.96}
|
||||
\edef\textwidthValue{117.82}
|
||||
\edef\textheightValue{82.96}
|
||||
\edef\fontscale{1.0}
|
||||
\or
|
||||
%a1
|
||||
\edef\paperwidthValue{83.96}
|
||||
\edef\paperheightValue{59.4}
|
||||
\edef\textwidthValue{82.96}
|
||||
\edef\textheightValue{58.4}
|
||||
\edef\fontscale{0.70710678} % fontscale=(1/sqrt(2))^1
|
||||
\or
|
||||
%a2
|
||||
\edef\paperwidthValue{59.4}
|
||||
\edef\paperheightValue{41.98}
|
||||
\edef\textwidthValue{58.4}
|
||||
\edef\textheightValue{40.98}
|
||||
\edef\fontscale{0.5} % fontscale=(1/sqrt(2))^2
|
||||
\or
|
||||
%a3
|
||||
\edef\paperwidthValue{41.98}
|
||||
\edef\paperheightValue{29.7}
|
||||
\edef\textwidthValue{40.98}
|
||||
\edef\textheightValue{28.7}
|
||||
\edef\fontscale{0.35355339} % fontscale=(1/sqrt(2))^3
|
||||
\or
|
||||
%a4
|
||||
\edef\paperwidthValue{29.7}
|
||||
\edef\paperheightValue{21.0}
|
||||
\edef\textwidthValue{28.7}
|
||||
\edef\textheightValue{20.0}
|
||||
\edef\fontscale{0.25} % fontscale=(1/sqrt(2))^4
|
||||
\or
|
||||
\@beamerposter@customsizetrue
|
||||
\fi
|
||||
}{%
|
||||
\beamerposter@Warning{the input \val\ was incorrect and was ignored.}
|
||||
}%
|
||||
\beamerposter@Info{finished size input check.}
|
||||
}
|
||||
\DeclareOptionX{orientation}[portrait]{
|
||||
\beamerposter@Info{checking orientation input, please wait.}
|
||||
\XKV@cc*+[\val\nr]{#1}{portrait,landscape}{%
|
||||
\beamerposter@Info{the input \val\ \nr\ was correct, we proceed.}
|
||||
\ifcase\nr\relax
|
||||
\@beamerposter@portraittrue
|
||||
\or
|
||||
\@beamerposter@portraitfalse
|
||||
\fi
|
||||
}{%
|
||||
\beamerposter@Warning{the input \val\ was incorrect and was ignored.}
|
||||
}%
|
||||
\beamerposter@Info{finished orientation check.}
|
||||
}
|
||||
\DeclareOptionX{scale}[1.0]{\edef\myfontscale{#1}\beamerposter@Info{myfontscale=\myfontscale}}
|
||||
\DeclareOptionX{width}{\edef\customwidth{#1}\beamerposter@Info{custom poster width=\customwidth}}
|
||||
\DeclareOptionX{height}{\edef\customheight{#1}\beamerposter@Info{custom poster height=\customheight}}
|
||||
\DeclareOptionX{debug}{\beamerposter@Info{enabled debug mode}\@beamerposter@debugtrue}
|
||||
\DeclareOptionX{grid}{\beamerposter@Info{enabling grid}\beamertemplategridbackground[1cm]}% Display a grid to help align images
|
||||
\DeclareOptionX{printer}{\edef\printerToUse{#1}\@beamerposter@externtrue}
|
||||
\DeclareOptionX*{\beamerposter@Warning{Unknown option ignored: \CurrentOption}}
|
||||
%\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{beamer}}
|
||||
\ExecuteOptionsX{size=a0,scale=1.0}
|
||||
\ProcessOptionsX\relax
|
||||
|
||||
%% enable debug mode for fp package (mainly for upn functions)
|
||||
\if@beamerposter@debug
|
||||
\FPdebugtrue
|
||||
\fi
|
||||
|
||||
%% normalize scale depending on poster size
|
||||
\FPupn{\myfontscale}{myfontscale fontscale * 2 round}
|
||||
|
||||
%% swap sizes for portrait orientation
|
||||
\if@beamerposter@portrait
|
||||
\newdimen\tmp
|
||||
\setlength{\tmp}{\paperwidthValue cm}
|
||||
\setlength{\paperwidth}{\paperheightValue cm}
|
||||
\setlength{\paperheight}{\tmp}
|
||||
\setlength{\tmp}{\textwidthValue cm}
|
||||
\setlength{\textwidth}{\textheightValue cm}
|
||||
\setlength{\textheight}{\tmp}
|
||||
\else
|
||||
\setlength{\paperwidth}{\paperwidthValue cm}
|
||||
\setlength{\paperheight}{\paperheightValue cm}
|
||||
\setlength{\textwidth}{\textwidthValue cm}
|
||||
\setlength{\textheight}{\textheightValue cm}
|
||||
\fi
|
||||
|
||||
%% overwrite dimensions if custom size
|
||||
\if@beamerposter@customsize
|
||||
\setlength{\paperwidth}{\customwidth cm}
|
||||
\setlength{\paperheight}{\customheight cm}
|
||||
\FPupn{\resulttextwidth}{1 customwidth -}
|
||||
\FPupn{\resulttextheight}{1 customheight -}
|
||||
\setlength{\textwidth}{\resulttextwidth cm}
|
||||
\setlength{\textheight}{\resulttextheight cm}
|
||||
\fi
|
||||
|
||||
%% Setting proper dimensions for a DIN A0 printer
|
||||
\setlength{\headheight}{0 cm}
|
||||
\setlength{\headsep}{0 cm}
|
||||
\setlength{\topmargin}{-12.7 mm} % -1in +1.47cm
|
||||
\setlength{\oddsidemargin}{-25.4 mm} % -1in +0.4cm
|
||||
|
||||
%% For the page layout
|
||||
\beamerposter@Info{paperwidth=\the\paperwidth, paperheight=\the\paperheight}
|
||||
\beamerposter@Info{textwidth=\the\textwidth, textwidth=\the\textheight}
|
||||
\beamerposter@Info{fontscale=\fontscale, myfontscale=\myfontscale}
|
||||
\geometry{
|
||||
paperwidth=\the\paperwidth,
|
||||
paperheight=\the\paperheight,
|
||||
hmargin=1cm,%
|
||||
vmargin=0cm,%
|
||||
head=0.5cm, %
|
||||
headsep=0pt,%
|
||||
foot=0.5cm %
|
||||
}
|
||||
|
||||
%%
|
||||
%% printer definition file example 'rwth-glossy-uv.df':
|
||||
%% ----
|
||||
%% \typeout{beamerposter: RWTH RZ printer, glossy paper, UV resistant, maximum settings}
|
||||
%% \edef\printermaxwidthValue{108} %unit should be cm
|
||||
%% \newlength{\printermaxwidth}
|
||||
%% \setlength{\printermaxwidth}{\printermaxwidthValue cm}
|
||||
%% ----
|
||||
%%
|
||||
%% now load printer definitions from file (e.g. \usepackage[printer=rwth-glossy-uv.df]{beamerposter}")
|
||||
\if@beamerposter@extern
|
||||
\InputIfFileExists{\printerToUse}{\typeout{load \printerToUse}}{\beamerposter@Error{\printerToUse\space not found!}{Please use another printer definition file}}
|
||||
\ifx\printermaxwidthValue\@empty%
|
||||
\relax%
|
||||
\else%
|
||||
%% @todo: calc poster ratios, scale to maximum printer size, and check if they still fit
|
||||
%% this here is still very basic ...
|
||||
\FPsub{\resultmaxwidth}{\printermaxwidthValue}{\paperwidthValue}
|
||||
\FPifneg{\resultmaxwidth}
|
||||
\beamerposter@Error{%
|
||||
resultmaxwidth=\resultmaxwidth \MessageBreak
|
||||
printermaxwidthValue=\printermaxwidthValue \MessageBreak
|
||||
paperwidthValue=\paperwidthValue \MessageBreak
|
||||
The specified poster dimensions might not be printable using
|
||||
'\printerToUse'.
|
||||
}{%
|
||||
Try to reduce your poster dimension and have a look at the aspect ratio.
|
||||
}
|
||||
\else
|
||||
\relax
|
||||
\fi
|
||||
\fi
|
||||
%\fi
|
||||
|
||||
%% scalable vector fonts
|
||||
\edef\fontSizeX{12}\edef\fontSizeY{14}
|
||||
\FPupn{\resulttinyX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resulttinyY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\tiny}{\fontsize{\resulttinyX}{\resulttinyY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{14.4}\edef\fontSizeY{18}
|
||||
\FPupn{\resultscriptsizeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultscriptsizeY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\scriptsize}{\fontsize{\resultscriptsizeX}{\resultscriptsizeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{17.28}\edef\fontSizeY{22}
|
||||
\FPupn{\resultfootnotesizeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultfootnotesizeY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\footnotesize}{\fontsize{\resultfootnotesizeX}{\resultfootnotesizeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{20.74}\edef\fontSizeY{25}
|
||||
\FPupn{\resultsmallX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultsmallY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\small}{\fontsize{\resultsmallX}{\resultsmallY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{24.88}\edef\fontSizeY{30}
|
||||
\FPupn{\resultnormalsizeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultnormalsizeY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\normalsize}{\fontsize{\resultnormalsizeX}{\resultnormalsizeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{29.86}\edef\fontSizeY{37}
|
||||
\FPupn{\resultlargeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultlargeY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\large}{\fontsize{\resultlargeX}{\resultlargeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{35.83}\edef\fontSizeY{45}
|
||||
\FPupn{\resultLargeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultLargeY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\Large}{\fontsize{\resultLargeX}{\resultLargeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{43}\edef\fontSizeY{54}
|
||||
\FPupn{\resultLARGEX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultLARGEY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\LARGE}{\fontsize{\resultLARGEX}{\resultLARGEY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{51.6}\edef\fontSizeY{64}
|
||||
\FPupn{\resulthugeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resulthugeY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\huge}{\fontsize{\resulthugeX}{\resulthugeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{61.92}\edef\fontSizeY{77}
|
||||
\FPupn{\resultHugeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultHugeY}{myfontscale fontSizeY * 2 round}
|
||||
\renewcommand*{\Huge}{\fontsize{\resultHugeX}{\resultHugeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{74.3}\edef\fontSizeY{93}
|
||||
\FPupn{\resultveryHugeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultveryHugeY}{myfontscale fontSizeY * 2 round}
|
||||
\newcommand*{\veryHuge}{\fontsize{\resultveryHugeX}{\resultveryHugeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{89.16}\edef\fontSizeY{112}
|
||||
\FPupn{\resultVeryHugeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultVeryHugeY}{myfontscale fontSizeY * 2 round}
|
||||
\newcommand*{\VeryHuge}{\fontsize{\resultVeryHugeX}{\resultVeryHugeY}\selectfont}
|
||||
|
||||
\edef\fontSizeX{107}\edef\fontSizeY{134}
|
||||
\FPupn{\resultVERYHugeX}{myfontscale fontSizeX * 2 round}
|
||||
\FPupn{\resultVERYHugeY}{myfontscale fontSizeY * 2 round}
|
||||
\newcommand*{\VERYHuge}{\fontsize{\resultVERYHugeX}{\resultVERYHugeY}\selectfont}
|
||||
|
||||
% set the normalfont (default)
|
||||
\renewcommand*{\normalfont}{\normalsize}
|
||||
|
||||
% adapt list indention (e.g. itemize/enumeration/... see beamer docu)
|
||||
\edef\labelWidthValue{1} % 1em label width
|
||||
\edef\labelSepValue{1} % 1em label separator width
|
||||
\edef\indentionLevelValuei{4} % 4em indention for first level for an A0 poster
|
||||
\edef\indentionLevelValueii{2.2} % etc. ...
|
||||
\edef\indentionLevelValueiii{1.87}
|
||||
%\edef\indentionLevelValueiiii{1.7}
|
||||
%\edef\indentionLevelValueiiiii{1}
|
||||
%\edef\indentionLevelValueiiiiii{1}
|
||||
\FPupn{\labelWidthValue}{labelWidthValue myfontscale * 2 round}
|
||||
\FPupn{\labelSepValue}{labelSepValue myfontscale * 2 round}
|
||||
\FPupn{\indentionLevelValuei}{indentionLevelValuei myfontscale * 2 round}
|
||||
\FPupn{\indentionLevelValueii}{indentionLevelValueii myfontscale * 2 round}
|
||||
\FPupn{\indentionLevelValueiii}{indentionLevelValueiii myfontscale * 2 round}
|
||||
%\FPupn{\indentionLevelValueiiii}{indentionLevelValueiiii myfontscale * 2 round}
|
||||
%\FPupn{\indentionLevelValueiiiii}{indentionLevelValueiiiii myfontscale * 2 round}
|
||||
%\FPupn{\indentionLevelValueiiiiii}{indentionLevelValueiiiiii myfontscale * 2 round}
|
||||
\setlength{\leftmargini}{\indentionLevelValuei em}%
|
||||
\setlength{\leftmarginii}{\indentionLevelValueii em}%
|
||||
\setlength{\leftmarginiii}{\indentionLevelValueiii em}%
|
||||
\setlength{\labelwidth}{\labelWidthValue em}%
|
||||
\setlength{\labelsep}{\labelSepValue em}%
|
||||
|
||||
% define bib item template with larger graphic
|
||||
\edef\bibIconScaleValue{2} % begin with 2
|
||||
\FPupn{\bibIconScaleValue}{bibIconScaleValue myfontscale * 2 round}
|
||||
\defbeamertemplate{bibliography item}{beamerposterarticle}
|
||||
{\lower5pt\hbox{\scalebox{\bibIconScaleValue}{\pgfuseimage{beamericonarticle}}}}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,809 @@
|
|||
%
|
||||
% Some credits
|
||||
%
|
||||
|
||||
\def\easychairstyleauthor{easychair class style, by Serguei A. Mokhov, with changes by Andrei Voronkov <30 December 2011>}
|
||||
\def\easychairstylerevision{CVS Revision: $Id: easychair.cls,v 3.1 2012/12/30 11:41:23 voronkov Exp $}
|
||||
\def\easychairstylepurpose{Designed for easyChair.org, under guidelines and suggestions of}
|
||||
\def\easychairstylevoronkov{\space\space\space\space\space\space\space\space\space\space\space\space\space Andrei Voronkov <www.voronkov.com>, and}
|
||||
\def\easychairstylesutcliffe{\space\space\space\space\space\space\space\space\space\space\space\space\space Geoff Sutcliffe <www.cs.miami.edu/^geoff>}
|
||||
\def\easychairstylecopyright{Copyright terms are that of EasyChair.org}
|
||||
\def\easychairstylebugs{For bug reports, please contact <andrei@voronkov.com>}
|
||||
|
||||
\everyjob{\typeout{\easychairstyleauthor}}
|
||||
\everyjob{\typeout{\easychairstylerevision}}
|
||||
\everyjob{\typeout{\easychairstylepurpose}}
|
||||
\everyjob{\typeout{\easychairstylevoronkov}}
|
||||
\everyjob{\typeout{\easychairstylesutcliffe}}
|
||||
\everyjob{\typeout{\easychairstylecopyright}}
|
||||
\everyjob{\typeout{\easychairstylebugs}}
|
||||
|
||||
\immediate\write10{\easychairstyleauthor}
|
||||
\immediate\write10{\easychairstylerevision}
|
||||
\immediate\write10{\easychairstylepurpose}
|
||||
\immediate\write10{\easychairstylevoronkov}
|
||||
\immediate\write10{\easychairstylesutcliffe}
|
||||
\immediate\write10{\easychairstylecopyright}
|
||||
\immediate\write10{\easychairstylebugs}
|
||||
|
||||
%
|
||||
% Require LaTeX 2.09 or later
|
||||
%
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||
\ProvidesClass{easychair}[2011/05/02 v3.0]
|
||||
\def\@tempa#1#2\@nil{\edef\@classname{#1}}
|
||||
\expandafter\@tempa\@currnamestack{}{}{}\@nil
|
||||
\ifx\@classname\@empty \edef\@classname{\@currname}\fi
|
||||
|
||||
|
||||
%
|
||||
% Debug
|
||||
%
|
||||
|
||||
\def\easychairdebug#1{\gdef\@EasyDebug{#1}}
|
||||
\def\@EasyDebug{}
|
||||
|
||||
\newif\ifdebug
|
||||
\debugfalse
|
||||
|
||||
\DeclareOption{debug}{\debugtrue}
|
||||
|
||||
\def\easychairframe#1{\gdef\@EasyFrame{#1}}
|
||||
\def\@EasyFrame{}
|
||||
|
||||
\newif\ifframe
|
||||
\framefalse
|
||||
|
||||
\DeclareOption{frame}{\frametrue}
|
||||
|
||||
\def\easychairverbose#1{\gdef\@EasyVerbose{#1}}
|
||||
\def\@EasyVerbose{}
|
||||
|
||||
\newif\ifverbose
|
||||
\verbosefalse
|
||||
|
||||
\DeclareOption{verbose}{\verbosetrue}
|
||||
|
||||
|
||||
%
|
||||
% Thesis
|
||||
% Perh Geoff, February 23, 2010 with support from Andrei
|
||||
%
|
||||
|
||||
\def\easythesis#1{\gdef\@EasyThesis{#1}}
|
||||
\def\@EasyThesis{}
|
||||
|
||||
\newif\ifthesis
|
||||
\thesisfalse
|
||||
|
||||
\DeclareOption{thesis}{\thesistrue}
|
||||
|
||||
|
||||
%
|
||||
% Times New Roman or not
|
||||
%
|
||||
|
||||
\def\easytimes#1{\gdef\@EasyTimes{#1}}
|
||||
\def\@EasyTimes{}
|
||||
|
||||
\newif\ifnotimes
|
||||
\notimesfalse
|
||||
|
||||
\DeclareOption{notimes}{\notimestrue}
|
||||
|
||||
\newif\ifwithtimes
|
||||
\withtimesfalse
|
||||
|
||||
\DeclareOption{withtimes}{\withtimestrue}
|
||||
|
||||
|
||||
%% Code added to use llncs style author list
|
||||
\newcounter{@inst}
|
||||
\newcounter{@auth}
|
||||
\newcounter{auco}
|
||||
\newdimen\instindent
|
||||
\def\institute#1{\gdef\@institute{#1}}
|
||||
|
||||
\def\institutename{\par
|
||||
\begingroup
|
||||
\parskip=\z@
|
||||
\parindent=\z@
|
||||
\setcounter{@inst}{1}%
|
||||
\def\and{\par\stepcounter{@inst}%
|
||||
\noindent$^{\the@inst}$\enspace\ignorespaces}%
|
||||
\setbox0=\vbox{\def\thanks##1{}\@institute}%
|
||||
\ifnum\c@@inst=1\relax
|
||||
\gdef\fnnstart{0}%
|
||||
\else
|
||||
\xdef\fnnstart{\c@@inst}%
|
||||
\setcounter{@inst}{1}%
|
||||
\noindent$^{\the@inst}$\enspace
|
||||
\fi
|
||||
\ignorespaces
|
||||
\@institute\par
|
||||
\endgroup}
|
||||
|
||||
\def\inst#1{\unskip$^{#1}$}
|
||||
\def\fnmsep{\unskip$^,$}
|
||||
\def\email#1{{\tt#1}}
|
||||
|
||||
%%
|
||||
|
||||
\newif\ifauthorundefined
|
||||
\authorundefinedtrue
|
||||
|
||||
\let\oldauthor=\author
|
||||
\renewcommand
|
||||
{\author}
|
||||
[1]
|
||||
{%
|
||||
\ifauthorundefined
|
||||
\oldauthor{#1}
|
||||
\authorundefinedfalse
|
||||
\else
|
||||
\PackageWarning{easychair}{Another use of author ignored}
|
||||
\fi
|
||||
}
|
||||
|
||||
\newif\iftitleundefined
|
||||
\titleundefinedtrue
|
||||
|
||||
\let\oldtitle=\title
|
||||
\renewcommand
|
||||
{\title}
|
||||
[1]
|
||||
{
|
||||
\iftitleundefined
|
||||
\oldtitle{#1}
|
||||
\titleundefinedfalse
|
||||
\else
|
||||
\PackageWarning{easychair}{Another use of title ignored}
|
||||
\fi
|
||||
}
|
||||
|
||||
|
||||
%
|
||||
% Running heads definitions
|
||||
%
|
||||
|
||||
%\def\titlerunning#1{\gdef\@titleRunning{#1}}
|
||||
%\def\authorrunning#1{\gdef\@authorRunning{#1}}
|
||||
%\titlerunning{easychair: Running title head is undefined.}
|
||||
%\authorrunning{easychair: Running author head is undefined.}
|
||||
|
||||
\newif\iftitlerunningundefined
|
||||
\titlerunningundefinedtrue
|
||||
|
||||
\newif\ifauthorrunningundefined
|
||||
\authorrunningundefinedtrue
|
||||
|
||||
\gdef\@titleRunning{easychair: Running title head is undefined.}
|
||||
\gdef\@authorRunning{easychair: Running author head is undefined.}
|
||||
|
||||
\def\titlerunning#1
|
||||
{
|
||||
\iftitlerunningundefined
|
||||
\gdef\@titleRunning{#1}
|
||||
\titlerunningundefinedfalse
|
||||
\else
|
||||
\PackageWarning{easychair}{Another use of titlerunning ignored}
|
||||
\fi
|
||||
}
|
||||
|
||||
\def\authorrunning#1
|
||||
{
|
||||
\ifauthorrunningundefined
|
||||
\gdef\@authorRunning{#1}
|
||||
\authorrunningundefinedfalse
|
||||
\else
|
||||
\PackageWarning{easychair}{Another use of authorrunning ignored}
|
||||
\fi
|
||||
}
|
||||
|
||||
%
|
||||
% Affiliations
|
||||
%
|
||||
|
||||
\newcommand{\affiliation}[1]{\footnotesize{#1}\vspace{-3pt}}
|
||||
|
||||
|
||||
%
|
||||
% Decide between letter and A4 paper formats
|
||||
% as well as orientation
|
||||
%
|
||||
|
||||
% Default is 'letterpaper'
|
||||
\def\paperformat#1{\gdef\@PaperFormat{#1}}
|
||||
\def\@PaperFormat{letterpaper}
|
||||
|
||||
\newif\ifletterpaper
|
||||
\newif\ifafourpaper
|
||||
\newif\ifcustompaper
|
||||
|
||||
\letterpapertrue
|
||||
|
||||
\DeclareOption{letterpaper}{\paperformat{letterpaper}\afourpaperfalse\custompaperfalse}
|
||||
\DeclareOption{a4paper}{\paperformat{a4paper}\afourpapertrue\letterpaperfalse\custompaperfalse}
|
||||
\DeclareOption{custompaper}{\paperformat{letterpaper}\afourpaperfalse\letterpaperfalse\custompapertrue}
|
||||
|
||||
|
||||
\newlength{\@LMarginSize}
|
||||
\newlength{\@RMarginSize}
|
||||
\newlength{\@TMarginSize}
|
||||
\newlength{\@BMarginSize}
|
||||
|
||||
\DeclareOption{lmargin}{}
|
||||
\DeclareOption{rmargin}{}
|
||||
\DeclareOption{tmargin}{}
|
||||
\DeclareOption{bmargin}{}
|
||||
|
||||
|
||||
% Default is portrait {}
|
||||
\def\paperorientation#1{\gdef\@PaperOrientation{#1}}
|
||||
\def\@PaperOrientation{}
|
||||
|
||||
\DeclareOption{portrait}{\paperorientation{}}
|
||||
\DeclareOption{landscape}{\paperorientation{landscape}}
|
||||
|
||||
% Two sided running heads for titlerunning and author running
|
||||
% twosided is the default
|
||||
\newif\iftwosided
|
||||
\twosidedfalse
|
||||
|
||||
\DeclareOption{onesided}{}
|
||||
\DeclareOption{twosided}{\twosidedtrue}
|
||||
|
||||
|
||||
%
|
||||
% Decide between 1- or 2-column formats
|
||||
%
|
||||
|
||||
\def\columnCount#1{\gdef\@ColumnCount{#1}}
|
||||
\def\@ColumnCount{onecolumn}
|
||||
|
||||
\DeclareOption{onecolumn}{}
|
||||
\DeclareOption{twocolumn}{\columnCount{twocolumn}}
|
||||
|
||||
|
||||
%
|
||||
% Decide on line spacing
|
||||
%
|
||||
|
||||
\def\lineSpacing#1{\gdef\@LineSpacing{#1}}
|
||||
\def\@LineSpacing{1.0}
|
||||
|
||||
\DeclareOption{zerospacing}{\lineSpacing{0.0}}
|
||||
\DeclareOption{singlespacing}{\lineSpacing{1.0}}
|
||||
\DeclareOption{lineandhalfspacing}{\lineSpacing{1.5}}
|
||||
\DeclareOption{doublespacing}{\lineSpacing{2.0}}
|
||||
|
||||
\DeclareOption{0.0}{\lineSpacing{0.0}}
|
||||
\DeclareOption{1.0}{\lineSpacing{1.0}}
|
||||
\DeclareOption{1.5}{\lineSpacing{1.5}}
|
||||
\DeclareOption{2.0}{\lineSpacing{2.0}}
|
||||
|
||||
\DeclareOption{0.0pt}{\lineSpacing{0.0}}
|
||||
\DeclareOption{1.0pt}{\lineSpacing{1.0}}
|
||||
\DeclareOption{1.5pt}{\lineSpacing{1.5}}
|
||||
\DeclareOption{2.0pt}{\lineSpacing{2.0}}
|
||||
|
||||
|
||||
%
|
||||
% Font point size; default is 10pt
|
||||
%
|
||||
% The \headheight will have to be changed later accordingly
|
||||
% such that fancyhdr does not complain it is too small.
|
||||
%
|
||||
|
||||
\def\baseFontSize#1{\gdef\@BaseFontSize{#1}}
|
||||
\def\headHeightSize#1{\gdef\@HeadHeightSize{#1}}
|
||||
\def\headSepSize#1{\gdef\@HeadSepSize{#1}}
|
||||
\def\footSkipSize#1{\gdef\@FootSkipSize{#1}}
|
||||
|
||||
\def\@BaseFontSize{10pt}
|
||||
\def\@HeadHeightSize{12.0pt}
|
||||
\def\@HeadSepSize{16.0pt} % instead of the default 25pt
|
||||
\def\@FootSkipSize{26.0pt} % instead of the default 30pt
|
||||
|
||||
\DeclareOption{8pt}{\PackageWarning{easychair}{Option '\CurrentOption' is not supported.}}
|
||||
\DeclareOption{9pt}{\PackageWarning{easychair}{Option '\CurrentOption' is not supported.}}
|
||||
\DeclareOption{10pt}{\baseFontSize{10pt}\headHeightSize{12.0pt}\headSepSize{16.0pt}\footSkipSize{26pt}}
|
||||
\DeclareOption{11pt}{\baseFontSize{11pt}\headHeightSize{13.6pt}\headSepSize{23.0pt}\footSkipSize{28pt}}
|
||||
\DeclareOption{12pt}{\baseFontSize{12pt}\headHeightSize{14.5pt}\headSepSize{25.0pt}\footSkipSize{30pt}}
|
||||
\ExecuteOptions{10pt}
|
||||
|
||||
%
|
||||
% Page sizing
|
||||
%
|
||||
|
||||
%\newif\iffullpage
|
||||
%\newif\ifsavetrees
|
||||
%
|
||||
%\DeclareOption{fullpage}{\fullpagetrue}
|
||||
%\DeclareOption{savetrees}{\savetreestrue}
|
||||
|
||||
|
||||
% Bark at any unknown package option
|
||||
\DeclareOption*{\PackageWarning{easychair}{Unknown option '\CurrentOption'}}
|
||||
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{geometry}}
|
||||
%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
|
||||
|
||||
%\ExecuteOptions{centertags,portrait,10pt,twoside,onecolumn,final}
|
||||
%\ExecuteOptions{}
|
||||
\ProcessOptions\relax
|
||||
|
||||
|
||||
%
|
||||
% Required packages and classes.
|
||||
%
|
||||
% All must be standard as per most common LaTeX
|
||||
% distributions.
|
||||
%
|
||||
|
||||
\ifthesis
|
||||
\LoadClass[\@PaperFormat,\@PaperOrientation,\@ColumnCount,\@BaseFontSize,twoside]{report}
|
||||
\RequirePackage{makeidx}
|
||||
\else
|
||||
% We are an article (more customized later)
|
||||
\LoadClass[\@PaperFormat,\@PaperOrientation,\@ColumnCount,\@BaseFontSize,twoside]{article}
|
||||
%\LoadClass[\@PaperFormat,\@PaperOrientation,\@ColumnCount,\@BaseFontSize]{article}
|
||||
\fi
|
||||
|
||||
% Require UTF8 encoding, per Andrei Voronkov, to accomodate
|
||||
% all sorts of author names.
|
||||
%\RequirePackage[utf8]{inputenc}
|
||||
|
||||
% All \urls will be hyperlinked and will deal properly with special characters
|
||||
% XXX: url is included by hyperref
|
||||
%\RequirePackage{url}
|
||||
|
||||
% To ensure the footnotes are always at the bottom.
|
||||
% IMPORTANT: footmisc should precede hyperref for the footnotes to hyperlink
|
||||
% correctly to their pages where they are at instead of always at
|
||||
% page 1. Per bug reports from a couple of users and a suggestion by
|
||||
% Uwe Pfeiffer.
|
||||
%\RequirePackage[bottom]{footmisc}
|
||||
|
||||
%% TOC/thumbnail LHS preview in the PDFs as well as active URLs and other cross-refs
|
||||
%% Newer versions of hyperref declare a4paper or letterpaper as obsolete and issue warnings
|
||||
%%\RequirePackage[\@PaperFormat,pdfcreator=easychair.cls-2.0]{hyperref}
|
||||
%\RequirePackage[linktocpage,pdfcreator=easychair.cls-2.0-Beta-3]{hyperref}
|
||||
|
||||
% Traditional graphics processing
|
||||
\RequirePackage{graphicx}
|
||||
%\RequirePackage{pdflscape}
|
||||
%\RequirePackage{lscape}
|
||||
|
||||
|
||||
%% Fonts, generally more compact but preserving point size
|
||||
|
||||
% Pick "Times Roman" as a base font unless explicitly told not to
|
||||
\ifnotimes
|
||||
\ifwithtimes
|
||||
\PackageWarning{easychair}{Cannot really use 'notimes' and 'withtimes' together}
|
||||
\PackageWarning{easychair}{Defaulting to 'notimes'...}
|
||||
\else
|
||||
\PackageWarning{easychair}{'notimes' has been deprecated as it is the default in 2.0}
|
||||
\fi
|
||||
\else
|
||||
\ifwithtimes
|
||||
\RequirePackage{mathptmx}
|
||||
\fi
|
||||
\fi
|
||||
|
||||
% Pick "Helvetica" as a "Sans-Serif" font
|
||||
\RequirePackage[scaled=.85]{helvet}
|
||||
|
||||
% For algorithm and source code listings
|
||||
\RequirePackage{listings}
|
||||
|
||||
%% Different Math and non-Math symbols and definitions
|
||||
|
||||
\RequirePackage{latexsym}
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{empheq}
|
||||
|
||||
%% Line spacing to be applied AFTER the above space saving packages
|
||||
|
||||
\renewcommand{\baselinestretch}{\@LineSpacing}
|
||||
|
||||
%% Final text printing area, per Geoff Sutcliffe
|
||||
|
||||
\RequirePackage{keyval}
|
||||
|
||||
\define@key{Ec}{lmargin}{\Ec@defbylen{lmargin}{#1}}
|
||||
|
||||
\newlength{\@MarginSize}
|
||||
\setlength{\@MarginSize}{1in}
|
||||
|
||||
\setlength{\@LMarginSize}{\@MarginSize}
|
||||
%\setlength{\@LMarginSize}{\Ec@lmargin}
|
||||
\setlength{\@RMarginSize}{\@MarginSize}
|
||||
\setlength{\@TMarginSize}{\@MarginSize}
|
||||
\setlength{\@BMarginSize}{\@MarginSize}
|
||||
|
||||
|
||||
% Head height is dependent on the font point size
|
||||
\setlength{\headheight}{\@HeadHeightSize}
|
||||
\setlength{\headsep}{\@HeadSepSize}
|
||||
\setlength{\footskip}{\@FootSkipSize}
|
||||
|
||||
\ifletterpaper
|
||||
\immediate\write10{easychair: Selecting letter paper margin sizes.}
|
||||
\RequirePackage[%
|
||||
papersize={8.5in,11in},
|
||||
total={145mm,224mm},
|
||||
centering,
|
||||
twoside,
|
||||
includeheadfoot]{geometry}
|
||||
\fi
|
||||
\ifafourpaper
|
||||
\immediate\write10{easychair: Selecting A4 paper margin sizes.}
|
||||
\RequirePackage[%
|
||||
papersize={210mm,297mm},
|
||||
total={145mm,224mm},
|
||||
centering,
|
||||
twoside,
|
||||
includeheadfoot]{geometry}
|
||||
\fi
|
||||
|
||||
\ifcustompaper
|
||||
\immediate\write10{easychair: Selecting custom paper margin sizes.}
|
||||
\RequirePackage[%
|
||||
papersize={189mm,246mm},
|
||||
total={145mm,224mm},
|
||||
top=9mm,
|
||||
left=24mm,
|
||||
twoside,
|
||||
includeheadfoot]{geometry}
|
||||
\headHeightSize{12.0pt}
|
||||
\headSepSize{16.0pt}
|
||||
\footSkipSize{26pt}
|
||||
\fi
|
||||
|
||||
%\setlength{\textwidth}{16cm}
|
||||
%\setlength{\textheight}{9in}
|
||||
|
||||
|
||||
%
|
||||
% Volume
|
||||
%
|
||||
|
||||
\RequirePackage{lastpage}
|
||||
|
||||
\newif\ifvolumeundefined
|
||||
\volumeundefinedtrue
|
||||
|
||||
% e.g.
|
||||
% \volumeinfo
|
||||
% {J. Bloe} % editor(s) #1
|
||||
% {1} % No. of editors #2
|
||||
% {LICS 2008} % event title #3
|
||||
% {1} % volume number #4
|
||||
% {4} % issue #5
|
||||
% {134} % start page #6
|
||||
|
||||
\def\@EasyFontStyle{\footnotesize}
|
||||
\newcommand{\headfootstyle}[1]{\def\@EasyFontStyle{#1}}
|
||||
|
||||
\def\@EasyVolumeInfo{}
|
||||
|
||||
\ifthesis
|
||||
\newcommand{\volumeinfo}[6]
|
||||
{\PackageWarning{easychair}{Cannot use volumeinfo with 'thesis' option. Ignoring...}}
|
||||
\else
|
||||
\newcommand{\volumeinfo}[6]{%
|
||||
\ifvolumeundefined
|
||||
% \def\@makefntext##1{\noindent ##1}%
|
||||
\def\@EasyEdsNames{#1}%
|
||||
\def\@EasyEds{ed.}%
|
||||
\def\@EasyEvent{#3}%
|
||||
\def\@EasyVolume{}%
|
||||
\def\@EasyIssue{}%
|
||||
\def\@EasyFirstPage{#6}%
|
||||
\ifnum #2>1 \gdef\@EasyEds{eds.}\fi%
|
||||
\ifnum #4>0 \gdef\@EasyVolume{; Volume #4}\fi%
|
||||
\ifnum #5>0 \gdef\@EasyIssue{, issue: #5} \fi%
|
||||
% \footnotetext[0]{\sf \@EasyEdsNames (\@EasyEds); \@EasyEvent\@EasyVolume\@EasyIssue, pp. #6-\pageref{LastPage}}%
|
||||
% \def\@EasyVolumeInfo{\footnotesize{\sf\@EasyEdsNames~(\@EasyEds); \@EasyEvent\@EasyVolume\@EasyIssue, pp. \@EasyFirstPage--\pageref{LastPage}}}%
|
||||
\def\@EasyVolumeInfo{\@EasyFontStyle\@EasyEdsNames~(\@EasyEds); \@EasyEvent\@EasyVolume\@EasyIssue, pp. \@EasyFirstPage--\pageref{LastPage}}%
|
||||
%\def\@makefntext##1{\noindent\@makefnmark##1}%
|
||||
\setcounter{page}{\@EasyFirstPage}
|
||||
\volumeundefinedfalse
|
||||
\else
|
||||
{\PackageWarning{easychair}{May not redefine volumeinfo}}
|
||||
\fi
|
||||
}
|
||||
\fi
|
||||
|
||||
\def\@EventInfo{}
|
||||
\def\@VolumeInfo{}
|
||||
|
||||
\newif\ifvolumeecpsundefined
|
||||
\volumeecpsundefinedtrue
|
||||
|
||||
\newcommand{\volumeinfoECPS}[2]{%
|
||||
\ifvolumeecpsundefined
|
||||
\def\@EventInfo{#1}%
|
||||
\def\@VolumeInfo{#2}%
|
||||
\volumeecpsundefinedfalse
|
||||
\else
|
||||
{\PackageWarning{easychair}{Ignoring another definition of volumeinfoECPS}}
|
||||
\fi
|
||||
}
|
||||
|
||||
|
||||
%
|
||||
% Allow for more space to place floats.
|
||||
%
|
||||
|
||||
\renewcommand{\topfraction}{0.95}
|
||||
\renewcommand{\bottomfraction}{0.95}
|
||||
\renewcommand{\textfraction}{0.05}
|
||||
\renewcommand{\floatpagefraction}{0.8}
|
||||
|
||||
|
||||
%
|
||||
% Running heads and ``foots''
|
||||
%
|
||||
|
||||
\RequirePackage{fancyhdr}
|
||||
\pagestyle{fancy}
|
||||
|
||||
\fancyhead{}
|
||||
%\ifdebug
|
||||
% \iftwosided
|
||||
% \fancyhead[RE]{\overline{\@titleRunning}}
|
||||
% \fancyhead[RO]{\overline{\@authorRunning}}
|
||||
% \else
|
||||
% \fancyhead[LO,LE]{\begin{math}\overline{\mbox{\@titleRunning}}\end{math}}
|
||||
% \fancyhead[RO,RE]{\begin{math}\overline{\mbox{\@authorRunning}}\end{math}}
|
||||
% \fi
|
||||
%\else
|
||||
\iftwosided
|
||||
\fancyhead[RE]{{\@EasyFontStyle\@titleRunning}}
|
||||
\fancyhead[RO]{{\@EasyFontStyle\@authorRunning}}
|
||||
\else
|
||||
\fancyhead[LO,LE]{{\@EasyFontStyle\@titleRunning}}
|
||||
\fancyhead[RO,RE]{{\@EasyFontStyle\@authorRunning}}
|
||||
\fi
|
||||
%\fi
|
||||
|
||||
\fancyfoot{}
|
||||
%\ifdebug
|
||||
% \fancyfoot[CO,CE]{\underline{\thepage}}
|
||||
% \renewcommand{\headrulewidth}{1pt}
|
||||
% \renewcommand{\footrulewidth}{1pt}
|
||||
%\else
|
||||
% \fancyfoot[CO,CE]{\thepage}
|
||||
% \fancyfoot[LO]{{\footnotesize{\sf\@EventInfo}}}
|
||||
% \fancyfoot[LE]{{\footnotesize{\sf\@VolumeInfo}}}
|
||||
% \fancyfoot[LO]{{\@EasyFontStyle\@EventInfo}}
|
||||
% \fancyfoot[LE]{{\@EasyFontStyle\@VolumeInfo}}
|
||||
\ifodd\c@page
|
||||
\fancyfoot[LO]{{\@EasyFontStyle\@VolumeInfo}}
|
||||
\fancyfoot[RE]{{\@EasyFontStyle\@EventInfo}}
|
||||
\else
|
||||
\fancyfoot[RE]{{\@EasyFontStyle\@VolumeInfo}}
|
||||
\fancyfoot[LO]{{\@EasyFontStyle\@EventInfo}}
|
||||
\fi
|
||||
% \fancyfoot[LO,LE]
|
||||
% {
|
||||
%\volumeinfoECPS
|
||||
% {A. Editor, B. Editor} % editors
|
||||
% {2} % number of editors
|
||||
% {EVENT, Month YEAR} % event
|
||||
% {1} % volume
|
||||
% }
|
||||
% \fancyfoot[RO,RE]{{\@EasyFontStyle\thepage}}
|
||||
% \fancyfoot[RO]{{\@EasyFontStyle\thepage}}
|
||||
% \fancyfoot[LE]{{\@EasyFontStyle\thepage}}
|
||||
\ifodd\c@page
|
||||
\fancyfoot[RO]{{\normalsize\thepage}}
|
||||
\fancyfoot[LE]{{\normalsize\thepage}}
|
||||
\else
|
||||
\fancyfoot[LE]{{\normalsize\thepage}}
|
||||
\fancyfoot[RO]{{\normalsize\thepage}}
|
||||
\fi
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\renewcommand{\footrulewidth}{0pt}
|
||||
%\fi
|
||||
|
||||
% Suppress the default date, per Geoff
|
||||
\date{}
|
||||
|
||||
% For the first page
|
||||
\fancypagestyle{plain}{%
|
||||
\fancyhf{} % clear all header and footer fields
|
||||
\ifodd\c@page
|
||||
\fancyfoot[L]{\@EasyVolumeInfo}%
|
||||
\fancyfoot[R]{{\normalsize\thepage}} % except the center
|
||||
\else
|
||||
\fancyfoot[R]{\@EasyVolumeInfo}%
|
||||
\fancyfoot[L]{{\normalsize\thepage}} % except the center
|
||||
\fi
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\renewcommand{\footrulewidth}{0pt}}
|
||||
|
||||
|
||||
\let\oldmaketitle=\maketitle
|
||||
\def\@maketitle{%
|
||||
%% Code added to use llncs style author list
|
||||
\def\andname{and}
|
||||
\def\lastandname{\unskip\ and}
|
||||
\def\lastand{\ifnum\value{@inst}=2\relax
|
||||
\unskip{} \andname\
|
||||
\else
|
||||
\unskip \lastandname\
|
||||
\fi}%
|
||||
\def\and{\stepcounter{@auth}\relax
|
||||
\ifnum\value{@auth}=\value{@inst}%
|
||||
\lastand
|
||||
\else
|
||||
\unskip,
|
||||
\fi}%
|
||||
%%
|
||||
\newpage
|
||||
\null
|
||||
% Facelift a bit the title and make it bold, per Geoff
|
||||
\vspace{-1cm}
|
||||
\begin{center}%
|
||||
\let\footnote\thanks%
|
||||
% Do not bold Times title, per Geoff
|
||||
\ifwithtimes
|
||||
{\LARGE{\@title}\par}
|
||||
\else
|
||||
{\LARGE{\bf \@title}\par}
|
||||
\fi
|
||||
\vskip \baselineskip
|
||||
\@date
|
||||
{\large
|
||||
\setbox0=\vbox{\setcounter{@auth}{1}\def\and{\stepcounter{@auth}}%
|
||||
\def\thanks##1{}\@author}%
|
||||
\global\value{@inst}=\value{@auth}%
|
||||
\global\value{auco}=\value{@auth}%
|
||||
\setcounter{@auth}{1}%
|
||||
{\lineskip .5em
|
||||
\noindent\ignorespaces
|
||||
\@author\vskip.35cm}}
|
||||
{\small\institutename}
|
||||
\end{center}%
|
||||
%\volumeinfoECPS{\@EventInfo}{\@VolumeInfo}
|
||||
%\titlerunning{EMPTY}%
|
||||
%\authorrunning{EMPTY}%
|
||||
%\authorrunning{\@authorRunning}%
|
||||
%\renewcommand{\titlerunning}[1]{}
|
||||
%\renewcommand{\authorrunning}[1]{}
|
||||
%%\renewcommand{\volumeinfoECPS}[2]{}%
|
||||
%%\renewcommand{\volumeinfo}[6]{}
|
||||
%\gdef\@authorRunning{Gooo\@authorRunning}%
|
||||
%\gdef\@EasyVolumeInfo{Foo\@authorRunning}%
|
||||
%\gdef\@EventInfo{}
|
||||
%\gdef\@VolumeInfo{}
|
||||
%\volumeinfo
|
||||
%{NNNNOT A. Voronkov} % editors
|
||||
%{1} % number of editors
|
||||
%{NYO-YO} % event
|
||||
%{44} % volume
|
||||
%{1} % issue
|
||||
%{45} % starting page number
|
||||
%\volumeinfoECPS
|
||||
%{NNNNOT Super EasyChair Workshop Proceedings}
|
||||
%{NNNNOT ECPS vol. 43}
|
||||
\par
|
||||
%\relax
|
||||
}
|
||||
|
||||
|
||||
% TOC/thumbnail LHS preview in the PDFs as well as active URLs and other cross-refs
|
||||
% Newer versions of hyperref declare a4paper or letterpaper as obsolete and issue warnings
|
||||
\RequirePackage[linktocpage,hyperfootnotes=false,pdfcreator=easychair.cls-3.0]{hyperref}
|
||||
|
||||
|
||||
% Tighten up bibliography
|
||||
\let\oldthebibliography=\thebibliography
|
||||
\let\endoldthebibliography=\endthebibliography
|
||||
\renewenvironment{thebibliography}[1]
|
||||
{
|
||||
\small
|
||||
\begin{oldthebibliography}{#1}
|
||||
\setlength{\parskip}{2pt}
|
||||
\setlength{\itemsep}{0pt}
|
||||
}
|
||||
{
|
||||
\end{oldthebibliography}
|
||||
}
|
||||
|
||||
\ifdebug
|
||||
\ifverbose
|
||||
\RequirePackage[colorgrid,pscoord]{eso-pic}%
|
||||
\else
|
||||
\RequirePackage[pscoord]{eso-pic}
|
||||
\newcommand\ShowFramePicture{%
|
||||
\begingroup
|
||||
\color{red}
|
||||
\AtTextLowerLeft{\framebox(\LenToUnit{\textwidth},\LenToUnit{\textheight}){}}%
|
||||
\AtTextUpperLeft{\put(0,\LenToUnit{\headsep}){\framebox(\LenToUnit{\textwidth},\LenToUnit{\headheight}){}}}%
|
||||
\AtTextLowerLeft{\put(0,\LenToUnit{-\footskip}){\framebox(\LenToUnit{\textwidth},\LenToUnit{\headheight}){}}}%
|
||||
\endgroup
|
||||
}
|
||||
\AddToShipoutPicture{\ShowFramePicture}
|
||||
\fi
|
||||
%\RequirePackage[a4,cam,center]{crop}%
|
||||
%\RequirePackage[cam,center]{crop}%
|
||||
\fi
|
||||
|
||||
\ifframe
|
||||
\ifverbose
|
||||
\RequirePackage[colorgrid,pscoord]{eso-pic}%
|
||||
\else
|
||||
\RequirePackage[pscoord]{eso-pic}
|
||||
\newcommand\ShowBlueFrame{%
|
||||
\begingroup
|
||||
\color{blue}
|
||||
% odd page
|
||||
% \AtTextLowerLeft{\put(\LenToUnit{-23.6mm},\LenToUnit{-21.8mm}){\framebox(\LenToUnit{188.3mm},\LenToUnit{245.4mm}){}}}%
|
||||
% even page
|
||||
% \AtTextLowerLeft{\put(\LenToUnit{-19.6mm},\LenToUnit{-21.8mm}){\framebox(\LenToUnit{188.3mm},\LenToUnit{245.4mm}){}}}%
|
||||
\endgroup
|
||||
}
|
||||
\AddToShipoutPicture{\ShowBlueFrame}
|
||||
\fi
|
||||
\fi
|
||||
|
||||
% \geometry{papersize={170mm,240mm},total={124mm,185mm}}
|
||||
|
||||
%% Indexing options for proceedings to link up people's names to their
|
||||
%% various participation and affiliation options.
|
||||
|
||||
\newcommand
|
||||
{\indexedperson}
|
||||
[3]
|
||||
{\index{#2!#1}\index{#1}\index{#1!#3}}
|
||||
|
||||
\newcommand
|
||||
{\indexedauthor}
|
||||
[1]
|
||||
{\indexedperson{#1}{Authors}{Author}}
|
||||
|
||||
\newcommand
|
||||
{\indexededitor}
|
||||
[1]
|
||||
{\indexedperson{#1}{Editors}{Editor}}
|
||||
|
||||
\newcommand
|
||||
{\indexedpcmember}
|
||||
[1]
|
||||
{\indexedperson{#1}{PC Members}{PC Member}}
|
||||
|
||||
\newcommand
|
||||
{\indexedreviewer}
|
||||
[1]
|
||||
{\indexedperson{#1}{Reviewers}{Reviewer}}
|
||||
|
||||
\newcommand
|
||||
{\indexedorganizer}
|
||||
[1]
|
||||
{\indexedperson{#1}{Organizers}{Organizer}}
|
||||
|
||||
\newcommand
|
||||
{\indexedwebmaster}
|
||||
[1]
|
||||
{\indexedperson{#1}{Webmasters}{Webmaster}}
|
||||
|
||||
\newcommand
|
||||
{\indexedaffiliation}
|
||||
[2]
|
||||
{\indexedperson{#1}{#2}{#2}}
|
||||
|
||||
\newcommand
|
||||
{\indexedsupervisor}
|
||||
[2]
|
||||
{\indexedperson{#1}{}{Supervisor: #2}\indexedperson{#2}{Supervisors}{Supervisor}}
|
||||
|
||||
\endinput
|
||||
|
||||
% \crop[font=\upshape\mdseries\small\textsf]
|
||||
|
||||
% EOF
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 384 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue