From 6611b51b07fdd7412000da8f20341cebdfb95c76 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 3 Nov 2014 02:41:37 +1300 Subject: Use xbindkeys for keybinding, not i3 Also consolidate Makefile into just one target for X --- Makefile | 16 +++------------- X/.xinitrc | 21 +++++++++++++++++++++ X/xbindkeysrc | 18 ++++++++++++++++++ i3/config | 32 -------------------------------- 4 files changed, 42 insertions(+), 45 deletions(-) create mode 100644 X/.xinitrc create mode 100644 X/xbindkeysrc diff --git a/Makefile b/Makefile index 61485573..4cc4b476 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,6 @@ install-vim-plugins \ install-wyrd \ install-x \ - install-xinitrc \ - install-xmodmap \ - install-xresources \ test \ test-bash \ test-bin \ @@ -81,7 +78,7 @@ install-gnupg : install -m 0700 -d -- "$(HOME)"/.gnupg install -m 0600 -- gnupg/*.conf "$(HOME)"/.gnupg -install-i3 : +install-i3 : install-x install -m 0755 -d -- "$(HOME)"/.i3 install -m 0644 -- i3/* "$(HOME)"/.i3 @@ -185,17 +182,10 @@ install-vim-pathogen : install-vim-plugins install-wyrd : install -m 0644 -- wyrd/wyrdrc "$(HOME)"/.wyrdrc -install-x : install-xmodmap \ - install-xresources \ - install-xinitrc - -install-xmodmap : +install-x : install -m 0644 -- X/Xresources "$(HOME)"/.Xresources - -install-xresources : install -m 0644 -- X/Xmodmap "$(HOME)"/.Xmodmap - -install-xinitrc : + install -m 0644 -- X/xbindkeysrc "$(HOME)"/.xbindkeysrc install -m 0644 -- X/xinitrc "$(HOME)"/.xinitrc test : test-sh test-bash test-bin test-urxvt diff --git a/X/.xinitrc b/X/.xinitrc new file mode 100644 index 00000000..603615f2 --- /dev/null +++ b/X/.xinitrc @@ -0,0 +1,21 @@ +# Read X resources +xrdb "$HOME"/.Xresources + +# Apply xmodmap definitions +xmodmap "$HOME"/.Xmodmap + +# Apply background image +feh --bg-scale -- "$HOME"/.i3/draugen.jpg + +# Start xscreensaver(1) +xscreensaver & + +# Start urxvtd(1) +urxvtd -f -o + +# Bind keys +xbindkeys + +# Start window manager +exec i3 + diff --git a/X/xbindkeysrc b/X/xbindkeysrc new file mode 100644 index 00000000..fcead7eb --- /dev/null +++ b/X/xbindkeysrc @@ -0,0 +1,18 @@ +"urxvtcd" + Mod4 + Return + +"dmenu_run -fn 'terminus-iso8860-1-12' -nb '#111111' -nf '#eeeeee' -sb '#285577' -sf '#ffffff'" + Mod4 + d + +"xscreensaver-command -lock" + Mod4 + slash + +"amixer -q sset Master toggle" + XF86AudioMute + +"amixer -q sset Master 5%+ unmute" + XF86AudioRaiseVolume + +"amixer -q sset Master 5%- unmute" + XF86AudioLowerVolume + diff --git a/i3/config b/i3/config index 8b0e5632..e94dca4d 100644 --- a/i3/config +++ b/i3/config @@ -13,15 +13,9 @@ bindsym $mod+Shift+r restart # Mod+Shift+q logs out of i3wm bindsym $mod+Shift+q exit -# Mod+Enter starts a terminal -bindsym $mod+Return exec urxvtcd - # Mod+Shift+c kills the focussed window bindsym $mod+Shift+c kill -# Mod+Shift+d runs Dmenu -bindsym $mod+d exec dmenu_run -fn 'terminus-iso8859-1-12' -nb "#111111" -nf "#eeeeee" -sb "#285577" -sf "#ffffff" - # Mod+Shift+h/j/k/l change focus in a Vimlike way bindsym $mod+h focus left bindsym $mod+j focus down @@ -34,9 +28,6 @@ bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up bindsym $mod+Shift+l move right -# Mod+slash locks the screen -bindsym $mod+slash exec xscreensaver-command -lock - # Mod+backslash splits horizontally bindsym $mod+backslash split h @@ -91,29 +82,6 @@ mode "resize" { bindsym Escape mode "default" } -# PrintScreen takes a screenshot of the whole display -bindsym Print exec sh -c 'mkdir -p "$HOME"/Screenshots && import "$HOME"/Screenshots/shot-"$(date +%Y%m%d%H%M%S)".png' - -# Shift-PrintScreen selects and takes a screenshot of a section of the screen -bindsym --release Shift+Print exec sh -c 'mkdir -p "$HOME"/Screenshots && import "$HOME"/Screenshots/snap-"$(date +%Y%m%d%H%M%S)".png' - -# Special modifier keys change volume -bindsym XF86AudioRaiseVolume exec amixer -q sset Master 5%+ unmute -bindsym XF86AudioLowerVolume exec amixer -q sset Master 5%- unmute -bindsym XF86AudioMute exec amixer -q sset Master toggle - -# Special modifier keys control ncmcpp -bindsym XF86AudioStop exec ncmpcpp stop -bindsym XF86AudioPlay exec ncmpcpp toggle -bindsym XF86AudioNext exec ncmpcpp next -bindsym XF86AudioPrev exec ncmpcpp prev - -# Special modifier keys run calculator, Thunar, mutt, and Firefox -bindsym XF86Calculator exec xcalc -bindsym XF86Explorer exec thunar -bindsym XF86Mail exec urxvtcd -e mutt -bindsym XF86HomePage exec firefox - # i3bar at bottom of screen bar { font pango:Verdana 7 -- cgit v1.2.3