From 6ce9823f9ad4fc349d763be57d19e28cd0911243 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 21 Dec 2014 20:39:20 +0100 Subject: Implemented basic `i3` layout selector based on `dmenu` * `apply_layout.sh` offers a `dmenu` selection of all files in `~/.i3/layout` * the selected layout is applied to the current workspace via `i3-msg` --- i3wm/.i3/apply_layout.sh | 6 ++++++ i3wm/.i3/config | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100755 i3wm/.i3/apply_layout.sh (limited to 'i3wm/.i3') diff --git a/i3wm/.i3/apply_layout.sh b/i3wm/.i3/apply_layout.sh new file mode 100755 index 0000000..e8a079c --- /dev/null +++ b/i3wm/.i3/apply_layout.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +available_layouts=$(ls -A1 ~/.i3/layout/) +selected_layout=$(echo $available_layouts | dmenu -fn 'Droid Sans Mono-11' -nb '#222222' -nf '#605c5a' -sb '#111111' -sf '#aadb0f') + +i3-msg "append_layout $(pwd)/.i3/layout/$selected_layout" diff --git a/i3wm/.i3/config b/i3wm/.i3/config index 49d457c..011ff39 100644 --- a/i3wm/.i3/config +++ b/i3wm/.i3/config @@ -116,10 +116,11 @@ for_window [class="^.*"] border pixel 2 bindsym $mod+Return exec urxvtc bindsym $alt+Return exec gvim -bindsym $mod+space exec --no-startup-id dmenu_run -fn 'Droid Sans Mono-11' -nb '#222222' -nf '#605c5a' -sb '#111111' -sf '#aadb0f' -bindsym $alt+space exec --no-startup-id passman submitform +bindsym $mod+space exec --no-startup-id dmenu_run -fn 'Droid Sans Mono-11' -nb '#222222' -nf '#605c5a' -sb '#111111' -sf '#aadb0f' +bindsym $alt+space exec --no-startup-id passman submitform +bindsym Control+space exec --no-startup-id ~/.i3/apply_layout.sh -bindsym control+Mod1+l exec --no-startup-id i3lock -c 000000 +bindsym Control+Mod1+l exec --no-startup-id i3lock -c 000000 bindsym Control+Mod1+m exec --no-startup-id ~/.screenlayout/mobile.sh bindsym Control+Mod1+d exec --no-startup-id ~/.screenlayout/docked.sh -- cgit v1.2.3