![]() |
|
Xmonad configuration - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Computers (https://sinister.ly/Forum-Computers) +--- Forum: Operating Systems (https://sinister.ly/Forum-Operating-Systems) +--- Thread: Xmonad configuration (/Thread-Xmonad-configuration) |
RE: Xmonad configuration - Deque - 06-27-2013 (06-26-2013, 08:32 PM)noize Wrote: Are you able to still watch them properly by removing any of those two elements? Or do you need both of them to do so? I need both (or all three of them, I already had the fullscreen for the layout set too). RE: Xmonad configuration - noize - 06-27-2013 (06-27-2013, 05:05 AM)Deque Wrote:(06-26-2013, 08:32 PM)noize Wrote: Are you able to still watch them properly by removing any of those two elements? Or do you need both of them to do so? Wait, three? What three? Are you maybe talking about these three?: Code: fullscreenManageHook
myManageHook
manageHook gnomeConfig'cause I'm talking about these 2: Code: fullscreenManageHook
handleEventHook = fullscreenEventHookRE: Xmonad configuration - Deque - 06-27-2013 (06-27-2013, 12:44 PM)noize Wrote:(06-27-2013, 05:05 AM)Deque Wrote:(06-26-2013, 08:32 PM)noize Wrote: Are you able to still watch them properly by removing any of those two elements? Or do you need both of them to do so? These three: Code: handleEventHook = fullscreenEventHook,
manageHook = fullscreenManageHook,
myLayouts = fullscreenFull someLayoutRE: Xmonad configuration - noize - 06-27-2013 (06-27-2013, 01:22 PM)Deque Wrote:(06-27-2013, 12:44 PM)noize Wrote:(06-27-2013, 05:05 AM)Deque Wrote:(06-26-2013, 08:32 PM)noize Wrote: Are you able to still watch them properly by removing any of those two elements? Or do you need both of them to do so? I never had the third one in my code. Later tonight I'll get my hands on XMonad and try switching between this options a bit to find the solution to properly watch YT videos in widescreen and to be able to switch workspaces with a click. Edit: the third one should be in layoutHook, shouldn't it? Where I have avoidstruts someLayout it should be avoidStruts fullscreenFull someLayout, right? RE: Xmonad configuration - Deque - 06-28-2013 Yes, it has to be in the layoutHook RE: Xmonad configuration - noize - 06-28-2013 Code: xmonad.hs:66:53
The function avoidStruts is applied to two arguments.Note: if I switch positions I get the same but for fullscreenFull. This is my xmonad.hs: Code: import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.SetWMName
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Actions.GridSelect
import XMonad.Layout.Fullscreen
import XMonad.Layout.PerWorkspace
import System.IO
myNormalBorderColor = "#cccccc"
myFocusedBorderColor = "#0000ff"
myManageHook = composeAll
[
(className =? "Firefox" <&&> resource =? "Dialog") --> doFloat
, className =? "Firefox" --> doShift "web"
, manageDocks
]
myLayoutMain = Mirror tiled ||| tiled ||| Full
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 2
-- Default proportion of screen occupied by master pane
ratio = 3/5
-- Ratio of screen to increment by when resizing panes
delta = 1/100
myLayoutDefault = tiled ||| Mirror tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 2
ratio = 3/5
delta = 1/100
myLayoutWeb = Mirror tiled ||| tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 3/4
delta = 1/100
myLayoutCoding = tiled ||| Mirror tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
delta = 1/100
main = do
xmonad $ gnomeConfig
{ manageHook = fullscreenManageHook <+> myManageHook <+> manageHook gnomeConfig
, handleEventHook = fullscreenEventHook
, startupHook = do
spawn "gnome-terminal"
spawn "firefox"
, layoutHook = onWorkspace "main" (fullscreenFull avoidStruts myLayoutMain) $
onWorkspace "web" (fullscreenFull avoidStruts myLayoutWeb) $
onWorkspace "coding" (fullscreenFull avoidStruts myLayoutCoding) $
avoidStruts myLayoutDefault
, workspaces = ["main","web","coding","hacking","testing","6","7","8","9"]
, modMask = mod4Mask
, normalBorderColor = myNormalBorderColor
, focusedBorderColor = myFocusedBorderColor
}`additionalKeys`
[ ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]P.S: it's happening pretty often to me that the cursor in gedit disappears. I mean, it is there, you can type and do everything but without seeing the bar. It makes things a bit harder. RE: Xmonad configuration - Deque - 06-28-2013 (06-28-2013, 08:45 AM)noize Wrote: You need to use brackets. The function fullscreenFull (or avoidStruts) takes one argument. If you do Code: fullscreenFull avoidStruts myLayoutMainYou apply two arguments to the function fullscreenFull. Instead you have to do: Code: fullscreenFull (avoidStruts myLayoutMain)That means you pass one argument, which is the result of the operation (avoidStruts myLayoutMain) I will probably switch to xmonad only (adding xmobar or dzen for some status bars). I don't really need Gnome. I don't really need the panels and there are too many little problems with Gnome which I never had with xmonad alone. RE: Xmonad configuration - noize - 06-28-2013 (06-28-2013, 12:11 PM)Deque Wrote:(06-28-2013, 08:45 AM)noize Wrote: I'll later try with that code. Could you mention some of the problems you're talking about (I've noticed a few too, though I can't recall now)? However, with XMonad + Gnome I can use Nautilus. RE: Xmonad configuration - Deque - 06-28-2013 You can use Nautilus without Gnome. Problems: Some shortcuts don't work, like Q+Mod+Shift to log out. The gnome panels don't show me the names of my workspaces and I don't know which workspace is still in use, so in order to close all programs I have to manually switch through all of them which is annoying. The gnome panels take too much space. I already made them as small as possible and removed the bottom panel -- still. I get pop up messages I don't want to get (like update notification). And the most important thing: I just don't need Gnome. I have managed to create a custom xsession with xmonad now. Will post more about this later. RE: Xmonad configuration - noize - 06-28-2013 (06-28-2013, 09:14 PM)Deque Wrote: You can use Nautilus without Gnome. I know Q+Mod+Shift is not working, I didn't notice it was because I was using it with Gnome, though. I usually use "sudo pkill -u noize" to log out from Terminal, but with Gnome I can do it by the top right corner's menu too. Update notifications are actually very annoying, that's true. Yeah, didn't notice this was caused by Gnome, basing on this, then, I think I'll leave that too. Waiting to see about the xsession. Quote:The gnome panels don't show me the names of my workspaces and I don't know which workspace is still in use, so in order to close all programs I have to manually switch through all of them which is annoying. In this part I don't get what you're talking about. |