You are not logged in.

#151 2013-08-19 20:06:52

mikkelsen
Member
Registered: 2013-08-19
Posts: 1

Re: Share your xmonad desktop!

my first xmonad setup. With a "space" theme.
scrot.jpg

Offline

#152 2014-08-20 05:29:53

yoman18
Member
Registered: 2014-08-20
Posts: 14

Re: Share your xmonad desktop!

- ncmpcpp / with tmux
  z5I4aoR.png  ZgWq4xl.png

- float layout / tiled layout
   t4t7bK7.png  rnBvJx1.png
   | wallpaper : solid #000000
   | running apps  : opera v12.16, urxvt, ranger, mpv, etc.
   | panel : dzen2, trayer, xmobar x2(transparency alpha=0), dmenu2, xmonad gridselect
   | compositer : xcompmgr(urxvt depth=32 "real(true)" transparency), with urxvt depth=24 "fake" transparency for ranger w3mimg-display preview, urxvt fade/shade in/out, no shadow
   | Black, Dark red, White ...  : GTK-sable red, qtconfig, Stylish CSS web addon.  | Etc..

- bsp layout(#3 nsp key) / circle layout : mopidy, urxvt(ncmpcpp), tmux(ranger), live tv(mpv), dunst notification
   Fh7IOO3.png  G8NJxOL.png

Last edited by yoman18 (2018-05-09 14:13:10)

Offline

#153 2014-09-05 00:43:44

davama
Member
From: NY
Registered: 2014-02-07
Posts: 45

Re: Share your xmonad desktop!

yoman18 wrote:

single mornitor setting
- ncmpcpp with tmux script
  http://i.imgur.com/ZgWq4xl.png

yoman18 your setup is amazing!! Think you can share that tmux-ncmpcpp script?

Here's my humble xmonad setup.
HUVDYuRm.png
xn3VdWim.png

Clickable xmobar WS, mpdlib, named layouts, ncmpcpp running with terminator

Use my setup for 3 different computers. For single screen comp my xmobars simple go on top and bottom. Still trying to figure out why the urgencyhook breaks my clickable xmobar. Very happy with current setup but I do see some room for improvement. Little by little i guess.

If anyone interested in xmonad.hs file
https://raw.githubusercontent.com/davam … /xmonad.hs





-- mod edit: read the rules and only post thumbnails https://bbs.archlinux.org/viewtopic.php?id=61754  [jwr] --

Last edited by davama (2016-02-24 21:58:49)

Offline

#154 2014-09-05 12:32:23

yoman18
Member
Registered: 2014-08-20
Posts: 14

Re: Share your xmonad desktop!

davama wrote:

yoman18 your setup is amazing!! Think you can share that tmux-ncmpcpp script?


thanks..

  • ~/.ncmpcpp/config

    #################################################################################
    ## this is example configuration file, copy it to                              ## 
    ## ~/.ncmpcpp/config and set up your preferences                               ##
    #################################################################################
    #
    ##### directories ######
    ##
    ## Directory for storing ncmpcpp related files.
    ## Changing it is useful if you want to store
    ## everything somewhere else and provide command
    ## line setting for alternative location to config
    ## file which defines that while launching ncmpcpp.
    ##
    #
    ncmpcpp_directory = "~/.ncmpcpp"
    #
    ##
    ## Directory for storing downloaded lyrics. It
    ## defaults to ~/.lyrics since other MPD clients
    ## (eg. ncmpc) also use that location.
    ##
    #
    lyrics_directory = "~/.lyrics"
    #
    ##### connection settings #####
    #
    ## set it in order to make tag editor and renaming files work properly
    #
    mpd_host = "127.0.0.1"
    #
    mpd_port = "6600"
    #
    mpd_music_dir = "~/Music"
    #
    mpd_connection_timeout = "5"
    #
    mpd_crossfade_time = "5"
    #
    mpd_communication_mode = "notifications" (polling/notifications)
    #
    ##### music visualizer #####
    ##
    ## Note: In order to make music visualizer work you'll
    ## need to use mpd fifo output, whose format parameter
    ## has to be set to 44100:16:1 for mono visualization
    ## or 44100:16:2 for stereo visualization. Example
    ## configuration (it has to be put into mpd.conf):
    ##
    ## audio_output {
    ##        type            "fifo"
    ##        name            "My FIFO"
    ##        path            "/tmp/mpd.fifo"
    ##        format          "44100:16:2"
    ## }
    ##
    #
    ##
    ## If you set format to 44100:16:2, make it 'yes'.
    ##
    #
    visualizer_in_stereo = "yes"
    #
    visualizer_fifo_path = "/tmp/mpd.fifo"
    #
    ##
    ## Note: Below parameter is needed for ncmpcpp
    ## to determine which output provides data for
    ## visualizer and thus allow syncing between
    ## visualization and sound as currently there
    ## are some problems with it.
    ##
    #
    visualizer_output_name = "FIFO"
    #
    ##
    ## Note: Below parameter defines how often ncmpcpp
    ## has to "synchronize" visualizer and audio outputs.
    ## 30 seconds is optimal value, but if you experience
    ## synchronization problems, set it to lower value.
    ## Keep in mind that sane values start with >=10.
    ##
    #
    visualizer_sync_interval = "30"
    #
    ##
    ## Note: To enable spectrum frequency visualization
    ## you need to compile ncmpcpp with fftw3 support.
    ##
    #
    visualizer_type = "spectrum" (spectrum/wave)
    #
    visualizer_look = "◆│"
    #visualizer_look = " ▊"
    #
    ##### system encoding #####
    ##
    ## ncmpcpp should detect your charset encoding
    ## but if it failed to do so, you can specify
    ## charset encoding you are using here.
    ##
    ## Note: You can see whether your ncmpcpp build
    ## supports charset detection by checking output
    ## of `ncmpcpp --version`.
    ##
    ## Note: Since MPD uses utf8 by default, setting
    ## this option makes sense only if your encoding
    ## is different.
    ##
    #
    system_encoding = "UTF-8"
    #
    ##### delays #####
    #
    ## delay after playlist highlighting will be disabled (0 = don't disable)
    #
    playlist_disable_highlight_delay = "5"
    #
    ## defines how long various messages are supposed to be visible
    #
    message_delay_time = "4"
    #
    ##### song format #####
    ##
    ## for song format you can use:
    ##
    ## %l - length
    ## %f - filename
    ## %D - directory
    ## %a - artist
    ## %A - album artist
    ## %t - title
    ## %b - album
    ## %y - year
    ## %n - track number (01/12 -> 01)
    ## %N - full track info (01/12 -> 01/12)
    ## %g - genre
    ## %c - composer
    ## %p - performer
    ## %d - disc
    ## %C - comment
    ## $R - begin right alignment
    ##
    ## you can also put them in { } and then it will be displayed
    ## only if all requested values are available and/or define alternate
    ## value with { }|{ } eg. {%a - %t}|{%f}
    ##
    ## Note: If you want to set limit on maximal length of a tag, just
    ## put the appropriate number between % and character that defines
    ## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
    ##
    ## Note: Format that is similar to "%a - %t" (i.e. without any additional
    ## braces) is equal to "{%a - %t}", so if one of the tags is missing,
    ## you'll get nothing.
    ##
    ## text can also have different color than the main window has,
    ## eg. if you want length to be green, write $3%l$9
    ##
    ## available values:
    ##
    ## - 0 - default window color (discards all other colors)
    ## - 1 - black
    ## - 2 - red
    ## - 3 - green
    ## - 4 - yellow
    ## - 5 - blue
    ## - 6 - magenta
    ## - 7 - cyan
    ## - 8 - white
    ## - 9 - end of current color
    ##
    ## Note: colors can be nested.
    ##
    #
    #song_list_format = "{%a - }{%t}|{$8%f$9}$R{$3(%l)$9}"
    song_list_format = "{$5%a $9}{$2%t$9}|{$5%f$9}$5$R{%b }{$3%7l$9}$9"
    #
    #
    song_status_format = "{{%a{ \"%b\"{ (%y)}} - }{%t}}|{%f}"
    #
    song_library_format = "{%n - }{%t}|{%f}"
    #
    tag_editor_album_format = "{(%y) }%b"
    #
    ##
    ## Note: Below variables are for alternative version of user's interface.
    ## Their syntax supports all tags and colors listed above plus some extra
    ## markers used for text attributes. They are followed by character '$'.
    ## After that you can put:
    ##
    ## - b - bold text
    ## - u - underline text
    ## - r - reverse colors
    ## - a - use alternative character set
    ##
    ## If you don't want to use an attribute anymore, just put it again, but
    ## this time insert character '/' between '$' and attribute character,
    ## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename
    ## with reversed colors.
    ##
    #
    #alternative_header_first_line_format = "$b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b"
    #
    #alternative_header_second_line_format = "{{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}"
    #
    ##
    ## Note: Below variables also supports
    ## text attributes listed above.
    ##
    #
    now_playing_prefix = "$b"
    #
    now_playing_suffix = "$/b"
    #
    browser_playlist_prefix = "$2playlist$9 "
    #
    selected_item_prefix = "$6"
    #
    selected_item_suffix = "$9"
    #
    ## colors are not supported for below variable
    #
    song_window_title_format = "{%a - }{%t}|{%f}"
    #
    ##### columns settings #####
    ##
    ## syntax of song columns list format is "column column etc."
    ##
    ## - syntax for each column is:
    ##
    ## (width of column)[column's color]{displayed tag}
    ##
    ## Note: Width is by default in %, if you want a column to
    ## have fixed size, add 'f' after the value, e.g. (10)[white]{a}
    ## will be the column that take 10% of screen (so the real column's
    ## width will depend on actual screen size), whereas (10f)[white]{a}
    ## will take 10 terminal cells, no matter how wide the screen is.
    ##
    ## - color is optional (if you want the default one, type [])
    ##
    ## Note: You can give a column additional attributes by putting appropriate
    ## character after displayed tag character. Available attributes are:
    ##
    ## - r - column will be right aligned
    ## - E - if tag is empty, empty tag marker won't be displayed
    ##
    ## You can also:
    ##
    ## - give a column custom name by putting it after attributes,
    ##   separated with character ':', e.g. {lr:Length} gives you
    ##   right aligned column of lengths named "Length".
    ##
    ## - define sequence of tags, that have to be displayed in case
    ##   predecessor is empty in a way similar to the one in classic
    ##   song format, i.e. using '|' character, e.g. {a|c|p:Owner}
    ##   creates column named "Owner" that tries to display artist
    ##   tag and then composer and performer if previous ones are
    ##   not available.
    ##
    #
    #song_columns_list_format = "(7f)[green]{l} (25)[cyan]{a} (40)[]{t|f} (30)[red]{b}"
    song_columns_list_format = "(6f)[green]{l} (40)[yellow]{t|f} (25)[cyan]{a} (30)[red]{b}"
    #
    ##### various settings #####
    #
    ##
    ## Note: Custom command that will be executed each
    ## time song changes. Useful for notifications etc.
    ##
    ## Attention: It doesn't support song format anymore.
    ## Use `ncmpcpp --now-playing SONG_FORMAT` instead.
    ##
    #execute_on_song_change = ""
    #
    playlist_show_remaining_time = "no"
    #
    playlist_shorten_total_times = "no"
    #
    playlist_separate_albums = "no"
    #
    playlist_display_mode = "classic" (classic/columns)
    #
    browser_display_mode = "classic" (classic/columns)
    #
    search_engine_display_mode = "classic" (classic/columns)
    #
    playlist_editor_display_mode = "columns" (classic/columns)
    #
    discard_colors_if_item_is_selected = "yes"
    #
    incremental_seeking = "yes"
    #
    seek_time = "1"
    #
    autocenter_mode = "yes"
    #
    centered_cursor = "yes"
    #
    ##
    ## Note: You can specify third character which will
    ## be used to build 'empty' part of progressbar.
    ##
    #progressbar_look = "=>"
    #progressbar_look = "• ─"
    progressbar_look = "─╼ "
    #progressbar_look = "─⊙ "
    #progressbar_look = "◾◾◽"
    #
    #
    default_place_to_search_in = "database" (database/playlist)
    #
    user_interface = "classic" (classic/alternative)
    #
    media_library_left_column = "a" (possible values: a,y,g,c,p, legend above)
    #
    default_find_mode = "wrapped" (wrapped/normal)
    #
    default_space_mode = "add" (add/select)
    #
    default_tag_editor_left_col = "albums" (albums/dirs)
    #
    default_tag_editor_pattern = "%n - %t"
    #
    #header_visibility = "yes"
    header_visibility = "no"
    #
    #
    #statusbar_visibility = "yes"
    statusbar_visibility = "no"
    #
    #
    titles_visibility = "yes"
    #
    header_text_scrolling = "yes"
    #
    fancy_scrolling = "yes"
    #
    cyclic_scrolling = "no"
    #
    lines_scrolled = "2"
    #
    follow_now_playing_lyrics = "yes"
    #
    fetch_lyrics_for_current_song_in_background = "yes"
    #
    store_lyrics_in_song_dir = "yes"
    #
    ##
    ## Note: If you set this variable, ncmpcpp will try to
    ## get info from last.fm in language you set and if it
    ## fails, it will fall back to english. Otherwise it will
    ## use english the first time.
    ##
    ## Note: Language has to be expressed as an ISO 639 alpha-2 code.
    ##
    lastfm_preferred_language = ""
    #
    ncmpc_like_songs_adding = "no" (enabled - add/remove, disabled - always add)
    #
    show_hidden_files_in_local_browser = "no"
    #
    display_screens_numbers_on_start = "yes"
    #
    ##
    ## How shall key_screen_switcher work?
    ##
    ## - "previous" - switch between current and last used screen
    ## - "sequence: 2 -> 9 -> 5" - switch between given sequence of screens.
    ##
    ## Screen numbers you can use after 'sequence' keyword are:
    ##
    ## - 1 - help
    ## - 2 - playlist
    ## - 3 - browser
    ## - 4 - search engine
    ## - 5 - media library
    ## - 6 - playlist editor
    ## - 7 - tag editor
    ## - 8 - outputs
    ## - 9 - visualizer
    ## - 10 - clock
    ##
    ## As you can see, above example will switch between
    ## playlist, visualizer and media library screens.
    ##
    screen_switcher_mode = "sequence: 2 -> 3"
    #
    ##
    ## Default width of locked screen (in %).
    ## Acceptable values are from 20 to 80.
    ##
    #
    #locked_screen_width_part = "50"
    locked_screen_width_part = "60"
    #
    #
    ask_for_locked_screen_width_part = "yes"
    #
    ##
    ## Note: You can define startup screen for ncmpcpp
    ## by choosing screen number from the list above.
    ##
    startup_screen = "2"
    #
    jump_to_now_playing_song_at_start = "yes"
    #
    ask_before_clearing_main_playlist = "no"
    #
    clock_display_seconds = "no"
    #
    display_volume_level = "yes"
    #
    #display_bitrate = "no"
    display_bitrate = "yes"
    #
    #
    display_remaining_time = "no"
    #
    regular_expressions = "basic" (basic/extended)
    #
    ##
    ## Note: If below is enabled, ncmpcpp will ignore leading
    ## "The" word while sorting items in browser, tags in
    ## media library, etc.
    ##
    ignore_leading_the = "no"
    #
    block_search_constraints_change_if_items_found = "yes"
    #
    mouse_support = "yes"
    #
    mouse_list_scroll_whole_page = "yes"
    #
    empty_tag_marker = "<empty>"
    #
    tag_editor_extended_numeration = "no"
    #
    media_library_display_date = "yes"
    #
    media_library_display_empty_tag = "yes"
    #
    media_library_disable_two_column_mode = "no"
    #
    enable_window_title = "yes"
    #
    ##
    ## Note: You can choose default search mode for search
    ## engine. Available modes are:
    ##
    ## - 1 - use mpd built-in searching (no regexes, pattern matching)
    ## - 2 - use ncmpcpp searching (pattern matching with support for regexes,
    ##       but if your mpd is on a remote machine, downloading big database
    ##       to process it can take a while
    ## - 3 - match only exact values (this mode uses mpd function for searching
    ##       in database and local one for searching in current playlist)
    ##
    #
    search_engine_default_search_mode = "1"
    #
    ##
    ## Note: Below variables can allow you to physically
    ## remove files and directories from your hdd using
    ## ncmpcpp's browser screen.
    ##
    #
    allow_physical_files_deletion = "no"
    #
    allow_physical_directories_deletion = "no"
    #
    external_editor = "easytag"
    #
    use_console_editor = "no" (set to yes, if your editor is console app)
    #
    ##### colors definitions #####
    #
    colors_enabled = "yes"
    #
    mpty_tag_color = "cyan"
    #
    #header_window_color = "default"
    header_window_color = "blue"
    #
    #
    #volume_color = "default"
    volume_color = "cyan"
    #
    #
    state_line_color = "default"
    #
    #state_flags_color = "default"
    state_flags_color = "blue"
    #
    #
    #main_window_color = "yellow"
    main_window_color = "white"
    #
    #
    color1 = "white"
    #
    color2 = "green"
    #
    #main_window_highlight_color = "yellow"
    main_window_highlight_color = "cyan"
    #
    #
    #progressbar_color = "default"
    progressbar_color = "red"
    #
    #
    statusbar_color = "default"
    #
    alternative_ui_separator_color = "black"
    #
    active_column_color = "red"
    #
    visualizer_color = "magenta"
    #
    window_border_color = "green"
    #
    active_window_border = "red"
    #
  • ~/.ncmpcpp/ncmpcpp_tmux

    #!/bin/bash
    
    #################################################################################
    ## this is example configuration file, copy it to                              ##
    ## ~/.ncmpcpp/ncmpcpp_tmux and set up preferences                              ##
    ## from ncmpcpp-tmux session : https://bbs.archlinux.org/viewtopic.php?id=66488&p=5 #113 posting by MadCatMk2        ##
    #################################################################################
    
    SESSION=ncmpcpp
    
    tmux -2 has-session -t $SESSION
    if [ $? -eq 0 ]; then
    	tmux -2 attach -t $SESSION
    	exit 0;
    fi
    
    # ncmpcpp -s, --screen <name>
    # Specify the startup screen (<name> may be: help, playlist, browser, search-engine, media-library, playlist-editor, tag-editor, outputs, visualizer, clock)
    tmux -2 new-session -d -s $SESSION 'ncmpcpp -s playlist'		# top
    tmux -2 split-window -d -t $SESSION:0 -p 40 'ncmpcpp -s search-engine'	# bottom
    #tmux -2 split-window -d -t $SESSION:0 -p 50 'ncmpcpp -s media-library'	# middle
    tmux -2 split-window -d -t $SESSION:0 -p 50 'ncmpcpp -s visualizer'	# middle
    
    # select split bottom
    # select split bottom
    #tmux -2 select-pane -t $SESSION:0.1
    # select split biddle
    #tmux -2 select-pane -t $SESSION:0.2
    
    # select tmux split top, cursor forcus
    tmux -2 select-pane -t $SESSION:0.0
    
    
    # Conver Class view mode : middle, bottom window
    for i in "\\" 
    	do tmux -2 send-keys -t $SESSION:0.1 "$i"
     	   tmux -2 send-keys -t $SESSION:0.2 "$i"
    done
    
    # top window : [playlist], [output], 
    # lock'screen width : 60(my default ncmpcpp config value) -> 80
    # cursor forced : [playst] , playlist display mode : Classic -> Columns
    for i in "C-l" "BSpace" "BSpace" "80" "Enter" "p" "8" "Left"
    	do tmux -2 send-keys -t $SESSION:0.0 "$i"
    done
    
    # middle window : [visualizer], [clock],  lock'screen width : 60
    # cursor forced : [visualizer]
    for i in "C-l" "BSpace" "BSpace" "60" "Enter" "0" "Left"
    	do tmux -2 send-keys -t $SESSION:0.1 "$i"
    done
    
    # bottom  window : [search-engine], [help],  lock'screen width : 40
    # cursor forced : [search-engine]
    for i in "\\" "C-l" "BSpace" "BSpace" "40" "Enter" "1" "Left"
    	do 
    		tmux -2 send-keys -t $SESSION:0.2 "$i"
    done
    
    
    # Bottom's status bar off : tmux 상태바 끄기
    tmux -2 set -t $SESSION -g status off
    
    tmux -2 attach-session -t $SESSION

I read your xmonad configuration file.  Your xmonad setting is big help to me. Thank you for your xmonad.hs posting. xmonad key bind is good.. I doing setting xmonad key binding continously.  Sorry my bad english.

Last edited by yoman18 (2014-10-11 21:24:23)

Offline

#155 2014-09-05 22:40:37

davama
Member
From: NY
Registered: 2014-02-07
Posts: 45

Re: Share your xmonad desktop!

yoman18 wrote:

I read your xmonad configuration file.  Your xmonad setting is big help to me. Thank you for your xmonad.hs posting. xmonad key bind is good.. I doing setting xmonad key binding continously.  Sorry my bad english.

Thank you and thanks for sharing! And your english is perfectly fine, message was understood. It really helped. I studied you tmux script and fiddled a bit to what i was looking for. Also had to create seperate ncmcpp config files for it
https://github.com/davama/xmonad/blob/master/xmonad.hs
https://github.com/davama/dotfiles/blob … cpp/config
http://i.imgur.com/4FzA1JW.png

I guess ever since ncmpcpp-0.5.9 I haven't found "screen merging" documentation to do it so this is the way to go for now.

BTW i noticed  that when i spawn a terminal running the tmux script, which shifts to a WS, i would never get all the panels on screen. They would only come up when my monitor was focues on the WS where the ncmpcpp is shifted to. Had to do a workaround on the xmonad.hs file where when spawn tmux-ncmpcpp.sh it first shifts to WS then runs tmux script. I dont know if you noticed that.

Thanks again

Last edited by davama (2014-12-31 21:58:47)

Offline

#156 2014-10-08 15:53:40

yoman18
Member
Registered: 2014-08-20
Posts: 14

Re: Share your xmonad desktop!

@ XMonad HTPC
- Default Layout /  Live TV Layout
KfUcO7s.png wrPBnvn.png

  • running apps :  urxvt, ranger, opera v12.16(vi-like Shortcut),  mpv, etc

  • running media server : emby, plex, mpd, tvheadend, etc

  • kodi (Emby add-on -> Arctic: Zephyr Exploded Skin -> Netfix Home, etc add-on), LIRC

  • Layout Hook

    ------------------------------------------------------------------------------- 
    -- Layout Hook                                                                  
    ------------------------------------------------------------------------------- 
    -- Define default layouts used on most workspaces....                           
    defaultLayouts = tiled ||| Circle ||| Full -- Full mode : Border
    --defaultLayouts = tiled ||| Mirror tiled ||| floatDwmStyle shrinkText myTheme |||  Full -- Full mode : Border
    --defaultLayouts = tiled ||| Mirror tiled ||| floatSimpleDwmStyle ||| Full -- Full mode : Border
    --defaultLayouts = tiled ||| Mirror tiled ||| noBorders (fullscreenFull Full) -- Full mode : no Borders.
    --defaultLayouts = noBorders (fullscreenFull Full) ||| tiled ||| Mirror tiled.  
      where                                                                         
        -- default tiling algorithm partitions the screen into two panes            
        --tiled   = gaps [(U,5), (D,5), (R,5), (L,5)] $ spacing 2 $ Tall nmaster delta ratio   -- gap all direction 5
        tiled   = spacing 2 $ Tall nmaster delta ratio                              
        --tiled   = Tall nmaster delta ratio                                        
        -- The default number of windows in the master pane                         
        nmaster = 1.                                                                
        -- Default proportion of screen occupied by master pane                     
        ratio   = 64/100                                                            
        -- Percent of screen to increment by when resizing panes                    
        delta   = 2/100                                                             
                                                                                    
    --- Define layout for specific workspaces                                       
    -- mediaLayout = noBorders $ Full                                               
    fullLayout = noBorders (fullscreenFull Full)
    floatLayout = Full ||| noBorders (Grid) ||| floatDefault shrinkText myTheme ||| floatDwmStyle shrinkText myTheme
    --floatLayout = simpleFloat ||| noBorders (fullscreenFull Full)                 
    --floatLayout = simpleFloat' shrinkText myTheme ||| Full                        
    --floatLayout = floatDwmStyle shrinkText myTheme ||| Full                       
    --floatLayout = floatSimpleTabbed ||| Full                                      
    --floatLayout = floatTabbed shrinkText myTheme ||| Full                         
    --floatLayout = floatDwmStyle shrinkText myTheme ||| Full                       
    --myLayout = simpleDeco shrinkText myTheme (layoutHook defaultConfig)                
                                                                                    
    tvLayout = noBorders (tiled) ||| gaptiled ||| Circle ||| noBorders (Grid) ||| noBorders (fullscreenFull Full)
      where                                                                         
        tiled = spacing 0 $ Tall nmaster delta ratio
        --nmaster = 2                                                               
        --ratio = 1/2                                                               
        --delta = 1/4                                                               
        nmaster = 1                                                                 
        ratio = 3/4                                                                 
        delta = 1/4                                                                 
        gaptiled = gaps [(U,5), (D,5), (R,5), (L,5)] $ spacing 10 $ Tall nmaster delta ratio
                                                                                    
    -- Put all layouts together                                                     
    --myLayouts = onWorkspace "[9]XBMC Xinerama" mediaLayout $ defaultLayouts       
    myLayouts = 
      onWorkspace (myWorkspaces !! 8) fullLayout $                                  
      onWorkspace (myWorkspaces !! 7) tvLayout $                                    
      onWorkspace (myWorkspaces !! 6) fullLayout $                                  
      onWorkspace (myWorkspaces !! 5) floatLayout $                                 
      smartBorders $                                                                
      defaultLayouts                        

Last edited by yoman18 (2016-11-08 15:31:18)

Offline

#157 2014-11-06 18:21:16

Fuxino
Member
From: Slovakia
Registered: 2014-09-26
Posts: 195

Offline

#158 2014-12-18 10:31:57

gauthier
Member
Registered: 2013-02-21
Posts: 2

Re: Share your xmonad desktop!

My kind of zenburn colors for XMonad with xmobar:

kw3QUB1gxdw9mtEmI2dSt-0MkzDaEwT1FfE2Ds5E83k?size=640x480&size_mode=3

xmonad.hs, xmobarrc, xsession there (commit 29302ad3cc378923243e4770905fb6f5895ca2a8):

https://github.com/fleutot/.xmonad

I'm happy with useful feedback.

Last edited by gauthier (2017-06-30 08:15:53)

Offline

#159 2015-02-01 08:47:36

Paul-S
Member
From: Wales
Registered: 2008-02-04
Posts: 353

Re: Share your xmonad desktop!

Mutt, Ncmpcpp, Dzen

EhU0X2as.png

Cheers
Paul-S

Offline

#160 2015-02-09 11:06:51

cameo
Member
Registered: 2012-08-18
Posts: 119

Re: Share your xmonad desktop!

Paul-S wrote:

Mutt, Ncmpcpp, Dzen

http://i.imgur.com/EhU0X2as.png

Cheers
Paul-S

Nifty as always~ smile

Slightly offtopic: could you please post your .muttrc?

Offline

#161 2015-02-09 19:45:35

Paul-S
Member
From: Wales
Registered: 2008-02-04
Posts: 353

Re: Share your xmonad desktop!

cameo wrote:
Paul-S wrote:

Mutt, Ncmpcpp, Dzen

http://i.imgur.com/EhU0X2as.png

Cheers
Paul-S

Nifty as always~ smile

Slightly offtopic: could you please post your .muttrc?

Here you go cameo, its using mutt with the sidebar patch from aur.

# ~/.mutt/muttrc

# directories and commands
# set alias_file          = ~/.mutt/alias                         # alias file
  set certificate_file    = ~/.mutt/certificates                  # where to store certs
  set header_cache        = ~/.mutt/cache/headers                 # where to store headers
  set message_cachedir    = ~/.mutt/cache/bodies                  # where to store bodies
  set mailcap_path        = ~/.mutt/mailcap                       # entrys for filetypes
  set signature           = ~/.mutt/sig                           # my signature file
  set tmpdir              = ~/.mutt/temp                          # where to keep temp files
  set editor              = "vim +:silent+?^$"                    # use vim and skip to last blank line
  set ispell              = "aspell -e -c"                        # use aspell as ispell
  set print_command       = "enscript -p - | psselect -r | lp"    # print email in reverse page order

# maildir settings
  set mbox_type           = Maildir                               # mailbox type
  set folder              = ~/Mail                                # mailbox location
  set spoolfile           = "+GMail/INBOX"                        # Gmail is default inbox

# main options
  set copy=yes
  set beep_new                                                    # terminal bell on new message
unset confirmappend                                               # don't ask, just do
  set delete                                                      # don't ask, just do
  set mail_check          = 0                                     # minimum time between scans
unset markers                                                     # no ugly plus signs
unset mark_old                                                    # read/new is good enough for me
  set menu_scroll                                                 # scroll in menus
  set pager_index_lines   = 10                                    # number of index lines to show
  set pager_context       = 5                                     # number of context lines to show
  set pager_stop                                                  # don't go to next message automatically
  set pipe_decode                                                 # strip headers and eval mimes when piping
  set reverse_alias                                               # show names from alias file in index
  set sort                = threads                               # like gmail
  set sort_aux            = reverse-last-date-received            # like gmail
unset sort_re                                                     # always thread
  set thorough_search                                             # strip headers and eval mimes before searching
  set thread_received                                             # sort threads by date received, not sent
  set tilde                                                       # show tildes like in vim
  set timeout             = 3                                     # idle time before scanning
unset wait_key                                                    # don't show "Press any key to continue"

# enriched messages
auto_view text/html                                               # view html automatically
alternative_order text/plain text/enriched text/html              # but save it for last

# formats and regexps
  set alias_format        = "%4n %t %-20a %r"
  set date_format         = "%m/%d/%y at %I:%M%P"
  set forward_format      = "Fwd: %s"                             # format for subject when forwarding
  set index_format        = "%3C %Z %[!%m/%d] %-17.17F %s"
  set quote_regexp        = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
  set reply_regexp        = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
  set status_format       = "-%r- %v ───────────/ %f %m%?n? [+%n]?%?d? [-%d]?%?t? [*%t]? /%?p?───/ %p waiting to send /?─%>─(%P)───"

# composing mail
  set askcc                                                       # always ask for CC:
  set edit_headers                                                # show headers when composing
  set fast_reply                                                  # skip to compose when replying
  set forward_quote                                               # include message in forwards
  set include                                                     # include message in replies
  set realname            = "my name"                       # who am i?
  set reply_to                                                    # reply to Reply-to: field, not From:
  set reverse_name                                                # reply as who it was sent to (see alternates)

# headers to show
ignore *                                                          # ignore all headers
unignore from: to: cc: date: subject:                             # show only these
hdr_order from: to: cc: date: subject:                            # and in this order

# lists
subscribe arch-announce arch-dev-public aur-general xmonad arch-haskell web-devel yesod

# list of folders to notify of new mail
mailboxes +GMail/INBOX +Googlemail/INBOX

#source $alias_file                                                # required for functionality
source ~/.mutt/sidebar.muttrc
source ~/.mutt/colors.muttrc
source ~/.mutt/gmail.muttrc

# override with account specific folder-hooks
folder-hook GMail/*      source ~/.mutt/gmail.muttrc
folder-hook Googlemail/*     source ~/.mutt/googlemail.muttrc

# collapse all thread in ML folders
folder-hook Gmail/(arch_lists|xmonad_list|web_devel|yesod) "exec collapse-all"

# these just give me headaches
bind index,pager \# noop
bind index,pager \& noop
bind index i        noop

# bindings -- very vim-like
bind pager i       exit
bind pager q       toggle-quoted
bind pager /       search
bind pager k       previous-line
bind pager j       next-line
bind pager gg      top
bind index G       imap-fetch-mail
bind pager G       imap-fetch-mail
bind index gg      first-entry
bind index G       last-entry
bind pager K       previous-undeleted
bind pager J       next-undeleted
bind index K       previous-unread
bind index J       next-unread
bind index,pager R group-reply

# macros
macro index ,i "<change-folder>!<return>" "go to inbox"
macro index ,p "<pipe-message>cat > ~/" "save message as"
macro index ,z "<shell-escape>offlineimap -q -o<return>" "sync IMAP"
macro index ,r "<tag-pattern>all<return><tag-prefix><clear-flag>N<untag-pattern>all<return>" "mark all as read"
macro index ,R "<collapse-all><tag-pattern>all<return><tag-prefix><clear-flag>N<untag-pattern>all<return><collapse-all>" "mark all as read (collapsed)"
macro index ,v "<collapse-thread>" "collapse/uncollapse thread"
macro index ,V "<collapse-all>"    "collapse/uncollapse all threads"

# search via notmuch
macro index ,s \
  "<enter-command>unset wait_key<enter><shell-escape>mutt-notmuch --prompt search<enter><change-folder-readonly>~/.cache/mutt_results<enter>" \
  "search mail (using notmuch)"

# cc myself when replying to an ML.
#
# note: with this, you can't use `:q!` mid-compose to abort the message.
# instead, you should use `:wq` and abort from the compose menu
unhook send-hook
send-hook "~u" "push '<edit-cc>,my-email@gmail.com<return>'"

# vim: ft=muttrc

Cheers
Paul-S

Offline

#162 2015-02-10 11:26:48

cameo
Member
Registered: 2012-08-18
Posts: 119

Re: Share your xmonad desktop!

Thanks Paul-S, much appreciated!

So do I. However I wonder, why my sidebar doesn't show up at all, as I can't find any mistakes in its bindings/macros.
Besides, one can learn much from others' muttrcs.

Last edited by cameo (2015-02-10 12:08:54)

Offline

#163 2015-03-29 23:03:56

whitebrice
Member
Registered: 2013-12-20
Posts: 33

Re: Share your xmonad desktop!

Clean:
W4H156G.png

Busy:
CiBTmKN.png

Offline

#164 2015-05-31 15:57:14

cameo
Member
Registered: 2012-08-18
Posts: 119

Re: Share your xmonad desktop!

It's about time for another fake busy session! – XMonad 0.12 darcs w/ XFCE4 in Solarized flavor. Featuring dzen2, xmobar, Stalonetray, urxvt, and many other apps just for showing off:

xmonad_solarized_ssc15_edition_thumb_by_mitoxd-d8vgm00.png

I'll leave a note when all relevant config files have been polished and uploaded.

Offline

#165 2015-09-30 08:17:01

Maeda
Member
Registered: 2015-02-17
Posts: 44

Re: Share your xmonad desktop!

Hi all !

Here is my Xmonad + Xmobar (2 Xmobar, top and bottom) + Trayer config (there is a script to handle bars/focus colors and background random change depending on what season we are) smile :

Empty%20desktop.png

Config is on my Codeberg (see sign).
Screens will update along with coding evolution on Codeberg.

Last edited by Maeda (2022-08-20 14:02:27)

Offline

#166 2015-10-10 12:54:48

ectospasm
Member
Registered: 2015-08-28
Posts: 292

Re: Share your xmonad desktop!

Here's the Arch setup (Xfce4 + XMonad) I've been using for a month:

Pristine (which I hardly ever see):
YjBHehB.png

Full Bore:
dIR7lYN.png

I like desktops like my coffee:  black.  No matter what image I have, I'm most likely to stare at a pretty picture rather than get work done.  So, plain black color, for both my panels and my desktop.  And a plain blank screensaver (Xscreensaver), too.  Can't be getting distracted anymore.

With XMonad I only see the desktop when I'm firing up a new workspace.

NOTE:  Public IP addresses have been obfuscated in the full image.

xmonad.hs:

{-# LANGUAGE DeriveDataTypeable #-}                                                                   
import Data.Ratio
import Data.List
import XMonad
import XMonad.Config.Kde
import XMonad.Config.Xfce
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.FadeInactive
import XMonad.Util.Run
import XMonad.Util.EZConfig
import XMonad.Util.Font
import XMonad.Layout
import XMonad.Layout.Tabbed
import XMonad.Layout.PerWorkspace
import XMonad.Layout.LayoutHints (layoutHints)
import XMonad.Layout.IM as IM
import XMonad.Layout.Reflect
import XMonad.Layout.TrackFloating
import XMonad.Actions.CycleWS
import XMonad.Actions.OnScreen
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import System.IO
import qualified DBus as D
import qualified DBus.Client as D
import qualified Codec.Binary.UTF8.String as UTF8
import Graphics.X11.ExtraTypes.XF86
import XMonad.Util.WorkspaceCompare
import XMonad.Actions.WorkspaceNames hiding (workspaceNamesPP)
import Control.Monad (liftM)
import XMonad.Actions.SpawnOn
import XMonad.Prompt
import XMonad.Prompt.Window
import XMonad.Operations
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.SetWMName
import XMonad.Hooks.ManageHelpers
import XMonad.Util.Loggers
import XMonad.Util.Paste
import XMonad.Actions.WindowGo


import XMonad.Actions.DynamicWorkspaces as DW
import qualified XMonad.Util.ExtensibleState as XS
import Control.Applicative
filterWorkspaces :: [WorkspaceId] -> [WindowSpace] -> [WindowSpace]
filterWorkspaces ws = filter (\(W.Workspace tag _ _) -> tag `elem` ws)
newtype LeftScreen = LeftScreen {getLeftScreen :: [WorkspaceId]} deriving (Typeable,Read,Show) 
instance ExtensionClass LeftScreen where
	initialValue = LeftScreen []
	extensionType = PersistentExtension


newtype RightScreen = RightScreen {getRightScreen :: [WorkspaceId]} deriving (Typeable,Read,Show)
instance ExtensionClass RightScreen where
	initialValue = RightScreen []
	extensionType = PersistentExtension





myManageHook = composeAll
  [ isDialog --> doFloat
	, className =? "Gnome-dictionary" --> doFloat
  , className =? "Xfce4-dict" --> doFloat
  , className =? "Last.fm"	--> doFloat
  , className =? "Xmessage"   --> doFloat
  , className	=? "Audacious"  --> doFloat
  , className =? "Skype"		--> doFloat
  , className =? "Keepassx"	--> doFloat
  , className =? "Kcalc"		--> doFloat
	, className =? "Clementine" --> doFloat
	, className =? "SpiderOak" --> doFloat
  , className =? "Pavucontrol" --> doFloat

{- The following sets doFloat on the Orage window (as above)
  But also ensures that it appears only on the left screen
  (screen 0).  (screenWorkspace 0) returns X (Maybe WorkspaceId),
  and the liftX function lifts an X action to a Query (which is 
  Maybe WorkspaceId) and the next lines return the workspace (if 
not empty), or do	nothing if (Maybe WorkspaceId) -> Nothing.
idHook maps to mempty, which means do nothing
-}
  , className =? "Orage"	--> doFloat 
	<+> do 
  ws <- liftX (screenWorkspace 0) 
  case ws of
    Just w -> doShift w
    Nothing -> idHook 
  
  , className =? "Wrapper"	--> doFloat 
	<+> do 
  ws <- liftX (screenWorkspace 0) 
  case ws of
    Just w -> doShift w
    Nothing -> idHook 


  , className =? "Plasma-desktop"	--> doFloat 
	<+> do 
  ws <- liftX (screenWorkspace 0) 
  case ws of
    Just w -> doShift w
    Nothing -> idHook 

	, className =? "Xfce4-notifyd" --> doIgnore

  ]


shiftInsert w =
  let translatedProgs = ["Chromium", "Chrome"]
  in do
  c <- runQuery className w;
  let toTranslate = any (== c) translatedProgs
  if toTranslate then spawn ("CLIP=$(xclip -out -selection clipboard); xclip -out"
    ++ " | xclip -in -selection clipboard; xdotool key --clearmodifiers --window "
    ++ show w ++ " ctrl+v; echo -n $CLIP | xclip -in -selection clipboard")
  else sendKey shiftMask xK_Insert

layoutH = layoutHints
    $ tiled
    ||| Mirror tiled
    ||| Full
    where
      tiled   = Tall 1 (3 % 100) (1/2)

fadeHook = fadeInactiveLogHook fadeAmount
  where fadeAmount = 0.2

makeLauncher yargs run exec close = concat
  ["exe=`yeganesh ", yargs, "` && ", run, " ", exec, "$exe", close]

launcher = makeLauncher "-x -- -nf grey -nb black" "eval" "\"exec " "\""

main = do
    dbus <- D.connectSession
    getWellKnownName dbus;
    xmonad $ xfceConfig {
    workspaces = ["sh","sb","of","wc","ws","wb","hng"]
  , terminal = myTerminal
	, focusFollowsMouse	= True
  , manageHook = manageDocks <+> myManageHook -- <+> manageHook defaultConfig
  , layoutHook = avoidStruts $ onWorkspace "gimp" gimp $ layoutH 
  , logHook = dynamicLogWithPP (ppL dbus)
   			>> dynamicLogWithPP (ppR dbus)
	      >> fadeHook
  , borderWidth = 1
  , normalBorderColor = "#333333"
  , focusedBorderColor = "#CCCC00"
  , modMask = winKey
  , startupHook = startupHook xfceConfig >> setWMName "L3GD"
  }	`additionalKeys` myKeys
	where --{
	   gimp	= IM.withIM 0.11 (Role "gimp-toolbox") $
		  reflectHoriz $
		  IM.withIM 0.15 (Role "gimp-dock") Full 

getWellKnownName :: D.Client -> IO()
getWellKnownName dbus = do 
  D.requestName dbus (D.busName_ "org.xmonad.Log")               
    [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue] 
  return()


outputThroughDBusR :: D.Client -> String -> IO()
outputThroughDBusR dbus str = do 
  let signal =	(D.signal  (D.objectPath_ "/org/xmonad/Log")
		(D.interfaceName_ "org.xmonad.Log")
		(D.memberName_ "Update")) {
		D.signalBody = [D.toVariant ("<span font=\"Terminus Bold 9\">" ++
					    (UTF8.decodeString str) ++ "</span>")]
		} 
  D.emit dbus signal


outputThroughDBusL :: D.Client -> String -> IO()
outputThroughDBusL dbus str = do 
  let signal =  (D.signal (D.objectPath_ "/org/xmonad/LogL")                         
		(D.interfaceName_ "org.xmonad.LogL")
		(D.memberName_ "Update")) {
		  D.signalBody = [D.toVariant ("<span font=\"Terminus Bold 9\">" ++
		  (UTF8.decodeString str) ++ "</span>")]                         
		} 
  D.emit dbus signal


pangoColor :: String -> String -> String
pangoColor fg = wrap left right
  where
    left 	= "<span foreground=\"" ++ fg ++ "\">"
    right	= "</span>"
    
pangoSanitize :: String -> String
pangoSanitize = foldr sanitize ""
  where
    sanitize '>' 	acc = "&gt;" ++ acc
    sanitize '<' 	acc = "&lt;" ++ acc
    sanitize '\"' 	acc = "" ++ acc
    sanitize '&'  	acc = "&amp;" ++ acc
    sanitize x    	acc = x:acc

{--- Now here's some fuckin' Voodoo Magic
filterOutLeft :: [WindowSpace] -> [WindowSpace]
filterOutLeft = filter (\(W.Workspace tag _ _) -> tag `elem` rightWksp)

filterOutRight :: [WindowSpace] -> [WindowSpace]
filterOutRight = filter (\(W.Workspace tag _ _) -> tag `elem` leftWksp)
-}

ppR dbus = defaultPP {   
    ppOutput		= outputThroughDBusR dbus   
  , ppCurrent           = pangoColor "yellow" . wrap "[" "]" . pangoSanitize   
  , ppVisible           = pangoColor "cyan" . wrap "(" ")" . pangoSanitize   
  , ppTitle             = pangoColor "green" . shorten 50. pangoSanitize   
  , ppUrgent            = pangoColor "red"   
  , ppSep               = " "
  , ppSort		= (.) <$> XS.gets (filterWorkspaces . getRightScreen) <*> getSortByIndex
  , ppHiddenNoWindows 	= const ""   
  , ppHidden		= pangoColor "gray"               
}

ppL dbus = defaultPP {   
    ppOutput		= outputThroughDBusL dbus   
  , ppCurrent		= pangoColor "yellow" . wrap "[" "]" . pangoSanitize   
  , ppVisible		= pangoColor "cyan" . wrap "(" ")" . pangoSanitize   
  , ppTitle		= pangoColor "maroon" . shorten 50. pangoSanitize   
  , ppUrgent		= pangoColor "red"   
  , ppSep		= " "   
  , ppSort		= (.) <$> XS.gets (filterWorkspaces . getLeftScreen) <*> getSortByIndex
  , ppHidden		= pangoColor "gray"  
  , ppHiddenNoWindows   = const ""   
  , ppExtras	        = [pangoColor "orange" `onLogger` logCmd "~/bin/now_playing"]

}


winKey :: KeyMask
winKey = mod4Mask

lAlt :: KeyMask
lAlt = mod1Mask

myTerminal = "urxvtc -cd ~"
altTerminal = "urxvtc -cd ~ -name altUrxvt"

myKeys =	[ 
    ((winKey ,											xK_l),			  								spawnHere "xscreensaver-command --lock && sleep 3 && xset dpms force off")
  , ((winKey ,											xK_Return),		  							do
                                                                      windows (viewOnScreen 0 "sh")
                                                                      ifWindows (resource =? "urxvt") (mapM_ focus) (spawnHere myTerminal))
  , ((controlMask .|. lAlt,         xK_BackSpace),                 (spawnHere "xfdesktop --quit"))
  , ((controlMask .|. shiftMask,		xK_Return),		  							do
                                                                      windows (viewOnScreen 1 "ws")
                                                                      ifWindows (resource =? "altUrxvt") (mapM_ focus) (spawnHere altTerminal))
  , ((winKey ,                      xK_v),                        do
                                                                    windows (viewOnScreen 1 "ws")
                                                                    ifWindows (className =? "Gvim") (mapM_ focus) (spawnHere "gvim"))
  , ((lAlt ,                        xK_v),                        spawnHere "xfce4-popup-clipman")
  , ((winKey .|. shiftMask,					xK_x),			  								windowPromptBring dXPConfig)
  , ((winKey ,											xK_b),			  								sendMessage ToggleStruts)
	, ((winKey ,											xK_g),												do
                                                                    windows (viewOnScreen 1 "sb")
                                                                    ifWindows (className =? "Chromium") (mapM_ focus) (spawnHere "chromium"))
  , ((winKey ,											xK_r),												do
                                                                    windows (viewOnScreen 1 "wb")
                                                                    ifWindows (className =? "Google-chrome") (mapM_ focus) (spawnHere "google-chrome-stable"))
	, ((winKey ,											xK_i),						  					ifWindows (className =? "Clementine") (mapM_ killWindow) (spawnHere "clementine"))
  , ((winKey ,												xK_d),	  									ifWindows (className =? "Xfce4-dict") (mapM_ killWindow) (spawnHere "xfce4-dict"))
  , ((winKey ,											xK_f),			  								spawnHere (myTerminal ++ " -e vifm . ~"))
    , ((winKey ,                      xK_o),                        do
                                                                      windows (viewOnScreen 1 "rbank")
                                                                      ifWindows (className =? "Opera") (mapM_ focus) (spawnHere "opera"))
  , ((winKey ,                      xK_s),                        ifWindows (className =? "Pavucontrol") (mapM_ killWindow) (spawnHere "pavucontrol"))
  , ((winKey ,											xK_c),				  							kill)
  , ((winKey ,											xK_comma),		  							sendMessage (IncMasterN 1))
  , ((winKey ,											xK_period),		  							sendMessage (IncMasterN (-1)))
  , ((winKey ,											xK_j),				  							windows W.focusDown) -- explicitly setting the default
  , ((winKey .|. controlMask,					xK_j),				  							windows W.swapDown) -- explicitly setting the default
  , ((winKey ,											xK_k),				  							windows W.focusUp) -- explicitly setting the default
  , ((winKey .|. controlMask,					xK_k),				  							windows W.swapUp) -- explicitly setting the default
  , ((lAlt ,												xK_Tab),			  							windows W.focusDown) -- replicating MS Windows task switcher behavior
  , ((lAlt .|. shiftMask,						xK_Tab),			  							windows W.focusUp)  -- replicating MS Windows task switcher behavior
  , ((winKey .|. controlMask,				xK_Return),		  							windows W.swapMaster)
  , ((winKey ,											xK_p),				  							spawnHere launcher)
	, ((winKey .|. shiftMask,					xK_p),												spawnHere "gmrun")
  , ((shiftMask,										xK_Insert),		  							withFocused shiftInsert)
  , ((winKey ,											xK_Print),		  							spawnHere "xfce4-screenshooter")
  , ((winKey ,											xK_Left),			  							prevWS)
  , ((winKey ,											xK_Right),		  							nextWS)
	, ((winKey ,											xK_Up),												spawnHere "skippy-xd")
  , ((0,														xF86XK_Calculator),	  				ifWindows (className =? "Gnome-calculator") (mapM_ killWindow) (spawnHere "gnome-calculator"))
  , ((0,														xF86XK_AudioPlay),	  				spawn "clementine --play-pause")
  , ((0,														xF86XK_AudioMute),	  				spawn "/home/trey/bin/mute")
  , ((0,														xF86XK_AudioRaiseVolume), 		spawn "amixer -c 0 set Master 5dB+")
  , ((0,														xF86XK_AudioLowerVolume), 		spawn "amixer -c 0 set Master 5dB-")
  , ((winKey .|. controlMask,					xK_h),		  									sendMessage Shrink)
  , ((winKey .|. lAlt,      					xK_h),		  									do
                                                                      windows (viewOnScreen 1 "sb")
                                                                      ifWindows (className =? "Chromium") (mapM_ focus) (spawnHere "chromium"))
  , ((winKey .|. controlMask,					xK_l),											  sendMessage Expand)
  , ((winKey ,												xK_1),			  								windows (viewOnScreen 0 "sh"))
  , ((winKey ,												xK_2),			  								windows (viewOnScreen 0 "sb"))
  , ((winKey ,                        xK_a),                        do 
                                                                        windows (viewOnScreen 1 "hip") 
                                                                        ifWindows (className =? "Hipchat") (mapM_ focus) (spawnHere "hipchat"))
  , ((winKey .|. shiftMask ,				xK_q),			  								spawn "xfce4-session-logout")
  , ((winKey ,											xK_h),											  DW.withWorkspace myXPConfigSelect $ \wk -> do
      sc <- screenBy 0
      if sc == 0
			then XS.modify $ LeftScreen . (++ [wk]) . getLeftScreen -- append to list
      else XS.modify $ RightScreen . (++ [wk]) . getRightScreen -- append to list
      windows $ W.view wk)
  , ((winKey ,											xK_z),											  DW.withWorkspace myXPConfigSelect (\ws -> do
	  sc <- screenBy 0
	  if sc == 0
	    then XS.modify $ LeftScreen . nub . (ws :) . getLeftScreen -- prefix to list
	    else XS.modify $ RightScreen . nub . (ws :) . getRightScreen -- prefix to list

	  windows $ W.shift ws
	))
  , ((winKey ,											xK_BackSpace),		  					do
    curr <- gets (W.currentTag . windowset)
    sc <- screenBy 0
    if sc == 0
      then do
				ws <- XS.gets getLeftScreen
				XS.put (LeftScreen (filter (/= curr) ws))
      else do
			ws <- XS.gets getRightScreen
			XS.put (RightScreen (filter (/= curr) ws))                                              
    DW.removeWorkspace
    )
  , ((winKey .|. controlMask ,			xK_r),			  								do
	old <- gets (W.currentTag . windowset)
	DW.renameWorkspace myXPConfigNew
	created <- gets (W.currentTag . windowset)
	sc <- screenBy 0
	if sc == 0
	   then do
	      ws <- XS.gets getLeftScreen
	      XS.put (LeftScreen (filter (/= old) ws))
	      XS.modify $ LeftScreen . (++ [created]) . getLeftScreen -- append to list
	   else do
	      ws <- XS.gets getRightScreen
	      XS.put (RightScreen (filter (/= old) ws))
	      XS.modify $ RightScreen . (++ [created]) . getRightScreen -- append to list
	refresh)
  , ((winKey ,											xK_m) ,			  								DW.withWorkspace myXPConfigNew $ \wk -> do
      sc <- screenBy 0
      if sc == 0
			then XS.modify $ LeftScreen . (++ [wk]) . getLeftScreen -- append to list
      else XS.modify $ RightScreen . (++ [wk]) . getRightScreen -- append to list
      windows $ W.view wk)
  ]
  ++
  [((m .|. winKey, key), screenWorkspace sc >>= flip whenJust (windows . f))
	| (key, sc) <- zip [xK_w, xK_e] [0..] -- For w,e keys
	, (f, m) <- [(W.view, 0), (W.shift, controlMask)]]

dXPConfig = defaultXPConfig {
   bgColor = "yellow"
, fgColor = "blue"
}

myXPConfigSelect = defaultXPConfig {
    bgColor		= "yellow"
  , fgColor		= "blue"
  , autoComplete	= Just 0
  , showCompletionOnTab = True
}

myXPConfigNew = defaultXPConfig {
    bgColor		= "yellow"
  , fgColor		= "blue"
  , autoComplete	= Nothing
  , showCompletionOnTab	= True
}

That XMonad code has grown organically.  Every time I do major work on my configuration, I have to relearn Haskell, and I lean heavily on the XMonad/Haskell community (which seems to have little patience for the fact that I don't think in Haskell).  Even so, all the blood, sweat, and tears I've put into this configuration mean that I will only leave XMonad when all of my configuration backups are lost completely.  It's rather ugly, please don't criticize it too much!

Offline

#167 2015-11-22 01:50:54

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,269
Website

Re: Share your xmonad desktop!

2015-11-22-014820_1920x1080_scrot.th.png2015-11-22-014809_1920x1080_scrot.th.png
See sig for configs wink

Last edited by Head_on_a_Stick (2015-11-22 01:54:30)


Para todos todo, para nosotros nada

Offline

#168 2016-05-29 09:20:59

_maxe
Member
From: DE
Registered: 2015-10-18
Posts: 25

Re: Share your xmonad desktop!

2016_05_29_11_18_scrot.jpg
Here is mine.
I really like XMonad, still using a config file found on the internet but i think i start writing my own smile

greetings

Offline

#169 2016-11-03 19:15:22

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: Share your xmonad desktop!

First time using xmonad. 
thumb-screenshot.png

Forked ssh0's config.  My config can be found here

Offline

#170 2016-11-04 18:07:12

afternewbie
Member
From: Indonesia
Registered: 2016-11-04
Posts: 1
Website

Re: Share your xmonad desktop!

f0KsAcks.png
just an old config that still i used until now smile

github

Offline

#171 2016-11-08 15:30:53

yoman18
Member
Registered: 2014-08-20
Posts: 14

Re: Share your xmonad desktop!

BDcHklt.png  K3HgAGq.png
hZ98Yy1.png  WXdvFes.png
3FwXgkF.png  2kO7bIi.png
NyOgkMD.png  CCAsJnm.png

~/.config/xmobar/xmobarrc-workspace

-- vim: ft=haskell
-- xmobar - a minimalistic status bar (version 2.24.3)
-- http://projects.haskell.org/xmobar/
-- http://fontawesome.io/cheatsheet/
-- https://wiki.archlinux.org/index.php/Xmobar
-- https://github.com/bchurchill/xmonad-pulsevolume
-- by nietz

Config {
       --- appearance
         font             = "xft:Noto Sans CJK KR-8:antialias=true:hinting=true:bold,xft:Hack:size=8:bold:antialias=true"
       , additionalFonts  = [ "xft:FontAwesome-8" ]
       , bgColor          = "#312e39"
       , fgColor          = "#c0a79a"
       , alpha            = 0                   -- 0 is transparent, 255 is opaque. 255 -> xmobar bgcolor, xmonad.hs xmobarPP bgcolor on
       , position         = Static { xpos = 0, ypos = 0, width = 1920, height = 16 }
       --, position         = Static { xpos = 620 , ypos = 0, width = 700, height = 16 }
       --, position         = TopSize C 35 16   -- 35%, 16 height, Centerd
       --, position         = TopW C 50         -- width x%, Centerd
       --, position         = TopP 20 20        -- left padding 20, right padding 20
       , textOffset       = -1                  -- he vertical offset, in pixels, for the text baseline. If negative or not given, xmobar will try to center text verticallly
       , iconOffset       = -1                  -- The vertical offset, in pixels, for icons bottom line. If negative or not given, xmobar will try to center icons vertically.

       --- general behavior
       , lowerOnStart     = True                -- When True the window is sent the bottom of the window stack initially.
       , hideOnStart      = False               -- When set to True the window is initially not mapped, i.e. hidden. It then can be toggled manually (for example using thedbus interface) or automatically (by a plugin) to make it reappear.
       , allDesktops      = True                -- When set to True (the default), xmobar will tell the window manager explicitly to be shown in all desktops, by setting _NET_WM_DESKTOP to 0xffffffff.
       , overrideRedirect = False               -- If you're running xmobar in a tiling window manager, you might need to set this option to False so that it behaves as adocked application. Defaults to True.
       , pickBroadest     = False               -- When multiple displays are available, xmobar will choose by default the first one to place itself. With this flag set toTrue (the default is False) it will choose the broadest one instead.
       , persistent       = True                -- When True the window status is fixed i.e. hiding or revealing is not possible. This option can be toggled at runtime. Defaults to False.

       -- borders
       , border           = NoBorder            -- TopB, TopBM, BottomB, BottomBM, FullB, FullBM or NoBorder (default). TopBM=TopBorderMargin
       , borderColor      = "black"
       , borderWidth      = 1
       , iconRoot         = "."                 -- Root folder where icons are stored. For if path start with "/", "./" or "../" it is interpreted as it is. Otherwise it w     ↪ill have iconRoot ++ "/" prepended to it. Default is ".".

       , commands         = [ Run MPD                        [ "-t"   ,       "<fn=1>\xf025</fn> <title> - <artist> (<album>) <statei> <state> <vbar> [<flags>] <fn=1>\xf0cb</fn> <ppos>/<plength>  <fn=1>\xf028</fn> <volume>%"
                                                               , "--" , "-P", "<fn=1>\xf144</fn>"
                                                               , "-Z" ,       "<fn=1>\xf28b</fn>"
                                                               , "-S" ,       "<fn=1>\xf28d</fn>"
                                                             ] 10
                            , Run Kbd                        [ ("kr(kr104)" , "<fc=#a3a3a3>KR104</fc>")
                                                               , ("kr"      , "<fc=#a3a3a3>KR104</fc>")
                                                               , ("us"      , "<fc=#8B0000>US</fc>"   )
                                                             ]
                            , Run Mail                       [ ("Ub: "      , "~/Mail/Personal/INBOX")
                                                               , (",  Fr: " , "~/Mail/Work/INBOX"    )
                                                             ] "mail"
                            , Run Volume "default" "Master"  [ "-t"         , "Master: <volume>% <status> <volumeipat>"
                                                               , "--"       , "--on"                    , "●"   --"[on]"
                                                                            , "--off"                   , "●"   --"○"   --"[off]"
                                                                            , "--onc"                   , "#783e57"
                                                                            , "--offc"                  , "#615772"
                                                                            , "--highd"                 , "-5.0"
                                                                            , "--lowd"                  , "-30.0"
                                                                            , "--volume-icon-pattern"   , "<icon=bitmapvolumeicon_%%.xpm/>"
                                                             ] 10
                            , Run Volume "default" "Capture" [ "-t"         , ",  Capture: <volume>% <status> <volumeipat>"
                                                               , "--"       , "--on"                    , "●"   --"[on]"
                                                                            , "--off"                   , "●"   --"○"   --"[off]"
                                                                            , "--onc"                   , "#783e57"
                                                                            , "--offc"                  , "#615772"
                                                                            , "--highd"                 , "-5.0"
                                                                            , "--lowd"                  , "-30.0"
                                                                            , "--volume-icon-pattern"   , "<icon=bitmapvolumeicon_%%.xpm/>"
                                                             ] 10
                            , Run StdinReader   -- xmonad workspace : layout : title
                            ]
       , sepChar         = "%"
       , alignSep        = "}{"
       , template        = " Mopidy: <fc=#a3a3a3>%mpd%</fc> }   %StdinReader%   { Kbd: %kbd%  <fn=1>   </fn>Vol: <fc=#a3a3a3>%default:Master% %default:Capture%</fc>  <fn=1> </fn> Gmail: <fc=#a3a3a3>%mail%</fc>  "
       }

~/.config/xmobar/xmobarrc

-- vim: ft=haskell
-- xmobar - a minimalistic status bar (version 2.24.3)
-- http://projects.haskell.org/xmobar/
-- http://fontawesome.io/cheatsheet/
-- https://wiki.archlinux.org/index.php/Xmobar
-- by nietz

Config {
       --- appearance
         font             = "xft:Noto Sans CJK KR-8:antialias=true:hinting=true:bold,xft:Hack:size=8:bold:antialias=true"
       , additionalFonts  = [ "xft:FontAwesome-8" ]
       , bgColor          = "#312e39"
       , fgColor          = "#c0a79a"
       , alpha            = 0                   -- 0 is transparent, 255 is opaque.
       , position         = Static { xpos = 0 , ypos = 1064, width = 1920, height = 16 }     -- 88, in 1080p resoulition, ypos = 1064  --> bottom
       --, position         = TopSize C 35 16   -- 35%, 16 height, Centerd
       --, position         = TopP 20 20        -- left padding 20, right padding 20
       , textOffset       = -1                  -- he vertical offset, in pixels, for the text baseline. If negative or not given, xmobar will try to center text verticallly
       , iconOffset       = -1                  -- The vertical offset, in pixels, for icons bottom line. If negative or not given, xmobar will try to center icons vertically.

       --- general behavior
       , lowerOnStart     = True                -- When True the window is sent the bottom of the window stack initially.
       , hideOnStart      = False               -- When set to True the window is initially not mapped, i.e. hidden. It then can be toggled manually (for example using thedbus interface) or automatically (by a plugin) to make it reappear.
       , allDesktops      = True                -- When set to True (the default), xmobar will tell the window manager explicitly to be shown in all desktops, by setting _NET_WM_DESKTOP to 0xffffffff.
       , overrideRedirect = False               -- If you're running xmobar in a tiling window manager, you might need to set this option to False so that it behaves as adocked application. Defaults to True.
       , pickBroadest     = False               -- When multiple displays are available, xmobar will choose by default the first one to place itself. With this flag set toTrue (the default is False) it will choose the broadest one instead.
       , persistent       = True                -- When True the window status is fixed i.e. hiding or revealing is not possible. This option can be toggled at runtime. Defaults to False.

       -- borders
       , border           = NoBorder            -- TopB, TopBM, BottomB, BottomBM, FullB, FullBM or NoBorder (default). TopBM=TopBorderMargin
       , borderColor      = "black"
       , borderWidth      = 1
       , iconRoot         = "."                 -- Root folder where icons are stored. For if path start with "/", "./" or "../" it is interpreted as it is. Otherwise it w     ↪ill have iconRoot ++ "/" prepended to it. Default is ".".

       -- plugins
       --   Numbers can be automatically colored according to their value. xmobar
       --   decides color based on a three-tier/two-cutoff system, controlled by
       --   command options:
       --     --Low sets the low cutoff
       --     --High sets the high cutoff
       --
       --     --low sets the color below --Low cutoff
       --     --normal sets the color between --Low and --High cutoffs
       --     --High sets the color above --High cutoff
       --
       --   The --template option controls how the plugin is displayed. Text
       --   color can be set by enclosing in <fc></fc> tags. For more details
       --   see http://projects.haskell.org/xmobar/#system-monitor-plugins.
       , commands         = 

            [ Run Weather "RKPK"    [
                                      "-t", "<fn=1>\xf285</fn> Pusan:  <skyCondition>  <fn=1>\xf043</fn><tempC>°C  <fn=1>\xf110</fn> rh: <rh>% (<hour>)  <fn=1>\xf042</fn> pressure: <pressure> hPa"        -- \xf185
                                    , "-L"          , "10"
                                    , "-H"          , "30"
                                    , "--low"       , "#e0cc8f"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#e38aa2"
                                    ] 36000

            --, Run Network "enp0s25" ["-t", "<dev>: ↓<rx>, ↑<tx>"]
            , Run Network "enp0s25" [
                                      "-t"          , "<fn=1>\xf1d8</fn> Net: ↓<rx>, ↑<tx>"
                                    , "-S"          , "True"
                                    , "-L"          , "1000"
                                    , "-H"          , "1001"
                                    , "--low"       , "#c0a79a"
                                    , "--normal"    , "#eaeaea"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run Network "enp5s0"  [
                                      "-t"          , "<fn=1>\xf1d8</fn> Net: ↓<rx>, ↑<tx>"
                                    , "-S"          , "True"
                                    , "-L"          , "1000"
                                    , "-H"          , "1001"
                                    , "--low"       , "#c0a79a"
                                    , "--normal"    , "#eaeaea"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run Cpu               [
                                      "-t"          , "<fn=1>\xf167</fn> Cpu: <total>"      -- \xf108
                                    , "-L"          , "5"
                                    , "-H"          , "50"
                                    , "--low"       , "#cccccc"
                                    , "--normal"    , "#eaeaea"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run MultiCpu          [
                                      "-t"          , " (core# <total0>-<total1>-<total2>-<total3>-<total4>-<total5>-<total6>-<total7>%)"
                                    , "-L"          , "5"
                                    , "-H"          , "50"
                                    , "--low"       , "#c0a39a"
                                    , "--normal"    , "#eaeaea"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run CpuFreq           [
                                      "-t"          , "(<cpu0>_<cpu1>_<cpu2>_<cpu3>_<cpu4>_<cpu5>_<cpu6>_<cpu7> GHz)"
                                    , "-L"          , "1"
                                    , "-H"          , "3"
                                    , "--low"       , "#c0a79a"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#eaeaea"
                                    , "--maxwidth"  , "4"
                                    ] 50

            , Run Memory            [
                                      "-t"          , "<fn=1>\xf1e3</fn> Mem: <usedratio>% (used: <used>M / cache: <cache>M)"
                                    , "-L"          , "2000"
                                    , "-H"          , "10000"
                                    , "--low"       , "#c0a39a"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run Swap              [] 10

            , Run CoreTemp          [
                                      "-t"          , "<fn=1>\xf166</fn> CoreTemp: <core0>-<core1>-<core2>-<core3>°C"      -- \xf26a
                                    , "-L"          , "40"
                                    , "-H"          , "70"
                                    , "--low"       , "#c0a39a"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#bf4040"
                                    ] 50

            , Run DiskU             [ ("/"          , "<fn=1>\xf1f0</fn> Disk:  [/: <used>/<size>]")
                                    , ("/home"      , ", [/home: <used>/<size>]"                   )
                                    ]
                                    [
                                      "-L"          , "50"
                                    , "-H"          , "95"
                                    , "-m"          , "1"
                                    , "-p"          , "3"
                                    , "--low"       , "#c0a39a"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#bf4040"
                                    ] 20

            , Run MPD               [
                                      "-t"          , "<composer> <title> (<album>) <track>/<plength> <statei> [<flags>]"
                                    , "--"
                                    , "-P"          , ">>"
                                    , "-Z"          , "|"
                                    , "-S"          , "><"
                                    ] 10

            , Run Kbd               [ ("us(dvorak)", "DV"), ("us", "US")]

            , Run Date              "<fn=1>\xf073</fn> %a %b %_d %Y " "date1" 10
            , Run Date              "<fn=1>\xf017</fn> %H:%M:%S"      "date2" 10

            , Run Com "/home/nietz/.xmonad/mpd_info.sh" [] "mpc"              10

            , Run Com "uname"       [ "-s" ,"-r" ,"-m"   ] ""                  0

            , Run Com "xmonad"      [ "--version"        ] "myxmonad"          0

            , Run Com "lsb_release" [ "-i", "-s"         ] "mydistro"          0

            , Run Com "lsb_release" [ "-c", "-s"         ] "mydistro_codename" 0
            ]

       , sepChar          = "%"
       , alignSep         = "}{"
       , template         = " %cpu% %multicpu% - %cpufreq% | %coretemp% | %memory% | %disku% | %enp0s25%%enp5s0% | %RKPK% }{ <fc=#98adeb><fn=1></fn> %mydistro% %uname%</fc>  <fc=#bf4040><fn=1></fn> %myxmonad% </fc><fc=#a3a3a3> <action=`orage --toggle`>%date1%</action> <action=`oclock-toggle.sh`>%date2%</action></fc> "
       }

~/.xmonad/xmonad.hs

-- vim: ft=haskell
-------------------------------------------------------------------------------
-- File       : ~/.xmonad/xmonad.hs     (xmonad 0.12)
-- based on   : Nepherte (dot) be [Step by Step Configuration of XMonad] 
--              https://www.nepherte.be/blog/step-by-step-configuration-of-xmonad.html
-- module     : https://github.com/pbrisbin/xmonad-config/blob/92b2653aabd4c3ca1854473e3679a2f11e278550/lib/Dzen.hs
-- referenced : http://xmonad.org/documentation.html
-- by nietz
--------------------------------------------------------------------------------
--
-- xmonad example config file.
-- /usr/share/x86_64-linux-ghc-8.0.1/xmonad-0.12/man/xmonad.hs
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--

-------------------------------------------------------------------------------
--- Import statement
-------------------------------------------------------------------------------
--{-# LANGUAGE DeriveDataTypeable #-}
--
-- Default Config
import XMonad
import Data.Monoid
import System.Exit

import qualified XMonad.StackSet as W
import qualified Data.Map        as M

-- Application
import Control.Monad

-- Keys move, resize Window
import XMonad.Actions.FloatKeys                         -- http://www.eng.uwaterloo.ca/~aavogt/xmonad/docs/xmonad-contrib/XMonad-Actions-FloatKeys.html
import qualified XMonad.Actions.FlexibleResize as Flex  -- Resize floating windows from any corner.

import XMonad.ManageHook

-- For JumpToLayout keybinding. "hiding" necessary for LayoutCombinators.
--import XMonad hiding ( (|||) )
--import XMonad.Layout.LayoutCombinators  -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutCombinators.html
--import XMonad.Layout.Named              -- (Deprecated) instead XMonad.Layout.Renamed http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Named.html
import XMonad.Layout.Renamed              -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Renamed.html

-- Window Layout Mode
import XMonad.Layout
import XMonad.Layout.ResizableTile      -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-ResizableTile.html
import XMonad.Layout.Circle             -- https://hackage.haskell.org/package/xmonad-contrib-0.12/docs/XMonad-Layout-Circle.html
import XMonad.Layout.Grid               -- https://hackage.haskell.org/package/xmonad-contrib-0.12/docs/XMonad-Layout-Circle.html
import XMonad.Layout.BinarySpacePartition
import XMonad.Layout.Simplest
import XMonad.Layout.SimplestFloat
import XMonad.Layout.SimpleFloat        -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-SimpleFloat.html#t:SimpleDecoration
import XMonad.Layout.NoBorders
import XMonad.Layout.Gaps               -- https://hackage.haskell.org/package/xmonad-contrib-0.12/docs/XMonad-Layout-Gaps.html
import XMonad.Layout.Fullscreen
import XMonad.Layout.ToggleLayouts      -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-ToggleLayouts.html
import XMonad.Layout.MultiToggle        -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-MultiToggle.html
import XMonad.Layout.MultiToggle.Instances
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Spacing
import XMonad.Layout.Gaps               -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Gaps.html
import XMonad.Layout.Minimize           -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Minimize.html
import XMonad.Layout.Maximize           -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Maximize.html
import XMonad.Layout.Monitor            -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Monitor.html
import XMonad.Layout.PositionStoreFloat -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-PositionStoreFloat.html
import XMonad.Layout.NoFrillsDecoration
import XMonad.Layout.BorderResize

--import XMonad.Layout.WindowArranger   -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-WindowArranger.html#t:WindowArranger

-- Key Binding
import XMonad.Util.Run                  -- customKeys binding
import XMonad.Util.CustomKeys           -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-CustomKeys.html#v:customKeys
import XMonad.Actions.CycleWS
import XMonad.Actions.Submap
import XMonad.Actions.NoBorders

-- Window Menu, management  action
import XMonad.Actions.WindowMenu
import XMonad.Actions.UpdatePointer
import XMonad.Actions.WindowBringer
import XMonad.Actions.SpawnOn
import XMonad.Actions.CycleWS
import XMonad.Actions.PhysicalScreens
import XMonad.Actions.WindowGo
import XMonad.Actions.GridSelect        -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
import XMonad.Actions.WithAll           -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-WithAll.html
import XMonad.Actions.SinkAll           -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-SinkAll.html

-- Divide a single screen into multiple screens, multiple screens into single screeen span 
import XMonad.Layout.LayoutScreens
import XMonad.Layout.TwoPane

-- XF86 Extra keys
import Graphics.X11.ExtraTypes.XF86

-- Dzen Status bar
import Dzen

-- Manage Hooks
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.ManageHelpers       -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-ManageHelpers.html 
import XMonad.Hooks.SetWMName
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.PositionStoreHooks  -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-PositionStoreHooks.html

-- Addtional Package
import XMonad.Util.EZConfig             -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-EZConfig.html
import XMonad.Util.WorkspaceCompare
import XMonad.Util.NamedScratchpad      --http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-NamedScratchpad.html

-- Themes and stuff
import XMonad.Layout.SimpleDecoration   -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-SimpleDecoration.html
import XMonad.Layout.Decoration
import XMonad.Layout.DecorationMadness  -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-DecorationMadness.html
import XMonad.Layout.ImageButtonDecoration
import XMonad.Util.Image
import XMonad.Util.Themes
import XMonad.Util.Loggers              -- for ppExtras: http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-Loggers.html

-- Flexible and general compositing interface than FadeInactive
import XMonad.Hooks.FadeWindows

-- A prompt for XMonad which will run a program, open a file, or raise an
-- already running program, depending on context.
import XMonad.Prompt                    -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Prompt.html
import XMonad.Prompt.RunOrRaise
import XMonad.Prompt.Shell
import XMonad.Prompt.XMonad
import XMonad.Prompt.Window             -- pops up a prompt with window names
import XMonad.Actions.Commands (defaultCommands)
import XMonad.Actions.Search            -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-Search.html
import Data.Maybe (fromMaybe)

-- System
import System.IO
import XMonad.Util.Replace (replace)
import Control.Monad (when)
import System.Environment (getArgs)


-------------------------------------------------------------------------------
-- Variables
-------------------------------------------------------------------------------
-- definee base16 color: systhwave theme
--
color0   = "#33303b"
color1   = "#87404f"
color2   = "#4c9982"
color3   = "#71949a"
color4   = "#615772"
color5   = "#783e57"
color6   = "#554757"
color7   = "#c0a79a"
color8   = "#2f2c37"
color9   = "#87404f"
color10  = "#4c9982"
color11  = "#71949a"
color12  = "#615772"
color13  = "#783e57"
color14  = "#554757"
color15  = "#c0a79a"
colorbg0 = "#312e39"
colorbg1 = "#c0a79a"
colorfg0 = "#ffffff"
colorfg1 = "#ce260b"

type Hex = String
type ColorCode = (Hex,Hex)
type ColorMap = M.Map Colors ColorCode

data Colors = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White | BG |FG
    deriving (Ord,Show,Eq)

colors :: ColorMap
colors = M.fromList
    [ (Black   , (color0,   color8  ))
    , (Red     , (color1,   color9  ))
    , (Green   , (color2,   color10 ))
    , (Yellow  , (color3,   color11 ))
    , (Blue    , (color4,   color12 ))
    , (Magenta , (color5,   color13 ))
    , (Cyan    , (color6,   color14 ))
    , (White   , (color7,   color15 ))
    , (BG      , (colorbg0, colorbg1))
    , (FG      , (colorfg0, colorfg1))
    ]

myColor :: Colors -> Int -> Hex
myColor color n =
    case M.lookup color colors of
        Nothing -> "#000000"
        Just (c1,c2) -> if n == 0
                        then c1
                        else c2

-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
-- 
myTerminal :: String
myTerminal = "urxvt"

-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True

-- Whether clicking on a window to focus also passes the click to the window
myClickJustFocuses :: Bool
myClickJustFocuses = False

-- Width of the window border in pixels.
--
myBorderWidth :: Dimension
myBorderWidth  = 6

-- modMask lets you specify which modkey you want to use. The default
-- is mod1Mask ("left alt").  You may also consider using mod3Mask
-- ("right alt"), which does not conflict with emacs keybindings. The
-- "windows key" is usually mod4Mask.
--
myModMask :: KeyMask
myModMask = mod4Mask

-- Border colors for unfocused and focused windows, respectively.
--
myFocusedBorderColor , myNormalBorderColor :: String
myFocusedBorderColor = (myColor Magenta 0) --"#870000" --"#9144ab"
myNormalBorderColor  = (myColor BG      0) --"#312e39" --"#33303b" --"#3a3a3a" --"#a3a3a3"

-- Font Setting
--
myGSFont , myDzenFont , myPromptFont , myThemeFont , myButtonThemeFont, myDmenuFont :: String
-- gridSelect Font
myGSFont            = "xft:Noto Sans CJK KR:bold:pixelsize=10"   --"xft:SpoqaHanSansJP:Bold:pixelsize=12"
-- dzen Font
myDzenFont          = "Noto Sans CJK KR:bold:pixelsize=10"       -- Dzen is not xft.
-- Prompt Font
myPromptFont        = "xft:Hack:bold:pixelsize=10,xft:NanumGothicCoding:bold:pixelsize=10"
-- Theme Font
myThemeFont         = "xft:Noto Sans CJK KR:bold:pixelsize=10,xft:Hack:bold:pixelsize=10"
myButtonThemeFont   = "xft:Noto Sans CJK KR:bold:pixelsize=10,xft:Hack:bold:pixelsize=10"
-- Dmenu2 Font
myDmenuFont         = "Source Han Sans KR:bold:pixelsize=12"

-- Extra Varaibles
myXResolution       = 1920
myYResolution       = 1080
myTopPanelHeight    = 16
myBottomPanelHeight = 16
myDefaultSpacing    = 0
myDefaultGaps       = 0

-- | A green monochrome colorizer based on window class
greenColorizer = colorRangeFromClassName
                  black            -- lowest inactive bg
                  (0x70,0xFF,0x70) -- highest inactive bg
                  black            -- active bg
                  white            -- inactive fg
                  white            -- active fg
    where black = minBound
          white = maxBound

-- | A synthwave monochrome colorizer based on window class
myGoToSelectedColorizer  :: Window -> Bool -> X (String, String)
myGoToSelectedColorizer  = colorRangeFromClassName
                  (0x31,0x2e,0x39) -- lowest inactive bg
                  (0x31,0x2e,0x39) -- highest inactive bg
                  (0x78,0x3e,0x57) -- active bg
                  (0xc0,0xa7,0x9a) -- inactive fg
                  (0xff,0xff,0xff) -- active fg

myBringSelectedColorizer :: Window -> Bool -> X (String, String)
myBringSelectedColorizer = colorRangeFromClassName
                  (0x31,0x2e,0x39) -- lowest inactive bg
                  (0x31,0x2e,0x39) -- highest inactive bg
                  (0x61,0x57,0x72) -- active bg
                  (0xc0,0xa7,0x9a) -- inactive fg
                  (0xff,0xff,0xff) -- active fg

-- gridSelect select Workspace layout
wsconfig            = defaultGSConfig
    { gs_cellheight   = 30
    , gs_cellwidth    = 300
    , gs_cellpadding  = 16
    , gs_originFractX = 0.5
    , gs_originFractY = 0.0
    , gs_font         = myGSFont
    }

-- gridSelect move Workspace layout
wsconfig2           = defaultGSConfig
    { gs_cellheight   = 30
    , gs_cellwidth    = 300
    , gs_cellpadding  = 16
    , gs_originFractX = 1.5
    , gs_originFractY = 0.0
    , gs_font         = myGSFont
    }

-- gridSelect select window layout
wiconfig colorizer  = (buildDefaultGSConfig myGoToSelectedColorizer )
--wiconfig = defaultGSConfig
    { gs_cellheight   = 30
    , gs_cellwidth    = 200
    , gs_cellpadding  = 16
    , gs_originFractX = 0.5
    , gs_originFractY = 0.5
    , gs_font         = myGSFont
  }

-- gridSelect bring window layout
wiconfig2 colorizer = (buildDefaultGSConfig myBringSelectedColorizer)
--wiconfig2 = defaultGSConfig
    { gs_cellheight   = 30
    , gs_cellwidth    = 200
    , gs_cellpadding  = 16
    , gs_originFractX = 0.5     --1.0
    , gs_originFractY = 0.3     --0.5
    , gs_font         = myGSFont
    }

-- gridSelect popup menu layout
popupconfig         = defaultGSConfig
    { gs_cellheight   = 30
    , gs_cellwidth    = 200
    , gs_cellpadding  = 8
    , gs_originFractX = 0.5
    , gs_originFractY = 0.5
    , gs_font         = myGSFont
    }

-- spawnSelected Redefine
spawnSelected' :: [(String, String)] -> X ()
spawnSelected' lst = gridselect conf lst >>= flip whenJust spawn
    where conf = popupconfig


------------------------------------------------------------------------------
-- Prompt : data XPConfig
------------------------------------------------------------------------------
-- Prompt Theme configuration
myPromptFgColor             = myColor BG      1
myPromptBgColor             = myColor Black   0
myPromptBgHLight            = myColor Magenta 0
myPromptFgHLight            = myColor White   0

--instance XPrompt Shell where
    --showXPrompt Shell = "dRun: "

-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Prompt.html#t:XPConfig
myPromptConfig :: XPConfig
myPromptConfig = defaultXPConfig 
    { XMonad.Prompt.font        = myPromptFont
    , bgColor                   = myPromptBgColor
    , fgColor                   = myPromptFgColor
    , bgHLight                  = myPromptBgHLight
    , fgHLight                  = myPromptFgHLight
    , borderColor               = myNormalBorderColor
    , promptBorderWidth         = 1
    , XMonad.Prompt.height      = 16
    , XMonad.Prompt.position    = Top 
    , alwaysHighlight           = False
    , historySize               = 20
    , historyFilter             = id
    , promptKeymap              = defaultXPKeymap 
    , completionKey             = xK_Tab
    , changeModeKey             = xK_grave
    , defaultText               = []
    , autoComplete              = Nothing
    , showCompletionOnTab       = False
    , searchPredicate           = isPrefixOf
   	}


-------------------------------------------------------------------------------
-- Theme configuration
-------------------------------------------------------------------------------
--

myTheme :: Theme
myTheme = defaultTheme
    { activeColor         = myColor Magenta 0
    , inactiveColor       = myColor Black   1
    , urgentColor         = myColor BG      1
    , activeBorderColor   = myColor Magenta 0
    , inactiveBorderColor = myColor Black   1
    , activeTextColor     = myColor White   1
    , inactiveTextColor   = myColor Blue    0
    , urgentTextColor     = myColor Red     0
    , fontName            = myThemeFont
    , decoWidth           = 1920
    , decoHeight          = 16
    , windowTitleAddons   = []
    , windowTitleIcons    = []
    }

myButtonTheme :: Theme
myButtonTheme = defaultThemeWithImageButtons
    { activeColor         = myColor Magenta 0
    , inactiveColor       = myColor Black   1
    , urgentColor         = myColor BG      1
    , activeBorderColor   = myColor Magenta 0
    , inactiveBorderColor = myColor Black   1
    , activeTextColor     = myColor White   1
    , inactiveTextColor   = myColor Blue    0
    , urgentTextColor     = myColor Red     0
    , fontName            = myButtonThemeFont
    , decoHeight          = 18
    , windowTitleIcons    = [ (menuButton , CenterLeft   3)
                            , (closeButton, CenterRight  3)
                            , (maxiButton , CenterRight 18)
                            , (miniButton , CenterRight 33)
                            ]
    }
    where
        convertToBool' :: [Int] -> [Bool]
        convertToBool' = map (\x -> x == 1)
        convertToBool :: [[Int]] -> [[Bool]]
        convertToBool  = map convertToBool'
        menuButton' :: [[Int]]
        menuButton' =  [[0,0,0,0,0,0,0,0,0,0],
                        [0,1,0,0,0,0,0,0,1,0],
                        [0,0,1,1,0,0,1,1,0,0],
                        [0,0,1,0,0,0,0,1,0,0],
                        [0,0,0,0,0,0,0,0,0,0],
                        [0,0,0,0,0,0,0,0,0,0],
                        [0,0,1,0,0,0,0,1,0,0],
                        [0,0,1,1,0,0,1,1,0,0],
                        [0,1,0,0,0,0,0,0,1,0],
                        [0,0,0,0,0,0,0,0,0,0]]
        menuButton :: [[Bool]]
        menuButton  = convertToBool menuButton'
        miniButton' :: [[Int]]
        miniButton' =  [[0,0,0,0,0,0,0,0,0,0],
                        [0,0,0,0,0,0,0,0,0,0],
                        [0,0,0,0,0,0,0,0,0,0],
                        [0,0,0,0,0,0,0,0,0,0],
                        [0,1,1,1,1,1,1,1,1,0],
                        [0,1,1,1,1,1,1,1,1,0],
                        [0,0,0,0,0,0,0,0,0,0],
                        [0,0,0,0,0,0,0,0,0,0],
                        [0,0,0,0,0,0,0,0,0,0],
                        [0,0,0,0,0,0,0,0,0,0]]
        miniButton :: [[Bool]]
        miniButton  = convertToBool miniButton'
        maxiButton' :: [[Int]]
        maxiButton' =  [[0,0,0,0,0,0,0,0,0,0],
                        [0,0,0,0,1,1,0,0,0,0],
                        [0,0,0,0,1,1,0,0,0,0],
                        [0,0,0,0,1,1,0,0,0,0],
                        [0,1,1,1,1,1,1,1,1,0],
                        [0,1,1,1,1,1,1,1,1,0],
                        [0,0,0,0,1,1,0,0,0,0],
                        [0,0,0,0,1,1,0,0,0,0],
                        [0,0,0,0,1,1,0,0,0,0],
                        [0,0,0,0,0,0,0,0,0,0]]
        maxiButton :: [[Bool]]
        maxiButton  = convertToBool maxiButton'
        closeButton' :: [[Int]]
        closeButton' = [[0,0,0,0,0,0,0,0,0,0],
                        [0,1,1,0,0,0,0,1,1,0],
                        [0,1,1,1,0,0,1,1,1,0],
                        [0,0,1,1,0,0,1,1,0,0],
                        [0,0,0,1,1,1,1,0,0,0],
                        [0,0,0,1,1,1,1,0,0,0],
                        [0,0,1,1,0,0,1,1,0,0],
                        [0,1,1,1,0,0,1,1,1,0],
                        [0,1,1,0,0,0,0,1,1,0],
                        [0,0,0,0,0,0,0,0,0,0]]
        closeButton :: [[Bool]]
        closeButton = convertToBool closeButton'


--------------------------------------------------------------------------------
-- Define the names of all workspaces
-------------------------------------------------------------------------------
-- The default number of workspaces (virtual screens) and their names.
-- By default we use numeric strings, but any string may be used as a
-- workspace name. The number of workspaces is determined by the length
-- of this list.
-- 
-- A tagging example:
-- 
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--myWorkspaces    = ["1","2","3","4","5","6","7","8","9"]

myWorkspaces :: [String]
-- Clicable workspaces : + dzenwsbar
--myWorkspaces = clickable $ 
    --[
    --" 1 ", " 2 ", " 3 ", " 4 ", " 5 ", " 6:Work ", " 7:Virtual Machine ", " TV ", " Kodi "
    --]
    --where clickable l = [ "^ca(1,xdotool key super+" ++ show (n) ++ ")" ++ ws ++ "^ca()" |
                         --(i,ws) <- zip [1..] l,
                         --let n = i ]

-- non-Clickable workspaces : + xmobar clickable set
--myWorkspaces = [ "  일  ", "  이  ", "  삼  ", "  사  ", "  오  ", "  육:Work  ", "  칠:Virtual Machine  ", "  TV  ", "  Kodi  " ]
myWorkspaces = [ "  1  ", "  2  ", "  3  ", "  4  ", "  5  ", "  6:Work  ", "  7:Virtual Machine  ", "  TV  ", "  Kodi  " ]


-------------------------------------------------------------------------------
-- Layout
-------------------------------------------------------------------------------
-- You can specify and transform your layouts by modifying these values.
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
--
-- The available layouts.  Note that each layout is separated by |||,
-- which denotes layout choice.
--

-- Define default layouts used on most workspaces.
defaultLayouts = avoidStruts ( Circle ||| tiled )
--defaultLayouts = Circle ||| tiled ||| Mirror tiled ||| floatDwmStyle shrinkText myTheme |||  Full     -- Full mode : Border
--defaultLayouts = tiled ||| Mirror tiled ||| floatSimpleDwmStyle ||| Full                              -- Full mode : Border
--defaultLayouts = tiled ||| Mirror tiled ||| noBorders (fullscreenFull Full)                           -- Full mode : no Borders
--defaultLayouts = noBorders (fullscreenFull Full) ||| tiled ||| Mirror tiled 
    where
        -- default tiling algorithm partitions the screen into two panes
        --tiled   = gaps [(U,5), (D,5), (R,5), (L,5)] $ spacing 2 $ Tall nmaster delta ratio            -- gap all direction 5
        tiled   = spacing 0 $ ResizableTall nmaster delta ratio []
        --tiled   = Tall nmaster delta ratio
        -- The default number of windows in the master pane
        nmaster = 1 
        -- Default proportion of screen occupied by master pane
        ratio   = 3/5
        -- Percent of screen to increment by when resizing panes
        delta   = 3/100

--- Define layout for specific workspaces
fullLayout = noBorders (fullscreenFull Full)

--floatLayout = simpleFloat ||| noBorders (fullscreenFull Full)
--floatLayout = simpleFloat' shrinkText myTheme ||| Full
--floatLayout = floatDwmStyle shrinkText myTheme ||| Full
--floatLayout = floatSimpleTabbed ||| Full
--floatLayout = floatTabbed shrinkText myTheme ||| Full
--floatLayout = floatDwmStyle shrinkText myTheme ||| Full
--floatLayout = avoidStruts (floatDefault shrinkText myTheme ||| Full)
--floatLayout = avoidStruts $ gaps [(U,20), (D,20), (L,50), (R,50)] $ spacing 20 $ emptyBSP ||| floatDwmStyle shrinkText myTheme
--floatLayout = avoidStruts $ gaps [(U,20), (D,20), (L,50), (R,50)] $ spacing 20 emptyBSP ||| noBorders ( simpleFloat' shrinkText myTheme )
--floatLayout = simpleDeco shrinkText myTheme (layoutHook defaultConfig)
--floatLayout = floatingDeco $ borderResize $ positionStoreFloat
               --where floatingDeco l = noFrillsDeco shrinkText defaultTheme l
floatLayout = avoidStruts $ gaps [(U,8), (D,8), (L,8), (R,8)] $ spacing 16 emptyBSP |||
              --noBorders ( imageButtonDeco shrinkText myButtonTheme $ simpleFloat' shrinkText myTheme { decoHeight =0 } ) |||
              noBorders ( imageButtonDeco shrinkText myButtonTheme simplestFloat )  |||
              noBorders ( imageButtonDeco shrinkText myButtonTheme positionStoreFloat )

tvLayout = avoidStruts
    (noBorders (tiled) ||| gaptiled ||| Circle ||| noBorders (Grid) ||| noBorders (fullscreenFull Full))
    where
        tiled = spacing 0 $ ResizableTall nmaster delta ratio []
        --nmaster = 2
        --ratio = 1/2
        --delta = 1/4
        nmaster = 1
        ratio = 3/4
        delta = 1/4
        gaptiled = gaps [(U,4), (D,4), (R,4), (L,4)] $ spacing 8 $ Tall nmaster delta ratio

-- Put all layouts together
myLayouts = lessBorders OnlyFloat                       $   -- OnlyFloat, Never, EmptyScreen, OtherIndicated, Screen
            smartBorders                                $
            borderResize                                $
            minimize $ maximize                         $
            mkToggle (NOBORDERS ?? FULL ?? EOT)         .
            mkToggle (single NBFULL)                    .
            mkToggle (single MIRROR)                    $
            toggleLayouts (avoidStruts $ Full)          $
            --toggleLayouts Full                        $
            --toggleLayouts (avoidStruts $ noBorders Full) $
            onWorkspace (myWorkspaces !! 8) fullLayout  $
            onWorkspace (myWorkspaces !! 7) tvLayout    $
            onWorkspace (myWorkspaces !! 6) fullLayout  $
            onWorkspace (myWorkspaces !! 5) floatLayout $
            defaultLayouts

-------------------------------------------------------------------------------
-- Named ScratchPads
-------------------------------------------------------------------------------
--
--http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-NamedScratchpad.html
--Scratchpad Everything:  https://pbrisbin.com/posts/scratchpad_everything/
--
myScratchPads :: [NamedScratchpad]
myScratchPads = [ NS "terminal" spawnTerm   findTerm   manageTerm     -- one scratchpad
                , NS "mixer"    spawnMixer  findMixer  manageMixer    -- and a second
                , NS "video"    spawnVideo  findVideo  manageVideo    -- and a third
                , NS "player"   spawnPlayer findPlayer managePlayer   -- and a 4th
                , NS "mpd"      spawnMpd    findMpd    manageMpd      -- and a 5th
                ]
    where
        role = stringProperty "WM_WINDOW_ROLE"

        spawnTerm   = myTerminal ++ " -name scratchpad"         -- launch my scratchpad terminal
        findTerm    = resource  =? "scratchpad"                 -- its window will be named "scratchpad" (see above)
        manageTerm  = customFloating $ W.RationalRect l t w h   -- and I'd like it fixed using the geometry below
            where
            -- reusing these variables is ok since they're confined to their own 
            -- where clauses 
            h = 0.5                                             -- height, 50%
            w = 0.5                                             -- width,  50%
            t = (1 - h)/2                                       -- centered top/bottom
            l = (1 - w)/2                                       -- centered left/right

        spawnMixer   = "urxvt -name pulsemixer -e pulsemixer"                                                       -- launch my pulsemixer
        findMixer    = resource =? "pulsemixer" <||> title =? "pulsemixer"                                          -- its window has a ClassName of "mixer"
        manageMixer  = customFloating $ W.RationalRect l t w h                                                      -- and I'd like it fixed using the geometry below:
            where
                h = 0.6                                         -- height, 60%
                w = 0.6                                         -- width,  60%
                t = (1 - h)/2                                   -- centered top/bottom
                l = (1 - w)/2                                   -- centered left/right

        -- mpsyt : "set playerargs --x11-name mpsyt"
        spawnVideo   = "mpv --x11-name mpsyt --ytdl-format best --no-resume-playback $(xclip -o)"                   -- launch mpv for youtube
        findVideo    = resource  =? "mpsyt" <&&> className =? "mpv"                                                 -- its window will be named "video" (see above)
        manageVideo  = ((customFloating $ W.RationalRect l t w h) <+> doF W.focusDown)                              -- and I'd like it fixed using the geometry below, then focus down, mpv no focus
            where
            -- reusing these variables is ok since they're confined to their own 
            -- where clauses 
            h = 0.24                                            -- height, 25%
            w = 0.24                                            -- width,  25%
            t = (1 - h) - (myBottomPanelHeight / myYResolution) -- bottom right edge: bottom xmobar height=16, y resoulution=1080
            l = 1 - w                   -- right, left/right

        spawnPlayer  = "mpv --x11-name livetv --profile tv --no-resume-playback --playlist-pos 19 channels.m3u"     -- launch mpv for livetv mpv
        findPlayer   = resource  =? "livetv" <&&> className =? "mpv"                                                -- its window will be named "player" (see above)
        managePlayer = customFloating $ W.RationalRect l t w h                                                      -- and I'd like it fixed using the geometry below
            where
            -- reusing these variables is ok since they're confined to their own 
            -- where clauses 
            h = 0.24                                            -- height, 24%
            w = 0.24                                            -- width,  24%
            t = 0 + (myTopPanelHeight / myYResolution)          -- top right edge: top xmobar height=16, y resoulution=1080
            l = 1 - w                                           -- right, left/right

        spawnMpd   = myTerminal ++ " -name mpd -e $HOME/.local/bin/ncmpcpp-tmux"                                    -- launch my scratchpad ncmpcpp
        findMpd    = resource  =? "mpd"                                                                             -- its window will be named "mpd" (see above)
        manageMpd  = customFloating $ W.RationalRect l t w h                                                        -- and I'd like it fixed using the geometry below
            where
            -- reusing these variables is ok since they're confined to their own 
            -- where clauses 
            h = 0.7                                             -- height, 70%
            w = 0.8                                             -- width,  80%
            t = (1 - h)/2                                       -- centered top/bottom
            l = (1 - w)/2                                       -- centered left/right


-- NamedScratchPad Pass
notSP :: X (WindowSpace -> Bool)
notSP = return $ ("NSP" /=) . W.tag

nextWS' :: X ()
nextWS' = moveTo Next (WSIs notSP)
prevWS' :: X ()
prevWS' = moveTo Prev (WSIs notSP)


-------------------------------------------------------------------------------
-- Window rules: Manage Hook
-------------------------------------------------------------------------------
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
-- The class name of an application corresponds to the first 
-- value of WM_CLASS (“Pidgin”).
-- The resource corresponds to the second value of WM_CLASS (also “Pidgin”). 
-- The title corresponds to WM_NAME (“Buddy List”).

-- Define the workspace on application has to go to
myManageHook :: ManageHook
myManageHook = (composeAll . concat $
    [
          [ className =?  c <||> title=?  c --> doF (W.shift (myWorkspaces !! 0))   | c <- myClassWebShifts      ]
        , [ className =?  c --> doF (W.shift (myWorkspaces !! 1))                   | c <- myClassBrowseShifts   ]
        , [ resource  =?  r --> doF (W.shift (myWorkspaces !! 2))                   | r <- myClassChatShifts     ]
        , [ className =?  c --> doF (W.shift (myWorkspaces !! 3))                   | c <- myClassTerminalShifts ]
        , [ className =?  c --> doF (W.shift (myWorkspaces !! 4))                   | c <- myClassDevShifts      ]
        , [ className =?  c --> doF (W.view  (myWorkspaces !! 5))                   | c <- myClassWorkShifts     ]
        , [ className =?  c --> doF (W.shift (myWorkspaces !! 5))                   | c <- myClassWorkShifts     ]
        , [ className =?  c --> doF (W.view  (myWorkspaces !! 8))                   | c <- myClassXinerama       ]
        , [ className =?  c --> doF (W.shift (myWorkspaces !! 8))                   | c <- myClassXinerama       ]
        --, [ className =?  c --> doFullFloat                                       | c <- myClassXinerama       ]
        , [ className =?  c --> doCenterFloat                                       | c <- myClassCFloats        ]
        , [ className =?  c --> doRectFloat (W.RationalRect 0.759 0.758 0.24 0.24)  | c <- myClassRFloats        ]
        , [ className =?  c --> doIgnore                                            | c <- myClassIgnore         ]
        --
        , [ title =? "autoload"     --> doF (W.shift (myWorkspaces !! 3)) ]
        --, [ className =? "mpv" --> doF (W.shift (myWorkspaces !! 3)) ]
        , [ title =? "ncmpcpp_tmux" --> doF (W.shift (myWorkspaces !! 3)) ]
        , [ title =? "ncmpcpp_tmux" --> doF (W.view  (myWorkspaces !! 3)) ]
        --
        , [ className =? "Clock" <&&> title     =? "oclock"                            --> doRectFloat (W.RationalRect (1-0.10) ((1-0.15)-(16/1080)) 0.10 0.15) ]
        , [ className =? "Orage" <&&> title     =? "Orage"                             --> doRectFloat (W.RationalRect (1-0.10) ((1-0.15)-(16/1080)) 0.10 0.15) ]
        , [ className =? "Orage" <&&> title    /=? "Orage"                             --> doCenterFloat                                                        ]
        , [ className =? "mpv"   <&&> resource /=? "mpsyt" <&&> resource /=? "livetv"  --> doCenterFloat                                                        ]
        --, [ className =? "mpv"   <&&> resource  =? "mpsyt"                             --> doF W.focusDown                                                      ]
        , [ className =? "URxvt" <&&> resource  =? "urxvt-big"                         --> (doF (W.view  (myWorkspaces !! 8)) <+> doF (W.shift (myWorkspaces !! 8))) ]
        --
        , [ isDialog     --> doCenterFloat                     ]
        , [ isFullscreen --> doFullFloat                       ]
    ])  <+> namedScratchpadManageHook myScratchPads
        <+> manageDocks
        <+> fullscreenManageHook
        <+> positionStoreManageHook (Just defaultThemeWithImageButtons)
        <+> manageHook defaultConfig

    where
        -- if non-Clickable workspace, then "doF(W.shift(myWorkspaces !! n))" => "viewShift" or "doShift"
        -- viewShift = doF . liftM2 (.) W.greedyView W.shift
        myClassWebShifts      = [ "W3m", "Uzbl", "Uzbl-core","Opera","vivaldi","qutebrowser", "mutt"             ]
        myClassBrowseShifts   = [ "Spacefm","Pcmanfm"                                                            ]
        myClassChatShifts     = [ "Pidgin","Weechat"                                                             ]
        myClassTerminalShifts = [ "Xterm","UXTerm"                                                               ]
        myClassDevShifts      = [ "I am not programmer"                                                          ]
        myClassWorkShifts     = [ "libreoffice","Openshot","Calculator","shutter","qbittorrent","Qbittorrent"    ]
        myClassIgnore         = [ "Gimp","desktop", "desktop_window", "mplayer2"                                 ]
        myClassXinerama       = [ "Kodi", "kodi", "Kodi.bin","kodi.bin","xbmc", "xbmc.bin"                       ]
        myClassCFloats        = [ "feh", "sxiv", "Xmessage", "Gxmessage"                                         ]
        myClassRFloats        = [ "Vlc"                                                                          ]



-------------------------------------------------------------------------------
-- Key Binding
-------------------------------------------------------------------------------
-- FOR MULTIMEDIA KEYS RUN:
-- xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
-- Then look in /usr/include/X11/XF86keysym.h and look for the name and code.
--
-- Graphics.X11 keysym definitions: https://wiki.haskell.org/Xmonad/Key_codes
-- /usr/include/X11/keysymdef.h

-- Define keys to add
keysToAdd x =
    [
    --- Workspace move, shit append,  Window Close
    -- Close focused window
    ((modMask x, xK_c), kill)
    -- Close focused workspaced all window
    ,  (((modMask x .|. controlMask .|. shiftMask), xK_c    ), killAll :: X())
    -- Shift to previous workspace
    ,  (((modMask x .|. controlMask              ), xK_Left ), prevWS'       )
    --,  (((modMask x .|. controlMask              ), xK_Left ), prevWS        )
    -- Shift to next workspace
    ,  (((modMask x .|. controlMask              ), xK_Right), nextWS'       )
    --,  (((modMask x .|. controlMask              ), xK_Right), nextWS        )
    -- Shift widow to previous workspace
    ,  (((modMask x .|. shiftMask                ), xK_Left ), shiftToPrev   )
    -- Shift to next workspace
    ,  (((modMask x .|. shiftMask                ), xK_Right), shiftToNext   )


    --- Working Window Visible Management
    --, ((modMask x .|. shiftMask, xK_a), windowMenu)
    , ((modMask x .|. shiftMask, xK_a), gridselectWorkspace wsconfig  (\ws -> W.view ws))                 -- select workspace
    , ((modMask x .|. shiftMask, xK_t), gridselectWorkspace wsconfig2 (\ws -> W.view ws . W.shift ws))    -- move current window to selected workspace
    --, ((modMask x .|. shiftMask, xK_s), goToSelected defaultGSConfig)                                   -- show all working apps'name list, if click, then go clicked app. I liked this menu
    --, ((modMask x .|. shiftMask, xK_s), goToSelected wiconfig)                                          -- show all working apps'name list, if click, then go clicked app. I liked this menu
    , ((modMask x .|. shiftMask, xK_s), goToSelected  $ wiconfig  myGoToSelectedColorizer)                -- above same, for custom colorizer 
    --, ((modMask x .|. shiftMask, xK_b), bringSelected wiconfig2)                                        -- bring window list and summon a window you select 
    , ((modMask x .|. shiftMask, xK_b), bringSelected $ wiconfig2 myBringSelectedColorizer)               -- bring window list and summon a window you select 
    , ((modMask x .|. shiftMask, xK_g), gotoMenu)                                                         -- avobe goToSelected same, like dmenu appearence
    , ((modMask x .|. shiftMask, xK_i), bringMenu)                                                        -- bring window, like dmenu appaerance


    -- Layout Window move or resize  -> import XMonad.Layout.WindowArranger
    --, (((modMask x .|. controlMask              ), xK_s    ), sendMessage  Arrange         )
    --, (((modMask x .|. controlMask .|. shiftMask), xK_s    ), sendMessage  DeArrange       )
    --, (((modMask x .|. controlMask              ), xK_Left ), sendMessage (MoveLeft      1))
    --, (((modMask x .|. controlMask              ), xK_Right), sendMessage (MoveRight     1))
    --, (((modMask x .|. controlMask              ), xK_Down ), sendMessage (MoveDown      1))
    --, (((modMask x .|. controlMask              ), xK_Up   ), sendMessage (MoveUp        1))
    --, (((modMask x                 .|. shiftMask), xK_Left ), sendMessage (IncreaseLeft  1))
    --, (((modMask x                 .|. shiftMask), xK_Right), sendMessage (IncreaseRight 1))
    --, (((modMask x                 .|. shiftMask), xK_Down ), sendMessage (IncreaseDown  1))
    --, (((modMask x                 .|. shiftMask), xK_Up   ), sendMessage (IncreaseUp    1))
    --, (((modMask x .|. controlMask .|. shiftMask), xK_Left ), sendMessage (DecreaseLeft  1))
    --, (((modMask x .|. controlMask .|. shiftMask), xK_Right), sendMessage (DecreaseRight 1))
    --, (((modMask x .|. controlMask .|. shiftMask), xK_Down ), sendMessage (DecreaseDown  1))
    --, (((modMask x .|. controlMask .|. shiftMask), xK_Up   ), sendMessage (DecreaseUp    1))


    -- Fixed Singgle Layout expand & divide 2 pane
    ,  (((modMask x .|. controlMask .|. shiftMask), xK_x), layoutScreens 1     (fixedLayout [Rectangle 0 0 3840 1080]))
    ,  (((modMask x .|. controlMask .|. shiftMask), xK_d), layoutSplitScreen 2 (TwoPane 0.5  0.5 ))   -- divide single screen to 2 screen
    ,  (((modMask x .|. controlMask .|. shiftMask), xK_r), layoutScreens 2     (TwoPane 0.25 0.75))
    -- Physical Screen control
    ,  (((modMask x .|. controlMask              ), xK_a), onPrevNeighbour W.view )
    ,  (((modMask x .|. controlMask              ), xK_s), onNextNeighbour W.view )
    ,  (((modMask x .|. controlMask .|. shiftMask), xK_a), onPrevNeighbour W.shift)
    ,  (((modMask x .|. controlMask .|. shiftMask), xK_s), onNextNeighbour W.shift)
    -- Return Default Layout
    ,  (((modMask x .|. controlMask .|. shiftMask), xK_space), rescreen)


    --- Floating Window Movement, Resizing
    -- Window Movement
    , ((modMask x                                , xK_Left        ), withFocused (keysMoveWindow (-10, 0  )))
    , ((modMask x                                , xK_Up          ), withFocused (keysMoveWindow (0  , -10)))
    , ((modMask x                                , xK_Down        ), withFocused (keysMoveWindow (0  , 10 )))
    , ((modMask x                                , xK_Right       ), withFocused (keysMoveWindow (10 , 0  )))
    -- Window Resizing 
    , (((modMask x .|. controlMask .|. shiftMask), xK_Left        ), withFocused (keysResizeWindow    (-10,   0) (0, 0)))
    , (((modMask x .|. controlMask .|. shiftMask), xK_Up          ), withFocused (keysResizeWindow    (0  , -10) (0, 0)))
    , (((modMask x .|. controlMask .|. shiftMask), xK_Down        ), withFocused (keysResizeWindow    (0  ,  10) (0, 0)))   -- urxvt terminal not works
    , (((modMask x .|. controlMask .|. shiftMask), xK_Right       ), withFocused (keysResizeWindow    (10 ,   0) (0, 0)))
    , (((modMask x .|. controlMask .|. shiftMask), xK_KP_Page_Down), withFocused (keysAbsResizeWindow (10 ,  10) (0, 0)))   -- urxvt down direction not
    , (((modMask x .|. controlMask .|. shiftMask), xK_KP_Home     ), withFocused (keysAbsResizeWindow (-10, -10) (0, 0)))


    --- Manual Float Corner movement : 
    -- Case : resolution 1920x1080 x2(dual), top panel height=16, no bottom panel, window spacing=2, window border=1
    -- Non-numeric num pad keys, sorted by number 
    -- numPadKeys = [ xK_KP_End,  xK_KP_Down,  xK_KP_Page_Down -- 1, 2, 3
    --              , xK_KP_Left, xK_KP_Begin, xK_KP_Right     -- 4, 5, 6
    --              , xK_KP_Home, xK_KP_Up,    xK_KP_Page_Up   -- 7, 8, 9
    --              , xK_KP_Insert]                            -- 0
    --
    -- Center Position, No resizable
    , ((modMask x,                                 xK_KP_Begin    ), withFocused (keysMoveWindowTo (959 , 547 ) (1/2, 1/2)))    -- Left Screen Center Position. no resizable
    , (((modMask x .|.                 shiftMask), xK_KP_Begin    ), withFocused (keysMoveWindowTo (2879, 547 ) (1/2, 1/2)))    -- Right Screen Center Position. no resizable
    , (((modMask x .|. controlMask .|. shiftMask), xK_KP_Begin    ), withFocused (keysMoveWindowTo (1916, 547 ) (1/2, 1/2)))    -- Dual Screen Center Position. no resizable
    -- Left Screen Conner Position, No resizable
    , ((modMask x                                , xK_KP_Home     ), withFocused (keysMoveWindowTo (2   , 18  ) (0  , 0  )))    -- Left Screen, Left-Top Conner Position. no resizable
    , ((modMask x                                , xK_KP_Page_Up  ), withFocused (keysMoveWindowTo (1916, 18  ) (1  , 0  )))    -- Left Screen, Rifhtt-Top Conner Position. no resizable
    , ((modMask x                                , xK_KP_End      ), withFocused (keysMoveWindowTo (2   , 1078) (0  , 1  )))    -- Left Screen, Left-Bottom Conner Position. no resizable
    , ((modMask x                                , xK_KP_Page_Down), withFocused (keysMoveWindowTo (1916, 1078) (1  , 1  )))    -- Left Screen, Rifhtt-Bottom Conner Position. no resizable
    -- Right Screen Conner Position, No resizable
    , (((modMask x .|.                 shiftMask), xK_KP_Home     ), withFocused (keysMoveWindowTo (1922, 18  ) (0  , 0  )))    -- Right Screen, Left-Top Conner Position. no resizable
    , (((modMask x .|.                 shiftMask), xK_KP_Page_Up  ), withFocused (keysMoveWindowTo (3836, 18  ) (1  , 0  )))    -- Right Screen, Rifhtt-Top Conner Position. no resizable
    , (((modMask x .|.                 shiftMask), xK_KP_End      ), withFocused (keysMoveWindowTo (1922, 1078) (0  , 1  )))    -- Right Screen, Left-Bottom Conner Position. no resizable
    , (((modMask x .|.                 shiftMask), xK_KP_Page_Down), withFocused (keysMoveWindowTo (3836, 1078) (1  , 1  )))    -- Right Screen, Rifhtt-Bottom Conner Position. no resizable


    -- ResizableTile
    , ((modMask x, xK_a), sendMessage MirrorShrink)
    , ((modMask x, xK_z), sendMessage MirrorExpand)


    -- Toggle Struts : panel visiblity toggle on/off
    , ((modMask x, xK_b                                ), sendMessage ToggleStruts)
    -- Hide all gaps:
    , (((modMask x .|. mod1Mask), xK_b                 ), sendMessage $ SetStruts [] [minBound .. maxBound]) 
    -- Show all gaps:
    , (((modMask x .|. controlMask .|. mod1Mask), xK_b ), sendMessage $ SetStruts [minBound .. maxBound] [])
    -- Show only upper and left gaps: 
    , (((modMask x .|. controlMask), xK_g              ), sendMessage $ SetStruts [U,L] [minBound .. maxBound])
    -- Hide the bottom keeping whatever the other values were:
    --,  (((modMask x .|. controlMask .|. shiftMask), xK_g), sendMessage $ SetStruts [] [D])
    -- Show only bottom gaps:
    , (((modMask x .|. controlMask .|. shiftMask), xK_g), sendMessage $ SetStruts [D] [minBound .. maxBound])


    -- Jump to layout
    , (((modMask x .|. controlMask .|. shiftMask), xK_j), submap . M.fromList $
      [ 
          -- ((0, xK_t), sendMessage $ JumpToLayout "tiled")
          --,((0, xK_u), sendMessage $ JumpToLayout "full")
          --,((0, xK_f), sendMessage $ JumpToLayout "float")
      ])


    -- Named Scratchpad key
    -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-NamedScratchpad.html
    , (((modMask x .|. controlMask .|. shiftMask), xK_n), submap . M.fromList $
        [ 
          ((0, xK_t), scratchTerm   )
        , ((0, xK_m), scratchMixer  )
        , ((0, xK_v), scratchVideo  )
        , ((0, xK_p), scratchPlayer )
        , ((0, xK_n), scratchMpd    )
        ]
      )


    -- Popup grid menu for spawning applications
    --, ((modMask x .|. shiftMask, xK_m), spawnSelected defaultGSConfig
    --, ((modMask x .|. shiftMask, xK_m), spawnSelected popupconfig
    --  [
          --"urxvt",
          --"qutebrowser"
        --]
    -- Redefined popup spawnSelected
    , ((modMask x .|. shiftMask, xK_m), spawnSelected'
        [
          ("Ranger"                  , "urxvt -e ranger"   )
        , ("Qute"                    , "qutebrowser"       )
        , ("Mutt"                    , "urxvt -e mutt"     )
        , ("Vivaldi"                 , "vivaldi-stable"    )
        , ("Libreooffice"            , "libreoffice --calc")
        , ("Xterm"                   , "xterm"             )
        , ("TV Library"              , "urxvt -e ranger /media/data01/tv/en/"   )
        , ("Movie Library"           , "urxvt -e ranger /media/data02/movie/ko/")
        , ("TV-Vlc"                  , "vlc ~/tvChannel.xspf"                                   )
        , ("TV-Vapoursynth"          , "mpv --profile tvv $HOME/channels.m3u --playlist-pos 19" )
        , ("TV-Hwdec"                , "mpv --profile tv  $HOME/channels.m3u --playlist-pos 19" )
        , ("Ncmpcpp_tmux"            , "urxvt -title ncmpcpp_tmux -e ~/.ncmpcpp/ncmpcpp_tmux"   )
        , ("XMonad Setting"          , "urxvt -e vi ~/.xmonad/xmonad.hs"                )
        , ("XMobar Left_Top"         , "urxvt -e vi ~/.config/xmobar/xmobarrc-topleft" )
        , ("XMobar Right_Top"        , "urxvt -e vi ~/.config/xmobar/xmobarrc-topright")
        , ("XMobar Bottom"           , "urxvt -e vi ~/.config/xmobar/xmobarrc"         )
        , ("데스크탑 rec-vaapi"      , ".local/bin/record_all_v.sh")
        , ("데스크탑 rec"            , ".local/bin/record_all.sh"  )
        , ("데스크탑 right-rec-vaapi", ".local/bin/record_2_v.sh"  )
        , ("데스크탑 right-rec"      , ".local/bin/record_2.sh"    )
        , ("데스크탑 rec exit"       , ".local/bin/rec_exit.sh"    )
        ]
      )


    -- Computer Power off
    , (((modMask x .|. controlMask .|. shiftMask), xK_Pause), submap . M.fromList $
      [ 
         ((0, xK_s), spawn "dbus-send --system --print-reply --dest='org.freedesktop.UPower' /org/freedesktop/UPower org.freedesktop.UPower.Suspend")                             -- suspend
       , ((0, xK_r), spawn "dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart") -- Restart
       , ((0, xK_f), spawn "dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop")    -- Shutdown
      ]) 

    -- Mornitor on/off
    , (((modMask x .|. controlMask .|. shiftMask), xK_Scroll_Lock), submap . M.fromList $
      [ 
         ((0, xK_a), spawn "xrandr --auto --output DFP1 --primary --mode 1920x1080 --left-of DFP2") --  dual mornitor on
       , ((0, xK_l), spawn "xrandr --output DFP1 --off"                                           ) --  left mornitor off
       , ((0, xK_r), spawn "xrandr --output DFP2 --off"                                           ) --  rifht moritor off
       , ((0, xK_o), spawn "xset dpms force suspend"                                              ) --  monitro off
       , ((0, xK_0), spawn "xscreensaver-command --lock"                                          ) --  screen lock
      ]) 


    --- Take Screenshot
    -- Full Screenshot : 1. screenshot -dn(delay n sec) then display captured image by "feh -F", 2. fullscreenimage.png is stored to ~/screeenshot/Desktop dir, 3. thumbimage(fullscreenimage's 250x70).png is stored to /screenshot/thumb dir
    -- "scrot -t 6" create fullscreen image and (fullscreen x 6%) thumb image
    , ((0, xK_Print), submap . M.fromList $
      [ 
          ((0, xK_0), spawn "scrot -d 0 -t 250x141 -e 'paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga; feh -F *scrot.png && notify-send \"Screenshoot Done\"; mv $f ~/screenshot/desktop; mv *thumb.png ~/screenshot/thumb/'")              -- "PrtSc + 0" keys combinations
       ,  ((0, xK_1), spawn "scrot -d 1 -t 250x141 -e 'paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga; feh -F *scrot.png && notify-send \"Screenshoot Done\"; mv $f ~/screenshot/desktop; mv *thumb.png ~/screenshot/thumb/'")              -- "PrtSc + 1" keys combinations
       ,  ((0, xK_5), spawn "scrot -d 5 -t 250x141 -e 'paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga; feh -F *scrot.png && notify-send \"Screenshoot Done\"; mv $f ~/screenshot/desktop; mv *thumb.png ~/screenshot/thumb/'")              -- "PrtSc + 5" keys combinations
      ]) 
    -- Currently focused window screenshot include grab wm border too
    , ((modMask x                  , xK_Print), spawn "scrot --border -u '%Y-%m-%d-%H%M%S_$wx$h_window.png' -e 'paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga; feh -F $f && notify-send \"Screenshoot Done\"; mv $f ~/screenshot/'")       -- "mod + PrtSc" keys combinations
    -- Interactively select a window or rectangle with mouse drag
    , (((modMask x .|. controlMask), xK_Print), spawn "sleep 0.3; scrot -s '%Y-%m-%d-%H%M%S_$wx$h_selection.png' -e 'paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga; feh -F $f && notify-send \"Screenshoot Done\"; mv $f ~/screenshot/'")  -- "mod + Control + PrtSc" keys combinations, then mouse drage


    --- PulseAudio Mixer control
    -- Volume up 1%
    , ((modMask x, xK_KP_Add     ), spawn "amixer -D pulse set Master 2%+ unmute")
    -- Volume down -1%
    , ((modMask x, xK_KP_Subtract), spawn "amixer -D pulse set Master 2%- unmute")
    -- Volume toggle
    , ((modMask x, xK_KP_Multiply), spawn "amixer -D pulse set Master toggle"    )

    --- Mpd control
    -- Play / pause song in mpd
    ,  (((modMask x .|. shiftMask), xK_p          ), spawn "mpc toggle"   )
    -- Play previous song in mpd
    ,  (((modMask x .|. shiftMask), xK_comma      ), spawn "mpc prev"     )
    -- Play next song in mpd
    ,  (((modMask x .|. shiftMask), xK_period     ), spawn "mpc next"     )
    -- MPD Volume Up
    ,  (((modMask x .|. shiftMask), xK_KP_Add     ), spawn "mpc volume +5")
    -- MPD Volume Down
    ,  (((modMask x .|. shiftMask), xK_KP_Subtract), spawn "mpc volume -5")
    -- random       -- toggle random mode, or specify state
    ,  (((modMask x .|. shiftMask), xK_z          ), spawn "mpc random"   )
    -- single       -- toggle single mode, or specify state
    ,  (((modMask x .|. shiftMask), xK_x          ), spawn "mpc single"   )
    -- consume      -- toggle consume mode, or specify state
    ,  (((modMask x .|. shiftMask), xK_c          ), spawn "mpc consume"  )
    -- repeat       -- toggle repeat mode, or specify state
    ,  (((modMask x .|. shiftMask), xK_v          ), spawn "mpc repeat"   )


    -- Exec XBMC
    ,  (((modMask x .|. controlMask), xK_x), spawn "kodi" <+> layoutScreens 1 (fixedLayout [Rectangle 0 0 3840 1080]))
    --,  (((modMask x .|. controlMask), xK_z), spawn "xmbc" <+> withFocused (keysAbsResizeWindow(3840,1080)(0,0)))


    -- Divico remote XF86 key mode
    , ((0, xF86XK_MenuKB), submap . M.fromList $
      [
        ((0, xF86XK_WebCam  ), spawn "xscreensaver-command --lock")     -- screen lock
      , ((0, xF86XK_PowerOff), submap . M.fromList $    --  Computer Power off : XF86 key
        [
          ((0, xK_1), spawn "dbus-send --system --print-reply --dest='org.freedesktop.UPower' /org/freedesktop/UPower org.freedesktop.UPower.Suspend")                             -- suspend
        , ((0, xK_2), spawn "dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart") -- Restart
        , ((0, xK_3), spawn "dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop")    -- Shutdown
        , ((0, xK_0), kill)     -- close focused window
        ])
      , ((0, xK_0), spawn "urxvt -name urxvt-big -fn xft:Hack:bold:pixelsize=44,xft:NanumGothicCoding:bold:pixelsize=48 -fb xft:Hack:bold:pixelsize=44,xft:NanumGothicCoding:bold:pixelsize=48 -e ranger")   -- ranger big font -> workspace 9
      , ((0, xK_1), submap . M.fromList $             -- Mpd Control : XF86 key
        [
        ((0, xK_Cancel  ), spawn "mpc toggle"   )
        , ((0, xK_Left  ), spawn "mpc prev"     )
        , ((0, xK_Right ), spawn "mpc next"     )
        , ((0, xK_Up    ), spawn "mpc volume +5")
        , ((0, xK_Down  ), spawn "mpc volume -5")
        ])
      , ((0, xK_2), spawn "mpv channels.m3u")
      , ((0, xK_3), spawn "killall mpv"     )
      ])

    --- Divico Fusion HDTV7 Remote : exec XBMC , (with lirc config, xbmc mce remote conf)
    ,  ((0, xF86XK_Open         ), spawn "kodi" )
    --,  ((0, xF86XK_Open), spawn "xbmc" <+> layoutScreens 1 (fixedLayout [Rectangle 0 0 3840 1080]))
    -- Toggle Xcinerama layout mode
    ,  ((0, xF86XK_RotateWindows), submap . M.fromList $
        [
        -- Default Layout : "open" + "1" == "ALT-TAB" + "1" (in Fusion remote key)
        ((  0, xK_1), rescreen)
        -- Xcinerama Single layout : "open" + "2" == "ALT-TAB" + "2" (
        , ((0, xK_2), layoutScreens 1 (fixedLayout [Rectangle 0 0 3840 1080]))
        -- Status Bar Toggle Mode : "ALT-TAB" + "0"
        , ((0, xK_0), sendMessage ToggleStruts)
        ])

    ]

    where
        -- this simply means "find the scratchpad in myScratchPads that is 
        -- named terminal and launch it"
        scratchTerm   = namedScratchpadAction myScratchPads "terminal"
        scratchMixer  = namedScratchpadAction myScratchPads "mixer"
        scratchVideo  = namedScratchpadAction myScratchPads "video"
        scratchPlayer = namedScratchpadAction myScratchPads "player"
        scratchMpd    = namedScratchpadAction myScratchPads "mpd"


-- Define keys to remove
keysToRemove x = 
    [
    -- Unused dmenu binding
      (modMask x,               xK_p)
    -- Unused gmrun binding
    , (modMask x .|. shiftMask, xK_p)
    -- Unused close window binding
    , (modMask x .|. shiftMask, xK_c)
    -- Unused xmonad recompile, restart logout binding
    , (modMask x,               xK_q)
    , (modMask x .|. shiftMask, xK_q)
    ]

-- Delete the keys combinations we want to remove
strippedKeys x = foldr M.delete (keys defaultConfig x) (keysToRemove x)
-- Compose all my new key combinations.
myKeys x       = M.union (strippedKeys x) (M.fromList  (keysToAdd x  ))

------------------------------------------------------------------------        
-- Key bindings. Add, modify or remove key bindings here.
-------------------------------------------------------------------------------
inskeys :: XConfig l -> [((KeyMask, KeySym), X ())]
inskeys conf@XConfig {XMonad.modMask = modm} =
    -- Standard Default Keybinding
    --
    -- launch a terminal
    [ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)

    -- launch dmenu
    --, ((modm,               xK_p     ), spawn "dmenu_run")

    -- launch gmrun
    --, ((modm .|. shiftMask, xK_p     ), spawn "gmrun")

    -- close focused window
    --, ((modm .|. shiftMask, xK_c     ), kill)

     -- Rotate through the available layout algorithms
    , ((modm,               xK_space ), sendMessage NextLayout)

    --  Reset the layouts on the current workspace to default
    --, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)

    -- Resize viewed windows to the correct size
    , ((modm,               xK_n     ), refresh)

    -- Move focus to the next window
    , ((modm,               xK_Tab   ), windows W.focusDown)

    -- Move focus to the next window
    , ((modm,               xK_j     ), windows W.focusDown)

    -- Move focus to the previous window
    , ((modm,               xK_k     ), windows W.focusUp  )

    -- Move focus to the master window
    , ((modm,               xK_m     ), windows W.focusMaster)

    -- Swap the focused window and the master window
    , ((modm,               xK_Return), windows W.swapMaster)

    -- Swap the focused window with the next window
    , ((modm .|. shiftMask, xK_j     ), windows W.swapDown  )

    -- Swap the focused window with the previous window
    , ((modm .|. shiftMask, xK_k     ), windows W.swapUp    )

    -- Shrink the master area
    , ((modm,               xK_h     ), sendMessage Shrink)

    -- Expand the master area
    , ((modm,               xK_l     ), sendMessage Expand)

    -- Push window back into tiling
    , ((modm,               xK_t     ), withFocused $ windows . W.sink)

    -- Increment the number of windows in the master area
    , ((modm              , xK_comma ), sendMessage (IncMasterN 1))

    -- Deincrement the number of windows in the master area
    , ((modm              , xK_period), sendMessage (IncMasterN (-1)))

    -- Toggle the status bar gap
    -- Use this binding with avoidStruts from Hooks.ManageDocks.
    -- See also the statusBar function from Hooks.DynamicLog.
    --
    --, ((modm              , xK_b     ), sendMessage ToggleStruts)

    -- Quit xmonad
    --, ((modm .|. shiftMask, xK_q     ), io (exitWith ExitSuccess))

    -- Restart xmonad
    --, ((modm              , xK_q     ), spawn "xmonad --recompile; xmonad --restart")

    -- Run xmessage with a summary of the default keybindings (useful for beginners)
    --, ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -"))
    ]
    ++

    --
    -- 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)]]

    ++
    --
    -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
    -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
    --
    [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
        | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
        , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
    -- End of Standard Default Key binding

    -- Set key bindings with customKeys:
    -- unbinding key, full screen toggle
    ++
    --[ ((modm,               xK_p),  spawn "rofi -show drun")     -- redefine x
    [ ((modm,               xK_o),  spawn "rofi -show drun")     -- redefine x
    , ((modm,               xK_q),  spawn "")   -- for removing keysToRemove x
    , ((modm .|. shiftMask, xK_q),  spawn "")   -- for removing keysToRemove x
    --for fullscreen toggle, visible border, status
    , ((modm,       xK_Caps_Lock),  sendMessage (XMonad.Layout.ToggleLayouts.Toggle "Full"))
    ]

    ++
    -- XMonad.Layout.BinarySpacePartition Key -- mod1Mask=altMask=Alt_L
    [ ((modm .|. mod1Mask,                  xK_l  ), sendMessage $ ExpandTowards R)
    , ((modm .|. mod1Mask,                  xK_h  ), sendMessage $ ExpandTowards L)
    , ((modm .|. mod1Mask,                  xK_j  ), sendMessage $ ExpandTowards D)
    , ((modm .|. mod1Mask,                  xK_k  ), sendMessage $ ExpandTowards U)
    , ((modm .|. mod1Mask .|. controlMask , xK_l  ), sendMessage $ ShrinkFrom R   )
    , ((modm .|. mod1Mask .|. controlMask , xK_h  ), sendMessage $ ShrinkFrom L   )
    , ((modm .|. mod1Mask .|. controlMask , xK_j  ), sendMessage $ ShrinkFrom D   )
    , ((modm .|. mod1Mask .|. controlMask , xK_k  ), sendMessage $ ShrinkFrom U   )
    , ((modm .|. mod1Mask,                  xK_r  ), sendMessage Rotate           )
    , ((modm .|. mod1Mask,                  xK_s  ), sendMessage Swap             )
    , ((modm .|. mod1Mask,                  xK_n  ), sendMessage FocusParent      )
    , ((modm .|.              controlMask , xK_n  ), sendMessage SelectNode       )
    , ((modm .|.              shiftMask   , xK_n  ), sendMessage MoveNode         )
    , ((modm .|. mod1Mask,                  xK_a  ), sendMessage Balance          )
    , ((modm .|. mod1Mask .|. shiftMask,    xK_a  ), sendMessage Equalize         )
    ]

    ++
    -- Minimize, Maxmize
    [
   -- Makes it possible to minimize windows, temporarily removing them from the
   -- layout until they are restored.
   -- minimize the focused window then focus down 
      ((modm, xK_minus        ), withFocused minimizeWindow <+> windows W.focusDown)

    -- restore the next minimized window. then focus up.
    , ((modm, xK_equal        ), sendMessage RestoreNextMinimizedWin <+> windows W.focusUp)

    -- Temporarily yanks the focused window out of the layout to mostly fill
    -- the screen : maxmize toggle key.
    , ((modm, xK_backslash    ), withFocused (sendMessage . maximizeRestore))

    -- a simple binding that pushes all floating windows on the current workspace back into tiling
    , ((modm .|. controlMask .|. shiftMask, xK_t), sinkAll)
    ]


-------------------------------------------------------------------------------
-- Mouse binding: default actions bound to mouse events
-------------------------------------------------------------------------------
--
--- Stadard Default mouse keybinding
--myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $

    -- mod-button1, Set the window to floating mode and move by dragging
    --[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
                                      -- >> windows W.shiftMaster))

    -- mod-button2, Raise the window to the top of the stack
    --, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))

    -- mod-button3, Set the window to floating mode and resize by dragging
    --, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
                                      -- >> windows W.shiftMaster))

    -- you may also bind events to the mouse scroll wheel (button4 and button5) 
    --]

--- Set custom mouse binding : button8/9 back/forward
--
isFloating :: Window -> X (Bool)
isFloating w = do
    ws <- gets windowset
    return $ M.member w (W.floating ws)

addMouse :: XConfig Layout -> M.Map (KeyMask, Button) (Window -> X ())
addMouse conf@(XConfig {XMonad.modMask = modMask, XMonad.mouseBindings = defaultBinds}) =
    M.fromList 
    [ -- Movement, only floating mode
      ((modMask, button1), (\w -> Main.isFloating w >>= \isF -> when (isF) $
                                  focus w >> mouseMoveWindow w 
                                          >> windows W.shiftMaster))
    -- Maximize toggle  -- scorll key press
    , ((modMask, button2), (\w -> focus w >> withFocused (sendMessage . maximizeRestore)))
    -- flexible resizing, only floating mode
    , ((modMask, button3), (\w -> Main.isFloating w >>= \isF -> when (isF) $
                                  focus w >> Flex.mouseResizeWindow w 
                                          >> windows W.shiftMaster))
    -- restore the next minimized window. then focus up. -- scroll down
    , ((modMask, button4), (\w -> focus w >> sendMessage RestoreNextMinimizedWin <+> windows W.focusUp))
    -- Miimize then focus down  -- scroll up
    , ((modMask, button5), (\w -> focus w >> withFocused minimizeWindow <+> windows W.focusDown))

    -- repeat now with alt/mod1mask: more natural window movements (as in other DE/WMs)
    , ((mod1Mask, button1), \w -> focus w >> mouseMoveWindow w
                                          >> windows W.shiftMaster)
    --
    , ((mod1Mask, button2), windows . (W.shiftMaster .) . W.focusWindow)
    --
    , ((mod1Mask, button3), \w -> focus w >> Flex.mouseResizeWindow w
                                          >> windows W.shiftMaster)
    ]

myMouse layout = addMouse layout `M.union`mouseBindings defaultConfig layout


-------------------------------------------------------------------------------
-- Fade Windows
-------------------------------------------------------------------------------
-- FadeHook
--
-- need compositer: xcompmgr or compton
-- xcompmgr -cCfF
-- xcompmgr -c -t-5 -l-5 -r4Z.2 -o.55"
myFadeHook = composeAll [isUnfocused --> transparency 0.2
                        ,                opaque
                        ]

-------------------------------------------------------------------------------
-- Remove Border Specific Windows
-------------------------------------------------------------------------------
removeBordersEventHook :: Event -> X All
removeBordersEventHook ev = do
    whenX (className =? "mpv" `runQuery` w) $ withDisplay $ \d ->
        io $ setWindowBorderWidth d w 0
    return (All True)
    where
        w = ev_window ev

-------------------------------------------------------------------------------
-- Event handling
-------------------------------------------------------------------------------
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
--
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
--myEventHook = mempty
--myEventHook = All

-- Note that the event hooks are run left to right (in contrast to
-- -- 'ManageHook'S which are right to left)
myEventHook = mconcat
    [ fadeWindowsEventHook
    , docksEventHook
    , ewmhDesktopsEventHook
    --, removeBordersEventHook                           -- always remove border for mpv
    , XMonad.Layout.Fullscreen.fullscreenEventHook       -- mpv "f" key: mpv config value: --x11-netwm=auto, works in floating mode, possible 2 screen full
    --, XMonad.Hooks.EwmhDesktops.fullscreenEventHook    -- mpv "f" key: mpv config value: --x11-netwm=yes,  works in tiling mode, only 1 screen full
    , positionStoreEventHook
    , handleEventHook def ]


-------------------------------------------------------------------------------
-- Status bars and logging
-------------------------------------------------------------------------------
--
-- Workspace Appearance
--
-- Workspace dzen bar (~/.xmonad/lib/[Dzen.hi, Dzen.hs, Dzen.o])
myStatusBar :: DzenConf
myStatusBar = DzenConf {
    x_position    = Just 601
    , y_position  = Just 0
    , width       = Just 720             -- 1320 1920
    , Dzen.height = Just 16 
    , alignment   = Just Centered        -- LeftAlign, RightAlign
    , Dzen.font   = Just myDzenFont
    , fg_color    = Just (myColor FG 0)  -- (myColor BG 0)  --312e39
    , bg_color    = Just (myColor BG 0)  -- "#312e39" --"#000000" --33303b
    , exec        = []
    , addargs     = []
}

-- Log Hook:
--
-- Log hook that prints out everything to a dzen handler
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-DynamicLog.html
-- https://github.com/xmonad/xmonadcontrib-reenberg/blob/master/XMonad/Hooks/DynamicLog.hs
-- http://xmonad.org/xmonad-docs/xmonad-contrib/src/XMonad-Util-WorkspaceCompare.html

myLogHook h = dynamicLogWithPP $ myPrettyPrinter h

-- Pretty printer for dzen workspace bar
myPrettyPrinter h = dzenPP {
    --ppCurrent         = dzenColor "#000000" "#e5e5e5"
    ppCurrent           = dzenColor (myColor FG    0) (myColor Magenta 0)  --"#783e57" --"#9144ab"
    , ppVisible         = dzenColor (myColor White 0) (myColor Blue    0)  --"#c0a79a" "#615772" --"#3a3a3a" 
    , ppHidden          = dzenColor (myColor White 0) (myColor Black   0)  --"#c0a79a" "#33303b" --"#e5e5e5"
    , ppHiddenNoWindows = dzenColor (myColor BG    0) (myColor BG      0)  --"#312e39" "#312e39" --"#444444" 
    , ppUrgent          = dzenColor (myColor Red   0) (myColor White   0)  --"#312e39". dzenStrip
    , ppSep             = dzenColor (myColor FG    0) (myColor BG      1)  ""  --" || "
    , ppWsSep           = ""
    , ppTitle           = dzenColor (myColor FG    0) (myColor Magenta 0) . ("  " ++) . dzenEscape . (++ "  ")  --"#783e57"
    , ppLayout          = dzenColor (myColor White 0) (myColor Blue    0) . ("  " ++) . dzenEscape . (++ "  ")  --"#c0a79a" "#615772"
    --, ppOrder           = reverse
    --, ppOrder           = \(ws,l,_,xs) -> [l,ws] ++ xs
    --, ppOrder           = \(ws:_:t:_) -> [ws,t]     -- workspace:title,  no layout
    , ppSort            = getSortByXineramaRule
    --, ppExtras          = [ padL loadAvg, logCmd "xmonad --version" ]
    , ppOutput          = hPutStrLn h
}


myWsBar :: String
myWsBar = "~/.cabal/bin/xmobar ~/.config/xmobar/xmobarrc-workspace"

myxmobarLogHook j = dynamicLogWithPP . namedScratchpadFilterOutWorkspacePP  $ myWsPrinter j     -- name~filter~PP: not displaying the NSP workspace

-- Pretty printer for xmobar workspace bar
myWsPrinter j = xmobarPP {
    ppCurrent           = xmobarColor (myColor FG    0) (myColor Magenta 0) . wrap  "  ●" ""                                        --"#783e57" "#9144ab"
    , ppVisible         = xmobarColor (myColor White 0) (myColor Red     0) . wrap  "  ♼" ""                                        --"#c0a79a" "#615772" --"#3a3a3a" 
    , ppHidden          = xmobarColor (myColor White 0) (myColor BG      0) . wrap  "  ○" ""                                        --"#c0a79a" "#33303b" --"#e5e5e5"
    , ppHiddenNoWindows = xmobarColor (myColor BG    0) (myColor BG      0) . \s -> ""                                              --"#312e39" "#312e39" --"#444444" 
    , ppUrgent          = xmobarColor (myColor Red   0) (myColor BG      0) . wrap  "  ◌" ""                                        --"#312e39". dzenStrip
    , ppSep             = xmobarColor (myColor FG    0) (myColor BG      0) ""                                                      --" || "
    , ppWsSep           = ""
    , ppTitle           = xmobarColor (myColor FG    0) (myColor Magenta 0) . ("   "   ++) . dzenEscape . (++ "   ") . shorten 94   --"#783e57"
    , ppLayout          = xmobarColor (myColor White 0) (myColor Magenta 0) . ("  ▒ "  ++) . dzenEscape . (++ " ▒" )                --"#c0a79a" "#615772"
    --, ppOrder           = reverse
    --, ppOrder           = \(ws:l:_:xs) -> [l,ws] ++ xs
    --, ppOrder           = \(ws:_:t:_) -> [ws,t]                                                                                   -- workspace:title,  no layout
    , ppOrder           = \(ws:l:t:_) -> [ws,l,t]                                                                                   -- workspace, layout, title
    , ppSort            = getSortByXineramaRule
    --, ppExtras          = [ padL loadAvg, logCmd "xmonad --version" ]
    , ppOutput          = hPutStrLn j
}


-------------------------------------------------------------------------------
-- Startup Hook
-------------------------------------------------------------------------------
--
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q.  Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
--myStartupHook = return ()

-- startup program
myStartupHook :: X()
myStartupHook = do
    -- Setting the X cursor
    spawn "xsetroot -cursor_name RingO"

    -- cursor disappleance
    --spawn "unclutter -root -idle 5"

    -- Num Lock key On
    spawn "numlockx on"

    -- Adjust mornitor
    spawn "xrandr --auto --output HDMI3 --primary --mode 1920x1080 --left-of HDMI1"
    --spawn "xset b off"
    --spawn "xset s off"
    --spawn "xset -dpms"

    -- Screen Saver
    --spawn "xscreensaver -no-splash"

    -- xmodemap
    spawn "xmodemap $HOME/.Xmodemap"

    -- Fcitx Input method
    spawn "fcitx-autostart"

    -- Load .Xresources
    spawn "xrdb -merge .Xresources"
    spawn "xrdb -merge .Xdefaults"

    -- Usb Auto Mount
    --spawn "udiskie -q -N -a -t"

    -- Run a Composite manager -- $ xdpyinfo | grep Composite
    -- http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions
    --spawn "xcompmgr -cfF -t-5 -l-5 -r4Z.2 -o.55"
    spawn "compton --config $HOME/.config/compton/compton.conf"

    -- notify-osd
    spawn "dunst"

    -- Set solid background 
    spawn $ "hsetroot -solid" ++ " \'" ++ (myColor BG 0) ++ "\'"
    -- Background image
    spawn "sleep 1; $HOME/.fehbg"
    --spawn "feh --no-xinerama --bg-fill ~/Wallpaper/3840x1080_Anime_1382081479862.png"
    --spawn "nitrogen --restore"

    -- Calendar Start (hide, no tray)
    spawn "orage"

    -- telegram
    spawn "sleep 2; telegram-desktop"

    -- screenkey
    spawn "sleep 3; screenkey"

    -- Load Music Player Daemon, then auto start
    --spawn "mopidy"
    spawn "mpd"
    spawn "sleep 4;ncmpcpp play"


    -- Load Volume-Icon
    --spawn "volumeicon"

    -- mail client
    spawn "sleep 1 && urxvt -e mutt -F $XDG_CONFIG_DIR/mutt/muttrc "
    -- tv channel epg
    spawn "sleep 1 && qutebrowser --backend webengine http://192.168.0.5:9981"

    nextScreen

    -- mpd, mopidy client
    spawn "(sleep 6); urxvt -e ~/.ncmpcpp/ncmpcpp_tmux"
    spawn "(sleep 8); killall ncmpcpp;  urxvt -title ncmpcpp_tmux -e ~/.ncmpcpp/ncmpcpp_tmux"

    -- Load JTBC NEWS channel play
    spawn "sleep 3; mpv --fs-screen=all --no-keepaspect --profile tv --playlist-pos 5 channel.m3u"

    -- Load Network mornitering applet
    --spawn "nm-applet"


-------------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.
-------------------------------------------------------------------------------
--
-- Run xmonad with the settings you specify. No need to modify this.
--
--main = xmonad defaults

-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
--defaults = def {
      -- simple stuff
        --terminal           = myTerminal,
        --focusFollowsMouse  = myFocusFollowsMouse,
        --clickJustFocuses   = myClickJustFocuses,
        --borderWidth        = myBorderWidth,
        --modMask            = myModMask,
        --workspaces         = myWorkspaces,
        --normalBorderColor  = myNormalBorderColor,
        --focusedBorderColor = myFocusedBorderColor,

      -- key bindings
        --keys               = myKeys,
        --mouseBindings      = myMouseBindings,

      -- hooks, layouts
        --layoutHook         = myLayout,
        --manageHook         = myManageHook,
        --handleEventHook    = myEventHook,
        --logHook            = myLogHook,
        --startupHook        = myStartupHook
    --}

defaults = def {
    -- Simple stuff
        terminal             = myTerminal
        , focusFollowsMouse  = myFocusFollowsMouse
        , clickJustFocuses   = myClickJustFocuses
        , borderWidth        = myBorderWidth
        , modMask            = myModMask
        , workspaces         = myWorkspaces
        , normalBorderColor  = myNormalBorderColor
        , focusedBorderColor = myFocusedBorderColor

    -- key bindings
        , keys               = myKeys <+> customKeys (const []) inskeys
        , mouseBindings      = myMouse

    -- hooks, layouts
        , layoutHook         = myLayouts
        , manageHook         = myManageHook
        , handleEventHook    = myEventHook
    }

         `additionalKeysP`
            [
            -- restart xmonad, recompile & restart xmonad
              ("M-S-q"  , spawn "killall xmobar dzen2 trayer; xmonad --restart"                      )      -- for trayer icon redraw
            , ("M-C-S-q", spawn "killall xmobar dzen2 trayer; xmonad --recompile && xmonad --restart")
            --
            -- "M-o" : rofi
            --
            -- dmenu2
            --, ("M-o"  , spawn "x=$(~/.cabal/bin/yeganesh -x -- -i -l 4 -p drun: -fn hack-10 -nb '#312e39' -nf '#c0a79a' -sb '#783e57' -sf '#ffffff') && exec $x")
            , ("M-p"    , spawn $ "x=$(~/.cabal/bin/yeganesh -x -- -i -s 0 -name 'dmenu' -o 1.0 -dim 0.5 -dc '" 
                                ++ (myColor Magenta 0)
                                ++ "' -l 0 -h 20 -p '● ♼ ○ ▒ ▒' -fn '" 
                                ++ myDmenuFont 
                                ++ "' -x 500 -y 80 -w 920  -nb '"    -- -y 530
                                ++ (myColor BG      0) 
                                ++ "' -nf '" 
                                ++ (myColor White   0) 
                                ++ "' -sb '" 
                                ++ (myColor Magenta 0) 
                                ++ "' -sf '"
                                ++ (myColor FG      0)
                                ++ "') && exec $x")
            -- dmeu likely launcher
            , ("M-C-p"  ,       prompt ("urxvt" ++ " -e") myPromptConfig)   -- for cli
            , ("M-C-S-p",       runOrRaisePrompt          myPromptConfig)   -- for gui
            --, ("M-S-p",   shellPrompt myPromptConfig)

            --- Toggle Fullscreen, Borders, Mirror
            -- switch to Full (with top.bottom status visible). need avoidstruts
            , ("M-C-<Space>",   sendMessage (XMonad.Layout.ToggleLayouts.Toggle "Full" ))
            -- same to Toggle "Full"
            --, ("M-C-<Space>", sendMessage ToggleLayout)
            -- switch to Full with no borders, no statusbar
            , ("M-f"        ,   sendMessage $ XMonad.Layout.MultiToggle.Toggle NBFULL   )
            -- switch to Full layout, border, no statusbar
            , ("M-C-f"      ,   sendMessage $ XMonad.Layout.MultiToggle.Toggle FULL     )
            -- Remove borders all windows in workspace
            , ("M-C-S-b"    ,   sendMessage $ XMonad.Layout.MultiToggle.Toggle NOBORDERS)
            -- Toggle the border of the currently focused window
            , ("M-C-b"      ,   withFocused toggleBorder                                )
            -- he Mirror transformation:
            , ("M-C-S-m"    ,   sendMessage $ XMonad.Layout.MultiToggle.Toggle MIRROR   )   -- bottom xmobar toggle struct. then properly works.

            -- Background images
            --, ("M-`"    , spawn "urxvt -e $HOME/.fehbg; mpc volume +1; sleep 1; mpc volume -1")
            , ("M-`"    , spawn "urxvt -e $HOME/.fehbg;")
            --, ("M-S-`"  , spawn $ "urxvt -e hsetroot -solid" ++ " \'" ++ (myColor BG 0) ++ "\'; mpc volume +1; sleep 1; mpc volume -1")
            , ("M-S-`"  , spawn $ "urxvt -e hsetroot -solid" ++ " \'" ++ (myColor BG 0) ++ "\'")

            -- show messege of default xmonad keybindings 
            , ("M-S-/"  , spawn ("echo \"" ++ help ++ "\" | gxmessage -geometry 900x700 -font monospace -file -"))

            --, ("<XF86Open>"            , spawn "kodi")
            --, ("<XF86AudioRaiseVolume>", spawn "amixer set Master 1%+")
            --, ("<XF86AudioLowerVolume>", spawn "amixer set Master 1%-")
            --, ("<XF86AudioMute>"       , spawn "amixer set Master toggle")
            -- Media Keys
            --, ("0x1008ff12" , spawn "vol mute") -- XF86AudioMute
            --, ("0x1008ff11" , spawn "vol down") -- XF86AudioLowerVolume
            --, ("0x1008ff13" , spawn "vol up")   -- XF86AudioRaiseVolume
            ]



main :: IO ()
main = do
    wsxmobar     <- spawnPipe myWsBar                   -- workspace xmobar bar
    --wsdzenbar    <- spawnDzen myStatusBar             -- workspace dzen bar

    xmproc       <- spawnPipe "~/.cabal/bin/xmobar"     -- bottom monitoring xmobar 

    spawn "sleep 1; trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --width 10 --transparent true --alpha 255 --tint 0x312e39 --height 16 --distancefrom right --distance 420"    -- transparent: alpha 255, --distancefrom right --distance 121" 

    args <- getArgs
    when ("--replace" `elem` args) replace

    xmonad $ withUrgencyHook NoUrgencyHook $ ewmh defaults {
    -- logHook
        logHook       = composeAll
            [
            fadeWindowsLogHook myFadeHook
            , myxmobarLogHook wsxmobar                            -- workspace status xmobar
            --, myLogHook wsdzenbar                               -- workspace status dzenbar
            , ewmhDesktopsLogHook
            , logHook def
            >> updatePointer (0.5, 0.5) (0.5, 0.5)                -- moves pointer to center of focused window
            ]
    -- startupHook
        --, startupHook      = setWMName "LG3D" <+> myStartupHook
        , startupHook = when (null args) $ myStartupHook          -- when args is "--restart", is not executed startupHook
    }

-------------------------------------------------------------------------------
-- Help
-------------------------------------------------------------------------------
--
-- | Finally, a copy of the default bindings in simple textual tabular format.
-- help key : mode4mask + ?    -- $ pacman -S xorg-xmessage gxmessage
help :: String
help = unlines 
    [ "Default Standard Keybindings:"
    , ""
    , "The default modifier key is 'mod4mask'=='window key'"
    , ""
    , "-- launching and killing programs"
    , "mod-shft-Enter        Launch xterminal"
    , "mod-p                 (Launch dmenu) --> Launch dmenu2"
    , "mod-shft-p            (Launch gmrun) --> Launch mpd toggle"
    , "(mod-shft-c)          Close/kill the focused window, but not copies"
    , " --> mod-c"
    , "mod-Space             Rotate through the available layout algorithms"
    , "mod-shft-Space        Reset the layouts on the current workSpace to default"
    , "mod-n                 Resize/refresh viewed windows to the correct size"
    , ""
    , "-- move focus up or down the window stack"
    , "mod-Tab               Move focus to the next window"
    , "mod-shft-Tab          Move focus to the previous window"
    , "mod-j                 Move focus to the next window"
    , "mod-k                 Move focus to the previous window"
    , "mod-m                 Move focus to the master window"
    , ""
    , "-- modifying the window order"
    , "mod-Return            Swap the focused window and the master window"
    , "mod-shft-j            Swap the focused window with the next window"
    , "mod-shft-k            Swap the focused window with the previous window"
    , ""
    , "-- resizing the master/slave ratio"
    , "mod-h                 Shrink the master area"
    , "mod-l                 Expand the master area"
    , ""
    , "-- floating layer support"
    , "mod-t                 Push window back into tiling; unfloat and re-tile it"
    , ""
    , "-- increase or decrease number of windows in the master area"
    , "mod-comma (mod-,)     Increment the number of windows in the master area"
    , "mod-period (mod-.)    Deincrement the number of windows in the master area"
    , ""
    , "-- quit, or restart"
    , "mod-shft-q            (Quit xmonad)    --> restart xmonad"
    , "mod-q                 (Restart xmonad) --> key disable"
    , "mod-control-shift-q   Restart xmonad   --> recompile & restart xmoand"
    , ""
    , "-- Workspaces & screens"
    , "mod-[1..0]            Switch to workSpace N"
    , "mod-shft-[1..0]       Move client to workspace N"
    , "mod-{w,e,r}           Switch to physical/Xinerama screens 1, 2, or 3"
    , "mod-shft-{w,e,r}      Move client to screen 1, 2, or 3"
    , ""
    , "-- Mouse bindings: default actions bound to mouse events (mod --> mod1mask)"
    , "mod1-button1           Set the window to floating mode and move by dragging"
    , "mod1-button2           Raise the window to the top of the stack"
    , "mod1-button3           Set the window to floating mode and resize by dragging"
    ]

** vivaldi minimal UI
* "Vimium" extension: https://chrome.google.com/webstore/deta … cmeb?hl=en
* "No Scroll Bars Please!" extension: https://chrome.google.com/webstore/deta … imdn?hl=en
* Top menu hide :  Ctrl + F11 toggle key
    /opt/vivaldi/resources/vivaldi/style/common.css   -> append

/*
Vivaldi UI Customisations
https://forum.vivaldi.net/topic/10629/vivaldi-ui-customisations
*/

/* Vivaldi Top Menu Hide */
#header {
        min-height: 0 !important;
        z-index: auto !important;
}

