You are not logged in.
So I'm trying to implement clickable WS on my xmobar and found this tutorial
http://www.arch-ed.dk/xmobar-clickable-workspaces/
Very helpfull! It was just a simple copy and paste with a few adjustment and it just worked.
Now my issue here is that my "doShift" no longer works. Im using other Hooks like dofloat, docenterfloat, dorectfloat and dosidefloat and they all work accordingly but doshift does not.
Literally all the code i added to my xmonad.hs was
xmobarEscape = concatMap doubleLts
where doubleLts '<' = "<<"
doubleLts x = [x]
myWorkspaces :: [String]
myWorkspaces = clickable . (map xmobarEscape) $ ["1:main","2:www","3:office","4:rdp","5:editor","6:email","7:files","8:media","9:WTL"]
where
clickable l = [ "<action=xdotool key super+" ++ show (n) ++ ">" ++ ws ++ "</action>" |
(i,ws) <- zip [1..9] l,
let n = i ]which replaced my old myWorkspaces (this is now commented out in my config)
myWorkspaces = ["1:main","2:www","3:office","4:rdp","5:editor","6:email","7:files","8:media","9:WTL"]here is myManageHook
myManageHook = composeAll
[ resource =? "desktop_window" --> doIgnore
, className =? "Eog" --> doFloat
, className =? "Xchat" --> doSideFloat NW
, className =? "Pithos" --> doSideFloat NE
, className =? "Pidgin" --> doSideFloat SW
, title =? "Ncmpcpp" --> doSideFloat SE
, className =? "Xmessage" --> doCenterFloat
, className =? "xfreerdp" --> doCenterFloat
, className =? "Brasero" --> doCenterFloat
, title =? "xclock" --> doCenterFloat
, title =? "Banshee Media Player" --> doCenterFloat
, title =? "Ncmpcpp" --> doShift "8:media"
, className =? "Chromium" --> doShift "2:www"
, className =? "libreoffice-calc" --> doShift "3:office"
, className =? "libreoffice-writer" --> doShift "3:office"
, className =? "VirtualBox" --> doShift "3:office"
, className =? "rdesktop" --> doShift "4:rdp"
, className =? "xfreerdp" --> doShift "4:rdp"
, className =? "Gedit" --> doShift "5:editor"
, className =? "Evolution" --> doShift "6:email"
, className =? "Brasero" --> doShift "7:files"
, className =? "Nautilus" --> doShift "7:files"
, className =? "Pithos" --> doShift "8:media"
, className =? "Xchat" --> doShift "8:media"
, className =? "Pidgin" --> doShift "8:media"
, className =? "Wine" --> doShift "9:WTL"
, title =? "Banshee Media Player" --> doShift "8:media"
, title =? "Unmount USB w/ Zenity" --> doRectFloat (W.RationalRect 0.35 0.35 0.35 0.35)
, title =? "Agenda for this Week" --> doRectFloat (W.RationalRect 0.35 0.35 0.35 0.35)
, className =? "xmobar" --> doIgnore
, isFullscreen --> (doF W.focusDown <+> doFullFloat)] I did not need to make any changes to my main so ill post that on request. Ive messed with the config a bit, trying to figure out if why doshift no longer works but nothing. I believe i had read online about WS names and how it does not like complex names or something like that but either way i did try with the names being "1","2","3"..... but no change. POR QUE!?!?! ![]()
Thank you in advance for your time.
Last edited by davama (2015-03-29 07:07:24)
Offline
OK i think i solved it but it works a little weird. Thanks to this
https://github.com/kniren/dotfiles/blob … /xmonad.hs
So here is a sample of my new myManageHook
, title =? "Ncmpcpp" --> doShift (myWorkspaces !! 7) -- this goes to "8:media"
, className =? "Chromium" --> doShift (myWorkspaces !! 1) -- this goes to "2:media"
, className =? "libreoffice-calc" --> doShift (myWorkspaces !! 2) -- to "3:office"Unfortunately it does not shift to the right number. That is why it is WS number minus 1. I guess now my issue is how can i make it go to the right WS number? As a test i sent an app to my "1:main" workspace as a test and it worked but like this
, className =? "libreoffice-writer" --> doShift (myWorkspaces !! 0)There could be something else in my config that is totally missed configured but i dont know what to look for.
Thanks again.
Offline
Everything works as it should
WS clickability, (xmobar || dzen): which ever you use
--myWorkspaces = clickable $ ["i","ii","iii","iv","v","vi","vii","viii","ix"] ++ ["NSP"] -- 4xmobar
-- where clickable l = ["<action=`xdotool key super+" ++ show (n) ++ "`>" ++ ws ++ "</action>" | (i,ws) <- zip [1..9] l, let n = i ] -- 4xmobar
-- where clickable l = ["<action=`xdotool key super+" ++ show (n) ++ "`>" ++ ws ++ "</action>" | (i,ws) <- zip nums l, let n = i ] -- 4xmobar
--myWorkspaces = clickable $ ["i","ii","iii","iv","v","vi","vii","viii","ix"] ++ ["NSP"] -- 4dzen
-- where clickable l = ["^ca(1,xdotool key super+" ++ show (n) ++ ")" ++ ws ++ "^ca()" | (i,ws) <- zip [1..9] l, let n = i ] -- 4dzen
-- where clickable l = ["^ca(1,xdotool key super+" ++ show (n) ++ ")" ++ ws ++ "^ca()" | (i,ws) <- zip nums l, let n = i ] -- 4dzenNew manageHook
myManageHook :: ManageHook
myManageHook = composeAll . concat $
[
[ isDialog --> doCenterFloat ]
, [ isFullscreen --> doFullFloat ]
, [(className =? c <||> title =? c <||> resource =? c) --> doIgnore | c <- bars ]
, [(className =? c <||> title =? c <||> resource =? c) --> doFloat | c <- float ]
, [(className =? c <||> title =? c <||> resource =? c) --> doCenterFloat | c <- cfloat ]
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 0) | c <- main ] -- i
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 1) | c <- www ] -- ii
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 2) | c <- office ] -- iii
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 3) | c <- rdp ] -- iv
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 4) | c <- file ] -- v
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 5) | c <- email ] -- vi
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 6) | c <- editor ] -- vii
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 7) | c <- media ] -- vii
, [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 8) | c <- chat ] -- ix
, [role =? c --> doFloat | c <- im ] -- place roles on im
]
where
bars = ["xmobar","dzen2","desktop_window"]
float = ["feh"]
cfloat = ["Xmessage","Gxmessage","Eog","Xscreensaver-demo","Brasero","xclock","Xscreensaver-demo","xfreerdp"]
++ ["SimpleScreenRecorder","Evolution-alarm-notify","Evolution","Gns3","Mtpaint"]
main = ["Wine","Pidgin","Skype"]
media = ["Pithos","Ario","Vlc","Ncmpcpp"]
www = ["Chromium"]
rdp = ["xfreerdp","rdesktop"]
office = ["libreoffice-calc","libreoffice-writer","VirtualBox","libreoffice"]
editor = ["Gvim","Xconfigs"]
email = ["Evolution"]
file = ["Brasero","spacefm","Xpdf"]
chat = ["Xchat","Gimp"]
im = ["nothing"]
role = stringProperty "WM_WINDOW_ROLE"Marking Solved
Thanks
Last edited by davama (2015-03-29 07:07:03)
Offline