ALL NEW DOTFILES!
No more branches and no more Makefiles
This commit is contained in:
commit
a26076b864
73 changed files with 11125 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
configDots/ranger/bookmarks
|
||||
configDots/ranger/history
|
||||
configDots/ranger/tagged
|
||||
|
||||
simpleDots/vim/vimplug-plugins
|
||||
!simpleDots/vim/vimplug-plugins/.gitkeep
|
6
README.md
Normal file
6
README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# dotfiles
|
||||
Theese are my dotfiles...
|
||||
Credits go to many people, especially Jess Frazelle.
|
||||
|
||||
## VIM Plugins
|
||||
The vim plugins need to be installed with :PlugInstall
|
84
Setup.sh
Executable file
84
Setup.sh
Executable file
|
@ -0,0 +1,84 @@
|
|||
#!/bin/bash
|
||||
###################################################################
|
||||
##
|
||||
# Setup my dotfiles
|
||||
#
|
||||
|
||||
|
||||
## Make sure this script is executed from the directory where it lives
|
||||
olddir=$(pwd)
|
||||
cd $(dirname $0)
|
||||
|
||||
## Some directories should exist before we start
|
||||
mkdir --parents ~/.config
|
||||
mkdir --parents ~/.local/share/applications
|
||||
|
||||
## Take all files (or dirs) in simpleDots,
|
||||
## delete them if they exist as a dotfile in ~/ or in ~/.config/
|
||||
## and recreate them as a link to this repo.
|
||||
echo "Recreating simpledots..."
|
||||
for target in $(find $(pwd)/simpleDots -maxdepth 1 -mindepth 1 ! -name "*.swp" ! -name "*+*")
|
||||
do
|
||||
basetarget=$(basename $target)
|
||||
echo " $basetarget"
|
||||
rm --force --recursive ~/.$basetarget
|
||||
rm --force --recursive ~/.config/$basetarget
|
||||
ln --symbolic --no-dereference --force $target ~/.$basetarget
|
||||
done
|
||||
|
||||
### Do the same for configDots
|
||||
echo "Recreating configDots..."
|
||||
for target in $(find $(pwd)/configDots -maxdepth 1 -mindepth 1 ! -name "*.swp" ! -name "*+*")
|
||||
do
|
||||
basetarget=$(basename $target)
|
||||
echo " $basetarget"
|
||||
rm --force --recursive ~/.$basetarget
|
||||
rm --force --recursive ~/.config/$basetarget
|
||||
ln --symbolic --no-dereference --force $target ~/.config/$basetarget
|
||||
done
|
||||
|
||||
### ... and for desktopfiles
|
||||
echo "Recreating desktopfiles..."
|
||||
for target in $(find $(pwd)/desktopfiles -maxdepth 1 -mindepth 1 ! -name "*.swp" ! -name "*+*")
|
||||
do
|
||||
basetarget=$(basename $target)
|
||||
echo " $basetarget"
|
||||
rm --force --recursive ~/.local/share/applications/$basetarget
|
||||
ln --symbolic --no-dereference --force $target ~/.local/share/applications/$basetarget
|
||||
done
|
||||
|
||||
## So far, we ignored files containing the + character. Now,
|
||||
## if we got an option passed to the script, we will check if there is
|
||||
## a dot file with +option as a suffix.
|
||||
## If we find one, we will replace the original link we create before with a
|
||||
## new link to this file.
|
||||
if [ $# == 1 ]
|
||||
then
|
||||
echo "Recreating simpledots for option $1..."
|
||||
for target in $(find $(pwd)/simpleDots -maxdepth 1 -mindepth 1 ! -name "*.swp" -name "*+$1")
|
||||
do
|
||||
basetarget=$(echo $(basename $target) | cut --delimiter="+" --field="1")
|
||||
echo " $basetarget"
|
||||
rm --force --recursive ~/.$basetarget
|
||||
ln --symbolic --no-dereference --force $target ~/.$basetarget
|
||||
done
|
||||
echo "Recreating configDots for option $1..."
|
||||
for target in $(find $(pwd)/configDots -maxdepth 1 -mindepth 1 ! -name "*.swp" -name "*+$1")
|
||||
do
|
||||
basetarget=$(echo $(basename $target) | cut --delimiter="+" --field="1")
|
||||
echo " $basetarget"
|
||||
rm --force --recursive ~/.config/$basetarget
|
||||
ln --symbolic --no-dereference --force $target ~/.config/$basetarget
|
||||
done
|
||||
echo "Recreating desktopfiles for option $1..."
|
||||
for target in $(find $(pwd)/desktopfiles -maxdepth 1 -mindepth 1 ! -name "*.swp" -name "*+$1")
|
||||
do
|
||||
basetarget=$(echo $(basename $target) | cut --delimiter="+" --field="1")
|
||||
echo " $basetarget"
|
||||
rm --force --recursive ~/.local/share/applications/$basetarget
|
||||
ln --symbolic --no-dereference --force $target ~/.local/share/applications/$basetarget
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
cd $olddir
|
189
bootstrapArchLinux.org
Normal file
189
bootstrapArchLinux.org
Normal file
|
@ -0,0 +1,189 @@
|
|||
#+TITLE: Arch Linux Installation
|
||||
* Preparation
|
||||
- Download Arch Linux ISO image
|
||||
- Write it to an usb drive with
|
||||
#+BEGIN_SRC
|
||||
$ dd if=[ARCH-LINUX.iso] of=[/path/to/usbdrive]
|
||||
#+END_SRC
|
||||
- Boot the computer from this stick
|
||||
|
||||
* Prepare the disk
|
||||
We will partition the disk drive for UEFI boot.
|
||||
The root disk will be encrypted, /boot will reside inside the unencrypted EFI service partition.
|
||||
The diskdevice is /dev/sda.
|
||||
|
||||
** Partition the disk
|
||||
- Write some zeros to the disk to make sure there is no bootsector left.
|
||||
#+BEGIN_SRC
|
||||
$ dd if=/dev/zero of=/dev/sda
|
||||
#+END_SRC
|
||||
- Abort after a few seconds.
|
||||
- Create partitions and format them
|
||||
#+BEGIN_SRC
|
||||
$ gdisk /dev/sda
|
||||
| o [ENTER] to create a new empty GUID partition table (GPT)
|
||||
| y [ENTER] to confirm
|
||||
|
|
||||
| n [ENTER] add a new partition
|
||||
| [ENTER] to select default partition number of 1
|
||||
| [ENTER] to select default start at first sector
|
||||
| +512M [ENTER] make that size partition for booting
|
||||
| ef00 [ENTER] EFI partition type
|
||||
|
|
||||
| n [ENTER] add a new partition
|
||||
| [ENTER] to select default partition number of 2
|
||||
| [ENTER] to select default start at first sector
|
||||
| +60G [ENTER] allocate whatever size wanted for linux
|
||||
|
|
||||
| w [ENTER] Write changes
|
||||
| y [ENTER] confirm
|
||||
#+END_SRC
|
||||
|
||||
** Encrypt the root partition
|
||||
- Create and open the root partition
|
||||
#+BEGIN_SRC
|
||||
$ cryptsetup luksFormat -v -s 512 -h sha512 /dev/sda2
|
||||
$ cryptsetup open /dev/sda2 cryptroot
|
||||
#+END_SRC
|
||||
- Format with ext4
|
||||
#+BEGIN_SRC
|
||||
$ mkfs.ext4 /dev/mapper/cryptroot
|
||||
#+END_SRC
|
||||
- Mount the encrypted volume
|
||||
#+BEGIN_SRC
|
||||
$ mount /dev/mapper/cryptroot /mnt
|
||||
#+END_SRC
|
||||
|
||||
** Mount the /boot partition
|
||||
#+BEGIN_SRC
|
||||
$ mkfs.fat -F32 /dev/sda1
|
||||
$ mkdir /mnt/boot
|
||||
$ mount /dev/sda1 /mnt/boot
|
||||
#+END_SRC
|
||||
|
||||
* Install the base-system
|
||||
- Connect to wifi
|
||||
#+BEGIN_SRC
|
||||
$ wifi-menu
|
||||
#+END_SRC
|
||||
- Select a nearby (possibly faster) mirror by editing /etc/pacman.d/mirrorlist
|
||||
- Install the base-system
|
||||
#+BEGIN_SRC
|
||||
$ pacstrap /mnt base base-devel dialog openssl-1.0 git intel-ucode \
|
||||
wpa_supplicant puppet linux linux-firmware vi netctl
|
||||
#+END_SRC
|
||||
- Generate fstab for the new system
|
||||
#+BEGIN_SRC
|
||||
$ genfstab -pU /mnt >> /mnt/etc/fstab
|
||||
#+END_SRC
|
||||
|
||||
* Configure the new system
|
||||
- Chroot into the new system
|
||||
#+BEGIN_SRC
|
||||
$ arch-chroot /mnt /bin/bash
|
||||
#+END_SRC
|
||||
- Set the hostname
|
||||
#+BEGIN_SRC
|
||||
$ echo MYHOSTNAME > /etc/hostname
|
||||
#+END_SRC
|
||||
- Edit /etc/vconsole.conf to set keyboard and font
|
||||
#+BEGIN_SRC
|
||||
$ vi /etc/vconsole.conf
|
||||
FONT=latarcyrheb-sun32
|
||||
KEYMAP=de
|
||||
#+END_SRC
|
||||
The FONT setting is optional. latarcyrheb-sun32 is useful for small hidpi devices like GPD Pocket.
|
||||
- Add encryption components to initramfs
|
||||
#+BEGIN_SRC
|
||||
$ vi /etc/mkinitcpio.conf
|
||||
...
|
||||
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt
|
||||
filesystems fsck)
|
||||
...
|
||||
$ mkinitcpio -P
|
||||
#+END_SRC
|
||||
- Install bootloader
|
||||
#+BEGIN_SRC
|
||||
$ bootctl install
|
||||
#+END_SRC
|
||||
- Configure the bootloader
|
||||
#+BEGIN_SRC
|
||||
$ vi /boot/loader/loader.conf
|
||||
default arch
|
||||
auto-firmware no
|
||||
timeout 0
|
||||
console-mode 2
|
||||
editor no
|
||||
#+END_SRC
|
||||
- Configure the bootloader entry
|
||||
#+BEGIN_SRC
|
||||
$ blkid | grep sda2 | cut -d \" -f 2 > /boot/loader/entries/arch.conf
|
||||
$ vi /boot/loader/arch.conf
|
||||
title Arch Linux
|
||||
linux /vmlinuz-linux
|
||||
initrd /intel-ucode.img
|
||||
initrd /initramfs-linux.img
|
||||
options cryptdevice=UUID=[DEVICE-UUID]:cryptroot root=/dev/mapper/cryptroot rw
|
||||
fbcon=rotate:1
|
||||
#+END_SRC
|
||||
DEVICE-UUID is the string we added with the first command.
|
||||
fbcon=rotate:1 rotates the display. This is ONLY NEEDED on device like GPD Pocket.
|
||||
|
||||
* More configuration
|
||||
- Perform basic systemconfiguration
|
||||
#+BEGIN_SRC
|
||||
$ git clone https://github.com/elfrinjo/dotfiles
|
||||
$ cd dotfiles
|
||||
$ ./Setup.sh
|
||||
$ cd sysconfig_arch
|
||||
$ puppet apply --modulepath ./modules cfg_base.pp
|
||||
#+END_SRC
|
||||
- Setup.sh can take options to replace some configfiles. Options are:
|
||||
| Option | Description |
|
||||
|--------+----------------------------------------|
|
||||
| gpdp2 | Some differences for the GPD Pocket II |
|
||||
| | |
|
||||
- Change the root password
|
||||
#+BEGIN_SRC
|
||||
$ passwd
|
||||
#+END_SRC
|
||||
- Create useraccount
|
||||
#+BEGIN_SRC
|
||||
$ useradd -m -G sudo [USERNAME]
|
||||
$ passwd [USERNAME]
|
||||
#+END_SRC
|
||||
- Exit the chroot
|
||||
#+BEGIN_SRC
|
||||
$ exit
|
||||
#+END_SRC
|
||||
- Shutdown the system
|
||||
#+BEGIN_SRC
|
||||
$ shutdown -h now
|
||||
#+END_SRC
|
||||
- Remove usb-drive
|
||||
- Start the computer
|
||||
- Enter drive encryption password
|
||||
- Logon as the newly created user
|
||||
- Connect to wifi
|
||||
#+BEGIN_SRC
|
||||
$ sudo wifi-menu
|
||||
#+END_SRC
|
||||
- Perform more system configuration
|
||||
#+BEGIN_SRC
|
||||
$ git clone https://github.com/elfrinjo/dotfiles
|
||||
$ cd dotfiles
|
||||
$ ./Setup.sh
|
||||
$ cd sysconfig_arch
|
||||
$ sudo puppet apply --modulepath ./modules cfg_[WANTED-CONFIGS].pp
|
||||
#+END_SRC
|
||||
- If there are special configfiles for Setup.sh, repeat with appropriate options. (See above)
|
||||
- configs with cfg_zz need to be applied last as they overwrite previous settings
|
||||
- At some point the Desktop will start. When this happens, just log on and continue inside a terminal
|
||||
- Update the system
|
||||
#+BEGIN_SRC
|
||||
$ pacman -Syu
|
||||
#+END_SRC
|
||||
- Reboot
|
||||
#+BEGIN_SRC
|
||||
$ reboot
|
||||
#+END_SRC
|
30
configDots/pikaur.conf
Normal file
30
configDots/pikaur.conf
Normal file
|
@ -0,0 +1,30 @@
|
|||
[sync]
|
||||
alwaysshowpkgorigin = no
|
||||
develpkgsexpiration = 301
|
||||
upgradesorting = versiondiff
|
||||
|
||||
[build]
|
||||
keepbuilddir = no
|
||||
keepdevbuilddir = yes
|
||||
skipfailedbuild = no
|
||||
alwaysusedynamicusers = no
|
||||
noedit = no
|
||||
donteditbydefault = yes
|
||||
nodiff = yes
|
||||
gitdiffargs = --ignore-space-change,--ignore-all-space
|
||||
|
||||
[colors]
|
||||
version = 10
|
||||
versiondiffold = 11
|
||||
versiondiffnew = 9
|
||||
|
||||
[ui]
|
||||
requireenterconfirm = no
|
||||
diffpager = auto
|
||||
printcommands = no
|
||||
|
||||
[misc]
|
||||
sudoloopinterval = 1
|
||||
pacmanpath = pacman
|
||||
debug = no
|
||||
|
62
configDots/ranger/commands.py
Normal file
62
configDots/ranger/commands.py
Normal file
|
@ -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()
|
1769
configDots/ranger/commands_full.py
Normal file
1769
configDots/ranger/commands_full.py
Normal file
File diff suppressed because it is too large
Load diff
656
configDots/ranger/rc.conf
Normal file
656
configDots/ranger/rc.conf
Normal file
|
@ -0,0 +1,656 @@
|
|||
# ===================================================================
|
||||
# This file contains the default startup commands for ranger.
|
||||
# To change them, it is recommended to create the file
|
||||
# ~/.config/ranger/rc.conf 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
|
||||
|
||||
# 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.
|
||||
#
|
||||
# * 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.
|
||||
set preview_images_method w3m
|
||||
|
||||
# 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
|
||||
|
||||
# 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 solarized
|
||||
|
||||
# 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
|
||||
|
||||
# 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?
|
||||
set draw_borders true
|
||||
|
||||
# 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 files tags in all columns or only in main column?
|
||||
set display_tags_in_all_columns true
|
||||
|
||||
# Set a title for the window?
|
||||
set update_title false
|
||||
|
||||
# Set the title to "ranger" in the tmux program?
|
||||
set update_tmux_title false
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
set line_numbers 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
|
||||
|
||||
# ===================================================================
|
||||
# == 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 -prt
|
||||
alias find scout -aeit
|
||||
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 ? 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
|
||||
|
||||
# Change the line mode
|
||||
map Mf linemode filename
|
||||
map Mi linemode fileinfo
|
||||
map Mm linemode mtime
|
||||
map Mp linemode permissions
|
||||
map Ms linemode sizemtime
|
||||
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 <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 ) 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 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
|
||||
|
||||
# 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 dD console delete
|
||||
|
||||
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
|
||||
|
||||
# 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!
|
||||
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
|
||||
|
||||
# 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-left> eval fm.ui.console.move_word(left=1)
|
||||
cmap <a-right> eval fm.ui.console.move_word(right=1)
|
||||
|
||||
# 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 <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>
|
226
configDots/ranger/rifle.conf
Normal file
226
configDots/ranger/rifle.conf
Normal file
|
@ -0,0 +1,226 @@
|
|||
# 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 | $DISPLAY is not empty (i.e. Xorg runs)
|
||||
#
|
||||
# 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 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 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 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
|
||||
|
||||
#--------------------------------------------
|
||||
# Code
|
||||
#-------------------------------------------
|
||||
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, flat 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 epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Image Viewing:
|
||||
#-------------------------------------------
|
||||
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
||||
mime ^image/svg, has display, X, flag f = display -- "$@"
|
||||
|
||||
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 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
|
||||
|
||||
#-------------------------------------------
|
||||
# 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"
|
||||
|
||||
# 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 very last action, so that it's never triggered accidentally, is to execute a program:
|
||||
mime application/x-executable = "$1"
|
178
configDots/ranger/scope.sh
Executable file
178
configDots/ranger/scope.sh
Executable file
|
@ -0,0 +1,178 @@
|
|||
#!/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.
|
||||
|
||||
# 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)
|
||||
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=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# Settings
|
||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
||||
HIGHLIGHT_TABWIDTH=8
|
||||
HIGHLIGHT_STYLE='pablo'
|
||||
PYGMENTIZE_STYLE='autumn'
|
||||
|
||||
|
||||
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}" - && 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
|
||||
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
|
||||
;; # Continue with next handler on failure
|
||||
esac
|
||||
}
|
||||
|
||||
handle_image() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
# SVG
|
||||
# image/svg+xml)
|
||||
# convert "${FILE_PATH}" "${IMAGE_CACHE_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 1920 \
|
||||
# -scale-to-y -1 \
|
||||
# -singlefile \
|
||||
# -jpeg -tiffcompression jpeg \
|
||||
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
||||
# && exit 6 || exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
handle_mime() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
# 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
|
||||
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
|
||||
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5
|
||||
# pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5
|
||||
exit 2;;
|
||||
|
||||
# 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
|
14
desktopfiles/gnucash.desktop
Executable file
14
desktopfiles/gnucash.desktop
Executable file
|
@ -0,0 +1,14 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
MimeType=application/x-gnucash;
|
||||
Name[de]=GnuCash
|
||||
Name=GnuCash
|
||||
GenericName[de]=Finanzmanagement
|
||||
GenericName=Finance Management
|
||||
Comment[de]=Verwaltung der Finanzen von Privatanwendern und Kleinbetrieben.
|
||||
Comment=Manage your finances, accounts, and investments
|
||||
Exec=LC_MESSAGES=de_DE.UTF-8 gnucash %f
|
||||
Icon=gnucash-icon
|
||||
StartupNotify=true
|
||||
Terminal=false
|
||||
Categories=Office;Finance;
|
146
simpleDots/Xresources
Normal file
146
simpleDots/Xresources
Normal file
|
@ -0,0 +1,146 @@
|
|||
!! drop in Solarized colorscheme for Xresources/Xdefaults
|
||||
|
||||
!!SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
|
||||
!!--------- ------- ---- ------- ----------- ---------- ----------- -----------
|
||||
!!base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
|
||||
!!base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
|
||||
!!base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46
|
||||
!!base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51
|
||||
!!base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
|
||||
!!base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
|
||||
!!base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93
|
||||
!!base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99
|
||||
!!yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71
|
||||
!!orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80
|
||||
!!red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86
|
||||
!!magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83
|
||||
!!violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77
|
||||
!!blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82
|
||||
!!cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63
|
||||
!!green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60
|
||||
|
||||
#define S_base03 #002b36
|
||||
#define S_base04 #00171d
|
||||
#define S_base02 #073642
|
||||
#define S_base01 #586e75
|
||||
#define S_base00 #c1cacd
|
||||
#define S_base0 #839496
|
||||
#define S_base1 #93a1a1
|
||||
#define S_base2 #eee8d5
|
||||
#define S_base3 #fdf6e3
|
||||
#define S_yellow #b58900
|
||||
#define S_orange #cb4b16
|
||||
#define S_red #dc322f
|
||||
#define S_magenta #d33682
|
||||
#define S_violet #6c71c4
|
||||
#define S_blue #268bd2
|
||||
#define S_cyan #2aa198
|
||||
#define S_green #859900
|
||||
|
||||
!URxvt*background: S_base04
|
||||
!URxvt*foreground: S_base00
|
||||
*background: #00171d
|
||||
*foreground: #c1cacd
|
||||
*depth: 32
|
||||
!*fading: 40
|
||||
!*fadeColor: S_base03
|
||||
|
||||
*cursorColor: #93a1a1
|
||||
*pointerColorBackground:#586e75
|
||||
*pointerColorForeground:#93a1a1
|
||||
!! black dark/light
|
||||
*color0: #073642
|
||||
*color8: #002b36
|
||||
!! red dark/light
|
||||
*color1: #dc322f
|
||||
*color9: #cb4b16
|
||||
!! green dark/light
|
||||
*color2: #859900
|
||||
*color10: #586e75
|
||||
!! yellow dark/light
|
||||
*color3: #b58900
|
||||
*color11: #c1cacd
|
||||
!! blue dark/light
|
||||
*color4: #268bd2
|
||||
*color12: #839496
|
||||
!! magenta dark/light
|
||||
*color5: #d33682
|
||||
*color13: #6c71c4
|
||||
!! cyan dark/light
|
||||
*color6: #2aa198
|
||||
*color14: #93a1a1
|
||||
!! white dark/light
|
||||
*color7: #eee8d5
|
||||
*color15: #fdf6e3
|
||||
|
||||
|
||||
*utf8: 1
|
||||
*saveLines: 65534
|
||||
|
||||
!-- Xft settings -- !
|
||||
! This stays out until I find out what it does.
|
||||
! It produces ugly huge fonts :(
|
||||
!Xft.dpi: 144
|
||||
!ft.rgba: rgb
|
||||
!ft.autohint: 0
|
||||
!ft.lcdfilter: lcddefault
|
||||
!ft.hintstyle: hintfull
|
||||
!ft.hinting: 1
|
||||
!ft.antialias: 1
|
||||
|
||||
! -- Fonts -- !
|
||||
URxvt.font: xft:Inconsolata:style=Regular:size=12,\
|
||||
xft:Symbola:style=Regular:size=12
|
||||
|
||||
URxvt.boldFont: xft:Inconsolata:style=Bold:size=12,\
|
||||
xft:Symbola:style=Bold:size=12
|
||||
|
||||
*faceSize: 10
|
||||
*bellIsUrgent: true
|
||||
|
||||
!! scroll
|
||||
!! do not scroll with output
|
||||
URxvt*scrollTtyOutput: false
|
||||
!! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
|
||||
URxvt*scrollWithBuffer: true
|
||||
!! scroll back to the bottom on keypress
|
||||
URxvt*scrollTtyKeypress: true
|
||||
|
||||
!! scrollback buffer
|
||||
URxvt.secondaryScreen: 1
|
||||
URxvt.secondaryScroll: 0
|
||||
URxvt.secondaryWheel: 1
|
||||
|
||||
!! no terminal-scrollbar
|
||||
URxvt*scrollBar: false
|
||||
|
||||
!! terminal name
|
||||
URxvt*termName: rxvt
|
||||
|
||||
!! terminal transparency
|
||||
!URxvt*transparent: true
|
||||
!URxvt*shading: 20
|
||||
|
||||
|
||||
!! copy paste
|
||||
URxvt*clipboard.copycmd: xclip -i -selection clipboard
|
||||
URxvt*clipboard.pastecmd: xclip -o -selection clipboard
|
||||
|
||||
!! clickable urls
|
||||
!URxvt.perl-ext-common: default,matcher,selection-to-clipboard
|
||||
!URxvt.url-launcher: /usr/local/bin/browser-exec
|
||||
!URxvt.matcher.button: 1
|
||||
!URxvt.url-select.underline: true
|
||||
|
||||
!! Resizable Fonts
|
||||
URxvt.perl-ext-common: font-size
|
||||
|
||||
!! No annoying 14755 box
|
||||
URxvt.iso14755: false
|
||||
URxvt.iso14755_52: false
|
||||
|
||||
!! get option over to work
|
||||
URxvt.keysym.M-Left: \033[1;5D
|
||||
URxvt.keysym.M-Right: \033[1;5C
|
||||
URxvt.keysym.Control-Left: \033[1;5D
|
||||
URxvt.keysym.Control-Right: \033[1;5C
|
154
simpleDots/Xresources+gpdp2
Normal file
154
simpleDots/Xresources+gpdp2
Normal file
|
@ -0,0 +1,154 @@
|
|||
!! drop in Solarized colorscheme for Xresources/Xdefaults
|
||||
|
||||
!!SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
|
||||
!!--------- ------- ---- ------- ----------- ---------- ----------- -----------
|
||||
!!base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
|
||||
!!base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
|
||||
!!base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46
|
||||
!!base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51
|
||||
!!base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
|
||||
!!base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
|
||||
!!base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93
|
||||
!!base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99
|
||||
!!yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71
|
||||
!!orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80
|
||||
!!red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86
|
||||
!!magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83
|
||||
!!violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77
|
||||
!!blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82
|
||||
!!cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63
|
||||
!!green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60
|
||||
|
||||
#define S_base03 #002b36
|
||||
#define S_base04 #00171d
|
||||
#define S_base02 #073642
|
||||
#define S_base01 #586e75
|
||||
#define S_base00 #c1cacd
|
||||
#define S_base0 #839496
|
||||
#define S_base1 #93a1a1
|
||||
#define S_base2 #eee8d5
|
||||
#define S_base3 #fdf6e3
|
||||
#define S_yellow #b58900
|
||||
#define S_orange #cb4b16
|
||||
#define S_red #dc322f
|
||||
#define S_magenta #d33682
|
||||
#define S_violet #6c71c4
|
||||
#define S_blue #268bd2
|
||||
#define S_cyan #2aa198
|
||||
#define S_green #859900
|
||||
|
||||
!URxvt*background: S_base04
|
||||
!URxvt*foreground: S_base00
|
||||
*background: #00171d
|
||||
*foreground: #c1cacd
|
||||
*depth: 32
|
||||
!*fading: 40
|
||||
!*fadeColor: S_base03
|
||||
|
||||
*cursorColor: #93a1a1
|
||||
*pointerColorBackground:#586e75
|
||||
*pointerColorForeground:#93a1a1
|
||||
!! black dark/light
|
||||
*color0: #073642
|
||||
*color8: #002b36
|
||||
!! red dark/light
|
||||
*color1: #dc322f
|
||||
*color9: #cb4b16
|
||||
!! green dark/light
|
||||
*color2: #859900
|
||||
*color10: #586e75
|
||||
!! yellow dark/light
|
||||
*color3: #b58900
|
||||
*color11: #c1cacd
|
||||
!! blue dark/light
|
||||
*color4: #268bd2
|
||||
*color12: #839496
|
||||
!! magenta dark/light
|
||||
*color5: #d33682
|
||||
*color13: #6c71c4
|
||||
!! cyan dark/light
|
||||
*color6: #2aa198
|
||||
*color14: #93a1a1
|
||||
!! white dark/light
|
||||
*color7: #eee8d5
|
||||
*color15: #fdf6e3
|
||||
|
||||
|
||||
*utf8: 1
|
||||
*saveLines: 65534
|
||||
|
||||
!-- Xft settings -- !
|
||||
! This stays out until I find out what it does.
|
||||
! It produces ugly huge fonts :(
|
||||
!Xft.dpi: 144
|
||||
!ft.rgba: rgb
|
||||
!ft.autohint: 0
|
||||
!ft.lcdfilter: lcddefault
|
||||
!ft.hintstyle: hintfull
|
||||
!ft.hinting: 1
|
||||
!ft.antialias: 1
|
||||
|
||||
! -- Fonts -- !
|
||||
URxvt.font: xft:Inconsolata:style=Regular:size=12,\
|
||||
xft:Symbola:style=Regular:size=12
|
||||
|
||||
URxvt.boldFont: xft:Inconsolata:style=Bold:size=12,\
|
||||
xft:Symbola:style=Bold:size=12
|
||||
|
||||
*faceSize: 10
|
||||
*bellIsUrgent: true
|
||||
|
||||
!! scroll
|
||||
!! do not scroll with output
|
||||
URxvt*scrollTtyOutput: false
|
||||
!! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
|
||||
URxvt*scrollWithBuffer: true
|
||||
!! scroll back to the bottom on keypress
|
||||
URxvt*scrollTtyKeypress: true
|
||||
|
||||
!! scrollback buffer
|
||||
URxvt.secondaryScreen: 1
|
||||
URxvt.secondaryScroll: 0
|
||||
URxvt.secondaryWheel: 1
|
||||
|
||||
!! no terminal-scrollbar
|
||||
URxvt*scrollBar: false
|
||||
|
||||
!! terminal name
|
||||
URxvt*termName: rxvt
|
||||
|
||||
!! terminal transparency
|
||||
!URxvt*transparent: true
|
||||
!URxvt*shading: 20
|
||||
|
||||
|
||||
!! copy paste
|
||||
URxvt*clipboard.copycmd: xclip -i -selection clipboard
|
||||
URxvt*clipboard.pastecmd: xclip -o -selection clipboard
|
||||
|
||||
!! clickable urls
|
||||
!URxvt.perl-ext-common: default,matcher,selection-to-clipboard
|
||||
!URxvt.url-launcher: /usr/local/bin/browser-exec
|
||||
!URxvt.matcher.button: 1
|
||||
!URxvt.url-select.underline: true
|
||||
|
||||
!! Resizable Fonts
|
||||
URxvt.perl-ext-common: font-size
|
||||
|
||||
!! No annoying 14755 box
|
||||
URxvt.iso14755: false
|
||||
URxvt.iso14755_52: false
|
||||
|
||||
!! get option over to work
|
||||
URxvt.keysym.M-Left: \033[1;5D
|
||||
URxvt.keysym.M-Right: \033[1;5C
|
||||
URxvt.keysym.Control-Left: \033[1;5D
|
||||
URxvt.keysym.Control-Right: \033[1;5C
|
||||
|
||||
Xft.dpi: 180
|
||||
Xft.autohint: 0
|
||||
Xft.lcdfilter: lcddefault
|
||||
Xft.hintstyle: hintfull
|
||||
Xft.hinting: 1
|
||||
Xft.antialias: 1
|
||||
Xft.rgba: rgb
|
139
simpleDots/aliases
Normal file
139
simpleDots/aliases
Normal file
|
@ -0,0 +1,139 @@
|
|||
#!/bin/bash
|
||||
|
||||
# debian specific aliases
|
||||
alias pbcopy='xclip -selection clipboard'
|
||||
alias pbpaste='xclip -selection clipboard -o'
|
||||
|
||||
# Easier navigation: .., ..., ...., ....., ~ and -
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias .....="cd ../../../.."
|
||||
alias ~="cd ~" # `cd` is probably faster to type though
|
||||
alias -- -="cd -"
|
||||
|
||||
# Shortcuts
|
||||
alias dl="cd ~/Downloads"
|
||||
alias g="git"
|
||||
alias h="history"
|
||||
|
||||
## Editor
|
||||
alias e='$EDITOR '
|
||||
alias E='sudo $EDITOR '
|
||||
|
||||
# Use dircolors if dircolordb is available
|
||||
test -f ~/.dircolors && eval $(dircolors ~/.dircolors)
|
||||
|
||||
# Always use color output for `ls`
|
||||
# And sort directories before files
|
||||
alias ls="ls --color --group-directories-first"
|
||||
|
||||
# ls abbreviation
|
||||
alias l="ls -l"
|
||||
alias ll="ls -l"
|
||||
alias la="ls -la"
|
||||
|
||||
# Always enable colored `grep` output
|
||||
alias grep='grep --color=auto '
|
||||
|
||||
# Enable aliases to be sudo’ed
|
||||
alias sudo='sudo '
|
||||
|
||||
# Implicit sudos
|
||||
alias docker='sudo docker '
|
||||
alias docker-compose='sudo docker-compose '
|
||||
alias systemctl='sudo systemctl '
|
||||
|
||||
# Get week number
|
||||
alias week='date +%V'
|
||||
|
||||
# Stopwatch
|
||||
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
|
||||
|
||||
# IP addresses
|
||||
alias pubip="dig +short myip.opendns.com @resolver1.opendns.com"
|
||||
alias localip="ip a | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | grep -v '172.17.'"
|
||||
|
||||
# View HTTP traffic
|
||||
alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'"
|
||||
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\""
|
||||
|
||||
# Canonical hex dump some systems have this symlinked
|
||||
command -v hd > /dev/null || alias hd="hexdump -C"
|
||||
|
||||
# OS X has no `md5sum`, so use `md5` as a fallback
|
||||
command -v md5sum > /dev/null || alias md5sum="md5"
|
||||
|
||||
# OS X has no `sha1sum`, so use `shasum` as a fallback
|
||||
command -v sha1sum > /dev/null || alias sha1sum="shasum"
|
||||
|
||||
# Trim new lines and copy to clipboard
|
||||
alias c="tr -d '\n' | xclip -selection clipboard"
|
||||
|
||||
# URL-encode strings
|
||||
alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"'
|
||||
|
||||
# Intuitive map function
|
||||
# For example, to list all directories that contain a certain file:
|
||||
# find . -name .gitattributes | map dirname
|
||||
alias map="xargs -n1"
|
||||
|
||||
# One of @janmoesen’s ProTip™s
|
||||
for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
|
||||
alias "$method"="lwp-request -m '$method'"
|
||||
done
|
||||
|
||||
# Kill all the tabs in Chrome to free up memory
|
||||
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
|
||||
alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
|
||||
|
||||
# Lock the screen (when going AFK)
|
||||
alias afk="~/.bin/~/.bin/screenlock.sh"
|
||||
|
||||
# vhosts
|
||||
alias hosts='sudo vim /etc/hosts'
|
||||
|
||||
# copy working directory
|
||||
alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard'
|
||||
|
||||
# copy file interactive
|
||||
alias cp='cp -i'
|
||||
|
||||
# move file interactive
|
||||
alias mv='mv -i'
|
||||
|
||||
# untar
|
||||
alias untar='tar xvf'
|
||||
|
||||
# Pipe my public key to my clipboard.
|
||||
alias pubkey="more ~/.ssh/id_rsa.pub | xclip -selection clipboard | echo '=> Public key copied to pasteboard.'"
|
||||
|
||||
# Pipe my private key to my clipboard.
|
||||
alias privkey="more ~/.ssh/id_rsa | xclip -selection clipboard | echo '=> Private key copied to pasteboard.'"
|
||||
|
||||
# vi == vim
|
||||
alias vi='vim'
|
||||
|
||||
# vim w/ forced latin1
|
||||
alias l1vim='vim -c "e ++enc=latin1"'
|
||||
|
||||
# Temperatursensoren mit Pfad
|
||||
alias get_systemp="paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) <(ls -1 /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t"
|
||||
|
||||
# Spezialitäten für Arch Linux
|
||||
alias y_clean='yaourt -Rsn $(yaourt -Qqdt)'
|
||||
alias y_update='yaourt -Syu --aur'
|
||||
alias y_inst='yaourt -Sy'
|
||||
alias y_rem='yaourt -Rsn'
|
||||
|
||||
# Passwort erstellen
|
||||
alias mkpasswd='openssl rand -base64 40 | cut -c1-40'
|
||||
|
||||
# Emacs called from bash should be run inside the terminal
|
||||
alias emacs='emacs -nw'
|
||||
|
||||
# k8s simplifications
|
||||
alias k='kubectl'
|
||||
source <(kubectl completion bash)
|
||||
complete -F __start_kubectl k
|
||||
alias kns='kubectl config set-context --current --namespace'
|
34
simpleDots/bash_profile
Normal file
34
simpleDots/bash_profile
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Load the shell dotfiles, and then some:
|
||||
# * ~/.path can be used to extend `$PATH`.
|
||||
# * ~/.extra can be used for other settings you don’t want to commit.
|
||||
for file in ~/.{bash_prompt,aliases,functions,path,extra,exports}; do
|
||||
[[ -r "$file" ]] && [[ -f "$file" ]] && source "$file"
|
||||
done
|
||||
unset file
|
||||
|
||||
# Case-insensitive globbing (used in pathname expansion)
|
||||
#shopt -s nocaseglob
|
||||
|
||||
# Append to the Bash history file, rather than overwriting it
|
||||
shopt -s histappend
|
||||
|
||||
# Autocorrect typos in path names when using `cd`
|
||||
shopt -s cdspell
|
||||
|
||||
# Enable some Bash 4 features when possible:
|
||||
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
|
||||
# * Recursive globbing, e.g. `echo **/*.txt`
|
||||
for option in globstar; do
|
||||
shopt -s "$option" 2> /dev/null
|
||||
done
|
||||
|
||||
# Add tab completion for SSH hostnames based on ~/.ssh/config
|
||||
# ignoring wildcards
|
||||
[[ -e "$HOME/.ssh/config" ]] && complete -o "default" \
|
||||
-o "nospace" \
|
||||
-W "$(grep "^Host" ~/.ssh/config | \
|
||||
grep -v "[?*]" | cut -d " " -f2 | \
|
||||
tr ' ' '\n')" scp sftp ssh
|
||||
|
||||
# print a fortune when the terminal opens
|
||||
which fortune > /dev/null && which lolcat > /dev/null && fortune -a -s | lolcat
|
122
simpleDots/bash_prompt
Normal file
122
simpleDots/bash_prompt
Normal file
|
@ -0,0 +1,122 @@
|
|||
# Shell prompt based on the Solarized Dark theme.
|
||||
# Screenshot: http://i.imgur.com/EkEtphC.png
|
||||
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
|
||||
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
|
||||
|
||||
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
|
||||
export TERM='gnome-256color';
|
||||
elif infocmp xterm-256color >/dev/null 2>&1; then
|
||||
export TERM='xterm-256color';
|
||||
fi;
|
||||
|
||||
prompt_git() {
|
||||
local s='';
|
||||
local branchName='';
|
||||
|
||||
# Check if the current directory is in a Git repository.
|
||||
if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then
|
||||
|
||||
# check if the current directory is in .git before running git checks
|
||||
if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then
|
||||
|
||||
# Ensure the index is up to date.
|
||||
git update-index --really-refresh -q &>/dev/null;
|
||||
|
||||
# Check for uncommitted changes in the index.
|
||||
if ! $(git diff --quiet --ignore-submodules --cached); then
|
||||
s+='+';
|
||||
fi;
|
||||
|
||||
# Check for unstaged changes.
|
||||
if ! $(git diff-files --quiet --ignore-submodules --); then
|
||||
s+='!';
|
||||
fi;
|
||||
|
||||
# Check for untracked files.
|
||||
if [ -n "$(git ls-files --others --exclude-standard)" ]; then
|
||||
s+='?';
|
||||
fi;
|
||||
|
||||
# Check for stashed files.
|
||||
if $(git rev-parse --verify refs/stash &>/dev/null); then
|
||||
s+='$';
|
||||
fi;
|
||||
|
||||
fi;
|
||||
|
||||
# Get the short symbolic ref.
|
||||
# If HEAD isn’t a symbolic ref, get the short SHA for the latest commit
|
||||
# Otherwise, just give up.
|
||||
branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \
|
||||
git rev-parse --short HEAD 2> /dev/null || \
|
||||
echo '(unknown)')";
|
||||
|
||||
[ -n "${s}" ] && s=" [${s}]";
|
||||
|
||||
echo -e "${1}${branchName}${blue}${s}";
|
||||
else
|
||||
return;
|
||||
fi;
|
||||
}
|
||||
|
||||
if tput setaf 1 &> /dev/null; then
|
||||
tput sgr0; # reset colors
|
||||
bold=$(tput bold);
|
||||
reset=$(tput sgr0);
|
||||
# Solarized colors, taken from http://git.io/solarized-colors.
|
||||
black=$(tput setaf 0);
|
||||
blue=$(tput setaf 33);
|
||||
cyan=$(tput setaf 37);
|
||||
green=$(tput setaf 64);
|
||||
orange=$(tput setaf 166);
|
||||
purple=$(tput setaf 125);
|
||||
red=$(tput setaf 124);
|
||||
violet=$(tput setaf 61);
|
||||
white=$(tput setaf 15);
|
||||
yellow=$(tput setaf 136);
|
||||
else
|
||||
bold='';
|
||||
reset="\e[0m";
|
||||
black="\e[1;30m";
|
||||
blue="\e[1;34m";
|
||||
cyan="\e[1;36m";
|
||||
green="\e[1;32m";
|
||||
orange="\e[1;33m";
|
||||
purple="\e[1;35m";
|
||||
red="\e[1;31m";
|
||||
violet="\e[1;35m";
|
||||
white="\e[1;37m";
|
||||
yellow="\e[1;33m";
|
||||
fi;
|
||||
|
||||
# Highlight the user name when logged in as root.
|
||||
if [[ "${USER}" == "root" ]]; then
|
||||
userStyle="${red}";
|
||||
else
|
||||
userStyle="${blue}";
|
||||
fi;
|
||||
|
||||
# Highlight the hostname when connected via SSH.
|
||||
if [[ "${SSH_TTY}" ]]; then
|
||||
hostStyle="${bold}${purple}";
|
||||
else
|
||||
hostStyle="${cyan}";
|
||||
fi;
|
||||
|
||||
# Set the terminal title to the current working directory.
|
||||
PS1="\[\033]0;\w\007\]";
|
||||
PS1+="\[${bold}\]\n"; # newline
|
||||
PS1+="\[${userStyle}\]\u"; # username
|
||||
PS1+="\[${reset}\] at ";
|
||||
PS1+="\[${bold}\]";
|
||||
PS1+="\[${hostStyle}\]\h"; # host
|
||||
PS1+="\[${reset}\] in ";
|
||||
PS1+="\[${bold}\]";
|
||||
PS1+="\[${green}\]\w"; # working directory
|
||||
PS1+="\$(prompt_git \"${reset} on ${bold}${violet}\")"; # Git repository details
|
||||
PS1+="\n";
|
||||
PS1+="\[${reset}\]$ "; # `$` (and reset color)
|
||||
export PS1;
|
||||
|
||||
PS2="\[${yellow}\]→ \[${reset}\]";
|
||||
export PS2;
|
96
simpleDots/bashrc
Normal file
96
simpleDots/bashrc
Normal file
|
@ -0,0 +1,96 @@
|
|||
#!/bin/bash -x
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
#if ! shopt -oq posix; then
|
||||
# if [[ -f /usr/share/bash-completion/bash_completion ]]; then
|
||||
# . /usr/share/bash-completion/bash_completion
|
||||
# elif [[ -f /etc/bash_completion ]]; then
|
||||
# . /etc/bash_completion
|
||||
# fi
|
||||
#fi
|
||||
#
|
||||
#if [ -d /etc/bash_completion.d ]
|
||||
#then
|
||||
# for file in /etc/bash_completion.d/* ; do
|
||||
# source "$file"
|
||||
# done
|
||||
#fi
|
||||
|
||||
if [[ -f $HOME/.bash_profile ]]; then
|
||||
source $HOME/.bash_profile
|
||||
fi
|
64
simpleDots/bin/256colors.pl
Executable file
64
simpleDots/bin/256colors.pl
Executable file
|
@ -0,0 +1,64 @@
|
|||
#!/usr/bin/perl
|
||||
# Author: Todd Larason <jtl@molehill.org>
|
||||
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
|
||||
|
||||
# use the resources for colors 0-15 - usually more-or-less a
|
||||
# reproduction of the standard ANSI colors, but possibly more
|
||||
# pleasing shades
|
||||
|
||||
# colors 16-231 are a 6x6x6 color cube
|
||||
for ($red = 0; $red < 6; $red++) {
|
||||
for ($green = 0; $green < 6; $green++) {
|
||||
for ($blue = 0; $blue < 6; $blue++) {
|
||||
printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
|
||||
16 + ($red * 36) + ($green * 6) + $blue,
|
||||
($red ? ($red * 40 + 55) : 0),
|
||||
($green ? ($green * 40 + 55) : 0),
|
||||
($blue ? ($blue * 40 + 55) : 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# colors 232-255 are a grayscale ramp, intentionally leaving out
|
||||
# black and white
|
||||
for ($gray = 0; $gray < 24; $gray++) {
|
||||
$level = ($gray * 10) + 8;
|
||||
printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
|
||||
232 + $gray, $level, $level, $level);
|
||||
}
|
||||
|
||||
|
||||
# display the colors
|
||||
|
||||
# first the system ones:
|
||||
print "System colors:\n";
|
||||
for ($color = 0; $color < 8; $color++) {
|
||||
print "\x1b[48;5;${color}m ";
|
||||
}
|
||||
print "\x1b[0m\n";
|
||||
for ($color = 8; $color < 16; $color++) {
|
||||
print "\x1b[48;5;${color}m ";
|
||||
}
|
||||
print "\x1b[0m\n\n";
|
||||
|
||||
# now the color cube
|
||||
print "Color cube, 6x6x6:\n";
|
||||
for ($green = 0; $green < 6; $green++) {
|
||||
for ($red = 0; $red < 6; $red++) {
|
||||
for ($blue = 0; $blue < 6; $blue++) {
|
||||
$color = 16 + ($red * 36) + ($green * 6) + $blue;
|
||||
print "\x1b[48;5;${color}m ";
|
||||
}
|
||||
print "\x1b[0m ";
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
|
||||
|
||||
# now the grayscale ramp
|
||||
print "Grayscale ramp:\n";
|
||||
for ($color = 232; $color < 256; $color++) {
|
||||
print "\x1b[48;5;${color}m ";
|
||||
}
|
||||
print "\x1b[0m\n";w
|
||||
|
12
simpleDots/bin/dmenu_dir2menu.sh
Executable file
12
simpleDots/bin/dmenu_dir2menu.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
directory=$1
|
||||
|
||||
## ARG1 needs to be a directory
|
||||
if [ ! -d $directory ]
|
||||
then
|
||||
echo Usage: $0 [Directory with menuitems]
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$directory/$(ls --color=never -1 $directory | dmenu)
|
BIN
simpleDots/bin/lock-keyring
Executable file
BIN
simpleDots/bin/lock-keyring
Executable file
Binary file not shown.
16
simpleDots/bin/lock-keyring.c
Normal file
16
simpleDots/bin/lock-keyring.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include <stdio.h>
|
||||
#include <gnome-keyring.h>
|
||||
|
||||
// To be compiled with:
|
||||
// cc lock-keyring.c -o lock-keyring -Wall $(pkg-config gnome-keyring-1 --cflags --libs)
|
||||
|
||||
int main() {
|
||||
GnomeKeyringResult lock_result = gnome_keyring_lock_all_sync();
|
||||
if (lock_result == GNOME_KEYRING_RESULT_OK) {
|
||||
printf("Successfully locked\n");
|
||||
return 0;
|
||||
} else {
|
||||
printf("Error locking keyring: %d\n", lock_result);
|
||||
return 1;
|
||||
}
|
||||
}
|
25
simpleDots/bin/reconnectfritzbox.sh
Executable file
25
simpleDots/bin/reconnectfritzbox.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Reconnect a Fritz.Box with activated UPnP
|
||||
|
||||
oldIp=$(curl -s https://canihazip.com/s)
|
||||
|
||||
curl "http://fritz.box:49000/igdupnp/control/WANIPConn1" \
|
||||
-H 'Content-Type: text/xml; charset="utf-8"' \
|
||||
-H 'SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' \
|
||||
-d '<?xml version="1.0" encoding="utf-8"?>
|
||||
<s:Envelope
|
||||
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<s:Body>
|
||||
<u:ForceTermination xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" />
|
||||
</s:Body>
|
||||
</s:Envelope>' \
|
||||
-s
|
||||
|
||||
sleep 5
|
||||
|
||||
newIp=$(curl -s https://canihazip.com/s)
|
||||
|
||||
|
||||
notify-send "Renew IP" "Old IP: $oldIp\nNew IP: $newIp"
|
16
simpleDots/bin/screenlock.sh
Executable file
16
simpleDots/bin/screenlock.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
## Take a screenshot and create a lockscreen
|
||||
rm -f /tmp/screen_locked.png
|
||||
scrot /tmp/screen_locked.png
|
||||
mogrify -scale 10% -scale 1000% /tmp/screen_locked.png
|
||||
#convert /tmp/screen_locked.png -swirl 360 -paint 1 /tmp/screen_locked.png
|
||||
|
||||
## Lock the gnome-keyring
|
||||
#test -x ~/.bin/lock-keyring && ~/.bin/lock-keyring
|
||||
|
||||
## Lock screen displaying this image.
|
||||
i3lock --show-failed-attempts --image=/tmp/screen_locked.png
|
||||
|
||||
## Turn the screen off after a delay.
|
||||
sleep 300; pgrep i3lock && xset dpms force off
|
15
simpleDots/bin/startAltBrowser.sh
Executable file
15
simpleDots/bin/startAltBrowser.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
###############################################################################
|
||||
##
|
||||
# Starts the correct browser
|
||||
#
|
||||
#
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
test -x ~/.local/bin/startAltBrowser.sh && (~/.local/bin/startAltBrowser.sh $@) && exit 0
|
||||
test -x /usr/bin/firefox && (/usr/bin/firefox $@ &) && exit 0
|
||||
test -x /usr/bin/chromium && (/usr/bin/chromium --force-dark-mode $@ &) && exit 0
|
||||
|
||||
i3-nagbar -m "None of your favorite browsers were found :-("
|
||||
exit 1
|
15
simpleDots/bin/startAltBrowserPrivat.sh
Executable file
15
simpleDots/bin/startAltBrowserPrivat.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
###############################################################################
|
||||
##
|
||||
# Starts the correct browser in private-mode
|
||||
#
|
||||
#
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
test -x ~/.local/bin/startAltBrowserPrivat.sh && (~/.local/bin/startAltBrowserPrivat.sh $@) && exit 0
|
||||
test -x /usr/bin/firefox && (/usr/bin/firefox --private-window $@ &) && exit 0
|
||||
test -x /usr/bin/chromium && (/usr/bin/chromium --force-dark-mode --incognito $@ &) && exit 0
|
||||
|
||||
i3-nagbar -m "None of your favorite browsers were found :-("
|
||||
exit 1
|
15
simpleDots/bin/startBrowser.sh
Executable file
15
simpleDots/bin/startBrowser.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
###############################################################################
|
||||
##
|
||||
# Starts the correct browser
|
||||
#
|
||||
#
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
test -x ~/.local/bin/startBrowser.sh && (~/.local/bin/startBrowser.sh $@) && exit 0
|
||||
test -x /usr/bin/firefox && (/usr/bin/firefox $@ &) && exit 0
|
||||
test -x /usr/bin/chromium && (/usr/bin/chromium --force-dark-mode $@ &) && exit 0
|
||||
|
||||
i3-nagbar -m "None of your favorite browsers were found :-("
|
||||
exit 1
|
15
simpleDots/bin/startBrowserPrivat.sh
Executable file
15
simpleDots/bin/startBrowserPrivat.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
###############################################################################
|
||||
##
|
||||
# Starts the correct browser in private-mode
|
||||
#
|
||||
#
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
test -x ~/.local/bin/startBrowserPrivat.sh && (~/.local/bin/startBrowserPrivat.sh $@) && exit 0
|
||||
test -x /usr/bin/firefox && (/usr/bin/firefox --private-window $@ &) && exit 0
|
||||
test -x /usr/bin/chromium && (/usr/bin/chromium --force-dark-mode --incognito $@ &) && exit 0
|
||||
|
||||
i3-nagbar -m "None of your favorite browsers were found :-("
|
||||
exit 1
|
23
simpleDots/bin/themer
Executable file
23
simpleDots/bin/themer
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
##################################################################
|
||||
## Themer
|
||||
# Switch Xresources colortheme from dark to light and back
|
||||
# again.
|
||||
#
|
||||
|
||||
statefile=~/.local/themer.state
|
||||
|
||||
state=$(cat $statefile)
|
||||
|
||||
case "$state" in
|
||||
Dark) xrdb -merge ~/.bin/themer_Xresources.light
|
||||
echo Light > $statefile
|
||||
;;
|
||||
Light) xrdb -merge ~/.bin/themer_Xresources.dark
|
||||
echo Dark > $statefile
|
||||
;;
|
||||
esac
|
||||
|
||||
state=$(cat $statefile)
|
||||
notify-send "Console Theme" "$state"
|
||||
|
56
simpleDots/bin/themer_Xresources.dark
Normal file
56
simpleDots/bin/themer_Xresources.dark
Normal file
|
@ -0,0 +1,56 @@
|
|||
#define S_base03 #00171d
|
||||
#define S_base02 #073642
|
||||
#define S_base01 #586e75
|
||||
#define S_base00 #657b83
|
||||
#define S_base0 #839496
|
||||
#define S_base1 #93a1a1
|
||||
#define S_base2 #eee8d5
|
||||
#define S_base3 #fdf6e3
|
||||
|
||||
*background: S_base03
|
||||
*foreground: S_base0
|
||||
*fadeColor: S_base03
|
||||
*cursorColor: S_base1
|
||||
*pointerColorBackground:S_base01
|
||||
*pointerColorForeground:S_base1
|
||||
|
||||
#define S_yellow #b58900
|
||||
#define S_orange #cb4b16
|
||||
#define S_red #dc322f
|
||||
#define S_magenta #d33682
|
||||
#define S_violet #6c71c4
|
||||
#define S_blue #268bd2
|
||||
#define S_cyan #2aa198
|
||||
#define S_green #859900
|
||||
|
||||
!! black dark/light
|
||||
*color0: S_base02
|
||||
*color8: S_base03
|
||||
|
||||
!! red dark/light
|
||||
*color1: S_red
|
||||
*color9: S_orange
|
||||
|
||||
!! green dark/light
|
||||
*color2: S_green
|
||||
*color10: S_base01
|
||||
|
||||
!! yellow dark/light
|
||||
*color3: S_yellow
|
||||
*color11: S_base00
|
||||
|
||||
!! blue dark/light
|
||||
*color4: S_blue
|
||||
*color12: S_base0
|
||||
|
||||
!! magenta dark/light
|
||||
*color5: S_magenta
|
||||
*color13: S_violet
|
||||
|
||||
!! cyan dark/light
|
||||
*color6: S_cyan
|
||||
*color14: S_base1
|
||||
|
||||
!! white dark/light
|
||||
*color7: S_base2
|
||||
*color15: S_base3
|
56
simpleDots/bin/themer_Xresources.light
Normal file
56
simpleDots/bin/themer_Xresources.light
Normal file
|
@ -0,0 +1,56 @@
|
|||
#define S_base03 #002b36
|
||||
#define S_base02 #073642
|
||||
#define S_base01 #586e75
|
||||
#define S_base00 #000000
|
||||
#define S_base0 #839496
|
||||
#define S_base1 #93a1a1
|
||||
#define S_base2 #eee8d5
|
||||
#define S_base3 #fdf6e3
|
||||
|
||||
*background: S_base3
|
||||
*foreground: S_base00
|
||||
*fadeColor: S_base3
|
||||
*cursorColor: S_base01
|
||||
*pointerColorBackground:S_base1
|
||||
*pointerColorForeground:S_base01
|
||||
|
||||
#define S_yellow #b58900
|
||||
#define S_orange #cb4b16
|
||||
#define S_red #dc322f
|
||||
#define S_magenta #d33682
|
||||
#define S_violet #6c71c4
|
||||
#define S_blue #268bd2
|
||||
#define S_cyan #2aa198
|
||||
#define S_green #859900
|
||||
|
||||
!! black dark/light
|
||||
*color0: S_base02
|
||||
*color8: S_base03
|
||||
|
||||
!! red dark/light
|
||||
*color1: S_red
|
||||
*color9: S_orange
|
||||
|
||||
!! green dark/light
|
||||
*color2: S_green
|
||||
*color10: S_base01
|
||||
|
||||
!! yellow dark/light
|
||||
*color3: S_yellow
|
||||
*color11: S_base00
|
||||
|
||||
!! blue dark/light
|
||||
*color4: S_blue
|
||||
*color12: S_base0
|
||||
|
||||
!! magenta dark/light
|
||||
*color5: S_magenta
|
||||
*color13: S_violet
|
||||
|
||||
!! cyan dark/light
|
||||
*color6: S_cyan
|
||||
*color14: S_base1
|
||||
|
||||
!! white dark/light
|
||||
*color7: S_base2
|
||||
*color15: S_base3
|
67
simpleDots/bin/tsaClient.sh
Executable file
67
simpleDots/bin/tsaClient.sh
Executable file
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
#########################################################################
|
||||
## tsaClient.sh
|
||||
#
|
||||
# Clientscript for the FreeTSA Timestamping Service
|
||||
# This script generates a tgz archive containing a given file and the
|
||||
# timestamping information from freetsa.org including tsr, tsq, log and
|
||||
# the ca certificates.
|
||||
#
|
||||
# devops@elfring.ms - 2019-05-29
|
||||
#
|
||||
#
|
||||
|
||||
echo "Clientscript for the FreeTSA Timestamping Service"
|
||||
echo "https://www.freetsa.org"
|
||||
echo
|
||||
|
||||
fileToStamp=$1
|
||||
|
||||
if [ _$# != _1 ]
|
||||
then
|
||||
echo "Usage: $0 [file to timestamp]"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e $fileToStamp ]
|
||||
then
|
||||
echo "$fileToStamp does not exist."
|
||||
echo
|
||||
exit 2
|
||||
fi
|
||||
|
||||
{
|
||||
echo "Timestamping file $fileToStamp"
|
||||
echo
|
||||
|
||||
echo "-------> Create SHA512 checksum (informational)"
|
||||
echo "# sha512sum $fileToStamp"
|
||||
sha512sum $fileToStamp 2>&1 | sed 's/^/ /'
|
||||
echo
|
||||
|
||||
echo "-------> Create and display timestamp query (TSQ)"
|
||||
echo "# openssl ts -query -data $fileToStamp -no_nonce -sha512 -cert -out $fileToStamp.tsq"
|
||||
echo "# openssl ts -query -in $fileToStamp.tsq -text"
|
||||
openssl ts -query -data $fileToStamp -no_nonce -sha512 -cert -out $fileToStamp.tsq 2>&1 | sed 's/^/ /'
|
||||
openssl ts -query -in $fileToStamp.tsq -text 2>&1 | sed 's/^/ /'
|
||||
echo
|
||||
|
||||
echo "-------> Have the TSQ signed and display the reply (TSR)"
|
||||
echo "# curl --silent --header "Content-Type: application/timestamp-query" --data-binary "@$fileToStamp.tsq" https://freetsa.org/tsr --output $fileToStamp.tsr"
|
||||
echo "# openssl ts -reply -in $fileToStamp.tsq -text"
|
||||
curl --silent --header "Content-Type: application/timestamp-query" --data-binary "@$fileToStamp.tsq" https://freetsa.org/tsr --output $fileToStamp.tsr 2>&1 | sed 's/^/ /'
|
||||
openssl ts -reply -in $fileToStamp.tsr -text 2>&1 | sed 's/^/ /'
|
||||
echo
|
||||
|
||||
echo "-------> Verify TSR (informational)"
|
||||
echo "# curl --silent --output freetsa_cacert.pem https://freetsa.org/files/cacert.pem"
|
||||
echo "# openssl ts -verify -in $fileToStamp.tsr -queryfile $fileToStamp.tsq -CAfile freetsa_cacert.pem"
|
||||
curl --silent --output freetsa_cacert.pem https://freetsa.org/files/cacert.pem 2>&1 | sed 's/^/ /'
|
||||
openssl ts -verify -in $fileToStamp.tsr -queryfile $fileToStamp.tsq -CAfile freetsa_cacert.pem 2>&1 | sed 's/^/ /'
|
||||
|
||||
} | tee $fileToStamp.log
|
||||
|
||||
tar czf $fileToStamp.tsa.tgz $fileToStamp.tsq $fileToStamp.tsr $fileToStamp.log freetsa_cacert.pem $fileToStamp
|
||||
rm $fileToStamp.tsq $fileToStamp.tsr $fileToStamp.log freetsa_cacert.pem
|
||||
echo
|
10
simpleDots/bin/xcqr
Executable file
10
simpleDots/bin/xcqr
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# Credit to Maddison Hellstrom (@b0o on Github)
|
||||
text=$(xclip -out -selection clipboard)
|
||||
notify-send --expire-time 3000 "Clipboard" "$text"
|
||||
qrencode --output - --size 1 "$text" \
|
||||
| feh --zoom max \
|
||||
--fullscreen \
|
||||
--force-aliasing \
|
||||
--image-bg white \
|
||||
-
|
225
simpleDots/dircolors
Normal file
225
simpleDots/dircolors
Normal file
|
@ -0,0 +1,225 @@
|
|||
# Configuration file for dircolors, a utility to help you set the
|
||||
# LS_COLORS environment variable used by GNU ls with the --color option.
|
||||
# Copyright (C) 1996, 1999-2010 Free Software Foundation, Inc.
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted provided the copyright notice and this notice are preserved.
|
||||
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
|
||||
# slackware version of dircolors) are recognized but ignored.
|
||||
# Below, there should be one TERM entry for each termtype that is colorizable
|
||||
TERM Eterm
|
||||
TERM ansi
|
||||
TERM color-xterm
|
||||
TERM con132x25
|
||||
TERM con132x30
|
||||
TERM con132x43
|
||||
TERM con132x60
|
||||
TERM con80x25
|
||||
TERM con80x28
|
||||
TERM con80x30
|
||||
TERM con80x43
|
||||
TERM con80x50
|
||||
TERM con80x60
|
||||
TERM cons25
|
||||
TERM console
|
||||
TERM cygwin
|
||||
TERM dtterm
|
||||
TERM eterm-color
|
||||
TERM gnome
|
||||
TERM gnome-256color
|
||||
TERM jfbterm
|
||||
TERM konsole
|
||||
TERM kterm
|
||||
TERM linux
|
||||
TERM linux-c
|
||||
TERM mach-color
|
||||
TERM mlterm
|
||||
TERM putty
|
||||
TERM rxvt
|
||||
TERM rxvt-256color
|
||||
TERM rxvt-cygwin
|
||||
TERM rxvt-cygwin-native
|
||||
TERM rxvt-unicode
|
||||
TERM rxvt-unicode256
|
||||
TERM screen
|
||||
TERM screen-256color
|
||||
TERM screen-256color-bce
|
||||
TERM screen-bce
|
||||
TERM screen-w
|
||||
TERM screen.linux
|
||||
TERM vt100
|
||||
TERM xterm
|
||||
TERM xterm-16color
|
||||
TERM xterm-256color
|
||||
TERM xterm-88color
|
||||
TERM xterm-color
|
||||
TERM xterm-debian
|
||||
# Below are the color init strings for the basic file types. A color init
|
||||
# string consists of one or more of the following numeric codes:
|
||||
# Attribute codes:
|
||||
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||
# Text color codes:
|
||||
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||
# Background color codes:
|
||||
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||
|
||||
## dircolors 256 COLOR SUPPORT (see here: http://www.mail-archive.com/bug-coreutils@gnu.org/msg11030.html)
|
||||
# Text 256 color coding:
|
||||
# 38;5;COLOR_NUMBER
|
||||
# Background 256 color coding:
|
||||
# 48;5;COLOR_NUMBER
|
||||
|
||||
NORMAL 00;38;5;244 # no color code at all
|
||||
#FILE 00 # regular file: use no color at all
|
||||
RESET 0 # reset to "normal" color
|
||||
DIR 00;38;5;33 # directory 01;34
|
||||
LINK 01;38;5;33 # symbolic link. (If you set this to 'target' instead of a
|
||||
# numerical value, the color is as for the file pointed to.)
|
||||
MULTIHARDLINK 00 # regular file with more than one link
|
||||
FIFO 48;5;230;38;5;136;01 # pipe
|
||||
SOCK 48;5;230;38;5;136;01 # socket
|
||||
DOOR 48;5;230;38;5;136;01 # door
|
||||
BLK 48;5;230;38;5;244;01 # block device driver
|
||||
CHR 48;5;230;38;5;244;01 # character device driver
|
||||
ORPHAN 48;5;235;38;5;160 # symlink to nonexistent file, or non-stat'able file
|
||||
SETUID 48;5;160;38;5;230 # file that is setuid (u+s)
|
||||
SETGID 48;5;136;38;5;230 # file that is setgid (g+s)
|
||||
CAPABILITY 30;41 # file with capability
|
||||
STICKY_OTHER_WRITABLE 48;5;64;38;5;230 # dir that is sticky and other-writable (+t,o+w)
|
||||
OTHER_WRITABLE 48;5;235;38;5;33 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 48;5;33;38;5;230 # dir with the sticky bit set (+t) and not other-writable
|
||||
# This is for files with execute permission:
|
||||
EXEC 01;38;5;64
|
||||
# List any file extensions like '.gz' or '.tar' that you would like ls
|
||||
# to colorize below. Put the extension, a space, and the color init string.
|
||||
# (and any comments you want to add after a '#')
|
||||
# If you use DOS-style suffixes, you may want to uncomment the following:
|
||||
#.cmd 01;32 # executables (bright green)
|
||||
#.exe 01;32
|
||||
#.com 01;32
|
||||
#.btm 01;32
|
||||
#.bat 01;32
|
||||
# Or if you want to colorize scripts even if they do not have the
|
||||
# executable bit actually set.
|
||||
#.sh 01;32
|
||||
#.csh 01;32
|
||||
|
||||
# archives or compressed (violet + bold for compression)
|
||||
.tar 00;38;5;61
|
||||
.tgz 01;38;5;61
|
||||
.arj 01;38;5;61
|
||||
.taz 01;38;5;61
|
||||
.lzh 01;38;5;61
|
||||
.lzma 01;38;5;61
|
||||
.tlz 01;38;5;61
|
||||
.txz 01;38;5;61
|
||||
.zip 01;38;5;61
|
||||
.z 01;38;5;61
|
||||
.Z 01;38;5;61
|
||||
.dz 01;38;5;61
|
||||
.gz 01;38;5;61
|
||||
.lz 01;38;5;61
|
||||
.xz 01;38;5;61
|
||||
.bz2 01;38;5;61
|
||||
.bz 01;38;5;61
|
||||
.tbz 01;38;5;61
|
||||
.tbz2 01;38;5;61
|
||||
.tz 01;38;5;61
|
||||
.deb 01;38;5;61
|
||||
.rpm 01;38;5;61
|
||||
.jar 01;38;5;61
|
||||
.rar 01;38;5;61
|
||||
.ace 01;38;5;61
|
||||
.zoo 01;38;5;61
|
||||
.cpio 01;38;5;61
|
||||
.7z 01;38;5;61
|
||||
.rz 01;38;5;61
|
||||
.apk 01;38;5;61
|
||||
|
||||
# image formats (yellow)
|
||||
.jpg 00;38;5;136
|
||||
.JPG 00;38;5;136 #stupid but needed
|
||||
.jpeg 00;38;5;136
|
||||
.gif 00;38;5;136
|
||||
.bmp 00;38;5;136
|
||||
.pbm 00;38;5;136
|
||||
.pgm 00;38;5;136
|
||||
.ppm 00;38;5;136
|
||||
.tga 00;38;5;136
|
||||
.xbm 00;38;5;136
|
||||
.xpm 00;38;5;136
|
||||
.tif 00;38;5;136
|
||||
.tiff 00;38;5;136
|
||||
.png 00;38;5;136
|
||||
.svg 00;38;5;136
|
||||
.svgz 00;38;5;136
|
||||
.mng 00;38;5;136
|
||||
.pcx 00;38;5;136
|
||||
.dl 00;38;5;136
|
||||
.xcf 00;38;5;136
|
||||
.xwd 00;38;5;136
|
||||
.yuv 00;38;5;136
|
||||
.cgm 00;38;5;136
|
||||
.emf 00;38;5;136
|
||||
.eps 00;38;5;136
|
||||
|
||||
# files of interest (base1 + bold)
|
||||
.pdf 01;38;5;245
|
||||
.tex 01;38;5;245
|
||||
.rdf 01;38;5;245
|
||||
.owl 01;38;5;245
|
||||
.n3 01;38;5;245
|
||||
.tt 01;38;5;245
|
||||
.nt 01;38;5;245
|
||||
|
||||
# "unimportant" files as logs and backups (base01)
|
||||
.log 00;38;5;240
|
||||
.bak 00;38;5;240
|
||||
.aux 00;38;5;240
|
||||
.bbl 00;38;5;240
|
||||
.blg 00;38;5;240
|
||||
|
||||
# audio formats (orange)
|
||||
.aac 00;38;5;166
|
||||
.au 00;38;5;166
|
||||
.flac 00;38;5;166
|
||||
.mid 00;38;5;166
|
||||
.midi 00;38;5;166
|
||||
.mka 00;38;5;166
|
||||
.mp3 00;38;5;166
|
||||
.mpc 00;38;5;166
|
||||
.ogg 00;38;5;166
|
||||
.ra 00;38;5;166
|
||||
.wav 00;38;5;166
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axa 00;38;5;166
|
||||
.oga 00;38;5;166
|
||||
.spx 00;38;5;166
|
||||
.xspf 00;38;5;166
|
||||
|
||||
# video formats (as audio + bold)
|
||||
.mov 01;38;5;166
|
||||
.mpg 01;38;5;166
|
||||
.mpeg 01;38;5;166
|
||||
.m2v 01;38;5;166
|
||||
.mkv 01;38;5;166
|
||||
.ogm 01;38;5;166
|
||||
.mp4 01;38;5;166
|
||||
.m4v 01;38;5;166
|
||||
.mp4v 01;38;5;166
|
||||
.vob 01;38;5;166
|
||||
.qt 01;38;5;166
|
||||
.nuv 01;38;5;166
|
||||
.wmv 01;38;5;166
|
||||
.asf 01;38;5;166
|
||||
.rm 01;38;5;166
|
||||
.rmvb 01;38;5;166
|
||||
.flc 01;38;5;166
|
||||
.avi 01;38;5;166
|
||||
.fli 01;38;5;166
|
||||
.flv 01;38;5;166
|
||||
.gl 01;38;5;166
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axv 01;38;5;166
|
||||
.anx 01;38;5;166
|
||||
.ogv 01;38;5;166
|
||||
.ogx 01;38;5;166
|
47
simpleDots/exports
Normal file
47
simpleDots/exports
Normal file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
|
||||
# PATH
|
||||
which ruby >/dev/null 2>&1 && PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
|
||||
export PATH=~/.local/bin:~/.bin:$PATH
|
||||
|
||||
# Make vim the default editor
|
||||
export EDITOR=vim;
|
||||
export TERMINAL="urxvt";
|
||||
|
||||
# Larger bash history (allow 32³ entries; default is 500)
|
||||
export HISTSIZE=50000000;
|
||||
export HISTFILESIZE=$HISTSIZE;
|
||||
export HISTCONTROL=ignoredups;
|
||||
# Make some commands not show up in history
|
||||
export HISTIGNORE=" *:ls:cd:cd -:pwd:exit:date:&::[bf]g:exit:pwd:clear:mplayer";
|
||||
|
||||
# Deutsches System aber englische Messages und Sortierung
|
||||
export LC_MESSAGES="en_US.UTF-8"
|
||||
export LC_COLLATE="C"
|
||||
export LANG="de_DE.UTF-8"
|
||||
export LC_CTYPE="de_DE.UTF-8"
|
||||
export LC_NUMERIC="de_DE.UTF-8"
|
||||
export LC_TIME="de_DE.UTF-8"
|
||||
export LC_MONETARY="de_DE.UTF-8"
|
||||
export LC_PAPER="de_DE.UTF-8"
|
||||
export LC_NAME="de_DE.UTF-8"
|
||||
export LC_ADDRESS="de_DE.UTF-8"
|
||||
export LC_TELEPHONE="de_DE.UTF-8"
|
||||
export LC_MEASUREMENT="de_DE.UTF-8"
|
||||
export LC_IDENTIFICATION="de_DE.UTF-8"
|
||||
unset LC_ALL
|
||||
|
||||
# Highlight section titles in manual pages
|
||||
export LESS_TERMCAP_md="${yellow}";
|
||||
|
||||
# Don’t clear the screen after quitting a manual page
|
||||
export MANPAGER="less -X";
|
||||
|
||||
export DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/user/$(id -u)/bus;
|
||||
|
||||
export TODOTXT_DEFAULT_ACTION=ls
|
||||
|
||||
# hidpi for gtk apps
|
||||
#export GDK_SCALE=2
|
||||
#export GDK_DPI_SCALE=0.5
|
||||
#export QT_DEVICE_PIXEL_RATIO=2
|
387
simpleDots/functions
Normal file
387
simpleDots/functions
Normal file
|
@ -0,0 +1,387 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Trap RC != 0 and display
|
||||
EC() {
|
||||
echo -e '\e[1;31m'code $?'\e[m\n'
|
||||
}
|
||||
trap EC ERR
|
||||
|
||||
# Simple calculator
|
||||
calc() {
|
||||
local result=""
|
||||
result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')"
|
||||
# └─ default (when `--mathlib` is used) is 20
|
||||
|
||||
if [[ "$result" == *.* ]]; then
|
||||
# improve the output for decimal numbers
|
||||
printf "$result" |
|
||||
sed -e 's/^\./0./' `# add "0" for cases like ".5"` \
|
||||
-e 's/^-\./-0./' `# add "0" for cases like "-.5"`\
|
||||
-e 's/0*$//;s/\.$//'; # remove trailing zeros
|
||||
else
|
||||
printf "$result"
|
||||
fi
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
# Create a new directory and enter it
|
||||
mkd() {
|
||||
mkdir -p "$@" && cd "$@"
|
||||
}
|
||||
|
||||
# cd and list
|
||||
cl() {
|
||||
local dir="$1"
|
||||
local dir="${dir:=$HOME}"
|
||||
if [[ -d "$dir" ]]; then
|
||||
cd "$dir" >/dev/null; ls -l
|
||||
else
|
||||
echo "bash: cl: $dir: Directory not found"
|
||||
fi
|
||||
}
|
||||
|
||||
# Simple Note App
|
||||
note () {
|
||||
# if file doesn't exist, create it
|
||||
if [[ ! -f $HOME/.notes ]]; then
|
||||
touch "$HOME/.notes"
|
||||
fi
|
||||
|
||||
if ! (($#)); then
|
||||
# no arguments, print file
|
||||
cat "$HOME/.notes"
|
||||
elif [[ "$1" == "-c" ]]; then
|
||||
# clear file
|
||||
printf "%s" > "$HOME/.notes"
|
||||
else
|
||||
# add all arguments to file
|
||||
printf "%s\n" "$*" >> "$HOME/.notes"
|
||||
fi
|
||||
}
|
||||
|
||||
todo() {
|
||||
if [[ ! -f $HOME/.todo ]]; then
|
||||
touch "$HOME/.todo"
|
||||
fi
|
||||
|
||||
if ! (($#)); then
|
||||
cat "$HOME/.todo"
|
||||
elif [[ "$1" == "-l" ]]; then
|
||||
nl -b a "$HOME/.todo"
|
||||
elif [[ "$1" == "-c" ]]; then
|
||||
> $HOME/.todo
|
||||
elif [[ "$1" == "-r" ]]; then
|
||||
nl -b a "$HOME/.todo"
|
||||
eval printf %.0s- '{1..'"${COLUMNS:-$(tput cols)}"\}; echo
|
||||
read -p "Type a number to remove: " number
|
||||
sed -i ${number}d $HOME/.todo
|
||||
else
|
||||
printf "%s\n" "$*" >> "$HOME/.todo"
|
||||
fi
|
||||
}
|
||||
|
||||
# Make a temporary directory and enter it
|
||||
tmpd() {
|
||||
if [ $# -eq 0 ]; then
|
||||
dir=`mktemp -d` && cd $dir
|
||||
else
|
||||
dir=`mktemp -d -t $1.XXXXXXXXXX` && cd $dir
|
||||
fi
|
||||
}
|
||||
|
||||
# Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression
|
||||
targz() {
|
||||
local tmpFile="${@%/}.tar"
|
||||
tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1
|
||||
|
||||
size=$(
|
||||
stat -f"%z" "${tmpFile}" 2> /dev/null; # OS X `stat`
|
||||
stat -c"%s" "${tmpFile}" 2> /dev/null # GNU `stat`
|
||||
)
|
||||
|
||||
local cmd=""
|
||||
if (( size < 52428800 )) && hash zopfli 2> /dev/null; then
|
||||
# the .tar file is smaller than 50 MB and Zopfli is available; use it
|
||||
cmd="zopfli"
|
||||
else
|
||||
if hash pigz 2> /dev/null; then
|
||||
cmd="pigz"
|
||||
else
|
||||
cmd="gzip"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Compressing .tar using \`${cmd}\`…"
|
||||
"${cmd}" -v "${tmpFile}" || return 1
|
||||
[ -f "${tmpFile}" ] && rm "${tmpFile}"
|
||||
echo "${tmpFile}.gz created successfully."
|
||||
}
|
||||
|
||||
# Determine size of a file or total size of a directory
|
||||
fs() {
|
||||
if du -b /dev/null > /dev/null 2>&1; then
|
||||
local arg=-sbh
|
||||
else
|
||||
local arg=-sh
|
||||
fi
|
||||
if [[ -n "$@" ]]; then
|
||||
du $arg -- "$@"
|
||||
else
|
||||
du $arg .[^.]* *
|
||||
fi
|
||||
}
|
||||
|
||||
# Create a data URL from a file
|
||||
dataurl() {
|
||||
local mimeType=$(file -b --mime-type "$1")
|
||||
if [[ $mimeType == text/* ]]; then
|
||||
mimeType="${mimeType};charset=utf-8"
|
||||
fi
|
||||
echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')"
|
||||
}
|
||||
|
||||
# Create a git.io short URL
|
||||
gitio() {
|
||||
if [ -z "${1}" -o -z "${2}" ]; then
|
||||
echo "Usage: \`gitio slug url\`"
|
||||
return 1
|
||||
fi
|
||||
curl -i http://git.io/ -F "url=${2}" -F "code=${1}"
|
||||
}
|
||||
|
||||
# Start an HTTP server from a directory, optionally specifying the port
|
||||
server() {
|
||||
local port="${1:-8000}"
|
||||
sleep 1 && open "http://localhost:${port}/" &
|
||||
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
|
||||
# And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files)
|
||||
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
|
||||
}
|
||||
|
||||
# Compare original and gzipped file size
|
||||
gz() {
|
||||
local origsize=$(wc -c < "$1")
|
||||
local gzipsize=$(gzip -c "$1" | wc -c)
|
||||
local ratio=$(echo "$gzipsize * 100 / $origsize" | bc -l)
|
||||
printf "orig: %d bytes\n" "$origsize"
|
||||
printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio"
|
||||
}
|
||||
|
||||
# Syntax-highlight JSON strings or files
|
||||
# Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json`
|
||||
json() {
|
||||
if [ -t 0 ]; then # argument
|
||||
python -mjson.tool <<< "$*" | pygmentize -l javascript
|
||||
else # pipe
|
||||
python -mjson.tool | pygmentize -l javascript
|
||||
fi
|
||||
}
|
||||
|
||||
# Run `dig` and display the most useful info
|
||||
digga() {
|
||||
dig +nocmd "$1" any +multiline +noall +answer
|
||||
}
|
||||
|
||||
# UTF-8-encode a string of Unicode symbols
|
||||
escape() {
|
||||
printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u)
|
||||
# print a newline unless we’re piping the output to another program
|
||||
if [ -t 1 ]; then
|
||||
echo ""; # newline
|
||||
fi
|
||||
}
|
||||
|
||||
# Decode \x{ABCD}-style Unicode escape sequences
|
||||
unidecode() {
|
||||
perl -e "binmode(STDOUT, ':utf8'); print \"$@\""
|
||||
# print a newline unless we’re piping the output to another program
|
||||
if [ -t 1 ]; then
|
||||
echo ""; # newline
|
||||
fi
|
||||
}
|
||||
|
||||
# Get a character’s Unicode code point
|
||||
codepoint() {
|
||||
perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"
|
||||
# print a newline unless we’re piping the output to another program
|
||||
if [ -t 1 ]; then
|
||||
echo ""; # newline
|
||||
fi
|
||||
}
|
||||
|
||||
# Show all the names (CNs and SANs) listed in the SSL certificate
|
||||
# for a given domain
|
||||
getcertnames() {
|
||||
if [ -z "${1}" ]; then
|
||||
echo "ERROR: No domain specified."
|
||||
return 1
|
||||
fi
|
||||
|
||||
local domain="${1}"
|
||||
echo "Testing ${domain}…"
|
||||
echo ""; # newline
|
||||
|
||||
local tmp=$(echo -e "GET / HTTP/1.0\nEOT" \
|
||||
| openssl s_client -connect "${domain}:443" 2>&1)
|
||||
|
||||
if [[ "${tmp}" = *"-----BEGIN CERTIFICATE-----"* ]]; then
|
||||
local certText=$(echo "${tmp}" \
|
||||
| openssl x509 -text -certopt "no_header, no_serial, no_version, \
|
||||
no_signame, no_validity, no_issuer, no_pubkey, no_sigdump, no_aux")
|
||||
echo "Common Name:"
|
||||
echo ""; # newline
|
||||
echo "${certText}" | grep "Subject:" | sed -e "s/^.*CN=//"
|
||||
echo ""; # newline
|
||||
echo "Subject Alternative Name(s):"
|
||||
echo ""; # newline
|
||||
echo "${certText}" | grep -A 1 "Subject Alternative Name:" \
|
||||
| sed -e "2s/DNS://g" -e "s/ //g" | tr "," "\n" | tail -n +2
|
||||
return 0
|
||||
else
|
||||
echo "ERROR: Certificate not found."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# `v` with no arguments opens the current directory in Vim, otherwise opens the
|
||||
# given location
|
||||
v() {
|
||||
if [ $# -eq 0 ]; then
|
||||
vim .
|
||||
else
|
||||
vim "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# `o` with no arguments opens the current directory, otherwise opens the given
|
||||
# location
|
||||
o() {
|
||||
if [ $# -eq 0 ]; then
|
||||
xdg-open . > /dev/null 2>&1
|
||||
else
|
||||
xdg-open "$@" > /dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
# `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring
|
||||
# the `.git` directory, listing directories first. The output gets piped into
|
||||
# `less` with options to preserve color and line numbers, unless the output is
|
||||
# small enough for one screen.
|
||||
tre() {
|
||||
tree -aC -I '.git' --dirsfirst "$@" | less -FRNX
|
||||
}
|
||||
|
||||
# Get colors in manual pages
|
||||
man() {
|
||||
env \
|
||||
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
|
||||
LESS_TERMCAP_md=$(printf "\e[1;31m") \
|
||||
LESS_TERMCAP_me=$(printf "\e[0m") \
|
||||
LESS_TERMCAP_se=$(printf "\e[0m") \
|
||||
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
|
||||
LESS_TERMCAP_ue=$(printf "\e[0m") \
|
||||
LESS_TERMCAP_us=$(printf "\e[1;32m") \
|
||||
man "$@"
|
||||
}
|
||||
|
||||
# Use feh to nicely view images
|
||||
openimage() {
|
||||
local types='*.jpg *.JPG *.png *.PNG *.gif *.GIF *.jpeg *.JPEG'
|
||||
|
||||
cd $(dirname "$1")
|
||||
local file=$(basename "$1")
|
||||
|
||||
feh -q $types --auto-zoom \
|
||||
--sort filename --borderless \
|
||||
--scale-down --draw-filename \
|
||||
--image-bg black \
|
||||
--start-at "$file"
|
||||
}
|
||||
|
||||
# get dbus session
|
||||
dbs() {
|
||||
local t=$1
|
||||
if [[ -z "$t" ]]; then
|
||||
local t="session"
|
||||
fi
|
||||
|
||||
dbus-send --$t --dest=org.freedesktop.DBus \
|
||||
--type=method_call --print-reply \
|
||||
/org/freedesktop/DBus org.freedesktop.DBus.ListNames
|
||||
}
|
||||
|
||||
# check if uri is up
|
||||
isup() {
|
||||
local uri=$1
|
||||
|
||||
if curl -s --head --request GET "$uri" | grep "200 OK" > /dev/null ; then
|
||||
notify-send --urgency=critical "$uri is down"
|
||||
else
|
||||
notify-send --urgency=low "$uri is up"
|
||||
fi
|
||||
}
|
||||
|
||||
# get the name of a x window
|
||||
xname(){
|
||||
local window_id=$1
|
||||
|
||||
if [[ -z $window_id ]]; then
|
||||
echo "Please specifiy a window id, you find this with 'xwininfo'"
|
||||
|
||||
return 1
|
||||
fi
|
||||
|
||||
local match_string='".*"'
|
||||
local match_int='[0-9][0-9]*'
|
||||
local match_qstring='"[^"\\]*(\\.[^"\\]*)*"' # NOTE: Adds 1 backreference
|
||||
|
||||
# get the name
|
||||
xprop -id $window_id | \
|
||||
sed -nr \
|
||||
-e "s/^WM_CLASS\(STRING\) = ($match_qstring), ($match_qstring)$/instance=\1\nclass=\3/p" \
|
||||
-e "s/^WM_WINDOW_ROLE\(STRING\) = ($match_qstring)$/window_role=\1/p" \
|
||||
-e "/^WM_NAME\(STRING\) = ($match_string)$/{s//title=\1/; h}" \
|
||||
-e "/^_NET_WM_NAME\(UTF8_STRING\) = ($match_qstring)$/{s//title=\1/; h}" \
|
||||
-e '${g; p}'
|
||||
}
|
||||
|
||||
# Docker
|
||||
d_stop(){
|
||||
docker stop $(docker ps -q)
|
||||
}
|
||||
d_clean(){
|
||||
docker rm $(docker ps -q -f status=exited)
|
||||
docker rmi $(docker images -q -f dangling=true)
|
||||
docker volume rm $(docker volume ls -f dangling=true)
|
||||
}
|
||||
d_reset(){
|
||||
docker stop $(docker ps -q)
|
||||
docker rm -f $(docker ps -aq)
|
||||
docker rmi -f $(docker images -qa)
|
||||
docker volume rm $(docker volume ls -q)
|
||||
|
||||
}
|
||||
|
||||
## Radare2 Container OPS
|
||||
d_r2(){
|
||||
docker run \
|
||||
-ti --rm \
|
||||
--cap-add=SYS_PTRACE \
|
||||
--name r2 \
|
||||
-v ~/RE:/mnt \
|
||||
-v ~/.radare2rc:/home/r2/.radare2rc:ro \
|
||||
-v ~/.bashrc:/home/r2/.bashrc:ro \
|
||||
-v ~/.bash_profile:/home/r2/.bash_profile:ro \
|
||||
-v ~/.exports:/home/r2/.exports:ro \
|
||||
-v ~/.aliases:/home/r2/.aliases:ro \
|
||||
radare/radare2 \
|
||||
bash
|
||||
}
|
||||
d_r2s(){
|
||||
docker exec -ti r2 bash
|
||||
}
|
||||
|
||||
## Menu-Man
|
||||
mman(){
|
||||
man -k . | sort | dmenu -l 30 | awk '{print substr($2, 2, length($2) - 2) " " $1}' | xargs -r urxvt -e man
|
||||
}
|
106
simpleDots/i3/alternating_layouts.py
Executable file
106
simpleDots/i3/alternating_layouts.py
Executable file
|
@ -0,0 +1,106 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import i3
|
||||
import re
|
||||
import subprocess
|
||||
import getopt
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def find_parent(window_id):
|
||||
"""
|
||||
Find the parent of a given window id
|
||||
"""
|
||||
root_window = i3.get_tree()
|
||||
result = [None]
|
||||
|
||||
def finder(n, p=None):
|
||||
if result[0] is not None:
|
||||
return
|
||||
for node in n:
|
||||
if node['id'] == window_id:
|
||||
result[0] = p
|
||||
return
|
||||
if len(node['nodes']):
|
||||
finder(node['nodes'], node)
|
||||
|
||||
finder(root_window['nodes'])
|
||||
return result[0]
|
||||
|
||||
|
||||
def set_layout():
|
||||
"""
|
||||
Set the layout/split for the currently
|
||||
focused window to either vertical or
|
||||
horizontal, depending on its width/height
|
||||
"""
|
||||
current_win = i3.filter(nodes=[], focused=True)
|
||||
for win in current_win:
|
||||
parent = find_parent(win['id'])
|
||||
|
||||
if (parent and "rect" in parent
|
||||
and parent['layout'] != 'tabbed'
|
||||
and parent['layout'] != 'stacked'):
|
||||
height = parent['rect']['height']
|
||||
width = parent['rect']['width']
|
||||
|
||||
if height > width:
|
||||
new_layout = 'vertical'
|
||||
else:
|
||||
new_layout = 'horizontal'
|
||||
|
||||
i3.split(new_layout)
|
||||
|
||||
|
||||
def print_help():
|
||||
print("Usage: " + sys.argv[0] + " [-p path/to/pid.file]")
|
||||
print("")
|
||||
print("Options:")
|
||||
print(" -p path/to/pid.file Saves the PID for this program in the filename specified")
|
||||
print("")
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Main function - listen for window focus
|
||||
changes and call set_layout when focus
|
||||
changes
|
||||
"""
|
||||
opt_list, args = getopt.getopt(sys.argv[1:], 'hp:')
|
||||
pid_file = None
|
||||
for opt in opt_list:
|
||||
if opt[0] == "-h":
|
||||
print_help()
|
||||
sys.exit()
|
||||
if opt[0] == "-p":
|
||||
pid_file = opt[1]
|
||||
|
||||
if pid_file:
|
||||
with open(pid_file, 'w') as f:
|
||||
f.write(str(os.getpid()))
|
||||
|
||||
|
||||
process = subprocess.Popen(
|
||||
['xprop', '-root', '-spy'],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE
|
||||
)
|
||||
regex = re.compile(b'^_NET_CLIENT_LIST_STACKING|^_NET_ACTIVE_WINDOW')
|
||||
|
||||
last_line = ""
|
||||
while True:
|
||||
line = process.stdout.readline()
|
||||
if line == b'': #X is dead
|
||||
break
|
||||
if line == last_line:
|
||||
continue
|
||||
if regex.match(line):
|
||||
set_layout()
|
||||
last_line = line
|
||||
|
||||
process.kill()
|
||||
sys.exit()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
281
simpleDots/i3/config
Normal file
281
simpleDots/i3/config
Normal file
|
@ -0,0 +1,281 @@
|
|||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
set $alt Mod1
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
#font pango:Terminus 8
|
||||
font pango:B612Mono 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.
|
||||
|
||||
# Color theme
|
||||
## class border backgr. text indicator child_border
|
||||
#client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
|
||||
#client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
|
||||
#client.unfocused #333333 #222222 #888888 #292d2e #222222
|
||||
#client.urgent #2f343a #900000 #ffffff #900000 #900000
|
||||
#client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
||||
#client.background #ffffff
|
||||
|
||||
## Green theme
|
||||
client.focused #77994B #547628 #EEEEEE #41FF00
|
||||
client.focused_inactive #333333 #5F676A #EEEEEE #333333
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+c kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
#bindsym $mod+d exec dmenu_run
|
||||
# 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 --entry-type name"
|
||||
|
||||
# Local Hotkeys
|
||||
bindsym $mod+x exec --no-startup-id "test -x ~/.local/bin/lhotkey-x && ~/.local/bin/lhotkey-x"
|
||||
bindsym $mod+y exec --no-startup-id "test -x ~/.local/bin/lhotkey-y && ~/.local/bin/lhotkey-y"
|
||||
bindsym $mod+F1 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F01 && ~/.local/bin/lhotkey-F01"
|
||||
bindsym $mod+F2 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F02 && ~/.local/bin/lhotkey-F02"
|
||||
bindsym $mod+F3 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F03 && ~/.local/bin/lhotkey-F03"
|
||||
bindsym $mod+F4 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F04 && ~/.local/bin/lhotkey-F04"
|
||||
bindsym $mod+F5 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F05 && ~/.local/bin/lhotkey-F05"
|
||||
bindsym $mod+F6 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F06 && ~/.local/bin/lhotkey-F06"
|
||||
bindsym $mod+F7 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F07 && ~/.local/bin/lhotkey-F07"
|
||||
bindsym $mod+F8 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F08 && ~/.local/bin/lhotkey-F08"
|
||||
bindsym $mod+F9 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F09 && ~/.local/bin/lhotkey-F09"
|
||||
bindsym $mod+F10 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F10 && ~/.local/bin/lhotkey-F10"
|
||||
bindsym $mod+F11 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F11 && ~/.local/bin/lhotkey-F11"
|
||||
bindsym $mod+F12 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F12 && ~/.local/bin/lhotkey-F12"
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+odiaeresis 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+odiaeresis 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
|
||||
|
||||
# move the whole workspace to an other display
|
||||
bindsym $mod+$alt+Left move workspace to output left
|
||||
bindsym $mod+$alt+Right move workspace to output 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+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# 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
|
||||
|
||||
# reload the configuration file
|
||||
#bindsym $mod+Shift+c 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 j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym odiaeresis resize grow width 10 px or 10 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
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
colors {
|
||||
#background #222222
|
||||
#statusline #eeeeee
|
||||
#separator #666666
|
||||
## border backgr. text
|
||||
#focused_workspace #4c7899 #285577 #ffffff
|
||||
#active_workspace #333333 #5f676a #ffffff
|
||||
#inactive_workspace #333333 #222222 #888888
|
||||
#urgent_workspace #2f343a #900000 #ffffff
|
||||
|
||||
## Green Theme
|
||||
focused_workspace #77994B #547628 #EEEEEE #41FF00
|
||||
}
|
||||
status_command i3status --config ~/.i3/i3-status.conf
|
||||
position top
|
||||
}
|
||||
|
||||
# Pulse Audio controls
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id "pulsemixer --change-volume +5"
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id "pulsemixer --change-volume -5"
|
||||
bindsym XF86AudioMute exec --no-startup-id "pulsemixer --toggle-mute"
|
||||
|
||||
# Sreen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 5
|
||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 5
|
||||
|
||||
# Toggle WiFi
|
||||
# [ _$(nmcli radio wifi) == _enabled ] && nmcli radio wifi off || nmcli radio wifi on
|
||||
|
||||
# Screenlock
|
||||
bindsym $alt+Ctrl+l exec "~/.bin/screenlock.sh"
|
||||
bindsym XF86Sleep exec "~/.bin/screenlock.sh"
|
||||
exec --no-startup-id xautolock -time 15 -locker "~/.bin/screenlock.sh" &
|
||||
|
||||
# quick terminal
|
||||
bindsym $mod+$alt+Shift+F1 exec --no-startup-id urxvt -name metask -e bash -o ignoreeof
|
||||
exec --no-startup-id urxvt -name metask -e bash -o ignoreeof
|
||||
for_window [instance="metask"] floating enable;
|
||||
for_window [instance="metask"] move scratchpad; \
|
||||
[instance="metask"] scratchpad show; \
|
||||
move position 0px 22px; \
|
||||
resize shrink height 150px; \
|
||||
resize grow width 683px; \
|
||||
move scratchpad
|
||||
bindsym F1 [instance="metask"] scratchpad show
|
||||
|
||||
# Touchpad controls
|
||||
#bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
|
||||
|
||||
# Media player controls
|
||||
#bindsym XF86AudioPlay exec playerctl play
|
||||
#bindsym XF86AudioPause exec playerctl pause
|
||||
#bindsym XF86AudioNext exec playerctl next
|
||||
#bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
# Misc keybindings
|
||||
bindsym --release Print exec "scrot --select"
|
||||
bindsym $mod+c exec free42
|
||||
bindsym $mod+XF86Calc exec free42
|
||||
bindsym $mod+b exec ~/.bin/startBrowser.sh
|
||||
bindsym $mod+$alt+b exec ~/.bin/startAltBrowser.sh
|
||||
bindsym $mod+n exec ~/.bin/startBrowserPrivat.sh
|
||||
bindsym $mod+$alt+n exec ~/.bin/startAltBrowserPrivat.sh
|
||||
bindsym $mod+m exec ~/.bin/dmenu_dir2menu.sh ~/.screenlayout/
|
||||
bindsym $mod+t exec ~/.bin/themer
|
||||
|
||||
# Get current public IP or restart a fritz.box connection
|
||||
bindsym $mod+i exec --no-startup-id notify-send "Public IP address" "$(curl https://canihazip.com/s)"
|
||||
bindsym $mod+Shift+i exec --no-startup-id "~/.bin/reconnectfritzbox.sh"
|
||||
|
||||
# Get current uptime
|
||||
bindsym $mod+u exec --no-startup-id notify-send "Uptime" "$(uptime --pretty)"
|
||||
bindsym $mod+Shift+u exec --no-startup-id test -x ~/.local/bin/mod-u && ~/.local/bin/mod-u
|
||||
|
||||
# Clipboard to QR
|
||||
bindsym $mod+q exec --no-startup-id "~/.bin/xcqr"
|
||||
|
||||
exec --no-startup-id "blueman-applet"
|
||||
exec --no-startup-id "nm-applet"
|
||||
exec --no-startup-id "parcellite"
|
||||
exec --no-startup-id "dunst -config ~/.i3/dunstrc"
|
||||
exec --no-startup-id test -x ~/.local/bin/i3autostart.sh && ~/.local/bin/i3autostart.sh
|
||||
exec --no-startup-id gsettings set org.gtk.Settings.FileChooser sort-directories-first true
|
||||
|
||||
## Spirallayout for new windows
|
||||
exec_always --no-startup-id ~/.i3/alternating_layouts.py
|
||||
|
||||
## Window Config
|
||||
for_window [class="Argon"] floating enable
|
||||
for_window [class="Vlc"] floating enable
|
||||
for_window [class="Ghidra"] floating enable
|
||||
for_window [title="^CSSH.*"] floating enable
|
||||
for_window [title="Formula editor"] floating enable
|
||||
for_window [title="Wfica"] fullscreen disable
|
||||
for_window [title="Microsoft Teams-Benachrichtigung"] floating enable
|
||||
|
||||
## Juggle Windows
|
||||
workspace 1 output DP1-1
|
||||
workspace 10 output DP1-2
|
||||
assign [class="^Wfica$"] 10
|
280
simpleDots/i3/config+gpdp2
Normal file
280
simpleDots/i3/config+gpdp2
Normal file
|
@ -0,0 +1,280 @@
|
|||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
set $alt Mod1
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
#font pango:Terminus 8
|
||||
font pango:B612Mono 8
|
||||
|
||||
# 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.
|
||||
|
||||
# Color theme
|
||||
## class border backgr. text indicator child_border
|
||||
#client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
|
||||
#client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
|
||||
#client.unfocused #333333 #222222 #888888 #292d2e #222222
|
||||
#client.urgent #2f343a #900000 #ffffff #900000 #900000
|
||||
#client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
||||
#client.background #ffffff
|
||||
|
||||
## Green theme
|
||||
client.focused #77994B #547628 #EEEEEE #41FF00
|
||||
client.focused_inactive #333333 #5F676A #EEEEEE #333333
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+c kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
#bindsym $mod+d exec dmenu_run
|
||||
# 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 --entry-type name"
|
||||
|
||||
# Local Hotkeys
|
||||
bindsym $mod+x exec --no-startup-id "test -x ~/.local/bin/lhotkey-x && ~/.local/bin/lhotkey-x"
|
||||
bindsym $mod+y exec --no-startup-id "test -x ~/.local/bin/lhotkey-y && ~/.local/bin/lhotkey-y"
|
||||
bindsym $mod+F1 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F01 && ~/.local/bin/lhotkey-F01"
|
||||
bindsym $mod+F2 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F02 && ~/.local/bin/lhotkey-F02"
|
||||
bindsym $mod+F3 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F03 && ~/.local/bin/lhotkey-F03"
|
||||
bindsym $mod+F4 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F04 && ~/.local/bin/lhotkey-F04"
|
||||
bindsym $mod+F5 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F05 && ~/.local/bin/lhotkey-F05"
|
||||
bindsym $mod+F6 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F06 && ~/.local/bin/lhotkey-F06"
|
||||
bindsym $mod+F7 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F07 && ~/.local/bin/lhotkey-F07"
|
||||
bindsym $mod+F8 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F08 && ~/.local/bin/lhotkey-F08"
|
||||
bindsym $mod+F9 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F09 && ~/.local/bin/lhotkey-F09"
|
||||
bindsym $mod+F10 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F10 && ~/.local/bin/lhotkey-F10"
|
||||
bindsym $mod+F11 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F11 && ~/.local/bin/lhotkey-F11"
|
||||
bindsym $mod+F12 exec --no-startup-id "test -x ~/.local/bin/lhotkey-F12 && ~/.local/bin/lhotkey-F12"
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+odiaeresis 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+odiaeresis 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
|
||||
|
||||
# move the whole workspace to an other display
|
||||
bindsym $mod+$alt+Left move workspace to output left
|
||||
bindsym $mod+$alt+Right move workspace to output 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+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# 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
|
||||
|
||||
# reload the configuration file
|
||||
#bindsym $mod+Shift+c 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 j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym odiaeresis resize grow width 10 px or 10 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
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
colors {
|
||||
#background #222222
|
||||
#statusline #eeeeee
|
||||
#separator #666666
|
||||
## border backgr. text
|
||||
#focused_workspace #4c7899 #285577 #ffffff
|
||||
#active_workspace #333333 #5f676a #ffffff
|
||||
#inactive_workspace #333333 #222222 #888888
|
||||
#urgent_workspace #2f343a #900000 #ffffff
|
||||
|
||||
## Green Theme
|
||||
focused_workspace #77994B #547628 #EEEEEE #41FF00
|
||||
}
|
||||
status_command i3status --config ~/.i3/i3-status.conf
|
||||
position top
|
||||
}
|
||||
|
||||
# Pulse Audio controls
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id "pulsemixer --change-volume +5"
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id "pulsemixer --change-volume -5"
|
||||
bindsym XF86AudioMute exec --no-startup-id "pulsemixer --toggle-mute"
|
||||
|
||||
# Sreen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 5
|
||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 5
|
||||
|
||||
# Toggle WiFi
|
||||
# [ _$(nmcli radio wifi) == _enabled ] && nmcli radio wifi off || nmcli radio wifi on
|
||||
|
||||
# Screenlock
|
||||
bindsym $alt+Ctrl+l exec "~/.bin/screenlock.sh"
|
||||
bindsym XF86Sleep exec "~/.bin/screenlock.sh"
|
||||
exec --no-startup-id xautolock -time 15 -locker "~/.bin/screenlock.sh" &
|
||||
|
||||
# quick terminal
|
||||
bindsym $mod+$alt+Shift+F1 exec --no-startup-id urxvt -name metask -e bash -o ignoreeof
|
||||
exec --no-startup-id urxvt -name metask -e bash -o ignoreeof
|
||||
for_window [instance="metask"] floating enable;
|
||||
for_window [instance="metask"] move scratchpad; \
|
||||
[instance="metask"] scratchpad show; \
|
||||
move position 0px 22px; \
|
||||
resize shrink height 150px; \
|
||||
resize grow width 683px; \
|
||||
move scratchpad
|
||||
bindsym F1 [instance="metask"] scratchpad show
|
||||
|
||||
# Touchpad controls
|
||||
#bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
|
||||
|
||||
# Media player controls
|
||||
#bindsym XF86AudioPlay exec playerctl play
|
||||
#bindsym XF86AudioPause exec playerctl pause
|
||||
#bindsym XF86AudioNext exec playerctl next
|
||||
#bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
# Misc keybindings
|
||||
bindsym --release Print exec "scrot --select"
|
||||
bindsym $mod+c exec free42
|
||||
bindsym $mod+XF86Calc exec free42
|
||||
bindsym $mod+b exec ~/.bin/startBrowser.sh
|
||||
bindsym $mod+$alt+b exec ~/.bin/startAltBrowser.sh
|
||||
bindsym $mod+n exec ~/.bin/startBrowserPrivat.sh
|
||||
bindsym $mod+$alt+n exec ~/.bin/startAltBrowserPrivat.sh
|
||||
bindsym $mod+m exec ~/.bin/dmenu_dir2menu.sh ~/.screenlayout/
|
||||
bindsym $mod+t exec ~/.bin/themer
|
||||
|
||||
# Get current public IP or restart a fritz.box connection
|
||||
bindsym $mod+i exec --no-startup-id notify-send "Public IP address" "$(curl https://canihazip.com/s)"
|
||||
bindsym $mod+Shift+i exec --no-startup-id "~/.bin/reconnectfritzbox.sh"
|
||||
|
||||
# Get current uptime
|
||||
bindsym $mod+u exec --no-startup-id notify-send "Uptime" "$(uptime --pretty)"
|
||||
bindsym $mod+Shift+u exec --no-startup-id test -x ~/.local/bin/mod-u && ~/.local/bin/mod-u
|
||||
|
||||
# Clipboard to QR
|
||||
bindsym $mod+q exec --no-startup-id "~/.bin/xcqr"
|
||||
|
||||
exec --no-startup-id "blueman-applet"
|
||||
exec --no-startup-id "nm-applet"
|
||||
exec --no-startup-id "parcellite"
|
||||
exec --no-startup-id "dunst -config ~/.i3/dunstrc"
|
||||
exec --no-startup-id test -x ~/.local/bin/i3autostart.sh && ~/.local/bin/i3autostart.sh
|
||||
exec --no-startup-id gsettings set org.gtk.Settings.FileChooser sort-directories-first true
|
||||
|
||||
## Spirallayout for new windows
|
||||
exec_always --no-startup-id ~/.i3/alternating_layouts.py
|
||||
|
||||
## Window Config
|
||||
for_window [class="Argon"] floating enable
|
||||
for_window [class="Vlc"] floating enable
|
||||
for_window [class="Ghidra"] floating enable
|
||||
for_window [title="^CSSH.*"] floating enable
|
||||
for_window [title="Formula editor"] floating enable
|
||||
for_window [title="Wfica"] fullscreen disable
|
||||
for_window [title="Microsoft Teams-Benachrichtigung"] floating enable
|
||||
|
||||
## Juggle Windows
|
||||
workspace 10 output HDMI2
|
||||
assign [class="^Wfica$"] 10
|
48
simpleDots/i3/dunstrc
Normal file
48
simpleDots/i3/dunstrc
Normal file
|
@ -0,0 +1,48 @@
|
|||
[global]
|
||||
font = Inconsolata 10
|
||||
allow_markup = yes
|
||||
format = "<b>%s</b>\n%b"
|
||||
sort = yes
|
||||
indicate_hidden = yes
|
||||
alignment = right
|
||||
bounce_freq = 0
|
||||
show_age_threshold = 60
|
||||
word_wrap = yes
|
||||
ignore_newline = no
|
||||
geometry = "200x5-6+30"
|
||||
transparency = 0
|
||||
idle_threshold = 120
|
||||
monitor = 0
|
||||
follow = mouse
|
||||
sticky_history = yes
|
||||
line_height = 0
|
||||
separator_height = 2
|
||||
padding = 8
|
||||
horizontal_padding = 8
|
||||
separator_color = "#585858"
|
||||
startup_notification = false
|
||||
|
||||
[frame]
|
||||
width = 1
|
||||
color = "#383838"
|
||||
|
||||
[shortcuts]
|
||||
close = ctrl+space
|
||||
close_all = ctrl+shift+space
|
||||
# history = ctrl+h
|
||||
context = ctrl+shift+period
|
||||
|
||||
[urgency_low]
|
||||
background = "#181818"
|
||||
foreground = "#E3C7AF"
|
||||
timeout = 5
|
||||
|
||||
[urgency_normal]
|
||||
background = "#181818"
|
||||
foreground = "#E3C7AF"
|
||||
timeout = 20
|
||||
|
||||
[urgency_critical]
|
||||
background = "#181818"
|
||||
foreground = "#FF2121"
|
||||
timeout = 0
|
80
simpleDots/i3/i3-status.conf
Normal file
80
simpleDots/i3/i3-status.conf
Normal file
|
@ -0,0 +1,80 @@
|
|||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
||||
# It is important that this file is edited as UTF-8.
|
||||
# The following line should contain a sharp s:
|
||||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
colors = true
|
||||
interval = 2
|
||||
}
|
||||
|
||||
order += "battery 0"
|
||||
order += "disk /"
|
||||
order += "ipv6"
|
||||
order += "wireless _first_"
|
||||
order += "ethernet _first_"
|
||||
order += "cpu_temperature 0"
|
||||
order += "cpu_usage"
|
||||
order += "load"
|
||||
order += "volume master"
|
||||
order += "tztime local"
|
||||
|
||||
ipv6 {
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
wireless _first_ {
|
||||
format_up = "⚵ %ip (%quality at %essid)"
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
ethernet _first_ {
|
||||
## if you use %speed, i3status requires root privileges
|
||||
format_up = "♆ %ip (%speed)"
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
battery 0 {
|
||||
format = "%status%percentage %remaining"
|
||||
format_down = ""
|
||||
status_chr = "⚡▴ "
|
||||
status_bat = "⚡▾ "
|
||||
status_full = "⚡ "
|
||||
low_threshold = 30
|
||||
threshold_type = time
|
||||
hide_seconds = true
|
||||
integer_battery_capacity = true
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "KW%V %Y-%m-%d %H:%M"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "📊 %1min %5min %15min"
|
||||
}
|
||||
|
||||
cpu_usage {
|
||||
format = "🚀 %usage"
|
||||
}
|
||||
|
||||
cpu_temperature 0 {
|
||||
format = "♨ %degrees °C"
|
||||
path = "~/.local/systemp"
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
format = "/ %avail"
|
||||
prefix_type = custom
|
||||
}
|
||||
|
||||
volume master {
|
||||
format = "♪ %volume"
|
||||
format_muted = "♪ mute (%volume)"
|
||||
device = "default"
|
||||
mixer = "Master"
|
||||
mixer_idx = 0
|
||||
}
|
80
simpleDots/i3/i3-status.conf+gpdp2
Normal file
80
simpleDots/i3/i3-status.conf+gpdp2
Normal file
|
@ -0,0 +1,80 @@
|
|||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
||||
# It is important that this file is edited as UTF-8.
|
||||
# The following line should contain a sharp s:
|
||||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
colors = true
|
||||
interval = 2
|
||||
}
|
||||
|
||||
order += "battery 0"
|
||||
#order += "disk /"
|
||||
order += "ipv6"
|
||||
order += "wireless _first_"
|
||||
order += "ethernet _first_"
|
||||
order += "cpu_temperature 0"
|
||||
order += "cpu_usage"
|
||||
#order += "load"
|
||||
order += "volume master"
|
||||
order += "tztime local"
|
||||
|
||||
ipv6 {
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
wireless _first_ {
|
||||
format_up = "⚵ %ip (%quality at %essid)"
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
ethernet _first_ {
|
||||
## if you use %speed, i3status requires root privileges
|
||||
format_up = "♆ %ip (%speed)"
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
battery 0 {
|
||||
format = "%status%percentage %remaining"
|
||||
format_down = ""
|
||||
status_chr = "⚡▴ "
|
||||
status_bat = "⚡▾ "
|
||||
status_full = "⚡ "
|
||||
low_threshold = 30
|
||||
threshold_type = time
|
||||
hide_seconds = true
|
||||
integer_battery_capacity = true
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "KW%V %Y-%m-%d %H:%M"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "📊 %1min %5min %15min"
|
||||
}
|
||||
|
||||
cpu_usage {
|
||||
format = "🚀 %usage"
|
||||
}
|
||||
|
||||
cpu_temperature 0 {
|
||||
format = "♨ %degrees °C"
|
||||
path = "~/.local/systemp"
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
format = "/ %avail"
|
||||
prefix_type = custom
|
||||
}
|
||||
|
||||
volume master {
|
||||
format = "♪ %volume"
|
||||
format_muted = "♪ mute (%volume)"
|
||||
device = "default"
|
||||
mixer = "Master"
|
||||
mixer_idx = 0
|
||||
}
|
48
simpleDots/inputrc
Normal file
48
simpleDots/inputrc
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Tab autocomplete regardless of filename case
|
||||
set completion-ignore-case off
|
||||
|
||||
# List all matches in case multiple possible completions are possible
|
||||
set show-all-if-ambiguous on
|
||||
|
||||
# Immediately add a trailing slash when autocompleting symlinks to directories
|
||||
set mark-symlinked-directories on
|
||||
|
||||
# Use the text that has already been typed as the prefix for searching through
|
||||
# commands (i.e. more intelligent Up/Down behavior)
|
||||
"\e[B": history-search-forward
|
||||
"\e[A": history-search-backward
|
||||
|
||||
# Do not autocomplete hidden files unless the pattern explicitly begins with a dot
|
||||
set match-hidden-files off
|
||||
|
||||
# Show all autocomplete results at once
|
||||
set page-completions off
|
||||
|
||||
# If there are more than 200 possible completions for a word, ask to show them all
|
||||
set completion-query-items 200
|
||||
|
||||
# Show extra file information when completing, like `ls -F` does
|
||||
set visible-stats on
|
||||
|
||||
# Be more intelligent when autocompleting by also looking at the text after
|
||||
# the cursor. For example, when the current line is "cd ~/src/mozil", and
|
||||
# the cursor is on the "z", pressing Tab will not autocomplete it to "cd
|
||||
# ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the
|
||||
# Readline used by Bash 4.)
|
||||
set skip-completed-text on
|
||||
|
||||
# Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456'
|
||||
set input-meta on
|
||||
set output-meta on
|
||||
set convert-meta off
|
||||
|
||||
# Use Alt/Meta + Delete to delete the preceding word
|
||||
"\e[3;3~": kill-word
|
||||
|
||||
## enable Alt-arrows
|
||||
"\e[1;5D": backward-word ### Alt left
|
||||
"\e[1;5C": forward-word ### Alt right
|
||||
|
||||
## Support for Home & End Keys via SSH
|
||||
"\e[7~": beginning-of-line
|
||||
"\e[8~": end-of-line
|
9
simpleDots/radare2rc
Normal file
9
simpleDots/radare2rc
Normal file
|
@ -0,0 +1,9 @@
|
|||
e asm.bbline = true
|
||||
e asm.highlight = $$
|
||||
e dir.projects = .
|
||||
e scr.color = 2
|
||||
e scr.color.grep = true
|
||||
e scr.scrollbar = true
|
||||
e scr.utf8 = true
|
||||
e scr.utf8.curvy = true
|
||||
eco solarized
|
486
simpleDots/urxvt/ext/font-size
Normal file
486
simpleDots/urxvt/ext/font-size
Normal file
|
@ -0,0 +1,486 @@
|
|||
#!/usr/bin/env perl
|
||||
#
|
||||
# On-the-fly adjusting of the font size in urxvt
|
||||
#
|
||||
# Copyright (c) 2008 David O'Neill
|
||||
# 2012 Noah K. Tilton <noahktilton@gmail.com>
|
||||
# 2009-2012 Simon Lundström <simmel@soy.se>
|
||||
# 2012-2016 Jan Larres <jan@majutsushi.net>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
#
|
||||
# URL: https://github.com/majutsushi/urxvt-font-size
|
||||
#
|
||||
# Based on:
|
||||
# https://github.com/dave0/urxvt-font-size
|
||||
# https://github.com/noah/urxvt-font
|
||||
# https://github.com/simmel/urxvt-resize-font
|
||||
#
|
||||
# X11 fonts background:
|
||||
# http://keithp.com/~keithp/talks/xtc2001/paper/
|
||||
|
||||
#:META:X_RESOURCE:%.step:interger:font size increase/decrease step
|
||||
|
||||
=head1 NAME
|
||||
|
||||
font-size - interactive font size setter
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
Put the font-size script into $HOME/.urxvt/ext/ and add it to the list
|
||||
of enabled perl-extensions in ~/.Xresources:
|
||||
|
||||
URxvt.perl-ext-common: ...,font-size
|
||||
|
||||
The extension automatically binds Ctrl++ to the 'increase' function,
|
||||
Ctrl+- to 'decrease', and Ctrl+0 to 'reset'. To use the other available functions
|
||||
or change the keys, add some keybindings of your own:
|
||||
|
||||
URxvt.keysym.C-Up: font-size:increase
|
||||
URxvt.keysym.C-Down: font-size:decrease
|
||||
URxvt.keysym.C-S-Up: font-size:incglobal
|
||||
URxvt.keysym.C-S-Down: font-size:decglobal
|
||||
URxvt.keysym.C-equal: font-size:reset
|
||||
URxvt.keysym.C-slash: font-size:show
|
||||
|
||||
Note that for urxvt versions older than 9.21 the resources have to look like this:
|
||||
|
||||
URxvt.keysym.C-Up: perl:font-size:increase
|
||||
URxvt.keysym.C-Down: perl:font-size:decrease
|
||||
URxvt.keysym.C-S-Up: perl:font-size:incglobal
|
||||
URxvt.keysym.C-S-Down: perl:font-size:decglobal
|
||||
URxvt.keysym.C-equal: perl:font-size:reset
|
||||
URxvt.keysym.C-slash: perl:font-size:show
|
||||
|
||||
Supported functions:
|
||||
|
||||
=over 2
|
||||
|
||||
=item * increase/decrease:
|
||||
|
||||
increase or decrease the font size of the current terminal.
|
||||
|
||||
=item * incglobal/decglobal:
|
||||
|
||||
same as above and also adjust the X server values so all newly
|
||||
started terminals will use the same fontsize.
|
||||
|
||||
=item * incsave/decsave:
|
||||
|
||||
same as incglobal/decglobal and also modify the ~/.Xresources
|
||||
file so the changed font sizes will persist over a restart of
|
||||
the X server or a reboot.
|
||||
|
||||
=item * reset:
|
||||
|
||||
reset the font size to the value of the resource when starting
|
||||
the terminal.
|
||||
|
||||
=item * show
|
||||
|
||||
show the current value of the 'font' resource in a popup.
|
||||
|
||||
=back
|
||||
|
||||
You can also change the step size that the script will use to increase
|
||||
the font size:
|
||||
|
||||
URxvt.font-size.step: 4
|
||||
|
||||
The default step size is 1. This means that with this setting a
|
||||
size change sequence would be for example 8->12->16->20 instead of
|
||||
8->9->10->11->12 etc. Please note that many X11 fonts are only
|
||||
available in specific sizes, though, and odd sizes are often not
|
||||
available, resulting in an effective step size of 2 instead of 1
|
||||
in that case.
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %escapecodes = (
|
||||
"font" => 710,
|
||||
"boldFont" => 711,
|
||||
"italicFont" => 712,
|
||||
"boldItalicFont" => 713
|
||||
);
|
||||
|
||||
sub on_init {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->bind_action ("C-plus", "%:increase")
|
||||
or warn "unable to register 'C-plus' as font-size increase hotkey\n";
|
||||
$self->bind_action ("C-minus", "%:decrease")
|
||||
or warn "unable to register 'C-minus' as font-size decrease hotkey\n";
|
||||
$self->bind_action ("C-0", "%:reset")
|
||||
or warn "unable to register 'C-0' as font-size reset hotkey\n";
|
||||
}
|
||||
|
||||
sub on_start
|
||||
{
|
||||
my ($self) = @_;
|
||||
|
||||
$self->{step} = $self->x_resource("%.step") || 1;
|
||||
|
||||
foreach my $type (qw(font boldFont italicFont boldItalicFont)) {
|
||||
$self->{$type} = $self->x_resource($type) || "undef";
|
||||
}
|
||||
}
|
||||
|
||||
# Needed for backwards compatibility with < 9.21
|
||||
sub on_user_command
|
||||
{
|
||||
my ($self, $cmd) = @_;
|
||||
|
||||
my $step = $self->{step};
|
||||
|
||||
if ($cmd eq "font-size:increase") {
|
||||
fonts_change_size($self, $step, 0);
|
||||
} elsif ($cmd eq "font-size:decrease") {
|
||||
fonts_change_size($self, -$step, 0);
|
||||
} elsif ($cmd eq "font-size:incglobal") {
|
||||
fonts_change_size($self, $step, 1);
|
||||
} elsif ($cmd eq "font-size:decglobal") {
|
||||
fonts_change_size($self, -$step, 1);
|
||||
} elsif ($cmd eq "font-size:incsave") {
|
||||
fonts_change_size($self, $step, 2);
|
||||
} elsif ($cmd eq "font-size:decsave") {
|
||||
fonts_change_size($self, -$step, 2);
|
||||
} elsif ($cmd eq "font-size:reset") {
|
||||
fonts_reset($self);
|
||||
} elsif ($cmd eq "font-size:show") {
|
||||
fonts_show($self);
|
||||
}
|
||||
}
|
||||
|
||||
sub on_action
|
||||
{
|
||||
my ($self, $action) = @_;
|
||||
|
||||
my $step = $self->{step};
|
||||
|
||||
if ($action eq "increase") {
|
||||
fonts_change_size($self, $step, 0);
|
||||
} elsif ($action eq "decrease") {
|
||||
fonts_change_size($self, -$step, 0);
|
||||
} elsif ($action eq "incglobal") {
|
||||
fonts_change_size($self, $step, 1);
|
||||
} elsif ($action eq "decglobal") {
|
||||
fonts_change_size($self, -$step, 1);
|
||||
} elsif ($action eq "incsave") {
|
||||
fonts_change_size($self, $step, 2);
|
||||
} elsif ($action eq "decsave") {
|
||||
fonts_change_size($self, -$step, 2);
|
||||
} elsif ($action eq "reset") {
|
||||
fonts_reset($self);
|
||||
} elsif ($action eq "show") {
|
||||
fonts_show($self);
|
||||
}
|
||||
}
|
||||
|
||||
sub fonts_change_size
|
||||
{
|
||||
my ($term, $delta, $save) = @_;
|
||||
|
||||
my @newfonts = ();
|
||||
|
||||
my $curres = $term->resource('font');
|
||||
if (!$curres) {
|
||||
$term->scr_add_lines("\r\nWarning: No font configured, trying a default.\r\nPlease set a font with the 'URxvt.font' resource.");
|
||||
$curres = "fixed";
|
||||
}
|
||||
my @curfonts = split(/\s*,\s*/, $curres);
|
||||
|
||||
my $basefont = shift(@curfonts);
|
||||
my ($newbasefont, $newbasedelta, $newbasesize) = handle_font($term, $basefont, $delta, 0, 0);
|
||||
push @newfonts, $newbasefont;
|
||||
|
||||
# Only adjust other fonts if base font changed
|
||||
if ($newbasefont ne $basefont) {
|
||||
foreach my $font (@curfonts) {
|
||||
my ($newfont, $newdelta, $newsize) = handle_font($term, $font, $delta, $newbasedelta, $newbasesize);
|
||||
push @newfonts, $newfont;
|
||||
}
|
||||
my $newres = join(",", @newfonts);
|
||||
font_apply_new($term, $newres, "font", $save);
|
||||
|
||||
handle_type($term, "boldFont", $delta, $newbasedelta, $newbasesize, $save);
|
||||
handle_type($term, "italicFont", $delta, $newbasedelta, $newbasesize, $save);
|
||||
handle_type($term, "boldItalicFont", $delta, $newbasedelta, $newbasesize, $save);
|
||||
}
|
||||
|
||||
if ($save > 1) {
|
||||
# write the new values back to the file
|
||||
my $xresources = readlink $ENV{"HOME"} . "/.Xresources";
|
||||
system("xrdb -edit " . $xresources);
|
||||
}
|
||||
}
|
||||
|
||||
sub fonts_reset
|
||||
{
|
||||
my ($term) = @_;
|
||||
|
||||
foreach my $type (qw(font boldFont italicFont boldItalicFont)) {
|
||||
my $initial = $term->{$type};
|
||||
if ($initial ne "undef") {
|
||||
font_apply_new($term, $initial, $type, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub fonts_show
|
||||
{
|
||||
my ($term) = @_;
|
||||
|
||||
my $out = $term->resource('font');
|
||||
$out =~ s/\s*,\s*/\n/g;
|
||||
|
||||
$term->{'font-size'}{'overlay'} = {
|
||||
overlay => $term->overlay_simple(0, -1, $out),
|
||||
timer => urxvt::timer->new->start(urxvt::NOW + 5)->cb(
|
||||
sub {
|
||||
delete $term->{'font-size'}{'overlay'};
|
||||
}
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
sub handle_type
|
||||
{
|
||||
my ($term, $type, $delta, $basedelta, $basesize, $save) = @_;
|
||||
|
||||
my $curres = $term->resource($type);
|
||||
if (!$curres) {
|
||||
return;
|
||||
}
|
||||
my @curfonts = split(/\s*,\s*/, $curres);
|
||||
my @newfonts = ();
|
||||
|
||||
foreach my $font (@curfonts) {
|
||||
my ($newfont, $newdelta, $newsize) = handle_font($term, $font, $delta, $basedelta, $basesize);
|
||||
push @newfonts, $newfont;
|
||||
}
|
||||
|
||||
my $newres = join(",", @newfonts);
|
||||
font_apply_new($term, $newres, $type, $save);
|
||||
}
|
||||
|
||||
sub handle_font
|
||||
{
|
||||
my ($term, $font, $delta, $basedelta, $basesize) = @_;
|
||||
|
||||
my $newfont;
|
||||
my $newdelta;
|
||||
my $newsize;
|
||||
my $prefix = 0;
|
||||
|
||||
if ($font =~ /^\s*x:/) {
|
||||
$font =~ s/^\s*x://;
|
||||
$prefix = 1;
|
||||
}
|
||||
if ($font =~ /^\s*(\[.*\])?xft:/) {
|
||||
($newfont, $newdelta, $newsize) = font_change_size_xft($term, $font, $delta, $basedelta, $basesize);
|
||||
} elsif ($font =~ /^\s*-/) {
|
||||
($newfont, $newdelta, $newsize) = font_change_size_xlfd($term, $font, $delta, $basedelta, $basesize);
|
||||
} else {
|
||||
# check whether the font is a valid alias and if yes resolve it to the
|
||||
# actual font
|
||||
my $lsfinfo = `xlsfonts -l $font 2>/dev/null`;
|
||||
|
||||
if ($lsfinfo eq "") {
|
||||
# not a valid alias, ring the bell if it is the base font and just
|
||||
# return the current font
|
||||
if ($basesize == 0) {
|
||||
$term->scr_bell;
|
||||
}
|
||||
return ($font, $basedelta, $basesize);
|
||||
}
|
||||
|
||||
my $fontinfo = (split(/\n/, $lsfinfo))[-1];
|
||||
my ($fontfull) = ($fontinfo =~ /\s+([-a-z0-9]+$)/);
|
||||
($newfont, $newdelta, $newsize) = font_change_size_xlfd($term, $fontfull, $delta, $basedelta, $basesize);
|
||||
}
|
||||
|
||||
# $term->scr_add_lines("\r\nNew font is $newfont\n");
|
||||
if ($prefix) {
|
||||
$newfont = "x:$newfont";
|
||||
}
|
||||
return ($newfont, $newdelta, $newsize);
|
||||
}
|
||||
|
||||
sub font_change_size_xft
|
||||
{
|
||||
my ($term, $fontstring, $delta, $basedelta, $basesize) = @_;
|
||||
|
||||
my @pieces = split(/:/, $fontstring);
|
||||
my @resized = ();
|
||||
my $size = 0;
|
||||
my $new_size = 0;
|
||||
|
||||
foreach my $piece (@pieces) {
|
||||
if ($piece =~ /^(?:(?:pixel)?size=|[^=-]+-)(\d+(\.\d*)?)$/) {
|
||||
$size = $1;
|
||||
|
||||
if ($basedelta != 0) {
|
||||
$new_size = $size + $basedelta;
|
||||
} else {
|
||||
$new_size = $size + $delta;
|
||||
}
|
||||
|
||||
$piece =~ s/(=|-)$size/$1$new_size/;
|
||||
}
|
||||
push @resized, $piece;
|
||||
}
|
||||
|
||||
my $resized_str = join(":", @resized);
|
||||
|
||||
# don't make fonts too small
|
||||
if ($new_size >= 6) {
|
||||
return ($resized_str, $new_size - $size, $new_size);
|
||||
} else {
|
||||
if ($basesize == 0) {
|
||||
$term->scr_bell;
|
||||
}
|
||||
return ($fontstring, 0, $size);
|
||||
}
|
||||
}
|
||||
|
||||
sub font_change_size_xlfd
|
||||
{
|
||||
my ($term, $fontstring, $delta, $basedelta, $basesize) = @_;
|
||||
|
||||
#-xos4-terminus-medium-r-normal-*-12-*-*-*-*-*-*-1
|
||||
|
||||
my @fields = qw(foundry family weight slant setwidth style pixelSize pointSize Xresolution Yresolution spacing averageWidth registry encoding);
|
||||
|
||||
my %font;
|
||||
$fontstring =~ s/^-//; # Strip leading - before split
|
||||
@font{@fields} = split(/-/, $fontstring);
|
||||
|
||||
if ($font{pixelSize} eq '*') {
|
||||
$term->scr_add_lines("\r\nWarning: Font size undefined, assuming 12.\r\nPlease set the 'URxvt.font' resource to a font with a concrete size.");
|
||||
$font{pixelSize} = '12'
|
||||
}
|
||||
if ($font{registry} eq '*') {
|
||||
$font{registry} ='iso8859';
|
||||
}
|
||||
|
||||
# Blank out the size for the pattern
|
||||
my %pattern = %font;
|
||||
$pattern{foundry} = '*';
|
||||
$pattern{setwidth} = '*';
|
||||
$pattern{pixelSize} = '*';
|
||||
$pattern{pointSize} = '*';
|
||||
# if ($basesize != 0) {
|
||||
# $pattern{Xresolution} = '*';
|
||||
# $pattern{Yresolution} = '*';
|
||||
# }
|
||||
$pattern{averageWidth} = '*';
|
||||
# make sure there are no empty fields
|
||||
foreach my $field (@fields) {
|
||||
$pattern{$field} = '*' unless defined($pattern{$field});
|
||||
}
|
||||
my $new_fontstring = '-' . join('-', @pattern{@fields});
|
||||
|
||||
my @candidates;
|
||||
# $term->scr_add_lines("\r\nPattern is $new_fontstring\n");
|
||||
open(FOO, "xlsfonts -fn '$new_fontstring' | sort -u |") or die $!;
|
||||
while (<FOO>) {
|
||||
chomp;
|
||||
s/^-//; # Strip leading '-' before split
|
||||
my @fontdata = split(/-/, $_);
|
||||
|
||||
push @candidates, [$fontdata[6], "-$_"];
|
||||
# $term->scr_add_lines("\r\npossibly $fontdata[6] $_\n");
|
||||
}
|
||||
close(FOO);
|
||||
|
||||
if (!@candidates) {
|
||||
die "No possible fonts!";
|
||||
}
|
||||
|
||||
if ($basesize != 0) {
|
||||
# sort by font size, descending
|
||||
@candidates = sort {$b->[0] <=> $a->[0]} @candidates;
|
||||
|
||||
# font is not the base font, so find the largest font that is at most
|
||||
# as large as the base font. If the largest possible font is smaller
|
||||
# than the base font bail and hope that a 0-size font can be found at
|
||||
# the end of the function
|
||||
if ($candidates[0]->[0] > $basesize) {
|
||||
foreach my $candidate (@candidates) {
|
||||
if ($candidate->[0] <= $basesize) {
|
||||
return ($candidate->[1], $candidate->[0] - $font{pixelSize}, $candidate->[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} elsif ($delta > 0) {
|
||||
# sort by font size, ascending
|
||||
@candidates = sort {$a->[0] <=> $b->[0]} @candidates;
|
||||
|
||||
foreach my $candidate (@candidates) {
|
||||
if ($candidate->[0] >= $font{pixelSize} + $delta) {
|
||||
return ($candidate->[1], $candidate->[0] - $font{pixelSize}, $candidate->[0]);
|
||||
}
|
||||
}
|
||||
} elsif ($delta < 0) {
|
||||
# sort by font size, descending
|
||||
@candidates = sort {$b->[0] <=> $a->[0]} @candidates;
|
||||
|
||||
foreach my $candidate (@candidates) {
|
||||
if ($candidate->[0] <= $font{pixelSize} + $delta && $candidate->[0] != 0) {
|
||||
return ($candidate->[1], $candidate->[0] - $font{pixelSize}, $candidate->[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# no fitting font available, check whether a 0-size font can be used to
|
||||
# fit the size of the base font
|
||||
@candidates = sort {$a->[0] <=> $b->[0]} @candidates;
|
||||
if ($basesize != 0 && $candidates[0]->[0] == 0) {
|
||||
return ($candidates[0]->[1], $basedelta, $basesize);
|
||||
} else {
|
||||
# if there is absolutely no smaller/larger font that can be used
|
||||
# return the current one, and beep if this is the base font
|
||||
if ($basesize == 0) {
|
||||
$term->scr_bell;
|
||||
}
|
||||
return ("-$fontstring", 0, $font{pixelSize});
|
||||
}
|
||||
}
|
||||
|
||||
sub font_apply_new
|
||||
{
|
||||
my ($term, $newfont, $type, $save) = @_;
|
||||
|
||||
# $term->scr_add_lines("\r\nnew font is $newfont\n");
|
||||
|
||||
$term->cmd_parse("\033]" . $escapecodes{$type} . ";" . $newfont . "\033\\");
|
||||
|
||||
# load the xrdb db
|
||||
# system("xrdb -load " . X_RESOURCES);
|
||||
|
||||
if ($save > 0) {
|
||||
# merge the new values
|
||||
open(XRDB_MERGE, "| xrdb -merge") || die "can't fork: $!";
|
||||
local $SIG{PIPE} = sub { die "xrdb pipe broken" };
|
||||
print XRDB_MERGE "URxvt." . $type . ": " . $newfont;
|
||||
close(XRDB_MERGE) || die "bad xrdb: $! $?";
|
||||
}
|
||||
}
|
111
simpleDots/urxvt/ext/font-size.md
Normal file
111
simpleDots/urxvt/ext/font-size.md
Normal file
|
@ -0,0 +1,111 @@
|
|||
urxvt-font-size
|
||||
===============
|
||||
|
||||
This is a perl extension for
|
||||
[rxvt-unicode](http://software.schmorp.de/pkg/rxvt-unicode.html) that allows
|
||||
changing the font size on the fly with keyboard shortcuts. It has the
|
||||
following features:
|
||||
|
||||
- Supports both xft and X11 fonts; X11 fonts work in both full form and as
|
||||
aliases.
|
||||
- Supports all four font settings: `font`, `boldFont`, `italicFont` and
|
||||
`boldItalicFont` and changes them in accordance with the base font (the
|
||||
first one from `font`).
|
||||
- Can apply the font change globally for the whole server, so that new
|
||||
terminals will inherit the same size, and even save it to `~/.Xresources`
|
||||
to be able to survive a reboot.
|
||||
- Should work even with complicated font setups like the example in the
|
||||
urxvt man-page.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Put the `font-size` script into `$HOME/.urxvt/ext/` and add it to the list of
|
||||
enabled perl-extensions in `~/.Xresources`:
|
||||
|
||||
```
|
||||
URxvt.perl-ext-common: ...,font-size
|
||||
```
|
||||
|
||||
Note: if your urxvt version is older than 9.14 you will have to add the path
|
||||
to the script to the `URxvt.perl-lib` resource.
|
||||
|
||||
The extension automatically binds Ctrl++ to the 'increase' function,
|
||||
Ctrl+- to 'decrease', and Ctrl+0 to 'reset'. To use the other available functions
|
||||
or change the keys, add some keybindings of your own:
|
||||
|
||||
|
||||
```
|
||||
URxvt.keysym.C-Up: font-size:increase
|
||||
URxvt.keysym.C-Down: font-size:decrease
|
||||
URxvt.keysym.C-S-Up: font-size:incglobal
|
||||
URxvt.keysym.C-S-Down: font-size:decglobal
|
||||
URxvt.keysym.C-equal: font-size:reset
|
||||
URxvt.keysym.C-slash: font-size:show
|
||||
```
|
||||
Then load your new `~/.Xresources` to see the changes in the next terminal you open:
|
||||
|
||||
```
|
||||
$ xrdb -merge ~/.Xresources
|
||||
```
|
||||
|
||||
Note that for urxvt versions older than 9.21 the resources have to look like this:
|
||||
|
||||
```
|
||||
URxvt.keysym.C-Up: perl:font-size:increase
|
||||
URxvt.keysym.C-Down: perl:font-size:decrease
|
||||
URxvt.keysym.C-S-Up: perl:font-size:incglobal
|
||||
URxvt.keysym.C-S-Down: perl:font-size:decglobal
|
||||
URxvt.keysym.C-equal: perl:font-size:reset
|
||||
URxvt.keysym.C-slash: perl:font-size:show
|
||||
```
|
||||
|
||||
The following functions are supported:
|
||||
|
||||
- `increase`/`decrease`: Increase or decrease the font size of the current
|
||||
terminal.
|
||||
- `incglobal`/`decglobal`: Same as above and also adjust the X server values
|
||||
so all newly started terminals will use the same fontsize.
|
||||
- `incsave`/`decsave`: Same as incglobal/decglobal and also modify the
|
||||
`~/.Xresources` file so the changed font sizes will persist over a restart
|
||||
of the X server or a reboot.
|
||||
- `reset`: Reset the font size to the value of the resource when starting
|
||||
the terminal.
|
||||
- `show`: Show the current value of the `font` resource in a popup.
|
||||
|
||||
You can also change the step size that the script will use to increase the
|
||||
font size:
|
||||
|
||||
```
|
||||
URxvt.font-size.step: 4
|
||||
```
|
||||
|
||||
The default step size is 1. This means that with this setting a size change
|
||||
sequence would be for example 8->12->16->20 instead of 8->9->10->11->12 etc.
|
||||
Please note that many X11 fonts are only available in specific sizes, though,
|
||||
and odd sizes are often not available, resulting in an effective step size of
|
||||
2 instead of 1 in that case.
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
At its core urxvt-font-size is just a fancy wrapper around the `ESC ] 710;Pt
|
||||
ST` (and 711/712/713 for bold, italic, and bold-italic) escape sequences. So
|
||||
if you are having trouble with this script please try the escape sequence
|
||||
directly like this (outside of a terminal multiplexer like screen or tmux):
|
||||
|
||||
```
|
||||
$ echo -e "\033]710;fixed\033\\"
|
||||
```
|
||||
|
||||
You can exchange `fixed` for any (single) font that you want to try, like for
|
||||
example `-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1`:
|
||||
|
||||
```
|
||||
$ echo -e "\033]710;-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1\033\\"
|
||||
```
|
||||
|
||||
If you can reproduce the problem this way then the problem does not lie with
|
||||
the urxvt-font-size script, but either directly with urxvt or some other
|
||||
component that may interfere (like for example a window manager). Please
|
||||
report the bug to those projects in that case.
|
1
simpleDots/vim/.VimballRecord
Normal file
1
simpleDots/vim/.VimballRecord
Normal file
|
@ -0,0 +1 @@
|
|||
Align.vba: call delete('/home/je/.vim/plugin/AlignPlugin.vim')|call delete('/home/je/.vim/plugin/AlignMapsPlugin.vim')|call delete('/home/je/.vim/plugin/cecutil.vim')|call delete('/home/je/.vim/doc/Align.txt')|call delete('/home/je/.vim/autoload/Align.vim')|call delete('/home/je/.vim/autoload/AlignMaps.vim')
|
2524
simpleDots/vim/autoload/plug.vim
Normal file
2524
simpleDots/vim/autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load diff
485
simpleDots/vim/vimrc
Executable file
485
simpleDots/vim/vimrc
Executable file
|
@ -0,0 +1,485 @@
|
|||
"
|
||||
" Basics
|
||||
"
|
||||
set nocompatible " be iMproved, required
|
||||
filetype off " required
|
||||
filetype plugin indent on " required
|
||||
|
||||
"
|
||||
" Install plugins
|
||||
"
|
||||
call plug#begin('~/.vim/vimplug-plugins')
|
||||
Plug 'Raimondi/delimitMate' " Autoclose quotes, parenthesis, brackets, etc.
|
||||
Plug 'airblade/vim-gitgutter' " Git-indicators on the left
|
||||
Plug 'altercation/vim-colors-solarized' " Colortheme
|
||||
Plug 'dhruvasagar/vim-table-mode' " Nice ascii tables
|
||||
Plug 'itchyny/lightline.vim' " Status-line
|
||||
Plug 'junegunn/vim-easy-align' " Align at any chars
|
||||
Plug 'ntpeters/vim-better-whitespace' " Complain on evil eol whitespace
|
||||
Plug 'scrooloose/nerdtree' " Nerdtree...
|
||||
Plug 'tpope/vim-fugitive' " git integration
|
||||
call plug#end()
|
||||
|
||||
|
||||
"
|
||||
" Settings
|
||||
"
|
||||
set noerrorbells " No beeps
|
||||
set number " Show line numbers
|
||||
set backspace=indent,eol,start " Makes backspace key more powerful.
|
||||
set showcmd " Show me what I'm typing
|
||||
set showmode " Show current mode.
|
||||
|
||||
set noswapfile " Don't use swapfile
|
||||
set nobackup " Don't create annoying backup files
|
||||
set nowritebackup
|
||||
set splitright " Split vertical windows right to the current windows
|
||||
set splitbelow " Split horizontal windows below to the current windows
|
||||
set encoding=utf-8 " Set default encoding to UTF-8
|
||||
set autowrite " Automatically save before :next, :make etc.
|
||||
set autoread " Automatically reread changed files without asking me anything
|
||||
set laststatus=2
|
||||
set hidden
|
||||
|
||||
set ruler " Show the cursor position all the time
|
||||
au FocusLost * :wa " Set vim to save the file on focus out.
|
||||
|
||||
set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats
|
||||
|
||||
set showmatch " Show matching brackets by flickering
|
||||
set noshowmode " We show the mode with airlien or lightline
|
||||
set incsearch " Shows the match while typing
|
||||
set hlsearch " Highlight found searches
|
||||
set ignorecase " Search case insensitive...
|
||||
set smartcase " ... but not when search pattern contains upper case characters
|
||||
set ttyfast
|
||||
set lazyredraw " Wait to redraw "
|
||||
|
||||
" speed up syntax highlighting
|
||||
set nocursorcolumn
|
||||
set nocursorline
|
||||
|
||||
syntax sync minlines=256
|
||||
set synmaxcol=300
|
||||
set re=1
|
||||
|
||||
" open help vertically
|
||||
command! -nargs=* -complete=help Help vertical belowright help <args>
|
||||
autocmd FileType help wincmd L
|
||||
|
||||
" Make Vim to handle long lines nicely.
|
||||
set wrap
|
||||
set textwidth=79
|
||||
set formatoptions=qrn1
|
||||
|
||||
" mail line wrapping
|
||||
au BufRead /tmp/mutt-* set tw=72
|
||||
|
||||
set autoindent
|
||||
set complete-=i
|
||||
set smarttab
|
||||
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
|
||||
set nrformats-=octal
|
||||
set shiftround
|
||||
|
||||
|
||||
" Time out on key codes but not mappings.
|
||||
" Basically this makes terminal Vim work sanely.
|
||||
set notimeout
|
||||
set ttimeout
|
||||
set ttimeoutlen=10
|
||||
|
||||
" Different Cursorshapes for the modes
|
||||
let &t_SI = "\<Esc>[6 q"
|
||||
let &t_SR = "\<Esc>[4 q"
|
||||
let &t_EI = "\<Esc>[2 q"
|
||||
|
||||
" Better Completion
|
||||
set complete=.,w,b,u,t
|
||||
set completeopt=longest,menuone
|
||||
|
||||
if &history < 1000
|
||||
set history=50
|
||||
endif
|
||||
|
||||
if &tabpagemax < 50
|
||||
set tabpagemax=50
|
||||
endif
|
||||
|
||||
if !empty(&viminfo)
|
||||
set viminfo^=!
|
||||
endif
|
||||
|
||||
if !&scrolloff
|
||||
set scrolloff=1
|
||||
endif
|
||||
if !&sidescrolloff
|
||||
set sidescrolloff=5
|
||||
endif
|
||||
set display+=lastline
|
||||
|
||||
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
|
||||
" so that you can undo CTRL-U after inserting a line break.
|
||||
inoremap <C-U> <C-G>u<C-U>
|
||||
|
||||
" Only do this part when compiled with support for autocommands.
|
||||
if has("autocmd")
|
||||
|
||||
" Enable file type detection.
|
||||
" Use the default filetype settings, so that mail gets 'tw' set to 72,
|
||||
" 'cindent' is on in C files, etc.
|
||||
" Also load indent files, to automatically do language-dependent indenting.
|
||||
filetype plugin indent on
|
||||
|
||||
" Put these in an autocmd group, so that we can delete them easily.
|
||||
augroup vimrcEx
|
||||
au!
|
||||
|
||||
" For all text files set 'textwidth' to 78 characters.
|
||||
autocmd FileType text setlocal textwidth=78
|
||||
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid or when inside an event handler
|
||||
" (happens when dropping a file on gvim).
|
||||
" Also don't do it when the mark is in the first line, that is the default
|
||||
" position when opening a file.
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
|
||||
augroup END
|
||||
else
|
||||
endif " has("autocmd")
|
||||
|
||||
|
||||
syntax enable
|
||||
if has('gui_running')
|
||||
"set transparency=3
|
||||
" fix js regex syntax
|
||||
set regexpengine=1
|
||||
syntax enable
|
||||
endif
|
||||
" set background=dark # set by Xresources
|
||||
let g:solarized_termcolors=256
|
||||
let g:solarized_termtrans=1
|
||||
" let g:hybrid_use_Xresources = 1
|
||||
" let g:rehash256 = 1
|
||||
colorscheme solarized
|
||||
set guifont=Inconsolata:h15
|
||||
set guioptions-=L
|
||||
|
||||
" This comes first, because we have mappings that depend on leader
|
||||
" With a map leader it's possible to do extra key combinations
|
||||
" i.e: <leader>w saves the current file
|
||||
let mapleader = ","
|
||||
let g:mapleader = ","
|
||||
let maplocalleader = ";"
|
||||
|
||||
" This trigger takes advantage of the fact that the quickfix window can be
|
||||
" easily distinguished by its file-type, qf. The wincmd J command is
|
||||
" equivalent to the Ctrl+W, Shift+J shortcut telling Vim to move a window to
|
||||
" the very bottom (see :help :wincmd and :help ^WJ).
|
||||
autocmd FileType qf wincmd J
|
||||
|
||||
" Dont show me any output when I build something
|
||||
" Because I am using quickfix for errors
|
||||
"nmap <leader>m :make<CR><enter>
|
||||
|
||||
" Some useful quickfix shortcuts
|
||||
":cc see the current error
|
||||
":cn next error
|
||||
":cp previous error
|
||||
":clist list all errors
|
||||
map <C-n> :cn<CR>
|
||||
map <C-m> :cp<CR>
|
||||
|
||||
nnoremap <silent> <leader>q :Sayonara<CR>
|
||||
|
||||
" Replace the current buffer with the given new file. That means a new file
|
||||
" will be open in a buffer while the old one will be deleted
|
||||
com! -nargs=1 -complete=file Breplace edit <args>| bdelete #
|
||||
|
||||
function! DeleteInactiveBufs()
|
||||
"From tabpagebuflist() help, get a list of all buffers in all tabs
|
||||
let tablist = []
|
||||
for i in range(tabpagenr('$'))
|
||||
call extend(tablist, tabpagebuflist(i + 1))
|
||||
endfor
|
||||
|
||||
"Below originally inspired by Hara Krishna Dara and Keith Roberts
|
||||
"http://tech.groups.yahoo.com/group/vim/message/56425
|
||||
let nWipeouts = 0
|
||||
for i in range(1, bufnr('$'))
|
||||
if bufexists(i) && !getbufvar(i,"&mod") && index(tablist, i) == -1
|
||||
"bufno exists AND isn't modified AND isn't in the list of buffers open in windows and tabs
|
||||
silent exec 'bwipeout' i
|
||||
let nWipeouts = nWipeouts + 1
|
||||
endif
|
||||
endfor
|
||||
echomsg nWipeouts . ' buffer(s) wiped out'
|
||||
endfunction
|
||||
|
||||
command! Ball :call DeleteInactiveBufs()
|
||||
|
||||
" Toggle line numbers
|
||||
nmap <leader>ll :set number!<cr>
|
||||
nmap <leader>lr :set relativenumber!<cr>
|
||||
|
||||
" Close quickfix easily
|
||||
nnoremap <leader>a :cclose<CR>
|
||||
|
||||
" Remove search highlight
|
||||
nnoremap <leader><space> :nohlsearch<CR>
|
||||
|
||||
" Better split switching
|
||||
map <C-j> <C-W>j
|
||||
map <C-k> <C-W>k
|
||||
map <C-h> <C-W>h
|
||||
map <C-l> <C-W>l
|
||||
|
||||
" Center the screen
|
||||
nnoremap <space> zz
|
||||
|
||||
" Move up and down on splitted lines (on small width screens)
|
||||
map <Up> gk
|
||||
map <Down> gj
|
||||
map k gk
|
||||
map j gj
|
||||
|
||||
nnoremap <F6> :setlocal spell! spell?<CR>
|
||||
|
||||
" Search mappings: These will make it so that going to the next one in a
|
||||
" search will center on the line it's found in.
|
||||
nnoremap n nzzzv
|
||||
nnoremap N Nzzzv
|
||||
|
||||
"nnoremap <leader>. :lcd %:p:h<CR>
|
||||
autocmd BufEnter * silent! lcd %:p:h
|
||||
|
||||
" trim all whitespaces away
|
||||
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
|
||||
|
||||
" Do not show stupid q: window
|
||||
map q: :q
|
||||
|
||||
" dont save .netrwhist history
|
||||
let g:netrw_dirhistmax=0
|
||||
|
||||
" Allow saving of files as sudo when I forgot to start vim using sudo.
|
||||
cmap w!! w !sudo tee > /dev/null %
|
||||
|
||||
" never do this again --> :set paste <ctrl-v> :set no paste
|
||||
let &t_SI .= "\<Esc>[?2004h"
|
||||
let &t_EI .= "\<Esc>[?2004l"
|
||||
|
||||
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
|
||||
|
||||
function! XTermPasteBegin()
|
||||
set pastetoggle=<Esc>[201~
|
||||
set paste
|
||||
return ""
|
||||
endfunction
|
||||
|
||||
" set 80 character line limit
|
||||
"if exists('+colorcolumn')
|
||||
" set colorcolumn=80
|
||||
"else
|
||||
" au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
|
||||
"endif
|
||||
|
||||
" ----------------------------------------- "
|
||||
" File Type settings "
|
||||
" ----------------------------------------- "
|
||||
|
||||
au BufNewFile,BufRead *.vim setlocal noet ts=4 sw=4 sts=4
|
||||
au BufNewFile,BufRead *.txt setlocal noet ts=4 sw=4
|
||||
au BufNewFile,BufRead *.md setlocal noet ts=4 sw=4
|
||||
au BufNewFile,BufRead *.yml,*.yaml setlocal expandtab ts=2 sw=2
|
||||
au BufNewFile,BufRead *.cpp setlocal expandtab ts=2 sw=2
|
||||
au BufNewFile,BufRead *.hpp setlocal expandtab ts=2 sw=2
|
||||
au BufNewFile,BufRead *.json setlocal expandtab ts=2 sw=2
|
||||
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux
|
||||
au BufNewFile,BufRead .nginx.conf*,nginx.conf* setf nginx
|
||||
augroup END
|
||||
|
||||
au FileType nginx setlocal noet ts=4 sw=4 sts=4
|
||||
|
||||
" Go settings
|
||||
au BufNewFile,BufRead *.go setlocal noet ts=4 sw=4 sts=4
|
||||
|
||||
" scala settings
|
||||
autocmd BufNewFile,BufReadPost *.scala setl shiftwidth=2 expandtab
|
||||
|
||||
" Markdown Settings
|
||||
autocmd BufNewFile,BufReadPost *.md setl ts=4 sw=4 sts=4 expandtab
|
||||
|
||||
" lua settings
|
||||
autocmd BufNewFile,BufRead *.lua setlocal noet ts=4 sw=4 sts=4
|
||||
|
||||
" Dockerfile settings
|
||||
autocmd FileType dockerfile set noexpandtab
|
||||
|
||||
" shell/config/systemd settings
|
||||
autocmd FileType fstab,systemd set noexpandtab
|
||||
autocmd FileType gitconfig,sh,toml set noexpandtab
|
||||
|
||||
" python indent
|
||||
autocmd BufNewFile,BufRead *.py setlocal tabstop=4 softtabstop=4 shiftwidth=4 textwidth=80 smarttab expandtab
|
||||
|
||||
" toml settings
|
||||
au BufRead,BufNewFile MAINTAINERS set ft=toml
|
||||
|
||||
" Wildmenu completion {{{
|
||||
set wildmenu
|
||||
" set wildmode=list:longest
|
||||
set wildmode=list:full
|
||||
|
||||
set wildignore+=.hg,.git,.svn " Version control
|
||||
set wildignore+=*.aux,*.out,*.toc " LaTeX intermediate files
|
||||
set wildignore+=*.jpg,*.bmp,*.gif,*.png,*.jpeg " binary images
|
||||
set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest " compiled object files
|
||||
set wildignore+=*.spl " compiled spelling word lists
|
||||
set wildignore+=*.sw? " Vim swap files
|
||||
set wildignore+=*.DS_Store " OSX bullshit
|
||||
set wildignore+=*.luac " Lua byte code
|
||||
set wildignore+=migrations " Django migrations
|
||||
set wildignore+=go/pkg " Go static files
|
||||
set wildignore+=go/bin " Go bin files
|
||||
set wildignore+=go/bin-vagrant " Go bin-vagrant files
|
||||
set wildignore+=*.pyc " Python byte code
|
||||
set wildignore+=*.orig " Merge resolution files
|
||||
|
||||
|
||||
" ----------------------------------------- "
|
||||
" Plugin configs "
|
||||
" ----------------------------------------- "
|
||||
|
||||
" ==================== Fugitive ====================
|
||||
nnoremap <leader>ga :Git add %:p<CR><CR>
|
||||
nnoremap <leader>gs :Gstatus<CR>
|
||||
nnoremap <leader>gp :Gpush<CR>
|
||||
vnoremap <leader>gb :Gblame<CR>
|
||||
|
||||
" ==================== Lightline ====================
|
||||
"
|
||||
let g:lightline = {
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste'],
|
||||
\ [ 'fugitive', 'filename', 'modified', 'ctrlpmark' ],
|
||||
\ ],
|
||||
\ 'right': [ [ 'lineinfo' ],
|
||||
\ [ 'percent' ],
|
||||
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
||||
\ },
|
||||
\ 'inactive': {
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'lineinfo': 'LightLineInfo',
|
||||
\ 'percent': 'LightLinePercent',
|
||||
\ 'modified': 'LightLineModified',
|
||||
\ 'filename': 'LightLineFilename',
|
||||
\ 'fileformat': 'LightLineFileformat',
|
||||
\ 'filetype': 'LightLineFiletype',
|
||||
\ 'fileencoding': 'LightLineFileencoding',
|
||||
\ 'mode': 'LightLineMode',
|
||||
\ 'fugitive': 'LightLineFugitive',
|
||||
\ 'ctrlpmark': 'CtrlPMark',
|
||||
\ },
|
||||
\ }
|
||||
|
||||
function! LightLineModified()
|
||||
if &filetype == "help"
|
||||
return ""
|
||||
elseif &modified
|
||||
return "+"
|
||||
elseif &modifiable
|
||||
return ""
|
||||
else
|
||||
return ""
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! LightLineFileformat()
|
||||
return winwidth(0) > 70 ? &fileformat : ''
|
||||
endfunction
|
||||
|
||||
function! LightLineFiletype()
|
||||
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''
|
||||
endfunction
|
||||
|
||||
function! LightLineFileencoding()
|
||||
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
|
||||
endfunction
|
||||
|
||||
function! LightLineInfo()
|
||||
return winwidth(0) > 60 ? printf("%3d:%-2d", line('.'), col('.')) : ''
|
||||
endfunction
|
||||
|
||||
function! LightLinePercent()
|
||||
return &ft =~? 'vimfiler' ? '' : (100 * line('.') / line('$')) . '%'
|
||||
endfunction
|
||||
|
||||
function! LightLineFugitive()
|
||||
return exists('*fugitive#head') ? fugitive#head() : ''
|
||||
endfunction
|
||||
|
||||
function! LightLineMode()
|
||||
let fname = expand('%:t')
|
||||
return fname == 'ControlP' ? 'CtrlP' :
|
||||
\ &ft == 'vimfiler' ? 'VimFiler' :
|
||||
\ winwidth(0) > 60 ? lightline#mode() : ''
|
||||
endfunction
|
||||
|
||||
function! LightLineFilename()
|
||||
let fname = expand('%:t')
|
||||
if mode() == 't'
|
||||
return ''
|
||||
endif
|
||||
|
||||
return fname == 'ControlP' ? g:lightline.ctrlp_item :
|
||||
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
|
||||
\ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
|
||||
\ ('' != fname ? fname : '[No Name]')
|
||||
endfunction
|
||||
|
||||
function! LightLineReadonly()
|
||||
return &ft !~? 'help' && &readonly ? 'RO' : ''
|
||||
endfunction
|
||||
|
||||
function! CtrlPMark()
|
||||
if expand('%:t') =~ 'ControlP'
|
||||
call lightline#link('iR'[g:lightline.ctrlp_regex])
|
||||
return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item
|
||||
\ , g:lightline.ctrlp_next], 0)
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let g:ctrlp_status_func = {
|
||||
\ 'main': 'CtrlPStatusFunc_1',
|
||||
\ 'prog': 'CtrlPStatusFunc_2',
|
||||
\ }
|
||||
|
||||
" ==================== NerdTree ====================
|
||||
" For toggling
|
||||
nmap <C-n> :NERDTreeToggle<CR>
|
||||
noremap <Leader>n :NERDTreeToggle<cr>
|
||||
noremap <Leader>f :NERDTreeFind<cr>
|
||||
|
||||
let NERDTreeShowHidden=1
|
||||
|
||||
let NERDTreeIgnore=['\.vim$', '\~$', '\.git$', '.DS_Store']
|
||||
|
||||
" Close nerdtree and vim on close file
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
|
||||
|
||||
|
||||
" vim:ts=2:sw=2:et
|
29
simpleDots/xprofile
Normal file
29
simpleDots/xprofile
Normal file
|
@ -0,0 +1,29 @@
|
|||
## Start Keyring-Daemon
|
||||
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
|
||||
export SSH_AUTH_SOCK
|
||||
|
||||
## Setup Keyboard
|
||||
xmodmap -e 'keycode 135 = Multi_key' # remaps context-menu-key to Compose
|
||||
|
||||
## Setup resources
|
||||
xrdb -merge ~/.Xresources
|
||||
test -f ~/.local/Xresources && xrdb -merge ~/.local/Xresources
|
||||
echo Dark > ~/.local/themer.state
|
||||
|
||||
## Setup Touchpad
|
||||
synclient TapButton1=1 \
|
||||
TapButton2=3 \
|
||||
TapButton3=2 \
|
||||
ClickFinger1=0 \
|
||||
ClickFinger2=0 \
|
||||
ClickFinger3=0 \
|
||||
HorizTwoFingerScroll=1 \
|
||||
VertTwoFingerScroll=1 \
|
||||
HorizScrollDelta=-111 \
|
||||
VertScrollDelta=-111 \
|
||||
PalmDetect=1
|
||||
|
||||
## Setup Screen
|
||||
test -x ~/.screenlayout/.default && ~/.screenlayout/.default
|
||||
test -x ~/.fehbg && ~/.fehbg
|
||||
|
154
simpleDots/xprofile+gpdp2
Normal file
154
simpleDots/xprofile+gpdp2
Normal file
|
@ -0,0 +1,154 @@
|
|||
!! drop in Solarized colorscheme for Xresources/Xdefaults
|
||||
|
||||
!!SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
|
||||
!!--------- ------- ---- ------- ----------- ---------- ----------- -----------
|
||||
!!base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
|
||||
!!base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
|
||||
!!base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46
|
||||
!!base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51
|
||||
!!base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
|
||||
!!base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
|
||||
!!base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93
|
||||
!!base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99
|
||||
!!yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71
|
||||
!!orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80
|
||||
!!red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86
|
||||
!!magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83
|
||||
!!violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77
|
||||
!!blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82
|
||||
!!cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63
|
||||
!!green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60
|
||||
|
||||
#define S_base03 #002b36
|
||||
#define S_base04 #00171d
|
||||
#define S_base02 #073642
|
||||
#define S_base01 #586e75
|
||||
#define S_base00 #c1cacd
|
||||
#define S_base0 #839496
|
||||
#define S_base1 #93a1a1
|
||||
#define S_base2 #eee8d5
|
||||
#define S_base3 #fdf6e3
|
||||
#define S_yellow #b58900
|
||||
#define S_orange #cb4b16
|
||||
#define S_red #dc322f
|
||||
#define S_magenta #d33682
|
||||
#define S_violet #6c71c4
|
||||
#define S_blue #268bd2
|
||||
#define S_cyan #2aa198
|
||||
#define S_green #859900
|
||||
|
||||
!URxvt*background: S_base04
|
||||
!URxvt*foreground: S_base00
|
||||
*background: #00171d
|
||||
*foreground: #c1cacd
|
||||
*depth: 32
|
||||
!*fading: 40
|
||||
!*fadeColor: S_base03
|
||||
|
||||
*cursorColor: #93a1a1
|
||||
*pointerColorBackground:#586e75
|
||||
*pointerColorForeground:#93a1a1
|
||||
!! black dark/light
|
||||
*color0: #073642
|
||||
*color8: #002b36
|
||||
!! red dark/light
|
||||
*color1: #dc322f
|
||||
*color9: #cb4b16
|
||||
!! green dark/light
|
||||
*color2: #859900
|
||||
*color10: #586e75
|
||||
!! yellow dark/light
|
||||
*color3: #b58900
|
||||
*color11: #c1cacd
|
||||
!! blue dark/light
|
||||
*color4: #268bd2
|
||||
*color12: #839496
|
||||
!! magenta dark/light
|
||||
*color5: #d33682
|
||||
*color13: #6c71c4
|
||||
!! cyan dark/light
|
||||
*color6: #2aa198
|
||||
*color14: #93a1a1
|
||||
!! white dark/light
|
||||
*color7: #eee8d5
|
||||
*color15: #fdf6e3
|
||||
|
||||
|
||||
*utf8: 1
|
||||
*saveLines: 65534
|
||||
|
||||
!-- Xft settings -- !
|
||||
! This stays out until I find out what it does.
|
||||
! It produces ugly huge fonts :(
|
||||
!Xft.dpi: 144
|
||||
!ft.rgba: rgb
|
||||
!ft.autohint: 0
|
||||
!ft.lcdfilter: lcddefault
|
||||
!ft.hintstyle: hintfull
|
||||
!ft.hinting: 1
|
||||
!ft.antialias: 1
|
||||
|
||||
! -- Fonts -- !
|
||||
URxvt.font: xft:Inconsolata:style=Regular:size=12,\
|
||||
xft:Symbola:style=Regular:size=12
|
||||
|
||||
URxvt.boldFont: xft:Inconsolata:style=Bold:size=12,\
|
||||
xft:Symbola:style=Bold:size=12
|
||||
|
||||
*faceSize: 10
|
||||
*bellIsUrgent: true
|
||||
|
||||
!! scroll
|
||||
!! do not scroll with output
|
||||
URxvt*scrollTtyOutput: false
|
||||
!! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
|
||||
URxvt*scrollWithBuffer: true
|
||||
!! scroll back to the bottom on keypress
|
||||
URxvt*scrollTtyKeypress: true
|
||||
|
||||
!! scrollback buffer
|
||||
URxvt.secondaryScreen: 1
|
||||
URxvt.secondaryScroll: 0
|
||||
URxvt.secondaryWheel: 1
|
||||
|
||||
!! no terminal-scrollbar
|
||||
URxvt*scrollBar: false
|
||||
|
||||
!! terminal name
|
||||
URxvt*termName: rxvt
|
||||
|
||||
!! terminal transparency
|
||||
URxvt*transparent: true
|
||||
URxvt*shading: 20
|
||||
|
||||
|
||||
!! copy paste
|
||||
URxvt*clipboard.copycmd: xclip -i -selection clipboard
|
||||
URxvt*clipboard.pastecmd: xclip -o -selection clipboard
|
||||
|
||||
!! clickable urls
|
||||
!URxvt.perl-ext-common: default,matcher,selection-to-clipboard
|
||||
!URxvt.url-launcher: /usr/local/bin/browser-exec
|
||||
!URxvt.matcher.button: 1
|
||||
!URxvt.url-select.underline: true
|
||||
|
||||
!! Resizable Fonts
|
||||
URxvt.perl-ext-common: font-size
|
||||
|
||||
!! No annoying 14755 box
|
||||
URxvt.iso14755: false
|
||||
URxvt.iso14755_52: false
|
||||
|
||||
!! get option over to work
|
||||
URxvt.keysym.M-Left: \033[1;5D
|
||||
URxvt.keysym.M-Right: \033[1;5C
|
||||
URxvt.keysym.Control-Left: \033[1;5D
|
||||
URxvt.keysym.Control-Right: \033[1;5C
|
||||
|
||||
Xft.dpi: 180
|
||||
Xft.autohint: 0
|
||||
Xft.lcdfilter: lcddefault
|
||||
Xft.hintstyle: hintfull
|
||||
Xft.hinting: 1
|
||||
Xft.antialias: 1
|
||||
Xft.rgba: rgb
|
108
sysconfig_arch/cfg_base.pp
Normal file
108
sysconfig_arch/cfg_base.pp
Normal file
|
@ -0,0 +1,108 @@
|
|||
############################################################################
|
||||
###
|
||||
## Base Config for all systems
|
||||
#
|
||||
#
|
||||
|
||||
## Some Packages...
|
||||
package {'fortune-mod': ensure => installed}
|
||||
package {'git': ensure => installed}
|
||||
package {'intel-ucode': ensure => installed}
|
||||
package {'make': ensure => installed}
|
||||
package {'openssh': ensure => installed}
|
||||
package {'rsync': ensure => installed}
|
||||
package {'sudo': ensure => installed}
|
||||
package {'vim': ensure => installed}
|
||||
|
||||
## Some localization
|
||||
file {'/etc/vconsole.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
content => "KEYMAP=de-latin1-nodeadkeys\nFONT=latarcyrheb-sun32\n",
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
file {'/etc/papersize':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
content => "a4\n",
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
file {'/etc/localtime':
|
||||
ensure => link,
|
||||
backup => false,
|
||||
target => '/usr/share/zoneinfo/Europe/Berlin',
|
||||
}
|
||||
|
||||
file {'/etc/locale.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/base/etc/locale.conf",
|
||||
}
|
||||
|
||||
file {'/etc/locale.gen':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/base/etc/locale.gen",
|
||||
}
|
||||
exec { '/usr/bin/locale-gen':
|
||||
subscribe => [
|
||||
File['/etc/locale.gen'],
|
||||
],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
## We'll use Network time
|
||||
service {'systemd-timesyncd':
|
||||
ensure => 'running',
|
||||
enable => true,
|
||||
}
|
||||
|
||||
|
||||
## Sudo...
|
||||
file {'/etc/sudoers':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0440',
|
||||
source => "puppet:///modules/base/etc/sudoers",
|
||||
}
|
||||
|
||||
group { 'sudo':
|
||||
ensure => present,
|
||||
system => true,
|
||||
}
|
||||
group { 'autologin':
|
||||
ensure => present,
|
||||
system => true,
|
||||
}
|
||||
|
||||
## Config for the packagemanagers
|
||||
file {'/etc/pacman.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/base/etc/pacman.conf",
|
||||
}
|
||||
file {'/etc/yaourtrc':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/base/etc/yaourtrc",
|
||||
}
|
13
sysconfig_arch/cfg_workstation-aur.pp
Normal file
13
sysconfig_arch/cfg_workstation-aur.pp
Normal file
|
@ -0,0 +1,13 @@
|
|||
############################################################################
|
||||
###
|
||||
## Additional packages from AUR, this time puppet needs to be run
|
||||
# as user with sudo privileges
|
||||
#
|
||||
#
|
||||
|
||||
package {'free42': ensure => installed}
|
||||
package {'insync': ensure => installed}
|
||||
package {'c-lolcat': ensure => installed}
|
||||
package {'ttf-b612': ensure => installed}
|
||||
package {'ttf-unifont': ensure => installed}
|
||||
package {'ttf-symbola': ensure => installed}
|
21
sysconfig_arch/cfg_workstation-laptop.pp
Normal file
21
sysconfig_arch/cfg_workstation-laptop.pp
Normal file
|
@ -0,0 +1,21 @@
|
|||
############################################################################
|
||||
###
|
||||
## Additional config for Laptops
|
||||
#
|
||||
#
|
||||
|
||||
package {'tlp': ensure => installed}
|
||||
|
||||
service {'tlp':
|
||||
ensure => 'running',
|
||||
enable => true,
|
||||
}
|
||||
|
||||
file {'/etc/default/tlp':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/desktop/etc/default/tlp",
|
||||
}
|
245
sysconfig_arch/cfg_workstation.pp
Normal file
245
sysconfig_arch/cfg_workstation.pp
Normal file
|
@ -0,0 +1,245 @@
|
|||
############################################################################
|
||||
###
|
||||
## Additional config for Workstations
|
||||
#
|
||||
#
|
||||
|
||||
## Disable ctrl-alt-del
|
||||
service {'ctrl-alt-del.target':
|
||||
enable => 'mask',
|
||||
}
|
||||
## Lots of Packages...
|
||||
package {'acpi': ensure => installed}
|
||||
package {'alsa-utils': ensure => installed}
|
||||
package {'arandr': ensure => installed}
|
||||
package {'autoconf': ensure => installed}
|
||||
package {'automake': ensure => installed}
|
||||
package {'bash': ensure => installed}
|
||||
package {'bash-completion': ensure => installed}
|
||||
package {'bind-tools': ensure => installed}
|
||||
package {'binutils': ensure => installed}
|
||||
package {'bison': ensure => installed}
|
||||
package {'blueman': ensure => installed}
|
||||
package {'bluez-utils': ensure => installed}
|
||||
package {'btrfs-progs': ensure => installed}
|
||||
package {'bzip2': ensure => installed}
|
||||
package {'cool-retro-term': ensure => installed}
|
||||
package {'coreutils': ensure => installed}
|
||||
package {'cryptsetup': ensure => installed}
|
||||
package {'ctags': ensure => installed}
|
||||
package {'curl': ensure => installed}
|
||||
package {'dcfldd': ensure => installed}
|
||||
package {'device-mapper': ensure => installed}
|
||||
package {'dhcpcd': ensure => installed}
|
||||
package {'dialog': ensure => installed}
|
||||
package {'diffutils': ensure => installed}
|
||||
package {'dmenu': ensure => installed}
|
||||
package {'dos2unix': ensure => installed}
|
||||
package {'dosfstools': ensure => installed}
|
||||
package {'dunst': ensure => installed}
|
||||
package {'e2fsprogs': ensure => installed}
|
||||
package {'emacs': ensure => installed}
|
||||
package {'expac': ensure => installed}
|
||||
package {'fakeroot': ensure => installed}
|
||||
package {'feh': ensure => installed}
|
||||
package {'file': ensure => installed}
|
||||
package {'filesystem': ensure => installed}
|
||||
package {'findutils': ensure => installed}
|
||||
package {'firefox': ensure => installed}
|
||||
package {'firefox-i18n-de': ensure => installed}
|
||||
package {'flex': ensure => installed}
|
||||
package {'gawk': ensure => installed}
|
||||
package {'gcc': ensure => installed}
|
||||
package {'gcc-libs': ensure => installed}
|
||||
package {'gettext': ensure => installed}
|
||||
package {'glibc': ensure => installed}
|
||||
package {'gnu-netcat': ensure => installed}
|
||||
package {'gnome-backgrounds': ensure => installed}
|
||||
package {'grep': ensure => installed}
|
||||
package {'groff': ensure => installed}
|
||||
package {'gzip': ensure => installed}
|
||||
package {'hdparm': ensure => installed}
|
||||
package {'i3-wm': ensure => installed}
|
||||
package {'i3lock': ensure => installed}
|
||||
package {'i3status': ensure => installed}
|
||||
package {'imagemagick': ensure => installed}
|
||||
package {'inetutils': ensure => installed}
|
||||
package {'iproute2': ensure => installed}
|
||||
package {'iputils': ensure => installed}
|
||||
package {'iw': ensure => installed}
|
||||
package {'jfsutils': ensure => installed}
|
||||
package {'keepassxc': ensure => installed}
|
||||
package {'less': ensure => installed}
|
||||
package {'libreoffice-fresh': ensure => installed}
|
||||
package {'libtool': ensure => installed}
|
||||
package {'licenses': ensure => installed}
|
||||
package {'lightdm': ensure => installed}
|
||||
package {'lightdm-gtk-greeter': ensure => installed}
|
||||
package {'lightdm-gtk-greeter-settings': ensure => installed}
|
||||
package {'linux': ensure => installed}
|
||||
package {'linux-headers': ensure => installed}
|
||||
package {'lm_sensors': ensure => installed}
|
||||
package {'logrotate': ensure => installed}
|
||||
package {'lshw': ensure => installed}
|
||||
package {'lvm2': ensure => installed}
|
||||
package {'m4': ensure => installed}
|
||||
package {'man-db': ensure => installed}
|
||||
package {'man-pages': ensure => installed}
|
||||
package {'mc': ensure => installed}
|
||||
package {'mdadm': ensure => installed}
|
||||
package {'mercurial': ensure => installed}
|
||||
package {'mplayer': ensure => installed}
|
||||
package {'nano': ensure => installed}
|
||||
package {'netctl': ensure => installed}
|
||||
package {'network-manager-applet': ensure => installed}
|
||||
package {'networkmanager': ensure => installed}
|
||||
package {'nmap': ensure => installed}
|
||||
package {'nmon': ensure => installed}
|
||||
package {'nomacs': ensure => installed}
|
||||
package {'p7zip': ensure => installed}
|
||||
package {'pacman': ensure => installed}
|
||||
package {'parcellite': ensure => installed}
|
||||
package {'patch': ensure => installed}
|
||||
package {'pciutils': ensure => installed}
|
||||
package {'pcmanfm-gtk3': ensure => installed}
|
||||
package {'perl': ensure => installed}
|
||||
package {'perl-date-manip': ensure => installed}
|
||||
package {'perl-finance-quote': ensure => installed}
|
||||
package {'perl-www-curl': ensure => installed}
|
||||
package {'procps-ng': ensure => installed}
|
||||
package {'psmisc': ensure => installed}
|
||||
package {'python-i3-py': ensure => installed}
|
||||
package {'qrencode': ensure => installed}
|
||||
package {'rng-tools': ensure => installed}
|
||||
package {'ruby': ensure => installed}
|
||||
package {'rxvt-unicode': ensure => installed}
|
||||
package {'screenfetch': ensure => installed}
|
||||
package {'scrot': ensure => installed}
|
||||
package {'seahorse': ensure => installed}
|
||||
package {'sed': ensure => installed}
|
||||
package {'shadow': ensure => installed}
|
||||
package {'sharutils': ensure => installed}
|
||||
package {'strace': ensure => installed}
|
||||
package {'subversion': ensure => installed}
|
||||
package {'sysfsutils': ensure => installed}
|
||||
package {'systemd-sysvcompat': ensure => installed}
|
||||
package {'tar': ensure => installed}
|
||||
package {'tcl': ensure => installed}
|
||||
package {'texinfo': ensure => installed}
|
||||
package {'texlive-bibtexextra': ensure => installed}
|
||||
package {'texlive-core': ensure => installed}
|
||||
package {'texlive-fontsextra': ensure => installed}
|
||||
package {'texlive-formatsextra': ensure => installed}
|
||||
package {'texlive-games': ensure => installed}
|
||||
package {'texlive-humanities': ensure => installed}
|
||||
package {'texlive-latexextra': ensure => installed}
|
||||
package {'texlive-music': ensure => installed}
|
||||
package {'texlive-pictures': ensure => installed}
|
||||
package {'texlive-pstricks': ensure => installed}
|
||||
package {'texlive-publishers': ensure => installed}
|
||||
package {'texlive-science': ensure => installed}
|
||||
package {'tk': ensure => installed}
|
||||
package {'tree': ensure => installed}
|
||||
package {'ttf-inconsolata': ensure => installed}
|
||||
package {'unzip': ensure => installed}
|
||||
package {'usbutils': ensure => installed}
|
||||
package {'util-linux': ensure => installed}
|
||||
package {'w3m': ensure => installed}
|
||||
package {'wget': ensure => installed}
|
||||
package {'which': ensure => installed}
|
||||
package {'wpa_supplicant': ensure => installed}
|
||||
package {'wxmaxima': ensure => installed}
|
||||
package {'xautolock': ensure => installed}
|
||||
package {'xclip': ensure => installed}
|
||||
package {'xdot': ensure => installed}
|
||||
package {'xf86-input-synaptics': ensure => installed}
|
||||
package {'xf86-video-intel': ensure => installed}
|
||||
package {'xfsprogs': ensure => installed}
|
||||
package {'xreader': ensure => installed}
|
||||
package {'xorg-apps': ensure => installed}
|
||||
package {'xorg-xclipboard': ensure => installed} # Important for Citrix
|
||||
package {'xorg-server': ensure => installed}
|
||||
package {'xterm': ensure => installed}
|
||||
package {'zathura': ensure => installed}
|
||||
package {'zathura-pdf-mupdf': ensure => installed}
|
||||
|
||||
## Audio-Zeugs
|
||||
package {'pulseaudio': ensure => installed}
|
||||
package {'pulseaudio-alsa': ensure => installed}
|
||||
package {'pulseaudio-bluetooth': ensure => installed}
|
||||
package {'pulsemixer': ensure => installed}
|
||||
package {'pavucontrol': ensure => installed}
|
||||
package {'pasystray': ensure => installed}
|
||||
package {'paprefs': ensure => installed}
|
||||
|
||||
## Logon and Greeting
|
||||
file {'/etc/systemd/logind.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/desktop/etc/systemd/logind.conf",
|
||||
}
|
||||
|
||||
file {'/etc/lightdm/lightdm-gtk-greeter.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/desktop/etc/lightdm/lightdm-gtk-greeter.conf",
|
||||
}
|
||||
|
||||
file {'/etc/lightdm/lightdm.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/desktop/etc/lightdm/lightdm.conf",
|
||||
}
|
||||
|
||||
file {'/etc/pam.d/login':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/desktop/etc/pam.d/login",
|
||||
}
|
||||
|
||||
file {'/etc/X11/xorg.conf.d/00-keyboard.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/desktop/etc/X11/xorg.conf.d/00-keyboard.conf",
|
||||
}
|
||||
|
||||
file {'/etc/pam.d/passwd':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/desktop/etc/pam.d/passwd",
|
||||
}
|
||||
|
||||
service {'lightdm.service':
|
||||
ensure => 'running',
|
||||
enable => true,
|
||||
}
|
||||
|
||||
## Network Manager
|
||||
service {'netctl.service':
|
||||
ensure => 'stopped',
|
||||
enable => false,
|
||||
}
|
||||
|
||||
service {'NetworkManager.service':
|
||||
ensure => 'running',
|
||||
enable => true,
|
||||
}
|
||||
|
49
sysconfig_arch/cfg_zz_gpdp2.pp
Normal file
49
sysconfig_arch/cfg_zz_gpdp2.pp
Normal file
|
@ -0,0 +1,49 @@
|
|||
############################################################################
|
||||
###
|
||||
## Additional config GPD Pocket 2
|
||||
# This MUST be run as the last manifest as it overwrites some
|
||||
# standards
|
||||
#
|
||||
|
||||
file {'/etc/X11/xorg.conf.d/20-intel.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/gpdp2/etc/X11/xorg.conf.d/20-intel.conf",
|
||||
}
|
||||
file {'/etc/X11/xorg.conf.d/30-display.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/gpdp2/etc/X11/xorg.conf.d/30-display.conf",
|
||||
}
|
||||
file {'/etc/X11/xorg.conf.d/99-touchscreen.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => "puppet:///modules/gpdp2/etc/X11/xorg.conf.d/99-touchscreen.conf",
|
||||
}
|
||||
|
||||
file {'/etc/modules-load.d/gpd-pocket-fan.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
content => "gpd-pocket-fan",
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
}
|
||||
file {'/etc/modprobe.d/gpd-pocket-fan.conf':
|
||||
ensure => file,
|
||||
backup => false,
|
||||
content => "options gpd-pocket-fan temp_limits=40000,40001,40002",
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
}
|
||||
|
37
sysconfig_arch/inst_yaourt.sh
Executable file
37
sysconfig_arch/inst_yaourt.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
## Install yaourt
|
||||
|
||||
|
||||
test $(whoami) = root && { echo "You cannot be root. However, you need root privileges granted by sudo."; exit 1; }
|
||||
|
||||
## Exit on error
|
||||
set -e
|
||||
|
||||
## Install devel
|
||||
sudo pacman -Sy --needed --noconfirm base-devel
|
||||
|
||||
olddir=$(pwd)
|
||||
|
||||
## Download, Compile and Install package-query
|
||||
cd /tmp
|
||||
curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
|
||||
tar -xvzf package-query.tar.gz
|
||||
cd package-query
|
||||
makepkg -si
|
||||
cd /tmp
|
||||
rm -rf package-query.tar.gz package-query
|
||||
|
||||
## Download, Compile and Install yaourt
|
||||
cd /tmp
|
||||
curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
|
||||
tar -xvzf yaourt.tar.gz
|
||||
cd yaourt
|
||||
makepkg -si
|
||||
cd /tmp
|
||||
rm -rf yaourt.tar.gz yaourt
|
||||
|
||||
|
||||
## Return to where we came from
|
||||
cd $olddir
|
||||
|
||||
|
14
sysconfig_arch/modules/base/files/etc/locale.conf
Normal file
14
sysconfig_arch/modules/base/files/etc/locale.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
LANG=de_DE.UTF-8
|
||||
LC_MESSAGES=en_US.UTF-8
|
||||
LC_COLLATE=C
|
||||
LC_CTYPE=de_DE.UTF-8
|
||||
LC_NUMERIC=de_DE.UTF-8
|
||||
LC_TIME=de_DE.UTF-8
|
||||
LC_MONETARY=de_DE.UTF-8
|
||||
LC_PAPER=de_DE.UTF-8
|
||||
LC_NAME=de_DE.UTF-8
|
||||
LC_ADDRESS=de_DE.UTF-8
|
||||
LC_TELEPHONE=de_DE.UTF-8
|
||||
LC_MEASUREMENT=de_DE.UTF-8
|
||||
LC_IDENTIFICATION=de_DE.UTF-8
|
3
sysconfig_arch/modules/base/files/etc/locale.gen
Normal file
3
sysconfig_arch/modules/base/files/etc/locale.gen
Normal file
|
@ -0,0 +1,3 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
de_DE.UTF-8 UTF-8
|
||||
en_US.UTF-8 UTF-8
|
101
sysconfig_arch/modules/base/files/etc/pacman.conf
Normal file
101
sysconfig_arch/modules/base/files/etc/pacman.conf
Normal file
|
@ -0,0 +1,101 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
#GPGDir = /etc/pacman.d/gnupg/
|
||||
#HookDir = /etc/pacman.d/hooks/
|
||||
HoldPkg = pacman glibc
|
||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#CleanMethod = KeepInstalled
|
||||
#UseDelta = 0.7
|
||||
Architecture = auto
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
IgnorePkg = ttf-inconsolata
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
#Color
|
||||
#TotalDownload
|
||||
CheckSpace
|
||||
#VerbosePkgLists
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||
# keyring can then be populated with the keys of all official Arch Linux
|
||||
# packagers with `pacman-key --populate archlinux`.
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The testing repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
#[testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[community-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[community]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the multilib repositories as required here.
|
||||
|
||||
#[multilib-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
105
sysconfig_arch/modules/base/files/etc/sudoers
Normal file
105
sysconfig_arch/modules/base/files/etc/sudoers
Normal file
|
@ -0,0 +1,105 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
### sudoers file.
|
||||
##
|
||||
## This file MUST be edited with the 'visudo' command as root.
|
||||
## Failure to use 'visudo' may result in syntax or file permission errors
|
||||
## that prevent sudo from running.
|
||||
##
|
||||
## See the sudoers man page for the details on how to write a sudoers file.
|
||||
##
|
||||
|
||||
##
|
||||
## Host alias specification
|
||||
##
|
||||
## Groups of machines. These may include host names (optionally with wildcards),
|
||||
## IP addresses, network numbers or netgroups.
|
||||
# Host_Alias WEBSERVERS = www1, www2, www3
|
||||
|
||||
##
|
||||
## User alias specification
|
||||
##
|
||||
## Groups of users. These may consist of user names, uids, Unix groups,
|
||||
## or netgroups.
|
||||
# User_Alias ADMINS = millert, dowdy, mikef
|
||||
|
||||
##
|
||||
## Cmnd alias specification
|
||||
##
|
||||
## Groups of commands. Often used to group related commands together.
|
||||
# Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
|
||||
# /usr/bin/pkill, /usr/bin/top
|
||||
# Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff
|
||||
|
||||
##
|
||||
## Defaults specification
|
||||
##
|
||||
## You may wish to keep some of the following environment variables
|
||||
## when running commands via sudo.
|
||||
##
|
||||
## Locale settings
|
||||
#Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
|
||||
##
|
||||
## Run X applications through sudo; HOME is used to find the
|
||||
## .Xauthority file. Note that other programs use HOME to find
|
||||
## configuration files and this may lead to privilege escalation!
|
||||
# Defaults env_keep += "HOME"
|
||||
##
|
||||
## X11 resource path settings
|
||||
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
|
||||
##
|
||||
## Desktop path settings
|
||||
# Defaults env_keep += "QTDIR KDEDIR"
|
||||
##
|
||||
## Allow sudo-run commands to inherit the callers' ConsoleKit session
|
||||
# Defaults env_keep += "XDG_SESSION_COOKIE"
|
||||
##
|
||||
## Uncomment to enable special input methods. Care should be taken as
|
||||
## this may allow users to subvert the command being run via sudo.
|
||||
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
|
||||
##
|
||||
## Uncomment to use a hard-coded PATH instead of the user's to find commands
|
||||
# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
##
|
||||
## Uncomment to send mail if the user does not enter the correct password.
|
||||
# Defaults mail_badpass
|
||||
##
|
||||
## Uncomment to enable logging of a command's output, except for
|
||||
## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
|
||||
# Defaults log_output
|
||||
# Defaults!/usr/bin/sudoreplay !log_output
|
||||
# Defaults!/usr/local/bin/sudoreplay !log_output
|
||||
# Defaults!REBOOT !log_output
|
||||
|
||||
## Unlock sudo on all ttys
|
||||
Defaults !tty_tickets
|
||||
|
||||
## Longer unlock timeout
|
||||
Defaults timestamp_timeout=120
|
||||
|
||||
## Keep SSH Session info in sudo
|
||||
Defaults env_keep += "SSH_TTY SSH_CONNECTION SSH_CLIENT"
|
||||
|
||||
|
||||
##
|
||||
## Runas alias specification
|
||||
##
|
||||
|
||||
##
|
||||
## User privilege specification
|
||||
##
|
||||
root ALL=(ALL) ALL
|
||||
|
||||
## Allow members of group wheel to execute any command w/o entering a password
|
||||
%wheel ALL=(ALL) NOPASSWD: ALL
|
||||
|
||||
## Allow members of group sudo to execute any command
|
||||
%sudo ALL=(ALL) ALL
|
||||
|
||||
## Uncomment to allow any user to run sudo if they know the password
|
||||
## of the user they are running the command as (root by default).
|
||||
# Defaults targetpw # Ask for the password of the target user
|
||||
# ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
|
||||
|
||||
## Read drop-in files from /etc/sudoers.d
|
||||
## (the '#' here does not indicate a comment)
|
||||
#includedir /etc/sudoers.d
|
70
sysconfig_arch/modules/base/files/etc/yaourtrc
Normal file
70
sysconfig_arch/modules/base/files/etc/yaourtrc
Normal file
|
@ -0,0 +1,70 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
|
||||
## yaourtrc - Configuration for yaourt
|
||||
#
|
||||
# See yaourtrc(5) for more information
|
||||
#
|
||||
#
|
||||
|
||||
# General
|
||||
#AUTOSAVEBACKUPFILE=0
|
||||
#DEVEL=0
|
||||
#DEVELSRCDIR=""
|
||||
#FORCE=0
|
||||
#NO_TESTDB=0
|
||||
|
||||
# Environment variables
|
||||
#EDITOR="$EDITOR"
|
||||
#TMPDIR="/tmp"
|
||||
#VISUAL="$VISUAL"
|
||||
|
||||
# SUDO
|
||||
#SUDONOVERIF=0 # Avoid multiple sudo checks when timestamp_timeout=0
|
||||
#SUDOREDIRECT=1 # Define to 0 in case you use a fingerprint device
|
||||
|
||||
# ABS
|
||||
#USE_GIT=0
|
||||
# If the package "abs" is installed, those var are parsed from abs.conf
|
||||
#REPOS=() # REPOS available at $SYNCSERVER
|
||||
#SYNCSERVER=""
|
||||
|
||||
# AUR
|
||||
#AURURL="https://aur.archlinux.org"
|
||||
#AURCOMMENT=5
|
||||
#AURDEVELONLY=0
|
||||
#AURSEARCH=1
|
||||
#AURSHOWDIFF=0
|
||||
#AURUPGRADE=0
|
||||
#AURVOTE=1
|
||||
#AURUSEGIT=0
|
||||
|
||||
# Build
|
||||
#EXPORT=0 # Export to 1: EXPORTDIR or PKGDEST
|
||||
# 2: pacman cache (as root)
|
||||
#EXPORTSRC=0 # Need EXPORT>0 to be used
|
||||
#EXPORTDIR="" # If empty, use makepkg's configuration (see makepkg.conf)
|
||||
|
||||
# Prompt
|
||||
NOCONFIRM=0
|
||||
UP_NOCONFIRM=0 # No prompt while build upgrades (including -Sbu)
|
||||
BUILD_NOCONFIRM=1 # Only prompt for editing files
|
||||
PU_NOCONFIRM=1 # Add --noconfirm to $PACMAN -U
|
||||
EDITFILES=0
|
||||
NOENTER=0
|
||||
|
||||
# Output
|
||||
#USECOLOR=1
|
||||
#USEPAGER=0
|
||||
#DETAILUPGRADE=1
|
||||
SHOWORPHANS=1
|
||||
#TERMINALTITLE=1
|
||||
|
||||
# Command
|
||||
#PACMAN="pacman"
|
||||
#MAKEPKG="makepkg"
|
||||
#DIFFEDITCMD="vimdiff"
|
||||
|
||||
# pacdiffviewer
|
||||
#P_LOCATE=0 # Use locate instead of find
|
||||
#P_SEARCHDIR=(/etc/ /boot/)
|
||||
#P_SAVEDIR='/var/lib/yaourt/backupfiles'
|
|
@ -0,0 +1,8 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
Section "InputClass"
|
||||
Identifier "system-keyboard"
|
||||
MatchIsKeyboard "on"
|
||||
Option "XkbLayout" "de"
|
||||
Option "XkbVariant" "nodeadkeys"
|
||||
Option "XkbOptions" "terminate:ctrl_alt_bksp"
|
||||
EndSection
|
398
sysconfig_arch/modules/desktop/files/etc/default/tlp
Normal file
398
sysconfig_arch/modules/desktop/files/etc/default/tlp
Normal file
|
@ -0,0 +1,398 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
# tlp - Parameters for power saving
|
||||
# See full explanation: https://linrunner.de/en/tlp/docs/tlp-configuration.html
|
||||
|
||||
# Notes:
|
||||
# - Some parameters are disabled, remove the leading '#' to enable # them;
|
||||
# shown values are suggestions not defaults
|
||||
# - Default *: intrinsic default that is effective when the parameter is missing
|
||||
# or disabled by a leading '#'; use PARAM="" to disable intrinsic defaults for
|
||||
# parameters with text string values
|
||||
# - Default <none>: do nothing or use kernel/hardware defaults
|
||||
|
||||
# Set to 0 to disable, 1 to enable TLP.
|
||||
# Default: 0
|
||||
TLP_ENABLE=1
|
||||
|
||||
# Operation mode when no power supply can be detected: AC, BAT.
|
||||
# Concerns some desktop and embedded hardware only.
|
||||
# Default: <none>
|
||||
TLP_DEFAULT_MODE=AC
|
||||
|
||||
# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
|
||||
# Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
|
||||
# Default: 0
|
||||
TLP_PERSISTENT_DEFAULT=0
|
||||
|
||||
# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
|
||||
# Non-zero value enables, zero disables laptop mode.
|
||||
# Default: 0 (AC), 2 (BAT)
|
||||
DISK_IDLE_SECS_ON_AC=0
|
||||
DISK_IDLE_SECS_ON_BAT=2
|
||||
|
||||
# Dirty page values (timeouts in secs).
|
||||
# Default: 15 (AC + BAT)
|
||||
MAX_LOST_WORK_SECS_ON_AC=15
|
||||
MAX_LOST_WORK_SECS_ON_BAT=60
|
||||
|
||||
# Note: CPU parameters below are disabled by default, remove the leading #
|
||||
# to enable them, otherwise kernel defaults will be used.
|
||||
|
||||
# Select a CPU frequency scaling governor.
|
||||
# Intel Core i processor with intel_pstate driver:
|
||||
# powersave(*), performance.
|
||||
# Older hardware with acpi-cpufreq driver:
|
||||
# ondemand(*), powersave, performance, conservative, schedutil.
|
||||
# (*) is recommended.
|
||||
# Use tlp-stat -p to show the active driver and available governors.
|
||||
# Important:
|
||||
# powersave for intel_pstate and ondemand for acpi-cpufreq are power
|
||||
# efficient for *almost all* workloads and therefore kernel and most
|
||||
# distributions have chosen them as defaults. If you still want to change,
|
||||
# you should know what you're doing! You *must* disable your distribution's
|
||||
# governor settings or conflicts will occur.
|
||||
# Default: <none>
|
||||
#CPU_SCALING_GOVERNOR_ON_AC=powersave
|
||||
#CPU_SCALING_GOVERNOR_ON_BAT=powersave
|
||||
|
||||
# Set the min/max frequency available for the scaling governor.
|
||||
# Possible values depend on your CPU. For available frequencies see
|
||||
# the output of tlp-stat -p.
|
||||
# Default: <none>
|
||||
#CPU_SCALING_MIN_FREQ_ON_AC=0
|
||||
#CPU_SCALING_MAX_FREQ_ON_AC=0
|
||||
#CPU_SCALING_MIN_FREQ_ON_BAT=0
|
||||
#CPU_SCALING_MAX_FREQ_ON_BAT=0
|
||||
|
||||
# Set energy performance hints (HWP) for Intel P-state governor:
|
||||
# performance, balance_performance, default, balance_power, power
|
||||
# Values are given in order of increasing power saving.
|
||||
# Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
|
||||
# Default: <none>
|
||||
CPU_HWP_ON_AC=balance_performance
|
||||
CPU_HWP_ON_BAT=balance_power
|
||||
|
||||
# Set Intel P-state performance: 0..100 (%).
|
||||
# Limit the max/min P-state to control the power dissipation of the CPU.
|
||||
# Values are stated as a percentage of the available performance.
|
||||
# Requires an Intel Core i processor with intel_pstate driver.
|
||||
# Default: <none>
|
||||
#CPU_MIN_PERF_ON_AC=0
|
||||
#CPU_MAX_PERF_ON_AC=100
|
||||
#CPU_MIN_PERF_ON_BAT=0
|
||||
#CPU_MAX_PERF_ON_BAT=30
|
||||
|
||||
# Set the CPU "turbo boost" feature: 0=disable, 1=allow
|
||||
# Requires an Intel Core i processor.
|
||||
# Important:
|
||||
# - This may conflict with your distribution's governor settings
|
||||
# - A value of 1 does *not* activate boosting, it just allows it
|
||||
# Default: <none>
|
||||
#CPU_BOOST_ON_AC=1
|
||||
#CPU_BOOST_ON_BAT=0
|
||||
|
||||
# Minimize number of used CPU cores/hyper-threads under light load conditions:
|
||||
# 0=disable, 1=enable.
|
||||
# Default: <none>
|
||||
SCHED_POWERSAVE_ON_AC=0
|
||||
SCHED_POWERSAVE_ON_BAT=1
|
||||
|
||||
# Kernel NMI Watchdog:
|
||||
# 0=disable (default, saves power), 1=enable (for kernel debugging only).
|
||||
# Default: <none>
|
||||
NMI_WATCHDOG=0
|
||||
|
||||
# Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
|
||||
# Frequency voltage pairs are written to:
|
||||
# /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
|
||||
# CAUTION: only use this, if you thoroughly understand what you are doing!
|
||||
# Default: <none>.
|
||||
#PHC_CONTROLS="F:V F:V F:V F:V"
|
||||
|
||||
# Set CPU performance versus energy savings policy:
|
||||
# performance, balance-performance, default, balance-power, power.
|
||||
# Values are given in order of increasing power saving.
|
||||
# Requires kernel module msr and x86_energy_perf_policy from linux-tools.
|
||||
# Default: <none>
|
||||
ENERGY_PERF_POLICY_ON_AC=performance
|
||||
ENERGY_PERF_POLICY_ON_BAT=power
|
||||
|
||||
# Disk devices; separate multiple devices with spaces.
|
||||
# Devices can be specified by disk ID also (lookup with: tlp diskid).
|
||||
# Note: DISK parameters below are effective only when this option is configured.
|
||||
# Default: "nvme0n1 sda"
|
||||
DISK_DEVICES="nvme0n1 sda mmcblk0"
|
||||
|
||||
# Disk advanced power management level: 1..254, 255 (max saving, min, off).
|
||||
# Levels 1..127 may spin down the disk; 255 allowable on most drives.
|
||||
# Separate values for multiple disks with spaces. Use the special value 'keep'
|
||||
# to keep the hardware default for the particular disk.
|
||||
# Default: <none>
|
||||
DISK_APM_LEVEL_ON_AC="254 254"
|
||||
DISK_APM_LEVEL_ON_BAT="128 128"
|
||||
|
||||
# Hard disk spin down timeout:
|
||||
# 0: spin down disabled
|
||||
# 1..240: timeouts from 5s to 20min (in units of 5s)
|
||||
# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
|
||||
# See 'man hdparm' for details.
|
||||
# Separate values for multiple disks with spaces. Use the special value 'keep'
|
||||
# to keep the hardware default for the particular disk.
|
||||
# Default: <none>
|
||||
#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
|
||||
#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
|
||||
|
||||
# Select I/O scheduler for the disk devices.
|
||||
# Multi queue (blk-mq) schedulers:
|
||||
# mq-deadline(*), none, kyber, bfq
|
||||
# Single queue schedulers:
|
||||
# deadline(*), cfq, bfq, noop
|
||||
# (*) recommended.
|
||||
# Separate values for multiple disks with spaces. Use the special value 'keep'
|
||||
# to keep the kernel default scheduler for the particular disk.
|
||||
# Notes:
|
||||
# - Multi queue (blk-mq) may need kernel boot option 'scsi_mod.use_blk_mq=1'
|
||||
# and 'modprobe mq-deadline-iosched|kyber|bfq' on kernels < 5.0
|
||||
# - Single queue schedulers are legacy now and were removed together with
|
||||
# the old block layer in kernel 5.0
|
||||
# Default: keep
|
||||
#DISK_IOSCHED="mq-deadline mq-deadline"
|
||||
|
||||
# AHCI link power management (ALPM) for disk devices:
|
||||
# min_power, med_power_with_dipm(*), medium_power, max_performance.
|
||||
# (*) Kernel >= 4.15 required, then recommended.
|
||||
# Multiple values separated with spaces are tried sequentially until success.
|
||||
# Default: <none>
|
||||
SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
|
||||
SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
|
||||
|
||||
# Exclude host devices from AHCI link power management.
|
||||
# Separate multiple hosts with spaces.
|
||||
# Default: <none>
|
||||
#SATA_LINKPWR_BLACKLIST="host1"
|
||||
|
||||
# Runtime Power Management for AHCI host and disks devices:
|
||||
# on=disable, auto=enable.
|
||||
# EXPERIMENTAL ** WARNING: auto may cause system lockups/data loss.
|
||||
# Default: <none>
|
||||
#AHCI_RUNTIME_PM_ON_AC=on
|
||||
#AHCI_RUNTIME_PM_ON_BAT=on
|
||||
|
||||
# Seconds of inactivity before disk is suspended.
|
||||
# Note: effective only when AHCI_RUNTIME_PM_ON_AC/BAT is activated.
|
||||
# Default: 15
|
||||
AHCI_RUNTIME_PM_TIMEOUT=15
|
||||
|
||||
# PCI Express Active State Power Management (PCIe ASPM):
|
||||
# default(*), performance, powersave.
|
||||
# (*) keeps BIOS ASPM defaults (recommended)
|
||||
# Default: <none>
|
||||
#PCIE_ASPM_ON_AC=default
|
||||
#PCIE_ASPM_ON_BAT=default
|
||||
|
||||
# Set the min/max/turbo frequency for the Intel GPU.
|
||||
# Possible values depend on your hardware. For available frequencies see
|
||||
# the output of tlp-stat -g.
|
||||
# Default: <none>
|
||||
#INTEL_GPU_MIN_FREQ_ON_AC=0
|
||||
#INTEL_GPU_MIN_FREQ_ON_BAT=0
|
||||
#INTEL_GPU_MAX_FREQ_ON_AC=0
|
||||
#INTEL_GPU_MAX_FREQ_ON_BAT=0
|
||||
#INTEL_GPU_BOOST_FREQ_ON_AC=0
|
||||
#INTEL_GPU_BOOST_FREQ_ON_BAT=0
|
||||
|
||||
# Radeon graphics clock speed (profile method): low, mid, high, auto, default;
|
||||
# auto = mid on BAT, high on AC.
|
||||
# Default: default
|
||||
RADEON_POWER_PROFILE_ON_AC=default
|
||||
RADEON_POWER_PROFILE_ON_BAT=default
|
||||
|
||||
# Radeon dynamic power management method (DPM): battery, performance.
|
||||
# Default: <none>
|
||||
RADEON_DPM_STATE_ON_AC=performance
|
||||
RADEON_DPM_STATE_ON_BAT=battery
|
||||
|
||||
# Radeon DPM performance level: auto, low, high; auto is recommended.
|
||||
# Note: effective only when RADEON_DPM_STATE_ON_AC/BAT is activated.
|
||||
# Default: auto
|
||||
RADEON_DPM_PERF_LEVEL_ON_AC=auto
|
||||
RADEON_DPM_PERF_LEVEL_ON_BAT=auto
|
||||
|
||||
# WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
|
||||
# Default: <none>
|
||||
WIFI_PWR_ON_AC=off
|
||||
WIFI_PWR_ON_BAT=on
|
||||
|
||||
# Disable wake on LAN: Y/N.
|
||||
# Default: N
|
||||
WOL_DISABLE=Y
|
||||
|
||||
# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
|
||||
# A value of 0 disables, >=1 enables power saving (recommended: 1).
|
||||
# Default: <none>
|
||||
SOUND_POWER_SAVE_ON_AC=0
|
||||
SOUND_POWER_SAVE_ON_BAT=1
|
||||
|
||||
# Disable controller too (HDA only): Y/N.
|
||||
# Note: effective only when SOUND_POWER_SAVE_ON_AC/BAT is activated.
|
||||
# Default: Y
|
||||
SOUND_POWER_SAVE_CONTROLLER=Y
|
||||
|
||||
# Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
|
||||
# Drive can be powered on again by releasing (and reinserting) the eject lever
|
||||
# or by pressing the disc eject button on newer models.
|
||||
# Note: an UltraBay/MediaBay hard disk is never powered off.
|
||||
# Default: 0
|
||||
BAY_POWEROFF_ON_AC=0
|
||||
BAY_POWEROFF_ON_BAT=0
|
||||
# Optical drive device to power off
|
||||
# Default: sr0
|
||||
BAY_DEVICE="sr0"
|
||||
|
||||
# Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
|
||||
# Default: <none>
|
||||
RUNTIME_PM_ON_AC=on
|
||||
RUNTIME_PM_ON_BAT=auto
|
||||
|
||||
# Exclude PCI(e) device adresses the following list from Runtime PM
|
||||
# (separate with spaces). Use lspci to get the adresses (1st column).
|
||||
# Default: <none>
|
||||
#RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
|
||||
|
||||
# Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
|
||||
# Default when unconfigured is "amdgpu nouveau nvidia radeon" which
|
||||
# prevents accidential power-on of dGPU in hybrid graphics setups.
|
||||
# Separate multiple drivers with spaces.
|
||||
# Default: "amdgpu mei_me nouveau nvidia pcieport radeon", use "" to disable
|
||||
# completely.
|
||||
#RUNTIME_PM_DRIVER_BLACKLIST="amdgpu mei_me nouveau nvidia pcieport radeon"
|
||||
|
||||
# Set to 0 to disable, 1 to enable USB autosuspend feature.
|
||||
# Default: 0
|
||||
USB_AUTOSUSPEND=1
|
||||
|
||||
# Exclude listed devices from USB autosuspend (separate with spaces).
|
||||
# Use lsusb to get the ids.
|
||||
# Note: input devices (usbhid) are excluded automatically
|
||||
# Default: <none>
|
||||
#USB_BLACKLIST="1111:2222 3333:4444"
|
||||
|
||||
# Bluetooth devices are excluded from USB autosuspend:
|
||||
# 0=do not exclude, 1=exclude.
|
||||
# Default: 0
|
||||
USB_BLACKLIST_BTUSB=0
|
||||
|
||||
# Phone devices are excluded from USB autosuspend:
|
||||
# 0=do not exclude, 1=exclude (enable charging).
|
||||
# Default: 0
|
||||
USB_BLACKLIST_PHONE=0
|
||||
|
||||
# Printers are excluded from USB autosuspend:
|
||||
# 0=do not exclude, 1=exclude.
|
||||
# Default: 1
|
||||
USB_BLACKLIST_PRINTER=1
|
||||
|
||||
# WWAN devices are excluded from USB autosuspend:
|
||||
# 0=do not exclude, 1=exclude.
|
||||
# Default: 0
|
||||
USB_BLACKLIST_WWAN=0
|
||||
|
||||
# Include listed devices into USB autosuspend even if already excluded
|
||||
# by the blacklists above (separate with spaces). Use lsusb to get the ids.
|
||||
# Default: <none>
|
||||
#USB_WHITELIST="1111:2222 3333:4444"
|
||||
|
||||
# Set to 1 to disable autosuspend before shutdown, 0 to do nothing
|
||||
# (workaround for USB devices that cause shutdown problems).
|
||||
# Default: 0
|
||||
#USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
|
||||
|
||||
# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
|
||||
# on system startup: 0=disable, 1=enable.
|
||||
# Note: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
|
||||
# are ignored when this is enabled.
|
||||
# Default: 0
|
||||
RESTORE_DEVICE_STATE_ON_STARTUP=0
|
||||
|
||||
# Radio devices to disable on startup: bluetooth, wifi, wwan.
|
||||
# Separate multiple devices with spaces.
|
||||
# Default: <none>
|
||||
#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
|
||||
|
||||
# Radio devices to enable on startup: bluetooth, wifi, wwan.
|
||||
# Separate multiple devices with spaces.
|
||||
# Default: <none>
|
||||
#DEVICES_TO_ENABLE_ON_STARTUP="wifi"
|
||||
|
||||
# Radio devices to disable on shutdown: bluetooth, wifi, wwan.
|
||||
# (workaround for devices that are blocking shutdown).
|
||||
# Default: <none>
|
||||
#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
|
||||
|
||||
# Radio devices to enable on shutdown: bluetooth, wifi, wwan.
|
||||
# (to prevent other operating systems from missing radios).
|
||||
# Default: <none>
|
||||
#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
|
||||
|
||||
# Radio devices to enable on AC: bluetooth, wifi, wwan.
|
||||
# Default: <none>
|
||||
#DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
|
||||
|
||||
# Radio devices to disable on battery: bluetooth, wifi, wwan.
|
||||
# Default: <none>
|
||||
#DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
|
||||
|
||||
# Radio devices to disable on battery when not in use (not connected):
|
||||
# bluetooth, wifi, wwan.
|
||||
# Default: <none>
|
||||
#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
|
||||
|
||||
# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
|
||||
# required). Charging starts when the remaining capacity falls below the
|
||||
# START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
|
||||
# Main / Internal battery (values in %)
|
||||
# Default: <none>
|
||||
#START_CHARGE_THRESH_BAT0=75
|
||||
#STOP_CHARGE_THRESH_BAT0=80
|
||||
# Ultrabay / Slice / Replaceable battery (values in %)
|
||||
# Default: <none>
|
||||
#START_CHARGE_THRESH_BAT1=75
|
||||
#STOP_CHARGE_THRESH_BAT1=80
|
||||
|
||||
# Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
|
||||
# Default: 0
|
||||
#RESTORE_THRESHOLDS_ON_BAT=1
|
||||
|
||||
# Battery feature drivers: 0=disable, 1=enable
|
||||
# Default: 1 (all)
|
||||
NATACPI_ENABLE=1
|
||||
TPACPI_ENABLE=1
|
||||
TPSMAPI_ENABLE=1
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# tlp-rdw - Parameters for the radio device wizard
|
||||
# Possible devices: bluetooth, wifi, wwan.
|
||||
|
||||
# Notes:
|
||||
# - Parameters are disabled by default, remove the leading # to enable them
|
||||
# - Separate multiple radio devices with spaces
|
||||
|
||||
# Default: <none> (for all parameters below)
|
||||
|
||||
# Radio devices to disable on connect.
|
||||
#DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
|
||||
#DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
|
||||
#DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
|
||||
|
||||
# Radio devices to enable on disconnect.
|
||||
#DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
|
||||
#DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
|
||||
#DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
|
||||
|
||||
# Radio devices to enable/disable when docked.
|
||||
#DEVICES_TO_ENABLE_ON_DOCK=""
|
||||
#DEVICES_TO_DISABLE_ON_DOCK=""
|
||||
|
||||
# Radio devices to enable/disable when undocked.
|
||||
#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
|
||||
#DEVICES_TO_DISABLE_ON_UNDOCK=""
|
|
@ -0,0 +1,9 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
[greeter]
|
||||
indicators = ~host;~spacer;~clock;~spacer;~session;~spacer;~power
|
||||
theme-name = Adwaita
|
||||
position = 7%,start 50%,center
|
||||
icon-theme-name = Adwaita
|
||||
#background = /usr/share/backgrounds/gnome/Road.jpg
|
||||
hide-user-image = true
|
||||
|
163
sysconfig_arch/modules/desktop/files/etc/lightdm/lightdm.conf
Normal file
163
sysconfig_arch/modules/desktop/files/etc/lightdm/lightdm.conf
Normal file
|
@ -0,0 +1,163 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
##
|
||||
# General configuration
|
||||
#
|
||||
# start-default-seat = True to always start one seat if none are defined in the configuration
|
||||
# greeter-user = User to run greeter as
|
||||
# minimum-display-number = Minimum display number to use for X servers
|
||||
# minimum-vt = First VT to run displays on
|
||||
# lock-memory = True to prevent memory from being paged to disk
|
||||
# user-authority-in-system-dir = True if session authority should be in the system location
|
||||
# guest-account-script = Script to be run to setup guest account
|
||||
# logind-check-graphical = True to on start seats that are marked as graphical by logind
|
||||
# log-directory = Directory to log information to
|
||||
# run-directory = Directory to put running state in
|
||||
# cache-directory = Directory to cache to
|
||||
# sessions-directory = Directory to find sessions
|
||||
# remote-sessions-directory = Directory to find remote sessions
|
||||
# greeters-directory = Directory to find greeters
|
||||
# backup-logs = True to move add a .old suffix to old log files when opening new ones
|
||||
#
|
||||
[LightDM]
|
||||
#start-default-seat=true
|
||||
#greeter-user=lightdm
|
||||
#minimum-display-number=0
|
||||
#minimum-vt=7 # Setting this to a value < 7 implies security issues, see FS#46799
|
||||
#lock-memory=true
|
||||
#user-authority-in-system-dir=false
|
||||
#guest-account-script=guest-account
|
||||
#logind-check-graphical=false
|
||||
#log-directory=/var/log/lightdm
|
||||
run-directory=/run/lightdm
|
||||
#cache-directory=/var/cache/lightdm
|
||||
#sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions
|
||||
#remote-sessions-directory=/usr/share/lightdm/remote-sessions
|
||||
#greeters-directory=/usr/share/lightdm/greeters:/usr/share/xgreeters
|
||||
#backup-logs=true
|
||||
|
||||
#
|
||||
# Seat configuration
|
||||
#
|
||||
# Seat configuration is matched against the seat name glob in the section, for example:
|
||||
# [Seat:*] matches all seats and is applied first.
|
||||
# [Seat:seat0] matches the seat named "seat0".
|
||||
# [Seat:seat-thin-client*] matches all seats that have names that start with "seat-thin-client".
|
||||
#
|
||||
# type = Seat type (xlocal, xremote, unity)
|
||||
# pam-service = PAM service to use for login
|
||||
# pam-autologin-service = PAM service to use for autologin
|
||||
# pam-greeter-service = PAM service to use for greeters
|
||||
# xserver-command = X server command to run (can also contain arguments e.g. X -special-option)
|
||||
# xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option)
|
||||
# xserver-config = Config file to pass to X server
|
||||
# xserver-layout = Layout to pass to X server
|
||||
# xserver-allow-tcp = True if TCP/IP connections are allowed to this X server
|
||||
# xserver-share = True if the X server is shared for both greeter and session
|
||||
# xserver-hostname = Hostname of X server (only for type=xremote)
|
||||
# xserver-display-number = Display number of X server (only for type=xremote)
|
||||
# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true)
|
||||
# xdmcp-port = XDMCP UDP/IP port to communicate on
|
||||
# xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
|
||||
# unity-compositor-command = Unity compositor command to run (can also contain arguments e.g. unity-system-compositor -special-option)
|
||||
# unity-compositor-timeout = Number of seconds to wait for compositor to start
|
||||
# greeter-session = Session to load for greeter
|
||||
# greeter-hide-users = True to hide the user list
|
||||
# greeter-allow-guest = True if the greeter should show a guest login option
|
||||
# greeter-show-manual-login = True if the greeter should offer a manual login option
|
||||
# greeter-show-remote-login = True if the greeter should offer a remote login option
|
||||
# user-session = Session to load for users
|
||||
# allow-user-switching = True if allowed to switch users
|
||||
# allow-guest = True if guest login is allowed
|
||||
# guest-session = Session to load for guests (overrides user-session)
|
||||
# session-wrapper = Wrapper script to run session with
|
||||
# greeter-wrapper = Wrapper script to run greeter with
|
||||
# guest-wrapper = Wrapper script to run guest sessions with
|
||||
# display-setup-script = Script to run when starting a greeter session (runs as root)
|
||||
# display-stopped-script = Script to run after stopping the display server (runs as root)
|
||||
# greeter-setup-script = Script to run when starting a greeter (runs as root)
|
||||
# session-setup-script = Script to run when starting a user session (runs as root)
|
||||
# session-cleanup-script = Script to run when quitting a user session (runs as root)
|
||||
# autologin-guest = True to log in as guest by default
|
||||
# autologin-user = User to log in with by default (overrides autologin-guest)
|
||||
# autologin-user-timeout = Number of seconds to wait before loading default user
|
||||
# autologin-session = Session to load for automatic login (overrides user-session)
|
||||
# autologin-in-background = True if autologin session should not be immediately activated
|
||||
# exit-on-failure = True if the daemon should exit if this seat fails
|
||||
#
|
||||
[Seat:*]
|
||||
#type=xlocal
|
||||
pam-service=lightdm
|
||||
pam-autologin-service=lightdm-autologin
|
||||
#pam-greeter-service=lightdm-greeter
|
||||
#xserver-command=X
|
||||
#xmir-command=Xmir
|
||||
#xserver-config=
|
||||
#xserver-layout=
|
||||
#xserver-allow-tcp=false
|
||||
#xserver-share=true
|
||||
#xserver-hostname=
|
||||
#xserver-display-number=
|
||||
#xdmcp-manager=
|
||||
#xdmcp-port=177
|
||||
#xdmcp-key=
|
||||
#unity-compositor-command=unity-system-compositor
|
||||
#unity-compositor-timeout=60
|
||||
#greeter-session=example-gtk-gnome
|
||||
#greeter-hide-users=false
|
||||
#greeter-allow-guest=true
|
||||
#greeter-show-manual-login=false
|
||||
#greeter-show-remote-login=true
|
||||
#user-session=default
|
||||
#allow-user-switching=true
|
||||
#allow-guest=true
|
||||
#guest-session=
|
||||
session-wrapper=/etc/lightdm/Xsession
|
||||
#greeter-wrapper=
|
||||
#guest-wrapper=
|
||||
#display-setup-script=
|
||||
#display-stopped-script=
|
||||
#greeter-setup-script=
|
||||
#session-setup-script=
|
||||
#session-cleanup-script=
|
||||
#autologin-guest=false
|
||||
autologin-user=je
|
||||
autologin-user-timeout=0
|
||||
#autologin-in-background=false
|
||||
#autologin-session=
|
||||
#exit-on-failure=false
|
||||
#
|
||||
# XDMCP Server configuration
|
||||
#
|
||||
# enabled = True if XDMCP connections should be allowed
|
||||
# port = UDP/IP port to listen for connections on
|
||||
# listen-address = Host/address to listen for XDMCP connections (use all addresses if not present)
|
||||
# key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored in keys.conf)
|
||||
#
|
||||
# The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn. Alternatively
|
||||
# it can be a word and the first 7 characters are used as the key.
|
||||
#
|
||||
[XDMCPServer]
|
||||
#enabled=false
|
||||
#port=177
|
||||
#listen-address=
|
||||
#key=
|
||||
|
||||
#
|
||||
# VNC Server configuration
|
||||
#
|
||||
# enabled = True if VNC connections should be allowed
|
||||
# command = Command to run Xvnc server with
|
||||
# port = TCP/IP port to listen for connections on
|
||||
# listen-address = Host/address to listen for VNC connections (use all addresses if not present)
|
||||
# width = Width of display to use
|
||||
# height = Height of display to use
|
||||
# depth = Color depth of display to use
|
||||
#
|
||||
[VNCServer]
|
||||
#enabled=false
|
||||
#command=Xvnc
|
||||
#port=5900
|
||||
#listen-address=
|
||||
#width=1024
|
||||
#height=768
|
||||
#depth=8
|
10
sysconfig_arch/modules/desktop/files/etc/pam.d/login
Normal file
10
sysconfig_arch/modules/desktop/files/etc/pam.d/login
Normal file
|
@ -0,0 +1,10 @@
|
|||
#%PAM-1.0
|
||||
##### THIS IS MANAGED BY PUPPET #####
|
||||
|
||||
auth required pam_securetty.so
|
||||
auth requisite pam_nologin.so
|
||||
auth include system-local-login
|
||||
auth optional pam_gnome_keyring.so
|
||||
account include system-local-login
|
||||
session include system-local-login
|
||||
session optional pam_gnome_keyring.so auto_start
|
7
sysconfig_arch/modules/desktop/files/etc/pam.d/passwd
Normal file
7
sysconfig_arch/modules/desktop/files/etc/pam.d/passwd
Normal file
|
@ -0,0 +1,7 @@
|
|||
#%PAM-1.0
|
||||
##### THIS IS MANAGED BY PUPPET #####
|
||||
#
|
||||
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
|
||||
#password required pam_unix.so sha512 shadow use_authtok
|
||||
password required pam_unix.so sha512 shadow nullok
|
||||
password optional pam_gnome_keyring.so
|
38
sysconfig_arch/modules/desktop/files/etc/systemd/logind.conf
Normal file
38
sysconfig_arch/modules/desktop/files/etc/systemd/logind.conf
Normal file
|
@ -0,0 +1,38 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
## This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Entries in this file show the compile time defaults.
|
||||
# You can change settings by editing this file.
|
||||
# Defaults can be restored by simply deleting this file.
|
||||
#
|
||||
# See logind.conf(5) for details.
|
||||
|
||||
[Login]
|
||||
#NAutoVTs=6
|
||||
#ReserveVT=6
|
||||
#KillUserProcesses=no
|
||||
#KillOnlyUsers=
|
||||
#KillExcludeUsers=root
|
||||
#InhibitDelayMaxSec=5
|
||||
HandlePowerKey=poweroff
|
||||
HandleSuspendKey=ignore
|
||||
#HandleHibernateKey=hibernate
|
||||
HandleLidSwitch=suspend
|
||||
#HandleLidSwitchDocked=ignore
|
||||
#PowerKeyIgnoreInhibited=no
|
||||
#SuspendKeyIgnoreInhibited=no
|
||||
#HibernateKeyIgnoreInhibited=no
|
||||
#LidSwitchIgnoreInhibited=yes
|
||||
#HoldoffTimeoutSec=30s
|
||||
#IdleAction=ignore
|
||||
#IdleActionSec=30min
|
||||
#RuntimeDirectorySize=10%
|
||||
#RemoveIPC=yes
|
||||
#InhibitorsMax=8192
|
||||
#SessionsMax=8192
|
||||
#UserTasksMax=33%
|
|
@ -0,0 +1,6 @@
|
|||
##### THIS IS MANAGED BY PUPPET #####
|
||||
Section "InputClass"
|
||||
Identifier "system-keyboard"
|
||||
MatchIsKeyboard "on"
|
||||
Option "XkbLayout" "us"
|
||||
EndSection
|
|
@ -0,0 +1,7 @@
|
|||
Section "Device"
|
||||
Identifier "Intel Graphics"
|
||||
Driver "intel"
|
||||
Option "AccelMethod" "sna"
|
||||
Option "TearFree" "true"
|
||||
Option "DRI" "3"
|
||||
EndSection
|
|
@ -0,0 +1,4 @@
|
|||
Section "Monitor"
|
||||
Identifier "eDP1"
|
||||
Option "Rotate" "right"
|
||||
EndSection
|
|
@ -0,0 +1,5 @@
|
|||
Section "InputClass"
|
||||
Identifier "calibration"
|
||||
MatchProduct "Goodix Capacitive TouchScreen"
|
||||
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
|
||||
EndSection
|
7
tweaks.org
Normal file
7
tweaks.org
Normal file
|
@ -0,0 +1,7 @@
|
|||
* Firefox about:config
|
||||
| Option | Value | Description |
|
||||
|------------------------------------------+-------+------------------------------------------|
|
||||
| privacy.donottrackheader.enabled | true | Send Do-not-track |
|
||||
| findbar.highlightAll | true | Highlight all partial results in search |
|
||||
| browser.sessionstore.max_resumed_crashes | -1 | Do not show "Upps, we could not recover" |
|
||||
| | | |
|
Reference in a new issue