From 953602d6ffd4cdbb41c3491bbff4d2c20466704a Mon Sep 17 00:00:00 2001 From: Yann Herklotz grave Date: Tue, 31 Jul 2018 16:22:47 +0100 Subject: Adding work configuration --- X/.Xresources | 2 +- emacs/loader.org | 124 ++++++------------------------------------------------- i3/config | 61 ++++++++++++++++----------- i3/i3status.conf | 27 ++++++++++++ 4 files changed, 78 insertions(+), 136 deletions(-) create mode 100644 i3/i3status.conf diff --git a/X/.Xresources b/X/.Xresources index bac9f7b..7e1abd3 100644 --- a/X/.Xresources +++ b/X/.Xresources @@ -180,7 +180,7 @@ URxvt*cursorColor: #cc99cc ! Select the fonts to be used. This is a comma separated list of font names that are checked in order when trying to find glyphs for characters -URxvt*font: xft:Inconsolata for Powerline:pixelsize:12 +URxvt*font: xft:Ubuntu Mono:pixelsize:12 ! When font styles are not enabled, or this option is enabled (True default), bold/blink font styles imply high intensity foreground/background colours URxvt*intensityStyles: false diff --git a/emacs/loader.org b/emacs/loader.org index 9b55eae..21f3aac 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -122,7 +122,6 @@ monitoring a file such as a log file. It will also do this silently. Disable tabs, I want to move towards only using spaces everywhere as that is my preferred style. This is just personal preference though. #+BEGIN_SRC emacs-lisp - (setq-default indent-tabs-mode nil) (setq-default tab-width 4) (setq-default python-indent-offset 4) #+END_SRC @@ -134,15 +133,6 @@ and set the column width to 80. (setq-default fill-column 80) #+END_SRC -**** Font -Set the font to Hack, which is an opensource monospace font designed for -programming and looking at source code. - -#+BEGIN_SRC emacs-lisp - (set-default-font "Hack-11") - (setq default-frame-alist '((font . "Hack-11"))) -#+END_SRC - **** Shell #+BEGIN_SRC emacs-lisp (use-package eshell @@ -150,93 +140,6 @@ programming and looking at source code. :bind (("C-c e" . eshell))) #+END_SRC -** Social -*** Mail -~mu4e~ is automatically in the load path when installed through a package -manager. - -For archlinux, the command to install mu4e is: - -#+BEGIN_SRC shell - pacman -S mu -#+END_SRC - -which comes with mu. - -Set the email client to be mu4e in emacs, and set the correct mail directory. As -I am downloading all the mailboxes, there will be duplicates, which can be -ignored in searches by setting ~mu4e-headers-skip-duplicates~. - -Also delete messages when they are sent, and don't copy them over to the sent -directory, as Gmail will do that for us. - -To download the mail using imap, I use ~mbsync~, which downloads all mail with -the ~-a~ flag. - -Finally, remove buffers when an email has been sent. - -#+BEGIN_SRC emacs-lisp - (use-package mu4e - :ensure nil - :commands mu4e - :config - (setq mail-user-agent 'mu4e-user-agent) - (setq mu4e-maildir "~/.mail") - (setq mu4e-headers-skip-duplicates t) - (setq mu4e-sent-messages-behavior 'delete) - (setq mu4e-get-mail-command "mbsync -a") - (setq message-kill-buffer-on-exit t) - (setq mu4e-completing-read-function 'completing-read) - (setq mu4e-context-policy 'pick-first) - (setq mu4e-confirm-quit nil) - - ;;; Mail directory shortcuts - (setq mu4e-maildir-shortcuts - '(("/gmail/Inbox" . ?g) - ("/imperial/Inbox" . ?i))) - (setq mu4e-contexts - `( ,(make-mu4e-context - :name "Gmail" - :match-func (lambda (msg) - (when msg (mu4e-message-contact-field-matches msg :to "ymherklotz@gmail.com"))) - :vars '((user-mail-address . "ymherklotz@gmail.com") - (user-full-name . "Yann Herklotz") - (mu4e-sent-folder . "/gmail/[Gmail]/Sent Mail") - (mu4e-drafts-folder . "/gmail/[Gmail]/Drafts") - (mu4e-trash-folder . "/gmail/[Gmail]/Trash") - (mu4e-refile-folder . "/gmail/[Gmail]/All Mail") - (smtpmail-smt-user . "ymherklotz@gmail.com") - (smtpmail-local-domain . "gmail.com") - (smtpmail-default-smtp-server . "smtp.gmail.com") - (smtpmail-smtp-server . "smtp.gmail.com") - (smtpmail-smtp-service . 587))) - ,(make-mu4e-context - :name "Imperial" - :match-func (lambda (msg) - (when msg (mu4e-message-contact-field-matches msg :to "ymh15@ic.ac.uk"))) - :vars '((user-mail-address . "ymh15@ic.ac.uk") - (user-full-name . "Yann Herklotz") - (mu4e-sent-folder . "/imperial/Sent") - (mu4e-drafts-folder . "/imperial/Drafts") - (mu4e-trash-folder . "/imperial/Trash") - (mu4e-refile-folder . "/imperial/Archive") - (smtpmail-smt-user . "ymh15@ic.ac.uk") - (smtpmail-local-domain . "cc.ic.ac.uk") - (smtpmail-default-smtp-server . "smtp.cc.ic.ac.uk") - (smtpmail-smtp-server . "smtp.cc.ic.ac.uk") - (smtpmail-smtp-service . 587)))))) -#+END_SRC - -Setting up ~smtp~ to send messages using gmail. - -#+BEGIN_SRC emacs-lisp - (use-package smtpmail - :ensure nil - :config - (setq message-send-mail-function 'smtpmail-send-it - starttls-use-gnutls t)) -#+END_SRC - ** Utility *** Diminish #+BEGIN_SRC emacs-lisp @@ -447,10 +350,6 @@ Set global keys for org mode to access agenda. Set up ob for executing code blocks #+BEGIN_SRC emacs-lisp - (use-package ox-taskjuggler - :ensure nil - :load-path "~/.emacs.d/personal") - (use-package ob :ensure nil :config @@ -501,7 +400,11 @@ lot of different language support. **** Magit #+BEGIN_SRC emacs-lisp (use-package magit - :bind (("C-x g" . magit-status))) + :bind (("C-x g" . magit-status)) + :config + (magit-add-section-hook 'magit-status-sections-hook + 'magit-insert-modules-overview + 'magit-insert-unpulled-from-upstream)) #+END_SRC **** Projectile @@ -534,8 +437,7 @@ Setting up CC mode with a hook that uses my settings. (c-set-offset 'inline-open 0) (c-set-offset 'inline-close 0) (c-set-offset 'innamespace 0) - (c-set-offset 'arglist-cont-nonempty 8) - (setq indent-tabs-mode nil)) + (c-set-offset 'arglist-cont-nonempty 8)) (add-hook 'c-mode-hook 'my-c++-mode-hook) (add-hook 'c++-mode-hook 'my-c++-mode-hook) @@ -717,19 +619,19 @@ Enabling global flycheck support. (mapc #'disable-theme custom-enabled-themes)) ;; (use-package color-theme-sanityinc-tomorrow) - + ;; ;; (use-package leuven-theme) - + ;; ;; (use-package zenburn-theme) - + ;; ;; (use-package gruvbox-theme) - + ;; ;; (use-package material-theme) - + ;; ;; (use-package monokai-theme) - + ;; ;; (use-package plan9-theme) - + ;; ;; (use-package gruvbox-theme) (use-package powerline diff --git a/i3/config b/i3/config index 09fb289..36aa8a7 100644 --- a/i3/config +++ b/i3/config @@ -42,6 +42,12 @@ bindsym $mod+d exec i3-dmenu-desktop # installed. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop +# Make the currently focused window a scratchpad +bindsym $mod+Shift+minus move scratchpad + +# Show the first scratchpad window +bindsym $mod+minus scratchpad show + # change focus bindsym $mod+j focus left bindsym $mod+k focus down @@ -79,6 +85,7 @@ bindsym $mod+f fullscreen toggle bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split +bindsym $mod+x layout toggle all # toggle tiling / floating bindsym $mod+Shift+space floating toggle @@ -149,10 +156,38 @@ mode "resize" { bindsym $mod+r mode "resize" +# color defines for zenburn styled i3 +set $bg #2c2c2e +set $fg #9f9f9f +set $hi #efef8f +set $ac #a0afa0 +set $tx #040404 +set $ia #8f8f8f +set $be #8faf9f +set $yw #ccdc90 +set $gn #88b090 +set $rd #e89393 + +# set some nice colors border background text +client.focused $ac $ac $tx +client.unfocused $bg $bg $ia +client.focused_inactive $bg $bg $ac +client.urgent $rd $rd $tx + # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { - status_command i3status + status_command i3status --config ~/.config/i3/i3status.conf + + colors { + background $bg + statusline $fg + separator $hi + focused_workspace $gn $bg $ac + active_workspace $gn $ac $tx + inactive_workspace $bg $bg $ia + urgent_workspace $rd $bg $ac + } } #============================================================ @@ -160,11 +195,7 @@ bar { #============================================================ # Disable titles -for_window [class="^.*"] border pixel 0 - -smart_gaps on -gaps inner 25 -gaps outer 15 +for_window [class="^.*"] border pixel 2 #============================================================ # Custom Bindings @@ -204,26 +235,8 @@ bindsym $mod+Shift+p mode "$mode_system" # Application Startup #============================================================ -# Start compton for tear fix -exec --no-startup-id compton -c & - # set the background exec --no-startup-id sh ~/.fehbg # Start emacs daemon to use with emacsclient exec --no-startup-id emacs --daemon & - -# Activate redshift -exec --no-startup-id redshift & - -# Startup dropbox -exec --no-startup-id dropbox & - -# Start nm-applet -exec --no-startup-id nm-applet & - -# Start pulse audio system tray - - -# Enable smooth scrolling -exec --no-startup-id xinput set-prop 'DLL075B:01 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1 diff --git a/i3/i3status.conf b/i3/i3status.conf new file mode 100644 index 0000000..337dc6c --- /dev/null +++ b/i3/i3status.conf @@ -0,0 +1,27 @@ +general { + output_format = "i3bar" + colors = true + interval = 5 +} + +order += "disk /" +order += "cpu_temperature 0" +order += "load" +order += "tztime local" + +disk "/" { + format = "%free" +} + +cpu_temperature 0 { + format = "T: %degrees °C" + path = "/sys/devices/platform/coretemp.0/temp1_input" +} + +load { + format = "%5min" +} + +tztime local { + format = "%Y-%m-%d %H:%M:%S" +} -- cgit