.win .topmenu {
        color: #fff;
        position: absolute;
        top: 5px;
        left: 98px;
}

.topmenu+#tabs-container.top {
        border-bottom: 1px solid;
        position: absolute;
        top: 62px;
        width: 100%;
        z-index: 1 !important;
}

#tabs-container.bottom #tabs, #tabs-container.top #tabs {
        height: 30px !important;
}

.toolbar.toolbar-addressbar {
        padding-right: 100px;
}

.button-toolbar.rewind{
        display: none;
}

.button-toolbar.next{
        display: none;
}

.button-toolbar.home{
        display: none;
}

#pagetitle{
        display: none;
}

.addressfield {
        margin-left: 10px !important;
}

.bookmark-bar {
        margin-bottom: 37px;
}

.window-buttongroup {
        z-index: 2;
}


/*  Vivaldi tab scroll bar*/
*::-webkit-scrollbar-thumb {
    min-height: 5px ! important;
    background: #554757 ! important;
}

*::-webkit-scrollbar-corner,
*::-webkit-scrollbar-track {
background: #312e39 ! important;
}

*::-webkit-scrollbar {
    width: 5px ! important;
    height: 5px ! important;
    background: #1e1e1e ! important;
    border: 1px solid #252525 ! important;
}

*::-webkit-scrollbar-button {
display: none ! important;
}

