summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-12-26 11:34:49 +0100
committerAnton Khirnov <anton@khirnov.net>2013-12-26 12:30:06 +0100
commit2d72937ffafa6d659b6e2f9d3b239045ca382b29 (patch)
tree171878d5cdf3f6f1c2a8caedb59612a2230e8867
parent157b8aa6b74b648bdd4f4ff668b814f1e422ca5d (diff)
bindings: add a binding for naming desktops
-rw-r--r--bindings.config9
-rw-r--r--colorset.config2
-rw-r--r--config1
-rw-r--r--functions.config4
-rw-r--r--modules.config11
5 files changed, 24 insertions, 3 deletions
diff --git a/bindings.config b/bindings.config
index 42553bc..c25f9ae 100644
--- a/bindings.config
+++ b/bindings.config
@@ -73,15 +73,18 @@ Silent Mouse 7 T N Resize br w+10 w+10
Silent Mouse 8 W N FvwmWindowMove
Silent Mouse 9 W N FvwmWindowResize
-# Move across pages with win or ctrl+alt + arrows
-Key Left A 4 WindowId root 1 WarpToWindow 10 50
-Key Right A 4 WindowId root 0 WarpToWindow 90 50
+# name desktops
+Key n A 4 FormDeskName
+
+# Move across pages with up/down arrows, mouse scroll or j/k
Key Up A 4 GotoPage 0p -1p
Key K A 4 GotoPage 0p -1p
Mouse 4 A 4 GotoPage 0p -1p
Key Down A 4 GotoPage 0p +1p
Key J A 4 GotoPage 0p +1p
Mouse 5 A 4 GotoPage 0p +1p
+
+# select a page directly with a number (0-9) or shift + number (10-19)
Piperead 'for i in `seq 0 8`; do j=$(($i+1)); echo Key $j A 4 GotoPage 0 $i; done'
Key 0 A 4 GotoPage 0 9
Piperead 'for i in `seq 10 18`; do j=$(($i-9)); echo Key $j A S4 GotoPage 0 $i; done'
diff --git a/colorset.config b/colorset.config
index ad70d07..211b8da 100644
--- a/colorset.config
+++ b/colorset.config
@@ -6,3 +6,5 @@ Colorset 2 RootTransparent, fg black, hi white, sh white, Tint "LightSkyBlue1"
Colorset 3 RootTransparent, fg LightSkyBlue1, bg black, Tint black 60
# Menu active item
Colorset 4 bg white, fg black, sh white, hi white
+# module fg/bg
+Colorset 6 bg rgb:4f/4f/4f, fg rgb:b0/e2/ff
diff --git a/config b/config
index 91bc778..b527c29 100644
--- a/config
+++ b/config
@@ -18,6 +18,7 @@ Read font.config
Read functions.config
Read initvars.config
Read menu.config
+Read modules.config
Read styles.config
DesktopSize 1x$[infostore.num_pages]
diff --git a/functions.config b/functions.config
index 828dc2a..304f222 100644
--- a/functions.config
+++ b/functions.config
@@ -84,6 +84,10 @@ DestroyFunc MPDControl
AddToFunc MPDControl
+ I Exec mpc -q $*
+DestroyFunc FormDeskName
+AddToFunc FormDeskName
++ I Module FvwmForm FormDeskName DESK=$[desk.n]
+
############################
#Don't steal focus
DestroyFunc UrgencyFunc
diff --git a/modules.config b/modules.config
new file mode 100644
index 0000000..bedb536
--- /dev/null
+++ b/modules.config
@@ -0,0 +1,11 @@
+# (FvwmForm) a dialog for entering the desktop name
+DestroyModuleConfig FormDeskName*
+*FormDeskName: Colorset 1
+*FormDeskName: ItemColorset 6
+*FormDeskName: ButtonFont $[ThemeFont]
+*FormDeskName: InputFont $[ThemeFont]
+*FormDeskName: Title "Enter the name for the desktop $DESK"
+*FormDeskName: WarpPointer
+*FormDeskName: Input deskname 64
+*FormDeskName: Button quit "Enter" ^M
+*FormDeskName: Command DesktopName $DESK $(deskname)