Guest User

Untitled

a guest
Oct 20th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. module Main (main) where
  2.  
  3. --------------------------------------------------------------------------------
  4. import System.Exit
  5. import XMonad
  6. import XMonad.Config.Desktop
  7. import XMonad.Hooks.DynamicLog
  8. import XMonad.Hooks.ManageHelpers
  9. import XMonad.Layout.BinarySpacePartition (emptyBSP)
  10. import XMonad.Layout.NoBorders (noBorders)
  11. import XMonad.Layout.ResizableTile (ResizableTall(..))
  12. import XMonad.Layout.ToggleLayouts (ToggleLayout(..), toggleLayouts)
  13. import XMonad.Prompt
  14. import XMonad.Prompt.ConfirmPrompt
  15. import XMonad.Prompt.Shell
  16. import XMonad.Util.EZConfig
  17.  
  18. ------------------------------------------------------------------------- -------
  19. main = do
  20. spawn "xmobar" -- Start a task bar such as xmobar.
  21. spawn "wmname LG3D"
  22.  
  23. -- Start xmonad using the main desktop configuration with a few
  24. -- simple overrides:
  25.  
  26. xmonad $ desktopConfig
  27. { modMask = mod4Mask -- Use the "Win" key for the mod key
  28. , manageHook = myManageHook <+> manageHook desktopConfig
  29. , layoutHook = desktopLayoutModifiers myLayouts
  30. , logHook = dynamicLogString def >>= xmonadPropLog
  31. , focusedBorderColor = "cyan"
  32. , borderWidth = 1
  33. }
  34.  
  35. `additionalKeysP` -- Add some extra key bindings:
  36. [ ("M-S-q", confirmPrompt myXPConfig "exit" (io exitSuccess))
  37. , ("M-p", shellPrompt myXPConfig)
  38. , ("M-<Esc>", sendMessage (Toggle "Full"))
  39. , ("<XF86AudioMute>", spawn "amixer -q sset 'Master' mute") --Muta o som
  40. , ("<XF86AudioLowerVolume>", spawn "amixer -q sset 'Master' 1%-") - -Diminui o volume em 1%
  41. , ("<XF86AudioRaiseVolume>", spawn "amixer -q sset 'Master' 1%+ unmute") --Aumenta o volume em 1%
  42. , ("<XF86MonBrightnessDown>", spawn "sh ~/OneDrive/Documentos/xmonad/brightness.sh -s -1") --Diminui o brilho da tela em 1%
  43. , ("<XF86MonBrightnessUp>", spawn "sh ~/OneDrive/Documentos/xmonad/brightness.sh -s +1") --Aumenta o Brilho da tela em 1%
  44. , ("C-<Return>", spawn "chromium") --Abre o google chrome
  45. , ("M-g", spawn "gedit") --Abre o gedit
  46. , ("M-r", spawn "nautilus") --Abre o nautilus
  47. , ("M-c", spawn "code") --Abre o MS Code
  48. ]
  49. ------------------------------------------------------------------------- -------
  50. -- | Customize layouts.
  51. --
  52. -- This layout configuration uses two primary layouts, 'ResizableTall'
  53. -- and 'BinarySpacePartition'. You can also use the 'M-<Esc>' key
  54. -- binding defined above to toggle between the current layout and a
  55. -- full screen layout.
  56. myLayouts = toggleLayouts (noBorders Full) others
  57. where
  58. others = ResizableTall 1 (1.5/100) (3/5) [] ||| emptyBSP
  59.  
  60. --------------------------------------------------------------------------------
  61. -- | Customize the way 'XMonad.Prompt' looks and behaves. It's a
  62. -- great replacement for dzen.
  63. myXPConfig = def
  64. { position = Top
  65. , alwaysHighlight = True
  66. , promptBorderWidth = 0
  67. , font = "xft:monospace:size=9"
  68. }
Add Comment
Please, Sign In to add comment