*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-track {
border: 0 ! important;
box-shadow: none ! important;
}

Last edited by yoman18 (2016-12-23 17:10:09)

Offline

#172 2018-03-03 15:49:29

cameo
Member
Registered: 2012-08-18
Posts: 119

Re: Share your xmonad desktop!

Rebuilding an old config of mine.

Arch scrotie 2018-feb

pastebin

Offline

#173 2018-09-01 16:19:39

Paul-S
Member
From: Wales
Registered: 2008-02-04
Posts: 353

Re: Share your xmonad desktop!

Few years since the last post and barely changed at all, has hardly changed for the last 8 years.

XrGrPvAt.jpg

AWTmF4Zt.jpg

Cheers
Paul-S

Offline

#174 2022-03-06 07:04:21

rcht
Member
Registered: 2021-08-10
Posts: 6

Re: Share your xmonad desktop!

~/.xmonad/xmonad.hs:

import System.Directory
import System.IO (hPutStrLn)

import XMonad

import XMonad.Actions.CycleWS
import XMonad.Actions.NoBorders

import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.WindowSwallowing

import XMonad.Layout.Gaps
import XMonad.Layout.Magnifier
import XMonad.Layout.Spacing
import XMonad.Layout.ShowWName
import XMonad.Layout.SimplestFloat

import XMonad.Util.Run
import XMonad.Util.SpawnOnce

import Data.Monoid
import System.Exit

import qualified XMonad.StackSet    as W
import qualified Data.Map           as M
import qualified Data.Maybe         as DM




myTerminal           = "alacritty"

myFocusFollowsMouse  :: Bool
myFocusFollowsMouse  = True

myBorderWidth        = 2

myModMask            = mod4Mask

myWorkspaces         = ["MAIN","DEV","CONF","MEET","VMC","BG","SYS","VIRT","MISC"] 
myNormalBorderColor  = "#000000"
myFocusedBorderColor = "#888888"

toggleFullscreen :: X () 
toggleFullscreen = do
    sendMessage ToggleStruts
    withFocused toggleBorder




myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
    [ ((modm                , xK_t     ), spawn $ XMonad.terminal conf                       )
    , ((modm .|. shiftMask  , xK_t     ), spawn "konsole --hide-menubar"                     )
    , ((modm                , xK_p     ), spawn "LC_CTYPE=en_US.utf8 rofi -show run"         )
    , ((modm .|. shiftMask  , xK_b     ), spawn "LC_CTYPE=en_US.utf8 rofi-bluetooth"         )
    , ((modm .|. shiftMask  , xK_p     ), spawn "rofi-pdf"                                   )
    , ((modm                , xK_q     ), kill                                               )
    , ((modm                , xK_space ), sendMessage NextLayout                             )
    , ((modm .|. controlMask, xK_t     ), toggleFullscreen                                   )
    , ((modm .|. shiftMask  , xK_space ), setLayout $ XMonad.layoutHook conf                 )
    , ((modm                , xK_n     ), refresh                                            )
    , ((modm                , xK_Tab   ), windows W.focusDown                                )
    , ((modm                , xK_j     ), windows W.focusDown                                )
    , ((modm                , xK_k     ), windows W.focusUp                                  )
    , ((modm                , xK_m     ), windows W.focusMaster                              )
    , ((modm                , xK_Return), windows W.swapMaster                               )
    , ((modm .|. shiftMask  , xK_j     ), windows W.swapDown                                 )
    , ((modm .|. shiftMask  , xK_k     ), windows W.swapUp                                   )
    , ((modm                , xK_h     ), sendMessage Shrink                                 )
    , ((modm                , xK_l     ), sendMessage Expand                                 )
    , ((modm .|. shiftMask  , xK_Return), withFocused $ windows . W.sink                     )
    , ((modm                , xK_comma ), sendMessage (IncMasterN 1)                         )
    , ((modm                , xK_period), sendMessage (IncMasterN (-1))                      )
    , ((modm                , xK_b     ), spawn "firefox &"                                  )
    , ((modm .|. shiftMask  , xK_q     ), io exitSuccess                                     )
    , ((modm .|. shiftMask  , xK_h     ), spawn "xmonad --recompile; xmonad --restart"       )
    , ((modm .|. shiftMask  , xK_g     ), sendMessage ToggleGaps                             )
    , ((modm                , xK_a     ), spawn "xmonad-keys-gui"                            )
    , ((modm .|. shiftMask  , xK_c     ), spawn "flameshot gui"                              )
    , ((modm                , xK_c     ), spawn "XDG_CURRENT_DESKTOP=KDE cantata"            )
    , ((modm .|. shiftMask  , xK_a     ), spawn "killall flameshot"                          )
    , ((modm .|. controlMask, xK_plus  ), sendMessage MagnifyMore                            )
    , ((modm .|. controlMask, xK_minus ), sendMessage MagnifyLess                            )
    , ((modm .|. controlMask, xK_m     ), sendMessage Toggle                                 )
    , ((modm .|. shiftMask  , xK_Right ), shiftToNext                                        )
    , ((modm .|. shiftMask  , xK_Left  ), shiftToPrev                                        )
    , ((modm                , xK_g     ), spawn "GalaxyBudsClient_Linux_64bit_Portable.bin &")
    , ((0                   , xK_F2    ), spawn "amixer -q sset Master 3%-"                  )
    , ((0                   , xK_F3    ), spawn "amixer -q sset Master 3%+"                  )
    , ((0                   , xK_F1    ), spawn "amixer -D pulse set Master 1+ toggle"       )
    ]
    ++
    [((m .|. modm, k), windows $ f i)
        | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
        , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
    ++
    [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
        | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
        , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]




-- gestures = M.fromList
  -- [ ( [ L ], \_ -> nextWS )
  -- , ( [ U ], \_ -> nextWS )
  -- , ( [ R ], \_ -> prevWS )
  -- , ( [ D ], \_ -> prevWS )
  -- ]





myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
    [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
                                       >> windows W.shiftMaster))
    , ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
    , ((modm, button3), (\w -> focus w >> mouseResizeWindow w
                                       >> windows W.shiftMaster))
    -- , ((0, button1), mouseGesture gestures)
    ]




