commit 39ad9735ce4e3bd74a186632ad73fecace9ae708 from: Isabella date: Tue May 13 22:35:49 2025 UTC Initial Commit commit - /dev/null commit + 39ad9735ce4e3bd74a186632ad73fecace9ae708 blob - /dev/null blob + 204aa53967db08853b3404f5c68e9e6762d1a7ef (mode 755) --- /dev/null +++ .Xresources @@ -0,0 +1,94 @@ +! __ __ +! \ \ / / +! \ V / _ __ ___ ___ ___ _ _ _ __ ___ ___ ___ +! > < | '__/ _ \/ __|/ _ \| | | | '__/ __/ _ \/ __| +! _ / . \| | | __/\__ \ (_) | |_| | | | (_| __/\__ \ +! (_)_/ \_\_| \___||___/\___/ \__,_|_| \___\___||___/ +! +! + +!-------------------------------------------------------------------------------- +! Xft settings: | +!-------------------------------------------------------------------------------- + +Xft.dpi: 96 +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +!-------------------------------------------------------------------------------- +! URxvt settings: | | +!-------------------------------------------------------------------------------- + +URxvt.depth: 32 +URxvt.geometry: 84x32 +URxvt.transparent: 0 +URxvt.fading: 0 +! URxvt.urgentOnBell: 1 +! URxvt.visualBell: 1 +URxvt.loginShell: 1 +URxvt.saveLines: 60 +URxvt.internalBorder: 2 +URxvt.lineSpace: 0 + +! Fonts. +URxvt.allow_bold: 0 +/* URxvt.font: -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */ +URxvt*font: xft:Monospace:pixelsize=11 +URxvt*boldFont: xft:Monospace:pixelsize=11 + +! Fix font space. +URxvt*letterSpace: -1 + +! Scrollbar. +URxvt.scrollStyle: rxvt +URxvt.scrollBar: 0 + +! Perl extensions. +URxvt.perl-ext-common: default,matcher +URxvt.matcher.button: 1 +URxvt.urlLauncher: firefox-esr + +! Cursor. +URxvt.cursorBlink: 0 +URxvt.cursorColor: #00ee00 +URxvt.cursorUnderline: 0 + +! Pointer. +URxvt.pointerBlank: 1 + +*background: #030007 +*foreground: #00dd00 +!!*fading: 40 +*fadeColor: #880000 +*cursorColor: #880000 +*pointerColorBackground: #586e75 +*pointerColorForeground: #93a1a1 + +! *color1: #073642 +! *color2: #073642 +! *color3: #073642 +! *color4: #073642 +! *color5: #073642 +! *color6: #073642 +! *color7: #073642 +! *color8: #073642 +! *color9: #073642 + +! green +*color10: #228822 + +! *color11: #073642 + +! blue +*color12: #004088 + +! *color13: #073642 + +! cyan +*color14: #006088 + +! *color15: #073642 blob - /dev/null blob + b1373e56c19769b771b19001a070abbe77fe22ed (mode 755) --- /dev/null +++ .Xresources_mac @@ -0,0 +1,94 @@ +! __ __ +! \ \ / / +! \ V / _ __ ___ ___ ___ _ _ _ __ ___ ___ ___ +! > < | '__/ _ \/ __|/ _ \| | | | '__/ __/ _ \/ __| +! _ / . \| | | __/\__ \ (_) | |_| | | | (_| __/\__ \ +! (_)_/ \_\_| \___||___/\___/ \__,_|_| \___\___||___/ +! +! + +!-------------------------------------------------------------------------------- +! Xft settings: | +!-------------------------------------------------------------------------------- + +Xft.dpi: 227 +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +!-------------------------------------------------------------------------------- +! URxvt settings: | | +!-------------------------------------------------------------------------------- + +URxvt.depth: 32 +URxvt.geometry: 84x32 +URxvt.transparent: 0 +URxvt.fading: 0 +! URxvt.urgentOnBell: 1 +! URxvt.visualBell: 1 +URxvt.loginShell: 1 +URxvt.saveLines: 60 +URxvt.internalBorder: 2 +URxvt.lineSpace: 0 + +! Fonts. +URxvt.allow_bold: 0 +/* URxvt.font: -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */ +URxvt*font: xft:Monospace:pixelsize=20 +URxvt*boldFont: xft:Monospace:pixelsize=20 + +! Fix font space. +URxvt*letterSpace: -1 + +! Scrollbar. +URxvt.scrollStyle: rxvt +URxvt.scrollBar: 0 + +! Perl extensions. +URxvt.perl-ext-common: default,matcher +URxvt.matcher.button: 1 +URxvt.urlLauncher: firefox-esr + +! Cursor. +URxvt.cursorBlink: 0 +URxvt.cursorColor: #004400 +URxvt.cursorUnderline: 1 + +! Pointer. +URxvt.pointerBlank: 1 + +*background: #000000 +*foreground: #006600 +!!*fading: 40 +*fadeColor: #880000 +*cursorColor: #880000 +*pointerColorBackground: #586e75 +*pointerColorForeground: #93a1a1 + +! *color1: #073642 +! *color2: #073642 +! *color3: #073642 +! *color4: #073642 +! *color5: #073642 +! *color6: #073642 +! *color7: #073642 +! *color8: #073642 +! *color9: #073642 + +! green +*color10: #228822 + +! *color11: #073642 + +! blue +*color12: #004088 + +! *color13: #073642 + +! cyan +*color14: #006088 + +! *color15: #073642 blob - /dev/null blob + 09651360590d575f8c95efb75a03dfff1b3b54fd (mode 755) --- /dev/null +++ .bash_profile @@ -0,0 +1,7 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc + +startx blob - /dev/null blob + 44fbcdb2f9f559325af64ac97a946577de812355 (mode 755) --- /dev/null +++ .bashrc @@ -0,0 +1,37 @@ +# _ _ +# | | | | +# | |__ __ _ ___| |__ _ __ ___ +# | '_ \ / _` / __| '_ \| '__/ __| +# _| |_) | (_| \__ \ | | | | | (__ +# (_)_.__/ \__,_|___/_| |_|_| \___| + +# REMINDER: Use ' for strings and " for programming. + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# Exports. +# root: PS1='\033[01;33m\]\h\033[00m\]:\033[01;34m\]\w\033[01;31m\]\$\033[00m\] ' +export PS1='\033[01;33m\]\h\033[00m\]:\033[01;34m\]\w\033[01;32m\]\$\033[00m\] ' +export EDITOR="/usr/bin/vim" +# export PATH="/folder/bin:$PATH" + +# Functions. +filesize () { + name=$1 + + if [[ -n "$name" ]]; then + ls -aGhl $name | awk -F " " {'print $4'} + stat -c%s $name + wc -c $name | awk -F " " {'print $1'} + + else + echo "Argument error!" + fi +} + +# Aliases. +alias emacs='emacs -nw' +alias ls='exa' blob - /dev/null blob + f0631bdc466311b711c44c6a72b2c5a5dffb9679 (mode 755) --- /dev/null +++ .compton.conf @@ -0,0 +1,6 @@ +# Fading +fading = true; # Fade windows during opacity changes. +fade-delta = 12; # The time between steps in a fade in milliseconds. (default 10). +fade-in-step = 0.15; # Opacity change between steps while fading in. (default 0.028). +fade-out-step = 0.15; # Opacity change between steps while fading out. (default 0.03). +no-fading-openclose = false; # Fade windows in/out when opening/closing. blob - /dev/null blob + cc106c0abbcbc9ba47c05bb74fa6b2fa28bdd988 (mode 755) --- /dev/null +++ .config/emacs/init.el @@ -0,0 +1,67 @@ +;; Disable toolbar. +;; (menu-bar-mode -1) + +;; Disable backups. +(setq make-backup-files nil) + +;; Set line numbers to display. +(when (version<= "26.0.50" emacs-version ) + (global-display-line-numbers-mode)) + +;; %H = 24hr, e.g 02:33. %k = blank-padded, e.g: 2:33. +;; %I = 12hr. %l = blank-padded. +;; %M = minutes. +;; %S = seconds. +;; %p = am/pm. +(setq display-time-format "%l:%M(%p)") +(display-time-mode 1) + +;; Set html-mode for .php files. +(setq auto-mode-alist + (append '((".*\\.php\\'" . html-mode)) + auto-mode-alist)) + +;; Windmove window controls. +(global-set-key (kbd "C-c ") 'windmove-left) +(global-set-key (kbd "C-c ") 'windmove-right) +(global-set-key (kbd "C-c ") 'windmove-up) +(global-set-key (kbd "C-c ") 'windmove-down) + +;; Theme. +(setq theme-file "~/.config/emacs/theme.el") +(load theme-file) + +;; Evil mode. +;; Enable MELPA to install evil mode and neotree. ('M-x package-refresh-contents' then 'M-x package-install RET '). +;; Current pkg list: dired-sidebar, evil and evil-collection. +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) +(package-initialize) +;; Evil mode. +(setq evil-want-keybinding nil) +(require 'evil) +(evil-mode 1) +(require 'evil-collection) + +;; Dired-sidebar. +(add-hook 'emacs-startup-hook #'dired-sidebar-toggle-sidebar) +(use-package dired-sidebar + :bind (("C-x C-n" . dired-sidebar-toggle-sidebar)) + :ensure t + :commands (dired-sidebar-toggle-sidebar) + :init + (add-hook 'dired-sidebar-mode-hook + (lambda () + (unless (file-remote-p default-directory) + (auto-revert-mode)))) + :config + (push 'toggle-window-split dired-sidebar-toggle-hidden-commands) + (push 'rotate-windows dired-sidebar-toggle-hidden-commands) + + (setq dired-sidebar-subtree-line-prefix "__") + (setq dired-sidebar-theme 'none) + (setq dired-sidebar-use-term-integration t) + (setq dired-sidebar-use-custom-font t)) + (setq dired-sidebar-width 40) + (setq dired-sidebar-display-alist '((side . right))) + (setq dired-sidebar-pop-to-sidebar-on-toggle-open nil) blob - /dev/null blob + 3b5ab4ccccd60623bafd27840f9a6ed5be207675 (mode 755) --- /dev/null +++ .config/emacs/theme.el @@ -0,0 +1,117 @@ +;;; deeper-blue-theme.el --- Custom theme for faces + +;; Copyright (C) 2011-2014 Free Software Foundation, Inc. + +;; Author: Scott Frazer + +;; This file is part of GNU Emacs. + +;; GNU Emacs 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. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(deftheme deeper-blue + "Face colors using a deep blue background.") + +(let ((class '((class color) (min-colors 89)))) + (custom-theme-set-faces + 'deeper-blue + `(Info-title-1-face ((,class (:family "helv" :weight bold :height 1.728)))) + `(Info-title-2-face ((,class (:family "helv" :weight bold :height 1.44)))) + `(Info-title-3-face ((,class (:family "helv" :weight bold :height 1.2)))) + `(Info-title-4-face ((,class (:family "helv" :weight bold)))) + `(compilation-column-number ((,class (:foreground "LightGreen")))) + `(compilation-error ((,class (:foreground "Red1")))) + `(compilation-info ((,class (:weight normal :foreground "LightSkyBlue")))) + `(compilation-line-number ((,class (:foreground "LightGreen")))) + `(compilation-mode-line-exit ((,class (:foreground "blue4")))) + `(cperl-array-face ((,class (:foreground "yellow2")))) + `(cperl-hash-face ((,class (:foreground "coral1")))) + `(cursor ((,class (:background "green")))) + `(default ((,class (:background "#181a26" :foreground "gray80")))) + ;; `(diff-added ((,class (nil)))) + ;; `(diff-changed ((,class (nil)))) + `(diff-context ((,class (:foreground "seashell4")))) + `(diff-file-header ((,class (:background "grey60")))) + `(diff-function ((,class (:inherit diff-header)))) + `(diff-header ((,class (:background "grey45")))) + `(diff-hunk-header ((,class (:inherit diff-header)))) + `(diff-index ((,class (:inherit diff-file-header)))) + `(diff-indicator-added ((,class (:foreground "white" :background "darkolivegreen")))) + `(diff-indicator-changed ((,class (:foreground "white" :background "dodgerblue4")))) + `(diff-indicator-removed ((,class (:foreground "white" :background "indianred4")))) + `(diff-refine-change ((,class (:background "skyblue4")))) + ;; `(diff-removed ((,class (nil)))) + `(dired-marked ((,class (:background "dodgerblue3" :foreground "white")))) + `(ediff-current-diff-A ((,class (:background "green4" :foreground "white")))) + `(ediff-current-diff-B ((,class (:background "darkorange3" :foreground "white")))) + `(ediff-even-diff-B ((,class (:background "Grey50" :foreground "White")))) + `(ediff-fine-diff-A ((,class (:background "skyblue4" :foreground "white")))) + `(ediff-fine-diff-B ((,class (:background "cyan4" :foreground "white")))) + `(ediff-odd-diff-A ((,class (:background "Grey50" :foreground "White")))) + `(error ((,class (:foreground "red")))) + `(flymake-errline ((,class (:background nil :underline "red")))) + `(flymake-warnline ((,class (:background nil :underline "magenta3")))) + `(font-lock-builtin-face ((,class (:foreground "LightCoral")))) + `(font-lock-comment-delimiter-face ((,class (:foreground "gray50")))) + `(font-lock-comment-face ((,class (:foreground "gray50")))) + `(font-lock-constant-face ((,class (:foreground "DarkOliveGreen3")))) + `(font-lock-doc-face ((,class (:foreground "moccasin")))) + `(font-lock-doc-string-face ((,class (:foreground "moccasin")))) + `(font-lock-function-name-face ((,class (:foreground "goldenrod")))) + `(font-lock-keyword-face ((,class (:foreground "DeepSkyBlue1")))) + `(font-lock-preprocessor-face ((,class (:foreground "gold")))) + `(font-lock-reference-face ((,class (:foreground "LightCoral")))) + `(font-lock-regexp-grouping-backslash ((,class (:weight bold)))) + `(font-lock-regexp-grouping-construct ((,class (:weight bold)))) + `(font-lock-string-face ((,class (:foreground "burlywood")))) + `(font-lock-type-face ((,class (:foreground "CadetBlue1")))) + `(font-lock-variable-name-face ((,class (:foreground "SeaGreen2")))) + `(fringe ((,class (:background "black")))) + `(highlight ((,class (:background "DodgerBlue4")))) + `(ido-first-match ((,class (:weight normal :foreground "orange")))) + `(ido-only-match ((,class (:foreground "green")))) + `(ido-subdir ((,class (:foreground nil :inherit font-lock-keyword-face)))) + `(info-header-node ((,class (:foreground "DeepSkyBlue1")))) + `(info-header-xref ((,class (:foreground "SeaGreen2")))) + `(info-menu-header ((,class (:family "helv" :weight bold)))) + `(info-node ((,class (:foreground "DeepSkyBlue1")))) + `(info-xref ((,class (:foreground "SeaGreen2")))) + `(isearch ((,class (:background "coral2" :foreground "white")))) + `(isearch-lazy-highlight-face ((,class (:background "coral4" :foreground "white")))) + `(lazy-highlight ((,class (:background "cadetblue" :foreground "white")))) + `(match ((,class (:background "DeepPink4")))) + `(minibuffer-prompt ((,class (:foreground "CadetBlue1")))) + `(mode-line ((,class (:background "gray75" :foreground "black" :box (:line-width 1 :style released-button))))) + `(mode-line-buffer-id ((,class (:weight bold :background nil :foreground "blue4")))) + `(mode-line-inactive ((,class (:background "gray40" :foreground "black" :box (:line-width 1 :color "gray40" :style nil))))) + `(outline-1 ((,class (:foreground "SkyBlue1")))) + `(outline-2 ((,class (:foreground "CadetBlue1")))) + `(outline-3 ((,class (:foreground "LightSteelBlue1")))) + `(outline-4 ((,class (:foreground "turquoise2")))) + `(outline-5 ((,class (:foreground "aquamarine1")))) + `(primary-selection ((,class (:background "blue3")))) + `(region ((,class (:background "#103050")))) + `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white")))) + `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white")))) + `(success ((,class (:foreground "SeaGreen2")))) + `(warning ((,class (:foreground "Yellow")))))) + +(provide-theme 'deeper-blue) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; deeper-blue-theme.el ends here blob - /dev/null blob + 4b5c307ce29298912faae540135d5642da5dbb15 (mode 755) --- /dev/null +++ .config/herbstluftwm/autostart @@ -0,0 +1,179 @@ +#!/usr/bin/env bash + +# this is a simple config for herbstluftwm + +hc() { + herbstclient "$@" +} + +hc emit_hook reload + +xsetroot -solid '#222222' + +# remove all existing keybindings +hc keyunbind --all + +# keybindings +# if you have a super key you will be much happier with Mod set to Mod4 +#Mod=Mod1 # Use alt as the main modifier +Mod=Mod4 # Use the super key as the main modifier + +hc keybind $Mod-Shift-q quit +hc keybind $Mod-Shift-r reload +hc keybind $Mod-Shift-c close +#hc keybind $Mod-Return spawn ${TERMINAL:-xterm} # use your $TERMINAL with xterm as fallback +hc keybind $Mod-Return spawn urxvt +hc keybind $Mod-space spawn rofi -show run -modi run -location 7 -width 100 \ + -lines 2 -line-margin 0 -line-padding 1 \ + -separator-style none -font "mono 10" -columns 9 -bw 0 \ + -disable-history \ + -hide-scrollbar \ + -color-window "#222222, #222222, #b1b4b3" \ + -color-normal "#222222, #b1b4b3, #222222, #005577, #b1b4b3" \ + -color-active "#222222, #b1b4b3, #222222, #007763, #b1b4b3" \ + -color-urgent "#222222, #b1b4b3, #222222, #77003d, #b1b4b3" \ + -kb-row-select "Tab" -kb-row-tab "" + +# basic movement +# focusing clients +hc keybind $Mod-Left focus left +hc keybind $Mod-Down focus down +hc keybind $Mod-Up focus up +hc keybind $Mod-Right focus right +hc keybind $Mod-h focus left +hc keybind $Mod-j focus down +hc keybind $Mod-k focus up +hc keybind $Mod-l focus right + +# moving clients +hc keybind $Mod-Shift-Left shift left +hc keybind $Mod-Shift-Down shift down +hc keybind $Mod-Shift-Up shift up +hc keybind $Mod-Shift-Right shift right +hc keybind $Mod-Shift-h shift left +hc keybind $Mod-Shift-j shift down +hc keybind $Mod-Shift-k shift up +hc keybind $Mod-Shift-l shift right + +# splitting frames +# create an empty frame at the specified direction +hc keybind $Mod-u split bottom 0.5 +hc keybind $Mod-o split right 0.5 +# let the current frame explode into subframes +hc keybind $Mod-Control-space split explode + +# resizing frames +resizestep=0.05 +hc keybind $Mod-Control-h resize left +$resizestep +hc keybind $Mod-Control-j resize down +$resizestep +hc keybind $Mod-Control-k resize up +$resizestep +hc keybind $Mod-Control-l resize right +$resizestep +hc keybind $Mod-Control-Left resize left +$resizestep +hc keybind $Mod-Control-Down resize down +$resizestep +hc keybind $Mod-Control-Up resize up +$resizestep +hc keybind $Mod-Control-Right resize right +$resizestep + +# tags +tag_names=( {1..9} ) +tag_keys=( {1..9} 0 ) + +hc rename default "${tag_names[0]}" || true +for i in ${!tag_names[@]} ; do + hc add "${tag_names[$i]}" + key="${tag_keys[$i]}" + if ! [ -z "$key" ] ; then + hc keybind "$Mod-$key" use_index "$i" + hc keybind "$Mod-Shift-$key" move_index "$i" + fi +done + +# cycle through tags +hc keybind $Mod-period use_index +1 --skip-visible +hc keybind $Mod-comma use_index -1 --skip-visible + +# layouting +hc keybind $Mod-r remove +hc keybind $Mod-s floating toggle +hc keybind $Mod-f fullscreen toggle +hc keybind $Mod-p pseudotile toggle +# The following cycles through the available layouts within a frame, but skips +# layouts, if the layout change wouldn't affect the actual window positions. +# I.e. if there are two windows within a frame, the grid layout is skipped. +hc keybind $Mod-b \ + or , and . compare tags.focus.curframe_wcount = 2 \ + . cycle_layout +1 vertical horizontal max vertical grid \ + , cycle_layout +1 + +# mouse +hc mouseunbind --all +hc mousebind $Mod-Button1 move +hc mousebind $Mod-Button2 zoom +hc mousebind $Mod-Button3 resize + +# focus +hc keybind $Mod-BackSpace cycle_monitor +hc keybind $Mod-Tab cycle_all +1 +hc keybind $Mod-Shift-Tab cycle_all -1 +hc keybind $Mod-c cycle +hc keybind $Mod-i jumpto urgent + +# theme +hc attr theme.tiling.reset 1 +hc attr theme.floating.reset 1 +hc set frame_border_active_color '#222222' +hc set frame_border_normal_color '#101010' +hc set frame_bg_normal_color '#565656' +hc set frame_bg_active_color '#345F0C' +hc set frame_border_width 1 +hc set always_show_frame 1 +hc set frame_bg_transparent 1 +hc set frame_transparent_width 5 +hc set frame_gap 4 + +hc attr theme.active.color '#9fbc00' +hc attr theme.normal.color '#454545' +hc attr theme.urgent.color orange +hc attr theme.inner_width 1 +hc attr theme.inner_color black +hc attr theme.border_width 3 +hc attr theme.floating.border_width 4 +hc attr theme.floating.outer_width 1 +hc attr theme.floating.outer_color black +hc attr theme.active.inner_color '#3E4A00' +hc attr theme.active.outer_color '#3E4A00' +hc attr theme.background_color '#141414' + +hc set window_gap 0 +hc set frame_padding 0 +hc set smart_window_surroundings 0 +hc set smart_frame_surroundings 1 +hc set mouse_recenter_gap 0 + +# rules +hc unrule -F +#hc rule class=XTerm tag=3 # move all xterms to tag 3 +hc rule focus=on # normally focus new clients +#hc rule focus=off # normally do not focus new clients +# give focus to most common terminals +#hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on +hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on +hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on +hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off + +hc set tree_style '╾│ ├└╼─┐' + +# unlock, just to be sure +hc unlock + +# do multi monitor setup here, e.g.: +# hc set_monitors 1280x1024+0+0 1280x1024+1280+0 +# or simply: +# hc detect_monitors + +# find the panel +panel=~/.config/herbstluftwm/panel.sh +[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh +for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do + # start it on each monitor + "$panel" $monitor & +done blob - /dev/null blob + 1a8e498868293adfd077ade15b2b1417d2e68340 (mode 755) --- /dev/null +++ .config/herbstluftwm/panel.sh @@ -0,0 +1,187 @@ +#!/usr/bin/env bash + +quote() { + local q="$(printf '%q ' "$@")" + printf '%s' "${q% }" +} + +hc_quoted="$(quote "${herbstclient_command[@]:-herbstclient}")" +hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} +monitor=${1:-0} +geometry=( $(hc monitor_rect "$monitor") ) +if [ -z "$geometry" ] ;then + echo "Invalid monitor $monitor" + exit 1 +fi +# geometry has the format W H X Y +x=${geometry[0]} +y=${geometry[1]} +panel_width=${geometry[2]} +panel_height=16 +font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*" +bgcolor=$(hc get frame_border_normal_color) +selbg=$(hc get window_border_active_color) +selfg='#101010' + +#### +# Try to find textwidth binary. +# In e.g. Ubuntu, this is named dzen2-textwidth. +if which textwidth &> /dev/null ; then + textwidth="textwidth"; +elif which dzen2-textwidth &> /dev/null ; then + textwidth="dzen2-textwidth"; +else + echo "This script requires the textwidth tool of the dzen2 project." + exit 1 +fi +#### +# true if we are using the svn version of dzen2 +# depending on version/distribution, this seems to have version strings like +# "dzen-" or "dzen-x.x.x-svn" +if dzen2 -v 2>&1 | head -n 1 | grep -q '^dzen-\([^,]*-svn\|\),'; then + dzen2_svn="true" +else + dzen2_svn="" +fi + +if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then + # mawk needs "-W interactive" to line-buffer stdout correctly + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593504 + uniq_linebuffered() { + awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@" + } +else + # other awk versions (e.g. gawk) issue a warning with "-W interactive", so + # we don't want to use it there. + uniq_linebuffered() { + awk '$0 != l { print ; l=$0 ; fflush(); }' "$@" + } +fi + +hc pad $monitor $panel_height + +{ + ### Event generator ### + # based on different input data (mpc, date, hlwm hooks, ...) this generates events, formed like this: + # \t [...] + # e.g. + # date ^fg(#efefef)18:33^fg(#909090), 2013-10-^fg(#efefef)29 + + #mpc idleloop player & + while true ; do + # "date" output is checked once a second, but an event is only + # generated if the output changed compared to the previous run. + date +$'date\t^fg(#efefef)%H:%M^fg(#909090), %Y-%m-^fg(#efefef)%d' + sleep 1 || break + done > >(uniq_linebuffered) & + childpid=$! + hc --idle + kill $childpid +} 2> /dev/null | { + IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)" + visible=true + date="" + windowtitle="" + while true ; do + + ### Output ### + # This part prints dzen data based on the _previous_ data handling run, + # and then waits for the next event to happen. + + separator="^bg()^fg($selbg)|" + # draw tags + for i in "${tags[@]}" ; do + case ${i:0:1} in + '#') + echo -n "^bg($selbg)^fg($selfg)" + ;; + '+') + echo -n "^bg(#9CA668)^fg(#141414)" + ;; + ':') + echo -n "^bg()^fg(#ffffff)" + ;; + '!') + echo -n "^bg(#FF0675)^fg(#141414)" + ;; + *) + echo -n "^bg()^fg(#ababab)" + ;; + esac + if [ ! -z "$dzen2_svn" ] ; then + # clickable tags if using SVN dzen + echo -n "^ca(1,$hc_quoted focus_monitor \"$monitor\" && " + echo -n "$hc_quoted use \"${i:1}\") ${i:1} ^ca()" + else + # non-clickable tags if using older dzen + echo -n " ${i:1} " + fi + done + echo -n "$separator" + echo -n "^bg()^fg() ${windowtitle//^/^^}" + # small adjustments + right="$separator^bg() $date $separator" + right_text_only=$(echo -n "$right" | sed 's.\^[^(]*([^)]*)..g') + # get width of right aligned text.. and add some space.. + width=$($textwidth "$font" "$right_text_only ") + echo -n "^pa($(($panel_width - $width)))$right" + echo + + ### Data handling ### + # This part handles the events generated in the event loop, and sets + # internal variables based on them. The event and its arguments are + # read into the array cmd, then action is taken depending on the event + # name. + # "Special" events (quit_panel/togglehidepanel/reload) are also handled + # here. + + # wait for next event + IFS=$'\t' read -ra cmd || break + # find out event origin + case "${cmd[0]}" in + tag*) + #echo "resetting tags" >&2 + IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)" + ;; + date) + #echo "resetting date" >&2 + date="${cmd[@]:1}" + ;; + quit_panel) + exit + ;; + togglehidepanel) + currentmonidx=$(hc list_monitors | sed -n '/\[FOCUS\]$/s/:.*//p') + if [ "${cmd[1]}" -ne "$monitor" ] ; then + continue + fi + if [ "${cmd[1]}" = "current" ] && [ "$currentmonidx" -ne "$monitor" ] ; then + continue + fi + echo "^togglehide()" + if $visible ; then + visible=false + hc pad $monitor 0 + else + visible=true + hc pad $monitor $panel_height + fi + ;; + reload) + exit + ;; + focus_changed|window_title_changed) + windowtitle="${cmd[@]:2}" + ;; + #player) + # ;; + esac + done + + ### dzen2 ### + # After the data is gathered and processed, the output of the previous block + # gets piped to dzen2. + +} 2> /dev/null | dzen2 -w $panel_width -x $x -y $y -fn "$font" -h $panel_height \ + -e "button3=;button4=exec:$hc_quoted use_index -1;button5=exec:$hc_quoted use_index +1" \ + -ta l -bg "$bgcolor" -fg '#efefef' blob - /dev/null blob + 774208d1cb2bcf91de550e35ef9347195c8cd034 (mode 755) --- /dev/null +++ .config/herbstluftwm/restartpanels.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +installdir=/ + +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +defaultpanel="$XDG_CONFIG_HOME/herbstluftwm/panel.sh" + +[ -x "$defaultpanel" ] || defaultpanel="$installdir/etc/xdg/herbstluftwm/panel.sh" + +panelcmd="${1:-$defaultpanel}" + +herbstclient emit_hook quit_panel + +for i in $(herbstclient list_monitors | cut -d':' -f1) ; do + "$panelcmd" $i & +done blob - /dev/null blob + bf3fb5e438273a4563a9341459a59c164e527c90 (mode 755) --- /dev/null +++ .config/i3/config @@ -0,0 +1,209 @@ +# _ ____ _____ __ _ +# (_)___ \ / ____| / _(_) +# _ __) | | | ___ _ __ | |_ _ __ _ +# | ||__ < | | / _ \| '_ \| _| |/ _` | +# | |___) | | |___| (_) | | | | | | | (_| | +# |_|____/ \_____\___/|_| |_|_| |_|\__, | +# __/ | +# |___/ + +# Mod key. +set $mod Mod4 + +# Font. +#font pango: Raleway Light,FontAwesome 9 +font pango: Sans,FontAwesome 9 + +# Thin borders. +hide_edge_borders both + +# Drag windows. +floating_modifier $mod + +# Change focus. +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# Lock. +bindsym $mod+Shift+x exec i3lock --color 661111 + +# Move focused window. +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +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+b split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen + +# change container layout +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +set $workspace1 "1 " +set $workspace2 "2 " +set $workspace3 "3 " +set $workspace4 "4 " +set $workspace5 "5 " +set $workspace6 "6 " +set $workspace7 "7 " +set $workspace8 "8 " +set $workspace9 "9 " +set $workspace10 "10 " + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $workspace1 +bindsym $mod+Shift+2 move container to workspace $workspace2 +bindsym $mod+Shift+3 move container to workspace $workspace3 +bindsym $mod+Shift+4 move container to workspace $workspace4 +bindsym $mod+Shift+5 move container to workspace $workspace5 +bindsym $mod+Shift+6 move container to workspace $workspace6 +bindsym $mod+Shift+7 move container to workspace $workspace7 +bindsym $mod+Shift+8 move container to workspace $workspace8 +bindsym $mod+Shift+9 move container to workspace $workspace9 +bindsym $mod+Shift+0 move container to workspace $workspace10 + +# switch to workspace +bindsym $mod+1 workspace $workspace1 +bindsym $mod+2 workspace $workspace2 +bindsym $mod+3 workspace $workspace3 +bindsym $mod+4 workspace $workspace4 +bindsym $mod+5 workspace $workspace5 +bindsym $mod+6 workspace $workspace6 +bindsym $mod+7 workspace $workspace7 +bindsym $mod+8 workspace $workspace8 +bindsym $mod+9 workspace $workspace9 +bindsym $mod+0 workspace $workspace10 + +# reload the configuration file +bindsym $mod+Shift+c reload + +# restart i3 inplace +bindsym $mod+Shift+r restart + +# exit i3 +bindsym $mod+Shift+e exec ~/.i3/scripts/exit_menu.sh + + +# resize window (you can also use the mouse for that) +mode "resize" { + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + 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 Return mode "default" + bindsym Escape mode "default" +} + +# resize mode +bindsym $mod+r mode "resize" + +set $bg-colour #441144 +set $inactive-bg-colour #331133 +set $text-colour #ff1174 +set $inactive-text-colour #c40008 +set $urgent-bg-colour #E53935 + +# window colors +#Border. Background. Text. Indicator. Colours. +client.focused $bg-colour $bg-colour $text-colour #00ff00 +client.unfocused $inactive-bg-colour $inactive-bg-colour $inactive-text-colour #00ff00 +client.focused_inactive $inactive-bg-colour $inactive-bg-colour $inactive-text-colour #00ff00 +client.urgent $urgent-bg-colour $urgent-bg-colour $text-colour #00ff00 + +# bar +bar { + #status_command i3blocks -c ~/.config/i3/i3blocks.conf + status_command i3status -c ~/.config/i3/i3status.conf + position top + colors { + background $bg-colour + separator #757575 + # border background text + focused_workspace $bg-colour $bg-colour $text-colour + inactive_workspace $inactive-bg-colour $inactive-bg-colour $inactive-text-colour + urgent_workspace $urgent-bg-colour $urgent-bg-colour $text-colour + } +} + + +# sticky window +bindsym $mod+Shift+s sticky toggle + +# floating +for_window [class="qTox"] floating enable +for_window [class="Pavucontrol"] floating enable +for_window [class="Skype"] floating enable + +# default workspaces +assign [class="Spotify"] $workspace10 +assign [class="Skype"] $workspace9 +assign [class="qTox"] $workspace9 + +# workspace default monitors +workspace $workspace1 output DVI-I-2 +workspace $workspace2 output DVI-I-2 +workspace $workspace3 output DVI-I-2 +workspace $workspace4 output DVI-I-2 +workspace $workspace5 output DVI-I-2 +workspace $workspace6 output DVI-I-2 +workspace $workspace9 output DVI-I-2 +workspace $workspace10 output DVI-I-2 + +# key-bindings +#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 2 +5% #increase sound volume +#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 2 -5% #decrease sound volume +#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 2 toggle # mute sound +#bindsym XF86AudioPlay exec playerctl play-pause +#bindsym XF86AudioPause exec playerctl play-pause +#bindsym XF86AudioNext exec playerctl next +#bindsym XF86AudioPrev exec playerctl previous +bindsym $mod+Shift+f exec firefox +bindsym $mod+Shift+l exec libreoffice +bindsym $mod+Return exec urxvt +bindsym $mod+Shift+q kill +bindsym Print exec xfce4-screenshot +bindsym $mod+d exec rofi -show drun -lines 3 -eh 2 -width 60 -padding 20 -opacity "85" -bw 0 -bc "$bg-colour" -bg "$bg-colour" -fg "$text-colour" -hlbg "$bg-colour" -hlfg "#955995" -font "Sans 11" + +# startup +#exec_always xrandr --output DisplayPort-0 --off --output DisplayPort-1 --mode 1280x1024 --pos 1920x0 --rotate normal --output HDMI-A-0 --off --output HDMI-A-1 --off --output DVI-D-0 --primary --mode 1920x1080 --pos 0x0 --rotate normal +#exec_always --no-startup-id feh --bg-scale ~/Pictures/GNU/GNU_1920_1080_Dark.png +exec_always --no-startup-id feh --bg-scale ~/Pictures/Wallpapers/wallpaper.jpg +exec redshift -O 4500 +exec setxkbmap gb + +#exec --no-startup-id compton -f blob - /dev/null blob + 52fe79af1820247700dc93d2ff47ff75c51a6ce5 (mode 755) --- /dev/null +++ .config/i3/i3blocks.conf @@ -0,0 +1,149 @@ +# _ ____ _ _ _ _____ __ _ +# (_)___ \| | | | | | / ____| / _(_) +# _ __) | |__ | | ___ ___| | _____ | | ___ _ __ | |_ _ __ _ +# | ||__ <| '_ \| |/ _ \ / __| |/ / __| | | / _ \| '_ \| _| |/ _` | +# | |___) | |_) | | (_) | (__| <\__ \ | |___| (_) | | | | | | | (_| | +# |_|____/|_.__/|_|\___/ \___|_|\_\___/ \_____\___/|_| |_|_| |_|\__, | +# __/ | +# |___/ + +# Global properties +# +# The top properties below are applied to every block, but can be overridden. +# Each block command defaults to the script name to avoid boilerplate. +command=/usr/share/i3blocks/$BLOCK_NAME +separator_block_width=1 +markup=none + +# Volume indicator +# +# The first parameter sets the step (and units to display) +# The second parameter overrides the mixer selection +# See the script for details. +#[volume] +#label=VOL +#label=♪ +#instance=Master +#instance=PCM +#interval=1 +#signal=10 +#command=~/.i3/scripts/volume + +# Memory usage +# +# The type defaults to "mem" if the instance is not specified. +[memory] +label= +color=#999999 +separator=false +interval=30 + +#[memory] +#label=SWAP +#instance=swap +#separator=false +#interval=30 + +# Disk usage +# +# The directory defaults to $HOME if the instance is not specified. +# The script may be called with a optional argument to set the alert +# (defaults to 10 for 10%). +[disk] +label= +color=#999999 +instance=/ +interval=30 + +# Network interface monitoring +# +# If the instance is not specified, use the interface used for default route. +# The address can be forced to IPv4 or IPv6 with -4 or -6 switches. +[iface] +instance=wlo1 +label= +color=#008800 +interval=10 +separator=false + +[wifi] +label= +instance=wlo1 +interval=10 +separator=false + +#[bandwidth] +#label= +#instance=wlo1 +#interval=5 + +# CPU usage +# +# The script may be called with -w and -c switches to specify thresholds, +# see the script for details. +#[cpu_usage] +#label=CPU +#interval=10 +#min_width=CPU: 100.00% +#separator=false + +#[load_average] +#label=Load = +#interval=10 + +# Temperature +# +# Support multiple chips, though lm-sensors. +# The script may be called with -w and -c switches to specify thresholds, +# see the script for details. +#[temperature] +#label=TEMP +#interval=10 + +# Battery indicator +# +# The battery instance defaults to 0. +[battery] +label=BAT +label= +color=#999999 +instance=0 +interval=30 + +# Date Time +# +[time] +color=#FF0000 +command=date '+%Y-%m-%d %H:%M:%S' +interval=1 + +# Generic media player support +# +# This displays "ARTIST - SONG" if a music is playing. +# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others. +#[mediaplayer] +#instance=spotify +#interval=5 +#signal=10 + +# OpenVPN support +# +# Support multiple VPN, with colors. +#[openvpn] +#interval=20 + +# Key indicators +# +# Add the following bindings to i3 config file: +# +# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks +# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks +#[keyindicator] +#instance=CAPS +#interval=once +#signal=11 + +#[keyindicator] +#instance=NUM +#interval=once +#signal=11 blob - /dev/null blob + bd3866ebf172fdd570b50cb1ebf2eb8bff388d7d (mode 755) --- /dev/null +++ .config/i3/scripts/keyboard-up.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ ! -f kbdvar.txt ]; then + touch kbdvar.txt + echo 0 > kbdvar.txt +fi + +var=`cat kbdvar.txt` + +if [ $var -gt "255" ]; then + var=255 +elif [ $var -lt "0" ]; then + var=0 +fi + +let "var=var+12" +echo "$var" > kbdvar.txt + +cat kbdvar.txt > /sys/class/leds/spi\:\:kbd_backlight/brightness + +exit 0 blob - /dev/null blob + 34c752eddcee4b7fad34f50691379f33eb866c3c (mode 755) --- /dev/null +++ .config/kitty/kitty.conf @@ -0,0 +1,191 @@ +# vim:fileencoding=utf-8:ft=conf + +# Fully featured +font_family monaco +italic_font auto +bold_font auto +bold_italic_font auto + +# Font size (in pts) +font_size 11.0 + +# The amount the font size is changed by (in pts) when increasing/decreasing +# the font size in a running terminal. +font_size_delta 2 + +# Nord theme - ported from https://github.com/arcticicestudio/nord-hyper +foreground #ff0000 +background #000000 +selection_foreground #000000 +selection_background #FFFACD +url_color #0087BD +cursor #660000 + +# black +color0 #3B4252 +color8 #4C566A + +# red +color1 #BF616A +color9 #BF616A + +# green +color2 #A3BE8C +color10 #A3BE8C + +# yellow +color3 #EBCB8B +color11 #EBCB8B + +# blue +color4 #81A1C1 +color12 #81A1C1 + +# magenta +color5 #B48EAD +color13 #B48EAD + +# cyan +color6 #88C0D0 +color14 #8FBCBB + +# white +color7 #E5E9F0 +color15 #B48EAD + +# Mouse & cursor +# cursor_blink_interval 1.0 +# cursor_stop_blinking_after 4.0 +# one of (block, beam, underline) +cursor_shape beam +mouse_hide_wait 3.0 + +scrollback_lines 10000 +scrollback_pager less +G -R +scrollback_in_new_tab no + +# Wheel scroll multiplier (modify the amount scrolled by the mouse wheel). Use negative +# numbers to change scroll direction. +wheel_scroll_multiplier 5.0 + +# The interval between successive clicks to detect double/triple clicks (in seconds) +click_interval 0.5 + +#Select for double clicking +select_by_word_characters :@-./_~?&=%+# + +#don't care, use i3. +focus_follows_mouse yes +remember_window_size no +enabled_layouts * +initial_window_width 640 +initial_window_height 400 + +# 10 yields ~100 FPS which is more than sufficient for most uses. +repaint_delay 10 + +# Delay (in milliseconds) before input from the program running in the terminal +# is processed. +input_delay 3 + +#bell +visual_bell_duration 0.1 +enable_audio_bell yes + +# The modifier keys to press when clicking with the mouse on URLs to open the URL +open_url_modifiers cmd +open_url_with default + +# Choose whether to use the system implementation of wcwidth() (used to +# control how many cells a character is rendered in). If you use the system +# implementation, then kitty and any programs running in it will agree. The +# problem is that system implementations often are based on outdated unicode +# standards and get the width of many characters, such as emoji, wrong. So if +# you are using kitty with programs that have their own up-to-date wcwidth() +# implementation, set this option to no. +use_system_wcwidth yes + +# The value of the TERM environment variable to set +term xterm-kitty + +#window decorations +window_border_width 1 +window_padding_width 0 +active_border_color #00ff00 +inactive_border_color #cccccc + +# Tab-bar colors +active_tab_foreground #000 +active_tab_background #eee +inactive_tab_foreground #444 +inactive_tab_background #999 + + +# Key mappings + +# Clipboard +map cmd+v paste_from_clipboard +map ctrl+shift+s paste_from_selection +map cmd+c copy_to_clipboard +map shift+insert paste_from_selection +map ctrl+shift+o pass_selection_to_program google-chrome +# map ctrl+shift+o pass_selection_to_program + +# Scrolling +map ctrl+shift+up scroll_line_up +map ctrl+shift+down scroll_line_down +map ctrl+shift+k scroll_line_up +map ctrl+shift+j scroll_line_down +map ctrl+shift+page_up scroll_page_up +map ctrl+shift+page_down scroll_page_down +map ctrl+shift+home scroll_home +map ctrl+shift+end scroll_end +map ctrl+shift+h show_scrollback + +# Window management +map ctrl+shift+enter new_window +map ctrl+shift+w close_window +map ctrl+shift+] next_window +map ctrl+shift+[ previous_window +map ctrl+shift+f move_window_forward +map ctrl+shift+b move_window_backward +map ctrl+shift+` move_window_to_top +map ctrl+shift+1 first_window +map ctrl+shift+2 second_window +map ctrl+shift+3 third_window +map ctrl+shift+4 fourth_window +map ctrl+shift+5 fifth_window +map ctrl+shift+6 sixth_window +map ctrl+shift+7 seventh_window +map ctrl+shift+8 eighth_window +map ctrl+shift+9 ninth_window +map ctrl+shift+0 tenth_window +# You can also open a new window running an arbitrary program, for example: +# map ctrl+shift+y new_window mutt +# You can also pass the current selection to the new program by using the @selection placeholder +# map ctrl+shift+y new_window less @selection +# Finally, you can even send the contents of the current screen + history buffer as stdin using +# the placeholders @text (which is the plain text) and @ansi (which includes text styling escape codes) +# For example, the following command opens the scrollback buffer in less in a new window. +# map ctrl+shift+y new_window @ansi less +G -R + + +# Tab management +map cmd+right next_tab +map cmd+left previous_tab +map cmd+t new_tab +map cmd+w close_tab +map ctrl+shift+l next_layout +map ctrl+shift+. move_tab_forward +map ctrl+shift+, move_tab_backward +# Just as with new_window above, you can also pass the name of arbitrary +# commands to run when using new_tab. + +# Miscellaneous +map cmd+equal increase_font_size +map cmd+minus decrease_font_size +map cmd+backspace restore_font_size +map cmd+enter toggle_fullscreen + +background_opacity 0.6 +dynamic_background_opacity yes blob - /dev/null blob + 1c28cadac0e1f747b5d4521cbf309fc6a5e436f8 (mode 755) --- /dev/null +++ .config/vim/mswin @@ -0,0 +1,126 @@ +" Set options and add mapping such that Vim behaves a lot like MS-Windows +" +" Maintainer: The Vim Project +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar + +" Bail out if this isn't wanted. +if exists("g:skip_loading_mswin") && g:skip_loading_mswin + finish +endif + +" set the 'cpoptions' to its Vim default +if 1 " only do this when compiled with expression evaluation + let s:save_cpo = &cpoptions +endif +set cpo&vim + +" set 'selection', 'selectmode', 'mousemodel' and 'keymodel' for MS-Windows +behave mswin + +" backspace and cursor keys wrap to previous/next line +set backspace=indent,eol,start whichwrap+=<,>,[,] + +" backspace in Visual mode deletes selection +vnoremap d + +if has("clipboard") + " CTRL-X and SHIFT-Del are Cut + vnoremap "+x + vnoremap "+x + + " CTRL-C and CTRL-Insert are Copy + vnoremap "+y + vnoremap "+y + + " CTRL-V and SHIFT-Insert are Paste + map "+gP + map "+gP + + cmap + + cmap + +endif + +" Pasting blockwise and linewise selections is not possible in Insert and +" Visual mode without the +virtualedit feature. They are pasted as if they +" were characterwise instead. +" Uses the paste.vim autoload script. +" Use CTRL-G u to have CTRL-Z only undo the paste. + +if 1 + exe 'inoremap