From 750c0e8099264aa42999dd935040adb0b8105e4b Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Tue, 29 Aug 2023 06:51:35 -0500 Subject: Add keyboard shortcuts and update xinitrc Also update install.sh to account for Xorg files. Remove unused slink from nvim/ --- Xorg/xbindkeysrc | 35 ++++++++++++++++++++++++++++++++++- Xorg/xinitrc | 26 +++++++++++++++----------- install.sh | 19 ++++++++++++++----- nvim/nvim | 1 - 4 files changed, 63 insertions(+), 18 deletions(-) delete mode 120000 nvim/nvim diff --git a/Xorg/xbindkeysrc b/Xorg/xbindkeysrc index e88a89e..6a4c8d8 100644 --- a/Xorg/xbindkeysrc +++ b/Xorg/xbindkeysrc @@ -65,6 +65,15 @@ #"rxvt" # Control + b:2 + Release + +# My shortcuts +# ============ + +# Change brightness or volume with (Super + up|down). This might be better to +# configure from the DE/WM. It's more complex and the command varies depending +# on the machine. +# See: https://askubuntu.com/a/149264/951105 + ## Increase volume #"pactl set-sink-volume @DEFAULT_SINK@ +1000" # XF86AudioRaiseVolume @@ -73,7 +82,31 @@ #"pactl set-sink-volume @DEFAULT_SINK@ -1000" # XF86AudioLowerVolume -# mpd +# Terminal + +# st with tmux (super + return) +"st -e tmux" + Mod4 + Return + +"st" + Shift+Mod4 + Return + +# Other applications (super + key) + +"firefox" + Mod4 + w + +"thunderbird" + Mod4 + m + +"goldendict" + Mod4 + g + +"zeal" + Mod4 + h + +# mpd control with mpc (just use strawberry(1)) + #"mpc toggle" # XF86AudioPlay #"mpc stop" diff --git a/Xorg/xinitrc b/Xorg/xinitrc index a9dbcb0..fe95f3c 100644 --- a/Xorg/xinitrc +++ b/Xorg/xinitrc @@ -1,8 +1,9 @@ #!/bin/sh -# Copied from /etc/X11/xinit/xinitrc +# This first part is copied from /etc/X11/xinit/xinitrc # # Start X with `$ xstart` +# See startx(1) and xinit(1) userresources=$HOME/.Xresources @@ -37,15 +38,6 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then unset f fi -# start some nice programs - -#twm & -#xclock -geometry 50x50-1+1 & -#xterm -geometry 80x50+494+51 & -#xterm -geometry 80x20+494-0 & -#exec xterm -geometry 80x66+0+0 -name login - - # Setup and start Desktop Environment # ====================================================================== @@ -60,6 +52,18 @@ xbindkeys # map CAPSLOCK to ESC setxkbmap -option caps:escape -# KDE Plasma (DE) + +# Start twm +#twm & +#xclock -geometry 50x50-1+1 & +#xterm -geometry 80x50+494+51 & +#xterm -geometry 80x20+494-0 & +#exec xterm -geometry 80x66+0+0 -name login + +# Start Plasma +# Start KDE Plasma (DE) export DESKTOP_SESSION=plasma exec startplasma-x11 + +# Start xfce4 +#startxfce4 diff --git a/install.sh b/install.sh index df782a0..c236ac5 100755 --- a/install.sh +++ b/install.sh @@ -70,6 +70,8 @@ prompt() { # FIXME: If $PWD has spaces in it, this might fail. # Filewise +# -------- + if prompt "bash"; then eval $cp_or_ln " ${PWD}/bash/bash_profile $HOME/.bash_profile" eval $cp_or_ln " ${PWD}/bash/bashrc $HOME/.bashrc" @@ -91,11 +93,6 @@ if prompt "vim"; then eval $cp_or_ln " ${PWD}/vim/fun.vim $VIMFILES/fun.vim" fi -# Directorywise -if prompt "nvim"; then - eval $cp_or_ln " ${PWD}/nvim $XDG_CONFIG_HOME/nvim" -fi - if prompt "git"; then [ -d $XDG_CONFIG_HOME/git ] || mkdir -p $XDG_CONFIG_HOME/git eval $cp_or_ln " ${PWD}/git/ignore $XDG_CONFIG_HOME/git/ignore" @@ -103,6 +100,18 @@ if prompt "git"; then eval $cp_or_ln " ${PWD}/git/git-prompt.sh $HOME/.git-prompt.sh" fi +if prompt "Xorg"; then + eval $cp_or_ln " ${PWD}/Xorg/xinitrc $HOME/.xinitrc" + eval $cp_or_ln " ${PWD}/Xorg/xbindkeysrc $HOME/.xbindkeysrc" +fi + +# Directorywise +# ------------- + +if prompt "nvim"; then + eval $cp_or_ln " ${PWD}/nvim $XDG_CONFIG_HOME/nvim" +fi + if prompt "zathura"; then eval $cp_or_ln " ${PWD}/zathura $XDG_CONFIG_HOME/zathura" diff --git a/nvim/nvim b/nvim/nvim deleted file mode 120000 index f265a59..0000000 --- a/nvim/nvim +++ /dev/null @@ -1 +0,0 @@ -/home/mitsuo/mahcode/dotfiles/nvim \ No newline at end of file -- cgit v1.2.3