mySWNConfig :: SWNConfig
mySWNConfig = def{
    swn_font      = "xft:Fira Code:bold:size=50"
    , swn_fade    = 0.25
    , swn_bgcolor = "#000000"
    , swn_color   = "#ffffff"
}




myLayout =  magnifierOff 
         $  showWName' mySWNConfig  
         $  avoidStruts myDefaultLayout
         where
            myDefaultLayout = tiled 
                          ||| Mirror tiled 
                          ||| Full 
                          ||| simplestFloat
            tiled   = Tall nmaster delta ratio
            nmaster = 1
            ratio   = 1/2
            delta   = 3/100




myManageHook = composeAll
    [ className =? "MPlayer"        --> doFloat
    , resource  =? "desktop_window" --> doIgnore
    , resource  =? "kdesktop"       --> doIgnore ]




myEventHook = swallowEventHook (className =? "Alacritty") (return True)




myStartupHook = do
    spawnOnce "nitrogen --restore &"
    spawnOnce "picom &"
    spawnOnce "~/.local/bin/wifi-connect &"
    spawnOnce "yakuake &"





myWorkspaceIndices = M.fromList $ zipWith (,) myWorkspaces [1..] 

clickable ws = "<action=xdotool key super+"++show i++">"++ws++"</action>"
    where i = DM.fromJust $ M.lookup ws myWorkspaceIndices





