LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-23-2012, 04:14 PM   #1
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 244

Rep: Reputation: 31
Switching workspaces in xmonad using programmer dvorak keyboard layout


I'm playing around with xmonad, and I haven't had much trouble with it except for switching workspaces. Pressing the indicated key combinations (mod+number) appear to do nothing. I am using the programmer dvorak keyboard layout, which has the numbers shifted. I assume this is what is causing the problem, but I have only just begun learning Haskell, so the config file is still mysterious to me. Any help in resolving this will be appreciated.
 
Old 03-24-2012, 12:54 AM   #2
culaterout
Member
 
Registered: Jul 2006
Location: colorado
Distribution: Debian, Arch Linux, Linux Mint, Ubuntu, Fedora, Suse, Mepis, Redhat, Sayabon, mandrake and android (
Posts: 189

Rep: Reputation: 29
You skipped past the tutorial... Thank God it is a bit confusing...

Mod key = Alt...

Better yet hear is keyboard....

And A small list I made up...

mrelendigs config

Install Demu

Install Terminator great terminal written in php and always drag drop text and spilt window right click.. it rocks.

atl + p = Dmenu

alt + shift +P = Gmrun

alt + shift + c = Close window/ program

alt + space = rotate view or

alt + tab = change windows without mouse

alt + shift + enter = terminal

Now you can load any Desktop Enviroment because Xmonad is a windows manager..

So Kde, LXDE, Gnome and XFCE work...

command is gnome-session, xfce4-panel and so on must load each Desktop Enviroment..

Her is a link to keyboard..

http://www.haskell.org/wikiupload/b/b8/Xmbindings.png


Good luck it Xmonad Rocks...
 
Old 03-24-2012, 10:02 AM   #3
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 244

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by culaterout View Post
You skipped past the tutorial... Thank God it is a bit confusing...
Actually, I did read it but forgot to mention that. I have already installed dmenu and trayer and they are both working properly. I have also changed my mod key to super and a couple of other minor settings. Here is the diff between the template config and my own:
Code:
@@ -25,11 +25,11 @@
 -- The preferred terminal program, which is used in a binding below and by
 -- certain contrib modules.
 --
-myTerminal      = "xterm"
+myTerminal      = "gnome-terminal"
  
 -- Whether focus follows the mouse pointer.
 myFocusFollowsMouse :: Bool
-myFocusFollowsMouse = True
+myFocusFollowsMouse = False
  
 -- Width of the window border in pixels.
 --
@@ -40,7 +40,7 @@
 -- ("right alt"), which does not conflict with emacs keybindings. The
 -- "windows key" is usually mod4Mask.
 --
-myModMask       = mod1Mask
+myModMask       = mod4Mask
  
 -- NOTE: from 0.9.1 on numlock mask is set automatically. The numlockMask
 -- setting should be removed from configs.
@@ -79,7 +79,7 @@
 -- Border colors for unfocused and focused windows, respectively.
 --
 myNormalBorderColor  = "#dddddd"
-myFocusedBorderColor = "#ff0000"
+myFocusedBorderColor = "#00ff00"
  
 ------------------------------------------------------------------------
 -- Key bindings. Add, modify or remove key bindings here.

My problem is that I need to modify this section:
Code:
    --
    -- mod-[1..9], Switch to workspace N
    --
    -- mod-[1..9], Switch to workspace N
    -- mod-shift-[1..9], Move client to workspace N
    --
    [((m .|. modm, k), windows $ f i)
        | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
        , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
    ++
to work with the programmer dvorak keyboard layout (note that you have to hold down shift to get the numbers). I have been trying to learn Haskell, and I can tell that this is a list comprehension, but I still don't understand all of it. Any help deciphering this (or Haskell in general) would be appreciated.
 
Old 03-24-2012, 08:15 PM   #4
culaterout
Member
 
Registered: Jul 2006
Location: colorado
Distribution: Debian, Arch Linux, Linux Mint, Ubuntu, Fedora, Suse, Mepis, Redhat, Sayabon, mandrake and android (
Posts: 189

Rep: Reputation: 29
You changed the Keybinds above:

-myModMask = mod1Mask
+myModMask = mod4Mask

so the code below has to change the default value for modm is the defualt modMask..

change line to [((m .|. modm, k), windows $ f i) to [((m .|. -myModMask, k), windows $ f i) or the other +myModMask not sure which key is shift key in this setup?

could have used the defualt and not changed the bindings

In fact, the config you need for that is just:
import XMonad
main = xmonad defaultConfig { modMask = mod4Mask }

You changed the hook line so now u have to modify the code hope fully this will not cause problems later in the keybindings if you add more code...



Good Luck..

Ps.. this could mess with the mouse binding for moving windows around if it doesn't see +myModMask as correct binding or you will have to use the alt + mouse to move window??
 
Old 03-24-2012, 08:19 PM   #5
culaterout
Member
 
Registered: Jul 2006
Location: colorado
Distribution: Debian, Arch Linux, Linux Mint, Ubuntu, Fedora, Suse, Mepis, Redhat, Sayabon, mandrake and android (
Posts: 189

Rep: Reputation: 29
Suggest reading?

http://www.haskell.org/haskellwiki/X..._Configuration

and looking over

http://xmonad.org/xmonad-docs/xmonad...ad-Config.html
 
Old 03-25-2012, 07:46 AM   #6
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 244

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by culaterout View Post
You changed the Keybinds above:

-myModMask = mod1Mask
+myModMask = mod4Mask

so the code below has to change the default value for modm is the defualt modMask..

change line to [((m .|. modm, k), windows $ f i) to [((m .|. -myModMask, k), windows $ f i) or the other +myModMask not sure which key is shift key in this setup?
I don't think that is the problem. I modified the following line and substituted unbound letter keys (specifically y, f, and g) for the number keys. That worked as expected, using the mod key I had specified, but there are a limited number of consecutive empty keys to do that with. I think I'll try to use the f-keys instead.
Quote:
Originally Posted by culaterout View Post
In fact, the config you need for that is just:
import XMonad
main = xmonad defaultConfig { modMask = mod4Mask }
I decided to copy the whole default config so that I could examine the Haskell and try playing with it. I'll probably switch to a minimal config like that when I figure this out.
Quote:
Originally Posted by culaterout View Post
Thanks for that. I had glanced over the first one but hadn't found the second.
 
Old 03-25-2012, 12:09 PM   #7
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 244

Original Poster
Rep: Reputation: 31
This works:
Code:
myWorkspaces    = ["1","2","3","4","5","6","7","8","9","10","11","12"]

...

    --
    -- mod-[1..9], Switch to workspace N
    --
    -- mod-[1..9], Switch to workspace N
    -- mod-shift-[1..9], Move client to workspace N
    --
    [((m .|. modm, k), windows $ f i)
        | (i, k) <- zip (XMonad.workspaces conf) [xK_F1 .. xK_F12]
        , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
    ++
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmer Dvorak layout in KDE King_DuckZ Linux - Desktop 0 03-13-2012 02:53 PM
portuguese dvorak keyboard layout xeon123 Linux - General 1 03-09-2012 11:49 AM
LiveCD with dvorak keyboard layout borisd Linux From Scratch 2 04-03-2008 04:04 PM
Changing keyboard layout to dvorak JussiKp Linux - Newbie 2 08-04-2006 04:11 AM
Switching to a Dvorak keyboard layout. ImAfrEaK Linux - Newbie 1 03-29-2004 09:58 PM


All times are GMT -5. The time now is 10:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration