From 900249e33d6c3e1108385360880ccc022bf61029 Mon Sep 17 00:00:00 2001 From: Julian T Date: Thu, 14 May 2020 20:38:15 +0200 Subject: Zsh vim keys and experimenting with new zsh config. Dwm converted to new xinit system --- dwm/.Xmodmap | 5 --- dwm/.dwmSession.sh | 2 +- dwm/.xinitrc | 19 ++--------- dwm/.zprofile | 3 -- dwm/Scripts/lc | 91 ----------------------------------------------------- zsh-no-omzsh/.zshrc | 24 ++++++++++++++ zsh/.zshrc | 3 +- 7 files changed, 28 insertions(+), 119 deletions(-) delete mode 100644 dwm/.Xmodmap delete mode 100644 dwm/.zprofile delete mode 100755 dwm/Scripts/lc create mode 100644 zsh-no-omzsh/.zshrc diff --git a/dwm/.Xmodmap b/dwm/.Xmodmap deleted file mode 100644 index 08cf429..0000000 --- a/dwm/.Xmodmap +++ /dev/null @@ -1,5 +0,0 @@ -clear lock -clear control -keycode 66 = Control_R -add control = Control_R Control_L - diff --git a/dwm/.dwmSession.sh b/dwm/.dwmSession.sh index fdb0fad..b4d33c3 100755 --- a/dwm/.dwmSession.sh +++ b/dwm/.dwmSession.sh @@ -1,4 +1,4 @@ -#!/bin/bash +!/bin/bash PIDFILE=/home/julian/.dwmSession.pid kill `cat $PIDFILE` diff --git a/dwm/.xinitrc b/dwm/.xinitrc index b824fad..c38d8e3 100644 --- a/dwm/.xinitrc +++ b/dwm/.xinitrc @@ -1,25 +1,10 @@ -setxkbmap -layout us -variant altgr-intl -export _JAVA_AWT_WM_NONREPARENTING=1 -feh --bg-tile /home/julian/Pictures/defaultWall.* -export TERM=st -dbus-update-activation-environment --systemd DISPLAY +export LOPTS="composer" -eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) -export SSH_AUTH_SOCK - -xmodmap .Xmodmap -xcape -e "Control_R=Escape" - -nm-applet & -xscreensaver & -xss-lock -- xscreensaver-command --lock & -xcompmgr & +source ~/Scripts/xlaunchrc while true; do dwm done & -play ~/Winsounds/login.wav -q & - exec sh /home/julian/.dwmSession.sh diff --git a/dwm/.zprofile b/dwm/.zprofile deleted file mode 100644 index b78f84a..0000000 --- a/dwm/.zprofile +++ /dev/null @@ -1,3 +0,0 @@ -if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then - exec startx -fi diff --git a/dwm/Scripts/lc b/dwm/Scripts/lc deleted file mode 100755 index 74518e7..0000000 --- a/dwm/Scripts/lc +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -Commands="update poweroff suspend set-keyboard caps-lock battery cups-website vim emacs htop scrot overleaf-render overleaf win pass wall stat mic" -statScripts="ram.sh status.sh net.sh mic.sh" - -handle_stuff() { - if [ "$1" = "--dmenu" ]; then - $0 $(echo $Commands | tr " " "\n" | dmenu -i -p ":") - fi - - if [ "$1" = "edit" ] || [ "$1" = "e" ]; then - notify-send "$*" - st -e nvim $(echo $* | cut -d" " -f2-) - fi - -# System info - if [ "$1" = "b" ] || [ "$1" = "battery" ]; then - notify-send "Battery information" "$(acpi | grep 1:)" - fi - -# System maintenance - if [ "$1" = "sk" ] || [ "$1" = "set-keyboard" ]; then - setxkbmap -layout us -variant altgr-intl - xcape -e "Control_R=Escape" - xmodmap .Xmodmap - fi - -# POWER COMMANDS - if [ "$1" = "s" ] || [ "$1" = "suspend" ]; then - systemctl suspend - fi - if [ "$1" = "poweroff" ]; then - poweroff - fi - -# Mics - if [ "$1" = "p" ] || [ "$1" = "scrot" ]; then - scrot /tmp/%Y-%m-%d-%T-screenshot.png - fi - - if [ "$1" = "overleaf-render" ]; then - st sh ~/Documents/overleafRenderer/compile.sh - fi - - if [ "$1" = "caps-lock" ] || [ "$1" = "cl" ]; then - xdotool key Caps_Lock - fi - - if [ "$1" = "win" ]; then - vboxmanage startvm "Windows xp" - fi - if [ "$1" = "wall" ]; then - feh --bg-tile Pictures/defaultWall.* - fi - if [ "$1" = "mic" ]; then - amixer set Capture toggle - fi - -# Launch - if [ "$1" = "vi" ] || [ "$1" = "vim" ]; then - st -e nvim - fi - if [ "$1" = "emacs" ]; then - st -e emacs - fi - if [ "$1" = "ht" ] || [ "$1" = "htop" ]; then - st -e htop - fi - if [ "$1" = "cups" ] || [ "$1" = "cups-website" ]; then - firefox "http://localhost:631/" - fi - if [ "$1" = "overleaf" ]; then - firefox -p Sharelatex --no-remote - fi - if [ "$1" = "pass" ]; then - bash $HOME/Scripts/passmenu - fi - - if [ "$1" = "stat" ]; then - sh /home/julian/Scripts/$(echo $statScripts | tr " " "\n" | dmenu -i -p "stat") - fi - -# Calc - if [ "$(echo $1 | head -c 1)" = "=" ]; then - calc="$(echo $1 | cut -c 2-)" - notify-send "Result" "$calc = $(echo $calc | bc)" - fi -} - - -handle_stuff $* & diff --git a/zsh-no-omzsh/.zshrc b/zsh-no-omzsh/.zshrc new file mode 100644 index 0000000..474a7a7 --- /dev/null +++ b/zsh-no-omzsh/.zshrc @@ -0,0 +1,24 @@ +# The following lines were added by compinstall + +zstyle ':completion:*' completer _expand _complete _ignored _approximate +zstyle ':completion:*' group-name '' +zstyle ':completion:*' list-colors '' +zstyle ':completion:*' matcher-list '+' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'l:|=* r:|=*' 'r:|[._-]=* r:|=*' +zstyle ':completion:*' menu select=5 +zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' +zstyle :compinstall filename '/home/julian/.zshrc' + +autoload -Uz compinit +compinit +# End of lines added by compinstall +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=10000 +SAVEHIST=100000 +unsetopt beep +bindkey -v +# End of lines configured by zsh-newuser-install + +PROMPT="$FG[032]%~\ +$(git_prompt_info) \ +$FG[105]%(!.#.ยป)%{$reset_color%} " diff --git a/zsh/.zshrc b/zsh/.zshrc index a8a9a99..e255cc9 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -80,8 +80,6 @@ SUDO_EDITOR=nvim export ANSIBLE_NOCOWS=1 -export PATH=$HOME/Scripts:$PATH - # Creates a new shell in the current shell alias new="ZSH_NEST=$((ZSH_NEST + 1)) zsh" @@ -92,6 +90,7 @@ then fi bindkey "^P" up-line-or-search +bindkey -v function gittr { if [ $# -eq 0 ] -- cgit v1.2.3