main = do
    xmproc <- spawnPipe "LC_CTYPE=en_US.utf8 xmobar -x 0 $HOME/.xmonad/xmobar.hs"
    xmonad $ ewmh $ docks $ def{
        terminal           = myTerminal          ,
        focusFollowsMouse  = myFocusFollowsMouse ,
        borderWidth        = myBorderWidth       ,
        modMask            = myModMask           ,
        workspaces         = myWorkspaces        ,
        normalBorderColor  = myNormalBorderColor ,
        focusedBorderColor = myFocusedBorderColor,

        keys               = myKeys              ,
        mouseBindings      = myMouseBindings     ,

        layoutHook         = myLayout            ,
        manageHook         = myManageHook        ,
        handleEventHook    = myEventHook         ,
        logHook            = dynamicLogWithPP $ xmobarPP {
            ppOutput          = hPutStrLn xmproc,
            ppCurrent         = xmobarColor "#ccff00" "" . wrap "[" "]" . clickable,
            ppVisible         = xmobarColor "#ccff00" ""                . clickable,
            ppHidden          = xmobarColor "#ccff00" ""                . clickable,
            ppHiddenNoWindows = xmobarColor "#888888" ""                . clickable,
            ppTitle           = xmobarColor "#ffffff" "" . shorten 50              ,
            ppSep             =  "  "                                              ,
            ppUrgent          = xmobarColor "#C45500" "" . wrap "!" "!" . clickable,
            ppExtras          = []                                                 ,
            ppOrder           = \(ws:l:t:ex) -> ws:[l]
        },
        startupHook        = myStartupHook
    }

