diff options
author | Mattias Andrée <maandree@kth.se> | 2021-06-25 16:02:27 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-06-25 16:02:27 +0200 |
commit | 92765544ab8ef4e23e7ce5183e073f567ae7f36f (patch) | |
tree | 71b289a69aa5d83e64587697186102c2e7f43565 | |
parent | Use asroot instead of sudo and add emacs configs (diff) | |
download | dotfiles-92765544ab8ef4e23e7ce5183e073f567ae7f36f.tar.gz dotfiles-92765544ab8ef4e23e7ce5183e073f567ae7f36f.tar.bz2 dotfiles-92765544ab8ef4e23e7ce5183e073f567ae7f36f.tar.xz |
m + add claws-mail and xmonad + add ~/.hidden
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | claws-mail/Makefile | 24 | ||||
-rw-r--r-- | claws-mail/clawsrc | 612 | ||||
-rw-r--r-- | emacs/Makefile | 4 | ||||
-rw-r--r-- | filesystem/Makefile | 22 | ||||
-rw-r--r-- | xmonad/.gitignore | 1 | ||||
-rw-r--r-- | xmonad/Makefile | 16 | ||||
-rw-r--r-- | xmonad/xmonad.hs.gpp | 230 | ||||
-rw-r--r-- | xmonad/xmonad.mk | 2 |
8 files changed, 908 insertions, 3 deletions
diff --git a/claws-mail/Makefile b/claws-mail/Makefile new file mode 100644 index 0000000..200ef24 --- /dev/null +++ b/claws-mail/Makefile @@ -0,0 +1,24 @@ +.POSIX: + +install: + mkdir -p -- ~/.claws-mail + test ! -d ~/.claws-mail/clawsrc + ln -sf -- ~/.dotfiles/claws-mail/clawsrc ~/.claws-mail/clawsrc + if test -e Mail; then \ + test -d ~/Mail && \ + test ! -e ~/.var/mail && \ + mkdir -p -- ~/.var && \ + mv -- ~/Mail ~/.var/mail; \ + else \ + mkdir -p -- ~/.var/mail; \ + fi + ln -sf -- .var/mail ~/Mail + test -e ~/.hidden && grep '^Mail$' < ~/.hidden || printf '%s\n' "Mail" >> ~/.hidden + +uninstall: + -unlink -- ~/.claws-mail/clawsrc + -rmdir -- ~/.claws-mail + -unlink -- ~/Mail + -test ! -e ~/.hidden || grep -v '^Mail$' < ~/.hidden | sponge ~/.hidden + +.PHONY: install uninstall diff --git a/claws-mail/clawsrc b/claws-mail/clawsrc new file mode 100644 index 0000000..8fbec64 --- /dev/null +++ b/claws-mail/clawsrc @@ -0,0 +1,612 @@ +clamav_enable=0 +clamav_max_size=1 +clamav_recv_infected=1 +clamav_save_folder= +clamad_config_type=1 +clamd_config_folder= +clamd_host= +clamd_port=0 + +[Common] +config_version=3 +use_ext_inc=0 +ext_inc_path=/usr/bin/mh/inc +autochk_newmail=1 +autochk_interval=60 +check_on_startup=0 +open_inbox_on_inc=0 +scan_all_after_inc=0 +newmail_notify_manu=0 +newmail_notify_auto=0 +newmail_notify_cmd= +receive_dialog_mode=2 +receivewin_width=460 +receivewin_height=-1 +no_receive_error_panel=0 +close_receive_dialog=1 +save_message=1 +confirm_send_queued_messages=0 +send_dialog_mode=0 +sendwin_width=1920 +sendwin_height=1200 +outgoing_charset=UTF-8 +encoding_method=0 +outgoing_fallback_to_ascii=1 +rewrite_first_from=1 +warn_empty_subj=0 +warn_sending_many_recipients_num=0 +hide_timezone=0 +allow_jisx0201_kana=0 +auto_ext_editor=0 +forward_as_attachment=0 +redirect_keep_from=0 +undo_level=50 +compose_with_format=0 +compose_subject_format= +compose_body_format=Hello,\n +show_compose_margin=0 +type_any_header=0 +linewrap_length=60 +linewrap_quotation=0 +linewrap_pastes=0 +primary_paste_unselects=0 +linewrap_auto=0 +auto_indent=1 +autosave=1 +autosave_length=50 +autosave_encrypted=1 +warn_large_insert=1 +warn_large_insert_size=500 +enable_aspell=1 +dictionary=sv +alt_dictionary=en_GB +use_alternate_dict=1 +check_while_typing=1 +recheck_when_changing_dict=1 +misspelled_color=#cd656c +use_both_dicts=0 +reply_with_quote=1 +compose_dnd_insert_or_attach=2 +reply_account_autoselect=1 +forward_account_autoselect=1 +reedit_account_autoselect=1 +default_reply_list=1 +show_ruler=1 +reply_quote_mark=> +reply_quote_format=On %d\n%f wrote:\n\n%q\n%X +forward_quote_mark=> +forward_quote_format=\n\nBegin forwarded message:\n\n?d{Date: %d\n}?f{From: %f\n}?t{To: %t\n}?c{Cc: %c\n}?n{Newsgroups: %n\n}?s{Subject: %s\n}\n\n%M +quote_chars=> +message_font_gtk2=VectorFixed Medium 10 +print_font_gtk2=Monospace 9 +small_font_gtk2=Sans 9 +normal_font_gtk2=VectorFixed Medium 10 +bold_font_gtk2=Sans Bold 9 +use_different_print_font=0 +derive_from_normal_font=1 +custom_color1=#000000 +custom_colorlabel1=Black +custom_color2=#cd656c +custom_colorlabel2=Red +custom_color3=#32a679 +custom_colorlabel3=Green +custom_color4=#ccad47 +custom_colorlabel4=Yellow +custom_color5=#2495be +custom_colorlabel5=Blue +custom_color6=#a46eb0 +custom_colorlabel6=Lilac +custom_color7=#00a09f +custom_colorlabel7=Cyan +custom_color8=#d8d8d8 +custom_colorlabel8=Grey +custom_color9=#555555 +custom_colorlabel9=Bright black +custom_color10=#eb5e6a +custom_colorlabel10=Bright red +custom_color11=#0ec287 +custom_colorlabel11=Bright green +custom_color12=#f2ca38 +custom_colorlabel12=Bright yellow +custom_color13=#00ace0 +custom_colorlabel13=Bright blue +custom_color14=#c473d1 +custom_colorlabel14=Bright lilac +custom_color15=#00c3c7 +custom_colorlabel15=Bright cyan +display_image=1 +resize_image=1 +inline_image=1 +display_folder_unread_num=0 +newsgroup_abbrev_len=16 +translate_header=0 +default_sort_key=3 +default_sort_type=1 +use_address_book=0 +thread_by_subject=0 +date_format=%Y-(%m)%b-%d %H:%M:%S, %a, w%W +msgview_date_format=0 +next_on_delete=0 +bold_unread=1 +toolbar_style=3 +toolbar_detachable=0 +show_col_headers=1 +show_statusbar=1 +show_searchbar=1 +summary_col_show_mark=1 +summary_col_show_unread=1 +summary_col_show_subject=1 +summary_col_show_from=1 +summary_col_show_to=1 +summary_col_show_date=1 +summary_col_show_mime=1 +summary_col_show_size=1 +summary_col_show_number=0 +summary_col_show_score=0 +summary_col_show_locked=0 +summary_col_show_tags=0 +summary_col_lock=0 +summary_col_pos_mark=5 +summary_col_pos_unread=6 +summary_col_pos_mime=7 +summary_col_pos_subject=8 +summary_col_pos_from=4 +summary_col_pos_date=10 +summary_col_pos_size=11 +summary_col_pos_number=0 +summary_col_pos_score=1 +summary_col_pos_locked=2 +summary_col_pos_to=9 +summary_col_pos_tags=3 +summary_col_size_mark=10 +summary_col_size_unread=13 +summary_col_size_mime=10 +summary_col_size_subject=508 +summary_col_size_from=227 +summary_col_size_to=189 +summary_col_size_date=199 +summary_col_size_size=138 +summary_col_size_number=40 +summary_col_size_score=40 +summary_col_size_locked=13 +summary_col_size_tags=150 +folderwin_x=16 +folderwin_y=16 +folderview_width=303 +folderview_height=1022 +folderview_visible=1 +folder_col_show_folder=1 +folder_col_show_new=1 +folder_col_show_unread=1 +folder_col_show_total=1 +folder_col_pos_folder=0 +folder_col_pos_new=1 +folder_col_pos_unread=2 +folder_col_pos_total=3 +folder_col_size_folder=181 +folder_col_size_new=20 +folder_col_size_unread=24 +folder_col_size_total=24 +folder_default_thread=1 +folder_default_thread_collapsed=0 +folder_default_hide_read_threads=0 +folder_default_hide_read_msgs=0 +folder_default_hide_del_msgs=0 +summaryview_width=647 +summaryview_height=538 +main_messagewin_x=256 +main_messagewin_y=210 +messageview_width=647 +messageview_height=478 +messageview_visible=1 +mainview_x=1920 +mainview_y=38 +mainview_width=647 +mainview_height=1138 +mainwin_x=1920 +mainwin_y=38 +mainwin_maximised=0 +mainwin_fullscreen=0 +mainwin_menubar=1 +mainwin_width=960 +mainwin_height=1138 +messagewin_width=960 +messagewin_height=1138 +mimeview_tree_height=60 +sourcewin_width=960 +sourcewin_height=1138 +compose_width=960 +compose_height=1138 +compose_notebook_height=150 +compose_x=1920 +compose_y=38 +enable_color=1 +quote_level1_color=#cd656c +quote_level2_color=#32a679 +quote_level3_color=#2495be +enable_bgcolor=1 +quote_level1_bgcolor=#222222 +quote_level2_bgcolor=#333333 +quote_level3_bgcolor=#444444 +uri_color=#32a679 +emphasis_color=#0000cf +target_folder_color=#a46eb0 +signature_color=#757575 +recycle_quote_colors=1 +default_header_color=#000000 +default_header_bgcolor=#f5f6be +tags_color=#000000 +tags_bgcolor=#f5f6be +qs_active_color=#000000 +qs_active_bgcolor=#f5f6be +qs_error_color=#000000 +qs_error_bgcolor=#ff7070 +display_header_pane=0 +display_header=1 +display_xface=1 +render_html=1 +invoke_plugin_on_html=0 +promote_html_part=0 +line_space=2 +never_send_retrcpt=0 +enable_smooth_scroll=0 +scroll_step=1 +scroll_half_page=0 +hide_quoted=1 +respect_flowed_format=0 +show_all_headers=1 +show_other_header=1 +attach_desc=1 +attach_save_directory=/home/mattias +attach_load_directory=/home/mattias/ +mime_textviewer= +mime_open_command=brave '%s' +show_inline_attachments=1 +layout_mode=0 +open_selected_message_on_folder_open=0 +open_selected_message_on_search_results=0 +open_selected_message_on_prevnext=0 +open_selected_message_on_deletemove=0 +open_selected_message_on_directional=0 +always_show_message_when_selected=0 +select_on_entry=3 +show_tooltips=1 +summary_select_prio1=2 +summary_select_prio2=3 +summary_select_prio3=1 +summary_select_prio4=5 +summary_select_prio5=0 +summary_select_prio6=0 +summary_select_prio7=0 +summary_select_prio8=0 +summary_select_prio9=0 +summary_select_prio10=0 +mark_as_read_on_new_window=1 +mark_as_read_delay=0 +immediate_execution=1 +nextunreadmsg_dialog=1 +summary_from_show=0 +pixmap_theme_path=INTERNAL_DEFAULT +enable_alpha_svg=1 +enable_pixmap_scaling=1 +pixmap_scaling_auto=1 +pixmap_scaling_ppi=96 +ask_mark_all_read=1 +ask_override_colorlabel=0 +ask_apply_per_account_filtering_rules=1 +apply_per_account_filtering_rules=0 +addressbook_use_editaddress_dialog=1 +addressbook_hpaned_pos=190 +addressbook_vpaned_pos=-1 +uri_open_command=brave '%s' +ext_editor_command=emacs '%s' +cmds_use_system_default=0 +add_address_by_click=0 +session_passwords=1 +confirm_on_exit=1 +clean_trash_on_exit=0 +ask_on_cleaning=1 +warn_queued_on_exit=1 +work_offline=0 +summary_quicksearch_type=4 +summary_quicksearch_recurse=1 +io_timeout_secs=60 +hide_score=-9999 +important_score=1 +clip_log=1 +log_length=500 +enable_log_standard=0 +enable_log_warning=0 +enable_log_error=0 +enable_log_status=0 +log_msg_color=#00af00 +log_warn_color=#af0000 +log_error_color=#af0000 +log_in_color=#000000 +log_out_color=#0000ef +log_status_ok_color=#00af00 +log_status_nok_color=#0000af +log_status_skip_color=#aa00aa +enable_filtering_debug=0 +filtering_debug_level=1 +enable_filtering_debug_inc=1 +enable_filtering_debug_manual=1 +enable_filtering_debug_folder_proc=0 +enable_filtering_debug_pre_proc=0 +enable_filtering_debug_post_proc=0 +filtering_debug_clip_log=1 +filtering_debug_log_length=500 +gtk_can_change_accels=0 +gtk_enable_accels=1 +color_new=#2495be +filteringwin_width=800 +filteringwin_height=1138 +filteringactionwin_width=490 +filteringactionwin_height=-1 +matcherwin_width=550 +matcherwin_height=431 +templateswin_width=480 +templateswin_height=-1 +actionsiodialog_width=582 +actionsiodialog_height=310 +actionswin_width=486 +actionswin_height=-1 +tagswin_width=486 +tagswin_height=-1 +sslmanwin_width=486 +sslmanwin_height=-1 +uriopenerwin_width=-1 +uriopenerwin_height=-1 +foldersortwin_width=400 +foldersortwin_height=300 +addressbookwin_width=960 +addressbookwin_height=1138 +addressbookeditpersonwin_width=640 +addressbookeditpersonwin_height=320 +addressbookeditgroupwin_width=580 +addressbookeditgroupwin_height=340 +pluginswin_width=418 +pluginswin_height=300 +prefswin_width=960 +prefswin_height=1138 +folderitemwin_width=700 +folderitemwin_height=550 +zero_replacement_char=0 +editaccountwin_width=700 +editaccountwin_height=550 +accountswin_width=500 +accountswin_height=380 +logwin_width=979 +logwin_height=1138 +filtering_debugwin_width=600 +filtering_debugwin_height=-1 +folderselwin_width=960 +folderselwin_height=1138 +addressaddwin_width=800 +addressaddwin_height=1138 +addressbook_folderselwin_width=300 +addressbook_folderselwin_height=-1 +aboutwin_width=960 +aboutwin_height=1138 +addrgather_width=450 +addrgather_height=-1 +news_subscribe_width=450 +news_subscribe_height=400 +imap_scan_tree_recurs_limit=64 +warn_dnd=1 +utf8_instead_of_locale_for_broken_mail=0 +enable_swap_from=0 +use_stripes_everywhere=1 +use_stripes_in_summaries=1 +stripes_color_offset=4000 +enable_hscrollbar=1 +folderview_vscrollbar_policy=0 +textview_cursor_visible=0 +hover_timeout=500 +cache_max_mem_usage=4096 +cache_min_keep_time=15 +thread_by_subject_max_age=10 +last_opened_folder= +goto_last_folder_on_startup=0 +summary_quicksearch_sticky=1 +summary_quicksearch_dynamic=0 +summary_quicksearch_autorun=0 +statusbar_update_step=10 +compose_no_markup=0 +skip_ssl_cert_check=0 +live_dangerously=0 +save_parts_readwrite=0 +hide_quotes=0 +unsafe_ssl_certs=0 +real_time_sync=0 +print_paper_type= +print_paper_orientation=0 +print_margin_top=-1 +print_margin_bottom=-1 +print_margin_left=-1 +print_margin_right=-1 +print_use_color=0 +print_use_collate=0 +print_use_reverse=0 +print_use_duplex=0 +print_imgs=1 +print_previewwin_width=600 +print_previewwin_height=-1 +use_networkmanager=1 +use_shred=0 +two_line_vertical=1 +inherit_folder_properties=0 +flush_metadata=1 +nav_history_length=50 +diff_added_color=#008b8b +diff_deleted_color=#6a5acd +diff_hunk_color=#a52a2a +folder_search_wildcard=1 +address_search_wildcard=1 +enable_avatars=3 +use_master_passphrase=0 +master_passphrase= +master_passphrase_salt=F1wE+Wgq10RpugHLGjNmyO9bi682DjsnN0/ynU+1Xe7hPFoLJgbzEX+wqQcwr6yeVYAF1kLnCasFwfF4wM5fmA== +master_passphrase_pbkdf2_rounds=50000 +use_proxy=0 +proxy_type=1 +proxy_host=localhost +proxy_port=1080 +use_proxy_auth=0 +proxy_name= +proxy_pass= + +[GPG] +auto_check_signatures=1 +autocompletion=0 +autocompletion_limit=0 +use_gpg_agent=0 +store_passphrase=0 +store_passphrase_timeout=0 +passphrase_grab=1 +gpg_warning=1 +gpg_ask_create_key=0 +skip_encryption_warning=pgpmime, +gpg_path= + +[AttRemover] +win_width=-1 +win_height=-1 + +[PerlPlugin] +filter_log_verbosity=2 + +[fancy] +enable_images=1 +enable_remote_content=0 +enable_scripts=0 +enable_plugins=0 +open_external=1 +zoom_level=100 +enable_java=0 +enable_gnome_proxy=0 +enable_proxy=0 +proxy_server=http://SERVERNAME:PORT +stylesheet= + +[NotificationPlugin] +include_mail=1 +include_news=0 +include_rss=0 +include_calendar=0 +urgency_hint_new=0 +urgency_hint_unread=0 +canberra_play_sounds=0 +banner_show=0 +banner_speed=30 +banner_width=0 +banner_include_unread=0 +banner_max_msgs=100 +banner_sticky=0 +banner_root_x=0 +banner_root_y=10 +banner_folder_specific=0 +banner_enable_colors=0 +banner_color_bg=#000000 +banner_color_fg=#fffe00 +popup_show=0 +popup_timeout=1000 +popup_folder_specific=0 +popup_display_folder_name=0 +command_enabled=0 +command_timeout=60000 +command_folder_specific=0 +command_line= +lcdproc_enabled=0 +lcdproc_hostname=localhost +lcdproc_port=13666 +trayicon_enabled=1 +trayicon_hide_at_startup=0 +trayicon_close_to_tray=0 +trayicon_hide_when_iconified=0 +trayicon_folder_specific=0 +trayicon_display_folder_name=0 +trayicon_popup_enabled=1 +trayicon_popup_timeout=2000 +hotkeys_enabled=0 +hotkeys_toggle_mainwindow= + +[Plugins_Common] +/usr/lib/claws-mail/plugins/newmail.so + +[Plugins_GTK2] +/usr/lib/claws-mail/plugins/acpi_notifier.so +/usr/lib/claws-mail/plugins/address_keeper.so +/usr/lib/claws-mail/plugins/archive.so +/usr/lib/claws-mail/plugins/attachwarner.so +/usr/lib/claws-mail/plugins/att_remover.so +/usr/lib/claws-mail/plugins/clamd.so +/usr/lib/claws-mail/plugins/fancy.so +/usr/lib/claws-mail/plugins/fetchinfo.so +/usr/lib/claws-mail/plugins/mailmbox.so +/usr/lib/claws-mail/plugins/notification.so +/usr/lib/claws-mail/plugins/pdf_viewer.so +/usr/lib/claws-mail/plugins/pgpcore.so +/usr/lib/claws-mail/plugins/pgpinline.so +/usr/lib/claws-mail/plugins/pgpmime.so +/usr/lib/claws-mail/plugins/smime.so +/usr/lib/claws-mail/plugins/spamreport.so +/usr/lib/claws-mail/plugins/tnef_parse.so + +[ClamAV] +clamav_enable=0 +clamav_max_size=1 +clamav_recv_infected=1 +clamav_save_folder= +clamad_config_type=1 +clamd_config_folder= +clamd_host= +clamd_port=0 + +[AcpiNotifier] +no_mail_action=0 +unread_mail_action=0 +new_mail_action=1 +blink_on_err=1 +on_param= +off_param= +file_path= + +[AddressKeeper] +addressbook_folder= +keep_to_addrs=1 +keep_cc_addrs=1 +keep_bcc_addrs=0 +block_matching_addrs= + +[Archiver] +save_folder= +compression=1 +format=0 +recursive=1 +md5sum=0 +rename=0 +unlink=0 + +[AttachWarner] +match_strings=attachment\nattached\nbifogning\nbifogat +skip_quotes=1 +skip_forwards_and_redirections=1 +skip_signature=1 +case_sensitive=1 + +[Fetchinfo] +fetchinfo_enable=0 +fetchinfo_uidl=1 +fetchinfo_account=1 +fetchinfo_server=1 +fetchinfo_userid=1 +fetchinfo_time=1 + +[SpamReport] +signalspam_enabled=0 +signalspam_user= +spamcop_enabled=0 +spamcop_user= +debianspam_enabled=0 + diff --git a/emacs/Makefile b/emacs/Makefile index 3a5a47d..3f8425e 100644 --- a/emacs/Makefile +++ b/emacs/Makefile @@ -11,11 +11,11 @@ install: ln -sf -- .config/emacs ~/.emacs.d printf '; %s\n\n' 'This file is generated by ~/.dotfiles/emacs/Makefile' > ~/.config/emacs/init.el cat -- init.el >> ~/.config/emacs/init.el - if pacman -Qq emacs-go-mode </dev/null >/dev/null 2>/dev/null; then\ + if pacman -Qq -- emacs-go-mode </dev/null >/dev/null 2>/dev/null; then\ printf '\n' >> ~/.config/emacs/init.el && \ cat -- init-go-mode.el >> ~/.config/emacs/init.el; \ fi - if pacman -Qq emacs-haskell-mode </dev/null >/dev/null 2>/dev/null; then\ + if pacman -Qq -- emacs-haskell-mode </dev/null >/dev/null 2>/dev/null; then\ printf '\n' >> ~/.config/emacs/init.el && \ cat -- init-haskell-mode.el >> ~/.config/emacs/init.el; \ fi diff --git a/filesystem/Makefile b/filesystem/Makefile index c46eea2..c6b7fde 100644 --- a/filesystem/Makefile +++ b/filesystem/Makefile @@ -1,5 +1,18 @@ .POSIX: +HIDE =\ + Templates\ + Desktop\ + Public\ + Documents\ + Downloads\ + Music\ + Pictures\ + Videos\ + public_html\ + password.gpg\ + mnt + install: mkdir -p -- ~/.config mkdir -p -- ~/.var/cache/.thumbnails @@ -53,6 +66,12 @@ install: mkdir -p -- ~/.usr/share/man mkdir -p -- ~/.usr/src ln -sf -- ~/.dotfiles/filesystem/user-dirs.dirs ~/.config/ + set -e && for f in $(HIDE); do \ + test -e ~/.hidden && grep '^'"$$f"'$' < ~/.hidden || printf '%s\n' "$$f" >> ~/.hidden; \ + done + if test "$$(hostname | tr '[[:upper:]]' '[[:lower:]]')" = zenith; then \ + test -e ~/.hidden && grep '^cryptokey.gpg$' < ~/.hidden || printf '%s\n' "cryptokey.gpg" >> ~/.hidden; \ + fi uninstall: -unlink -- ../.cache ~/.config/.cache @@ -86,5 +105,8 @@ uninstall: -rmdir -- ~/.usr/share -rmdir -- ~/.usr/src -rmdir -- ~/.usr + -for f in $(HIDE) cryptokey.gpg; do \ + test ! -e ~/.hidden || grep -v '^'"$$f"'$' < ~/.hidden | sponge ~/.hidden; \ + done .PHONY: install uninstall diff --git a/xmonad/.gitignore b/xmonad/.gitignore new file mode 100644 index 0000000..48adae9 --- /dev/null +++ b/xmonad/.gitignore @@ -0,0 +1 @@ +/xmonad.hs diff --git a/xmonad/Makefile b/xmonad/Makefile index afb5a4b..0cb5a50 100644 --- a/xmonad/Makefile +++ b/xmonad/Makefile @@ -11,11 +11,25 @@ install: mkdir -p -- ~/.config/X11/xinit/xinitrc.d test ! -d ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad ln -sf -- ~/.dotfiles/xmonad/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad + pacman -Qq -- general-preprocessor </dev/null >/dev/null + pacman -Qq -- xpybar </dev/null >/dev/null + mkdir -p -- ~/.xmonad + test ! -d ~/.xmonad/xmonad.hs + make xmonad.hs + ln -sf -- ~/.dotfiles/xmonad/xmonad.hs ~/.xmonad/xmonad.hs + xmonad --recompile + +include xmonad.mk uninstall: -unlink -- ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad -rmdir -- ~/.config/X11/xinit/xinitrc.d -rmdir -- ~/.config/X11/xinit -rmdir -- ~/.config/X11 + -rm -rf -- ~/.xmonad + -make clean + +clean: + -rm -f xmonad.hs -.PHONY: install uninstall +.PHONY: install uninstall clean diff --git a/xmonad/xmonad.hs.gpp b/xmonad/xmonad.hs.gpp new file mode 100644 index 0000000..0728476 --- /dev/null +++ b/xmonad/xmonad.hs.gpp @@ -0,0 +1,230 @@ +-- -*- haskell -*- +import XMonad hiding ( (|||) ) +import qualified XMonad.StackSet as W -- hiding ( workspaces, focus ) + +import XMonad.Actions.CycleWS +import XMonad.Actions.UpdatePointer +import XMonad.Actions.MouseResize +import XMonad.Actions.WindowMenu + +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.ManageHelpers +import XMonad.Hooks.ManageDocks +import XMonad.Hooks.UrgencyHook +import XMonad.Hooks.EwmhDesktops + +import XMonad.Layout.IM +import XMonad.Layout.LayoutCombinators +import XMonad.Layout.LayoutHints +import XMonad.Layout.NoBorders +import XMonad.Layout.PerWorkspace +import XMonad.Layout.ResizableTile +import XMonad.Layout.Grid +import XMonad.Layout.Accordion +import XMonad.Layout.Circle +import XMonad.Layout.WindowArranger +import XMonad.Layout.SimpleFloat +import XMonad.Layout.PerScreen +import XMonad.Layout.LayoutModifier +import XMonad.Layout.Gaps + +import XMonad.Util.EZConfig +import XMonad.Util.Loggers +import XMonad.Util.Run +import XMonad.Util.Scratchpad +import XMonad.Util.WindowProperties +import XMonad.Util.WorkspaceCompare +import XMonad.Util.Replace +import XMonad.Util.Themes + +import XMonad.Layout.Tabbed +import XMonad.Layout.DecorationMadness +import XMonad.Layout.DecorationAddons +import XMonad.Layout.Decoration +import XMonad.Layout.SimpleDecoration +import XMonad.Layout.DwmStyle +import XMonad.Layout.TabBarDecoration +import XMonad.Layout.ImageButtonDecoration +import XMonad.Layout.BorderResize +import XMonad.Layout.SimpleFloat +import XMonad.Layout.Maximize +import XMonad.Layout.Minimize + +import qualified Data.Map as M + + +$$< + workspace_1=main + if test "$(hostname | tr '[[:upper:]]' '[[:lower:]]')" = zenith; then + workspace_6=saved + workspace_7=chat + workspace_8=mail + fi + workspace_9=media + + modmask=mod4Mask # Super_L + focus_on_hover=True + with_decorations=true + + if test -x /usr/bin/terminator || test -x /usr/local/bin/terminator; then + terminal=terminator + elif test -x /usr/bin/st || test -x /usr/local/bin/st; then + terminal=st + else + terminal=xterm + fi + screenshooter= +$$> + + + +---- ==== Keypad numbers ==== ---- +numPadKeys = [ xK_KP_Insert -- 0 + , 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 + ] + + +---- ==== Kill panel and restart ==== ---- +$$>if test -x /usr/bin/dpkill; then +myRestart = "env DISPLAY=${DISPLAY}.0 dpkill xpybar ; xmonad --restart" +$$>else +myRestart = "pkill xpybar ; xmonad --restart" +$$>fi + + +---- ==== Naming of workspaces ==== ---- +myWorkspaces = [ "1$${workspace_1:+-${workspace_1}}" + , "2$${workspace_2:+-${workspace_2}}" + , "3$${workspace_3:+-${workspace_3}}" + , "4$${workspace_4:+-${workspace_4}}" + , "5$${workspace_5:+-${workspace_5}}" + , "6$${workspace_6:+-${workspace_6}}" + , "7$${workspace_7:+-${workspace_7}}" + , "8$${workspace_8:+-${workspace_8}}" + , "9$${workspace_9:+-${workspace_9}}" + ] + + +---- ==== Mouse bindings ==== ---- +stackRotate (W.Stack f [] rs) = W.Stack f [] rs +stackRotate (W.Stack f ls rs) = W.Stack l (f:(reverse ls')) rs + where + (l:ls') = reverse ls + +stackUnrotate (W.Stack f [] rs) = W.Stack f [] rs +stackUnrotate (W.Stack f (l:ls) rs) = W.Stack l (ls ++ [f]) rs + +stackUnrotateRight (W.Stack f ls []) = W.Stack f ls [] +stackUnrotateRight (W.Stack f ls rs) = W.Stack r ls (f:(reverse rs')) + where + (r:rs') = reverse rs + +stackRotateRight (W.Stack f ls []) = W.Stack f ls [] +stackRotateRight (W.Stack f ls (r:rs)) = W.Stack r ls (rs ++ [f]) + +myMouse = [ (( $${modmask}, button4), (\w -> focus w >> windows (W.modify' stackRotate))) + , (( $${modmask}, button5), (\w -> focus w >> windows (W.modify' stackUnrotate))) + , (( $${modmask} .|. controlMask, button4), (\w -> focus w >> windows (W.modify' stackRotateRight))) + , (( $${modmask} .|. controlMask, button5), (\w -> focus w >> windows (W.modify' stackUnrotateRight))) + ] + + +---- ==== Main method ==== ---- +main = do + ---- System status panel + d <- spawnPipe "env DISPLAY=${DISPLAY}.0 xpybar -c ~/.config/xpybar/xmonad-monitor" + + ---- Dude… settings + xmonad $ docks $ ewmh def + { terminal = "$${terminal}" + , focusFollowsMouse = $${focus_on_hover} + , modMask = $${modmask} + , borderWidth = 0 -- No borders + , workspaces = myWorkspaces -- Name my workspaces + , logHook = myLogHook d -- Top(system) panel hook + , manageHook = myManageHook -- Manage hook + , layoutHook = myLayoutHook -- Layout algorithms + , handleEventHook = handleEventHook def <+> fullscreenEventHook + , mouseBindings = \x -> M.union (mouseBindings def x) (M.fromList myMouse) + }`additionalKeys` -- Modifiy keybindings + [ (( $${modmask}, xK_F4), kill) -- <Super>F4 :: Kill window + , (( $${modmask}, xK_F12), spawn "$${terminal}") -- <Super>F12 :: Open terminal +$$>if test -n "${screenshooter}"; then + , (( 0, xK_Print), spawn "$${screenshooter}") -- SysReq :: Take a screen-shot +$$>fi + , (( $${modmask}, xK_q), spawn myRestart) -- modified restart command + , (( $${modmask}, xK_F5), sendMessage $ JumpToLayout (decoName ++ "Tall")) + , (( $${modmask}, xK_F6), sendMessage $ JumpToLayout (decoName ++ "Mirror Tall")) + , (( $${modmask}, xK_F7), sendMessage $ JumpToLayout (decoName ++ "Grid")) + , (( $${modmask}, xK_F8), sendMessage $ JumpToLayout "Full") + , (( $${modmask} .|. controlMask, xK_m), withFocused (sendMessage . maximizeRestore)) + , (( $${modmask}, xK_m), withFocused minimizeWindow) + , (( $${modmask} .|. shiftMask , xK_m), sendMessage RestoreNextMinimizedWin) + ] + + +---- ==== Layout settings ==== ---- +ratios = [ toRational (2/(1 + sqrt 5 :: Double)) -- golden ratio + , toRational (sqrt 2 - 1 :: Double) -- silver ratio + , 1 / 2 -- half + ] + +$$>if ${with_decorations}; then +$$> deco="imageButtonDeco shrinkText myTheme" +myTheme = (defaultThemeWithImageButtons + { activeColor = "#333333" + , inactiveColor = "#000000" + , urgentColor = "#880000" + , activeBorderColor = "#888888" + , inactiveBorderColor = "#888888" + , urgentBorderColor = "#CD656C" + , activeTextColor = "#EEEEEE" + , inactiveTextColor = "#EEEEEE" + , urgentTextColor = "#FFFFFF" + , fontName = "-misc-fixed-medium-r-normal-*-10-*-*-*-c-*-iso10646-1" + , decoWidth = 100 + , decoHeight = 14 + , windowTitleAddons = [] + {- , windowTitleIcons = [] -} + }) +decoName = "ImageButtonDeco Maximize Minimize " +$$>else +$$> deco= +decoName = "Maximize Minimize " +$$>fi + +myManageHook = manageDocks <+> manageHook def <+> composeAll + [ className =? "XEyes" --> doIgnore + , className =? "TzClock" --> doIgnore + ] +myLayoutHook = avoidStruts $ myLayouts +myLayouts = $${deco} (maximize $ minimize (tiled 2)) + ||| $${deco} (maximize $ minimize (Mirror (tiled 2))) + ||| full + ||| $${deco} (maximize $ minimize Grid) + ||| $${deco} (maximize $ minimize (Mirror Grid)) + ||| full +tiled n = Tall nmaster delta (ratios!!n) +full = noBorders Full +nmaster = 1 +delta = 1/100 + + +---- ==== dzen2/xpybar (top panel) settings ==== ---- +myLogHook h = do + dynamicLogWithPP $ def + { ppCurrent = dzenColor "#303030" "#909090" . pad + , ppHidden = dzenColor "#909090" "" . pad + , ppHiddenNoWindows = dzenColor "#606060" "" . pad + , ppLayout = dzenColor "#909090" "" . pad + , ppUrgent = dzenColor "#cd656c" "" . pad . dzenStrip + , ppTitle = shorten 100 + , ppWsSep = "" + , ppSep = " " + , ppOutput = hPutStrLn h + } + dynamicLogString def + { ppSort = getSortByXineramaRule + } >>= xmonadPropLog diff --git a/xmonad/xmonad.mk b/xmonad/xmonad.mk new file mode 100644 index 0000000..66b4054 --- /dev/null +++ b/xmonad/xmonad.mk @@ -0,0 +1,2 @@ +xmonad.hs: xmonad.hs.gpp xmonad.mk + gpp -s '$$$$' < xmonad.hs.gpp > ~/.xmonad/xmonad.hs |