~/.xmonad/xmobar.hs:

Config { font = "xft:Roboto Mono:size=11:bold:antialias=true"
       , bgColor = "black"
       , fgColor = "grey"
       , position = Top
       , lowerOnStart = True
       , commands = [ Run Cpu [] 10
                    , Run Uptime ["-t", "Up: <hours>h <minutes>m"] 10
                    , Run Wireless "wlp0s20f3" ["-t","Wlan: <essid>"] 10
                    , Run Memory [ "-t", "Mem: <usedratio>%" ] 10
                    , Run Battery ["-t", "Batt: <left>% <timeleft>"] 10
                    , Run UnsafeStdinReader
                    -- , Run Com "/home/rachit/.local/bin/systraypad" [] "traypad" 100
    		    , Run Date "%H:%M:%S %a %b %_d " "date" 10
                    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "<icon=/home/rachit/.xmonad/haskell.xpm/>  %UnsafeStdinReader% }{ <fc=#ff1a00> %uptime% </fc><fc=#ff8d00> %wlp0s20f3wi% </fc><fc=#e3ff00> %cpu% </fc><fc=#00ff04> %battery% </fc><fc=#0051ff> %date% </fc>"
       }

Screenshot

Not much of a ricer smile but very smooth setup

Offline

#175 2024-05-03 20:22:47

Fuxino
Member
From: Slovakia
Registered: 2014-09-26
Posts: 195

Re: Share your xmonad desktop!

Had some fun ricing my XMonad big_smile

thumb-xmonad-terminals.png thumb-xmonad-config.png
thumb-xmonad-1terminal.png thumb-xmonad-clean.png
thumb-xmonad-2screens.png

All configurations are in my dotfiles repo (but they're always work in progress): https://github.com/Fuxino/dotfiles


Arch + XMonad

Dotfiles: https://github.com/Fuxino/dotfiles

Offline

Board footer

Powered by FluxBB