summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2019-01-27 20:05:18 +0100
committerMiguel <m.i@gmx.at>2019-01-27 20:05:18 +0100
commitdfe1efe982999312aba825c98918cdd205870cd2 (patch)
treed6e0d16f717e8d970584da50794b3c7ff2231507
parentbd0c6bc05c529e90317e9b3d6f0ba7890a1ebca3 (diff)
some updates
-rw-r--r--vim/README.md6
-rw-r--r--vim/vimrc36
-rwxr-xr-xxmonad/checkmail.sh10
-rw-r--r--xmonad/xmobarrc53
-rw-r--r--xmonad/xmonad.hs125
5 files changed, 114 insertions, 116 deletions
diff --git a/vim/README.md b/vim/README.md
index e4fe8e7..ef26c2e 100644
--- a/vim/README.md
+++ b/vim/README.md
@@ -1,7 +1,8 @@
My Vimrc Config
===============
-This directory hosts my personal vim config files.
+This repo hosts my personal vim config files.
+They are very unlikely to be useful to anybody (excepting me) at this point.
Dependancies
============
@@ -13,7 +14,6 @@ I found the foloowing on vim.org.
* syntax/htmljinja.vim
* syntax/jinja.vim
-
Installation
============
@@ -37,7 +37,7 @@ Steve Losh's book: Learn Vimscript The Hard Way: http://learnvimscriptthehardway
License
=======
-Copyright (c) 2014-2018 Michal Idziorek (unless stated otherwise)
+Copyright (c) 2014-2019 Michal Idziorek (unless stated otherwise)
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
diff --git a/vim/vimrc b/vim/vimrc
index d716a0e..63dc82d 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1,11 +1,13 @@
"""""""""""""""""""""""""""""""""""""
" Miguel's .vimrc "
" Author: Michal Idziorek "
-" Last Update: 2018-05-29 "
+" Last Update: 2018-OCT-17 "
"""""""""""""""""""""""""""""""""""""
" {{{ TODO / NOTES
"
+" NEW: https://github.com/vim-airline/vim-airline
+"
" http://www.alexeyshmalko.com/2014/using-vim-as-c-cpp-ide/
" set exrc
" set secure
@@ -88,6 +90,7 @@
" {{{ Vundle - Plugin Manager
"
" Vundle plugin manager (Replaces pathogen)"
+
" https://github.com/VundleVim/Vundle.vim
set nocompatible
filetype off
@@ -104,12 +107,15 @@ Plugin 'gmarik/Vundle.vim'
" github plugins
" Plugin 'Valloric/YouCompleteMe'
-Plugin 'fholgado/minibufexpl.vim'
+
Plugin 'scrooloose/nerdtree'
+Plugin 'altercation/vim-colors-solarized'
+
+Plugin 'fholgado/minibufexpl.vim'
Plugin 'majutsushi/tagbar'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-sensible'
-Plugin 'vim-scripts/Conque-GDB'
+"""Plugin 'vim-scripts/Conque-GDB'
" My own plugins on github
" Plugin 'git://ex40.softwarefools.com/vim-potion.git'
@@ -167,6 +173,7 @@ filetype plugin indent on
" misc!
" {{{
+set expandtab
let g:potion_command = "/home/miguel/int/dev/potion/bin/potion"
set nocompatible
@@ -214,9 +221,10 @@ set statusline+=%= " Switch to the right side
set statusline+=%l " Current line
set statusline+=/ " Separator
set statusline+=%L " Total lines
-set statusline+=, " comma
+set statusline+=, " comma
set statusline+=%c " Column
set statusline+=\ (%P) " Percentage
+set statusline& " reset?
" }}}
" terminal width / colorcolumn
@@ -254,8 +262,18 @@ set foldlevelstart=0
" colorscheme / syntax highlight
" {{{
"colorscheme olgas
-colorscheme desert
+"colorscheme miguels
syntax enable
+
+if has('gui_running')
+ set background=light
+else
+ set background=dark
+endif
+
+ set background=dark
+
+colorscheme solarized
syntax sync fromstart
" }}}
@@ -299,8 +317,9 @@ inoremap jk <esc>
" display help in new tab on <F1>
map <F1> :tab help<CR>
-map <F5> :silent make \| copen \| redraw!<CR>
-map <F5> :silent make \| redraw!<CR>
+"map <F5> :silent make \| copen \| redraw!<CR>
+"map <F5> :silent make \| redraw!<CR>
+map <F5> :make<CR>
" retab
map <leader>rt :retab!<CR>
@@ -416,7 +435,8 @@ augroup filetype_haskell
autocmd!
autocmd FileType haskell setlocal foldmethod=marker
" autocmd Filetype haskell map <F5> :w<ENTER>:term cabal -- exec runghc %<ENTER>
- autocmd Filetype haskell map <F5> :w<ENTER>:term make<ENTER>
+" autocmd Filetype haskell map <F5> :w<ENTER>:term make<ENTER>
+ " autocmd Filetype haskell map <F5> :w<ENTER>:term make<ENTER>
autocmd FileType haskell setlocal expandtab
augroup END
" }}}
diff --git a/xmonad/checkmail.sh b/xmonad/checkmail.sh
index a760f30..5fb596d 100755
--- a/xmonad/checkmail.sh
+++ b/xmonad/checkmail.sh
@@ -1,14 +1,16 @@
#!/bin/bash
-MAILS=$(echo x | mail -f /home/miguel/mail/default | head -n 2 | tail -n 1 | cut -d" " -f 4-)
+MAILS=$(echo x | mail -f /home/miguel/mail/default | head -n 1 | tail -n 1 | cut -d" " -f 4-)
+A="<action=xterm -e mutt>"
+B="</action>"
case $MAILS in
*new*)
- echo "<fc=#f44>$MAILS</fc>"
+ echo "$A<icon=/home/miguel/git/dotfiles/xmonad/mail.xpm/><fc="#dc322f">$MAILS</fc>$B"
;;
*unread*)
- echo "<fc=yellow>$MAILS</fc>"
+ echo "$A<fc="#b58900">$MAILS</fc>$B"
;;
*)
- echo "no mail"
+ echo "$A<fc="#93a1a1">no mail</fc>$B"
;;
esac
diff --git a/xmonad/xmobarrc b/xmonad/xmobarrc
index 37879bb..dd713da 100644
--- a/xmonad/xmobarrc
+++ b/xmonad/xmobarrc
@@ -1,50 +1,45 @@
-- vim: set ft=haskell:
-
Config {
--- font = "-adobe-courier-medium-r-*-*-34-*-*-*-*-*-*-*",
--- font= "-adobe-*-*-r-*-24-*",
--- font= "-*-*-*-*-*-24-*",
-
- font = "xft:Sans-13:bold"
-
- , bgColor = "black"
- , fgColor = "grey"
- , position = TopW L 95
- , lowerOnStart = True
- , commands = [
+ font = "xft:Sans-10:bold"
+ , additionalFonts = ["xft:FontAwesome-10"]
+ , bgColor = "#002b36"
+ , fgColor = "#657b83"
+ , position = TopW L 95
+ , lowerOnStart = True
+ , pickBroadest = False
+ , commands = [
Run StdinReader
, Run MultiCpu ["-t","<total0> <total1> <total2> <total3> <total4> <total5> <total6> <total7>%",
- "-L","10","-H","65","--low","gray90","--normal","lightblue","--high","red"] 10
+ "-L","10","-H","65","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10
- , Run Network "eth0" ["-t","<rx> <tx>","-L","100","-H","5000","--low","gray90","--normal","lightblue","--high","red"] 10
- , Run Memory ["-t","<usedratio>%","-L","20","-H","60","--low","gray90","--normal","lightblue","--high","red"] 10
- , Run Swap ["-t","<usedratio>%","-L","1","-H","10","--low","gray90","--normal","yellow","--high","red"] 10
+ , Run Network "eth0" ["-t","rx <rx> tx <tx>",
+ "-L","100","-H","5000","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10
- --, Run Date "%a %_d %b %Y %H:%M:%S" "date" 10
- , Run Date "%d %b %H:%M:%S" "date" 10
+ , Run Memory ["-t","<usedratio>%",
+ "-L","20","-H","60","--low","#93a1a1","--normal","#268bd2","--high","#dc322f"] 10
- , Run DiskU
- [
+ , Run Swap ["-t","<usedratio>%",
+ "-L","1","-H","10","--low","#93a1a1","--normal","#b58900","--high","#dc322f"] 10
- ("/", "/:<fc=white><free></fc>"),
- ("/mnt/DATA", "/dat:<fc=white><free></fc>"),
- ("/mnt/BACKUP", "/bkp:<fc=white><free></fc>"),
- ("/mnt/PENIS", "/pns:<fc=white><free></fc>")
+ , Run Date "%a %d %b %Y %H:%M:%S" "date" 10
- ] [] 20
+ , Run DiskU [ ("/", "/:<fc=#93a1a1><free></fc>"),
+ ("/mnt/DATA", "/dat:<fc=#93a1a1><free></fc>"),
+ ("/mnt/BACKUP", "/bkp:<fc=#93a1a1><free></fc>"),
+ ("/mnt/PENIS", "/pns:<fc=#93a1a1><free></fc>")] [] 20
- , Run CoreTemp ["-t", "<core0> <core1> <core2> <core3>", "-L", "40", "-H", "60", "-l", "gray90", "-n", "lightblue", "-h", "red"] 50
+ , Run CoreTemp ["-t", "<core0> <core1> <core2> <core3>",
+ "-L", "30", "-H", "60", "-l", "#93a1a1", "-n", "#268bd2", "-h", "#dc322f"] 50
- , Run Com "/home/miguel/git/dotfiles/xmonad/checkmail.sh" [] "mymails" 100
+ , Run Com "/home/miguel/git/dotfiles/xmonad/checkmail.sh" [] "mymails" 30
, Run Com "/home/miguel/git/dotfiles/xmonad/nvidia-temp.sh" [] "gputemp" 30
]
, sepChar = "%"
, alignSep = "}{"
- , template = "%StdinReader%}{%mymails% - net %eth0% KB/s- cpu %multicpu% (%coretemp%°C) - gpu %gputemp% - mem %memory% (%swap%) - %disku% - <fc=#aaaacc>%date%</fc>"
-
+ , template = "%StdinReader%}{%mymails% - %eth0% KB/s - cpu %multicpu% (%coretemp%°C) - gpu %gputemp% - mem %memory% (%swap%) - %disku% - <fc=#93a1a1>%date%</fc> <action=`zenity --question --text=yesorno && xmessage -geometry 200x200+300+300 dupa -buttons YES:0,nope&&xterm`><fn=1></fn></action>"
}
diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs
index 2974ed8..84337a8 100644
--- a/xmonad/xmonad.hs
+++ b/xmonad/xmonad.hs
@@ -1,6 +1,6 @@
--
-- Miguel's Xmonad Config.
--- Last Update: 2018-05-29
+-- Last Update: 2018-06-07
--
import XMonad
@@ -9,7 +9,6 @@ import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Actions.SpawnOn
-import XMonad.Layout.Gaps
import XMonad.Util.Run
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
@@ -21,7 +20,7 @@ import XMonad.Util.NamedWindows
import XMonad.Util.WorkspaceCompare
import System.IO
--- testing layouts
+import XMonad.Layout.Gaps
import XMonad.Layout.NoBorders
import XMonad.Layout.Accordion
import XMonad.Layout.Circle
@@ -37,8 +36,13 @@ configPath="/home/miguel/git/dotfiles/xmonad"
-- DREAMS / TODO
-- notify-send replace/ always same workspace
-- bells for different apps: mutt, slrn , cmabber
--- xterm-float that will float with 80x20 chars
+-- xterm-float that will float with 80x20 chars?
+-- help shift-mod-/
-- ...
+-- TODO: would still like fullscreen flash vids to not crop and leave xmobar drawn
+-- TODO: hook in TopicSpaces, start specific apps on specific workspaces
+-- | The available layouts. Note that each layout is separated by |||, which
+-- denotes layout choice.||| Circle||| OneBig (3/4) (3/4) ||| spiral (1/1.61803) ||| tabbedBottom shrinkText def {fontName="xft:Sans-13:bold",decoHeight=60}
-- http://xmonad.org/manpage.html
-- xmona key-bindings :
@@ -58,41 +62,24 @@ configPath="/home/miguel/git/dotfiles/xmonad"
-- mod-`1234567890-=< (+shifted)
-- mod-qwer (+shifted)
-- mouse-1/2/3
+--
+-- https://superuser.com/questions/478498/start-applications-on-specific-workspaces-in-xmonad
+-- spawnOn appears to be broken !?
+
+spawnToWorkspace :: String -> String -> X ()
+spawnToWorkspace program workspace = do spawn program
+ windows $ W.greedyView workspace
+spawnOnSingle workspace prog = spawnOn workspace $ "xterm -e " ++ configPath ++ "/single-startup.sh " ++ prog
-- http://pbrisbin.com/posts/using_notify_osd_for_xmonad_notifications/
data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show)
-
instance UrgencyHook LibNotifyUrgencyHook where
urgencyHook LibNotifyUrgencyHook w = do
name <- getName w
Just idx <- fmap (W.findTag w) $ gets windowset
safeSpawn "notify-send" [show name, "workspace " ++ idx]
--- TODO: would still like fullscreen flash vids to not crop and leave xmobar drawn
--- TODO: remove the red border when doing fullscreen? tried adding 'smartBorders' to the layoutHook but that didn't work
--- TODO: hook in TopicSpaces, start specific apps on specific workspaces
-
--- extra workspaces (used below)
---myExtraWorkspaces =
--- [
--- (xK_quoteleft, "~★"),
--- (xK_1, "1⚒"),
--- (xK_2, "2⚁"),
--- (xK_3, "3⚂"),
--- (xK_4, "4⚃"),
--- (xK_5, "5⚄"),
--- (xK_6, "6✉"),
--- (xK_7, "7⚛"),
--- (xK_8, "8♬"),
--- (xK_9, "9☎"),
--- (xK_0, "0☭"),
--- (xK_minus, "-☹"),
--- (xK_equal, "+☺"),
--- (xK_BackSpace, "<☠")
--- ]
--- | The available layouts. Note that each layout is separated by |||, which
--- denotes layout choice.||| Circle||| OneBig (3/4) (3/4) ||| spiral (1/1.61803) ||| tabbedBottom shrinkText def {fontName="xft:Sans-13:bold",decoHeight=60}
layout = tiled ||| Mirror tiled ||| noBorders Full ||| Grid ||| ThreeColMid 1 (3/100) (1/2)
where
-- default tiling algorithm partitions the screen into two panes
@@ -129,69 +116,62 @@ myExtraWorkspaces =
main = do
xmproc <- spawnPipe $ "/usr/bin/xmobar "++configPath++"/xmobarrc"
xmonad
- $ withUrgencyHook LibNotifyUrgencyHook
- $ docks $ ewmh defaultConfig {
-
--- workspaces = ["~","1","2","3","4","5","6","7","8","9","0"] ++ (map snd myExtraWorkspaces),
- workspaces = (map snd myExtraWorkspaces),
- borderWidth = 5,
--- focusedBorderColor = "#ff4444",
- focusedBorderColor = "#0000ff",
- normalBorderColor = "#777777",
--- workspaces = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n"] ,
- -- ++ map show [1,2,3,4],
-
--- focusFollowsMouse = False,
- modMask = mod4Mask,
+-- $ withUrgencyHook LibNotifyUrgencyHook
+-- $ docks
+ $ ewmh defaultConfig {
+
+ workspaces = (map snd myExtraWorkspaces)
+ ,borderWidth = 2
+ ,normalBorderColor = "#586e75"
+ --focusedBorderColor = "#cb4b16",
+ ,focusedBorderColor = "#eee8d5"
+-- focusFollowsMouse = False,
+ ,modMask = mod4Mask
--terminal = "urxvt",
- terminal = "xterm -e tmux"
+ ,terminal = "xterm -e tmux"
-- if you are using xmonad 0.9, you can avoid web flash videos getting cropped in fullscreen like so:
--- manageHook = ( isFullscreen --> doFullFloat ) <+> manageDocks <+> manageHook defaultConfig,
+ --,manageHook = ( isFullscreen --> doFullFloat ) <+> manageDocks <+> manageHook defaultConfig,
-- (no longer needed in 0.10)
- ,manageHook = composeAll []
- --[ className =? "XTerm" --> doFloat ]
-
+ --,manageHook = composeAll [] <+> manageSpawn
+ ,manageHook = composeAll[
+ className =? "Xmessage" --> doFloat
+ ] <+> manageSpawn <+> manageDocks <+> manageHook def
-- (className=? "qemu-system-i386" -->doShift "2")
-- <+> ( title=?"xterm-float" --> (doRectFloat$W.RationalRect 0 0 0.5 0.5) )
-- <+> manageSpawn <+> manageDocks <+> manageHook defaultConfig
,layoutHook = avoidStruts $ layout
--- ,startupHook = do
-
--- spawnOn "1" "xterm"
+ ,startupHook = do spawnOnSingle "6" "mutt"
+-- spawnOnSingle "6" "slrn"
+-- spawnOnSingle "6" "newsbeuter"
+ spawnOnSingle "6" "mcabber"
+ spawnOnSingle "6" "weechat"
+-- spawnToWorkspace "xterm" (map snd myExtraWorkspaces !! 6)
-- spawnOn "6" "xterm -e irssi"
-- spawnOn "6" "xterm -e slrn"
-- spawnOn "6" "xterm -e mutt"
-- spawnOn "9" "chromium --new-window https://people.live.com/ https://www.facebook.com/"
-
- --spawnOn "7" "chromium --new-window http://softwarefools.com/"
--- spawn "chromium --new-window http://softwarefools.com/"
-
--- spawnOn "9" "skype"
--- spawnOn "9" "pidgin"
-
--- spawnOn "9" "nm-applet"
--- spawnOn "9" "skype --dbpath=/home/miguel/.Skype_atene"
-- setWMName "LG3D"
- --,
-
,logHook =
takeTopFocus >>( dynamicLogWithPP $ xmobarPP
{
-- ppOrder = reverse,
- ppSort = mkWsSort $ getXineramaPhysicalWsCompare horizontalScreenOrderer, --getSortByXineramaPhysicalRule def,
+-- ppSort = mkWsSort $ getXineramaPhysicalWsCompare horizontalScreenOrderer, --getSortByXineramaPhysicalRule def,
+ ppSort = getSortByXineramaPhysicalRule,
+-- ppSort = mkWsSort $ getXineramaPhysicalWsCompare,
+-- ppSort = mkWsSort $ getXineramaWsCompare,
ppOutput = hPutStrLn xmproc,
- ppTitle = xmobarColor "green" "" . shorten 50,
- ppCurrent = (\x -> "<fc=red>"++x++"</fc>"),
- ppVisible = (\x -> "<fc=green>"++x++"</fc>"),
- ppHidden = (\x -> "<fc=yellow>"++x++"</fc>"),
- ppHiddenNoWindows = (\x -> "<fc=gray>"++x++"</fc>")
- ,ppVisibleNoWindows = Just (\x-> "<fc=blue>"++x++"</fc>")
+ ppTitle = xmobarColor "#859900" "" . shorten 50, --green
+ ppCurrent = (\x -> "<fc=#dc322f>"++x++"</fc>"), --red
+ ppVisible = (\x -> "<fc=#859900>"++x++"</fc>"), --green
+ ppHidden = (\x -> "<fc=#b58900>"++x++"</fc>"), --yellow
+ ppHiddenNoWindows = (\x -> "<fc=#93a1a1>"++x++"</fc>") --gray
+ -- ,ppVisibleNoWindows = Just (\x-> "<fc=#268bd2>"++x++"</fc>") --blue
})
} `additionalKeys`
(
@@ -199,9 +179,10 @@ main = do
((mod4Mask, xK_F1 ), spawn "xterm -e vim ~/.xmonad/xmonad.hs")
,((mod4Mask , xK_b ), sendMessage ToggleStruts)
- , ((mod4Mask, xK_m ), spawn "notify-send \"$( fetchmail )\"")
+-- , ((mod4Mask, xK_m ), spawn "notify-send \"$( fetchmail )\"")
+ , ((mod4Mask, xK_m ), spawn "xterm -e \"fetchmail&&sleep 2\"")
, ((mod4Mask, xK_c ), spawn "notify-send \"$(xclip -o)\"")
- , ((mod4Mask, xK_p ), spawn "dmenu_run -nb '#000' -nf '#77aaff' -sb '#77aadd' -sf black -fn '-adobe-courier-medium-r-*-*-34-*-*-*-*-*-*-*'")
+ , ((mod4Mask, xK_p ), spawn "dmenu_run -nb '#073642' -nf '#fdf6e3' -sb '#268bd2' -sf '#073642' -fn 'DejaVu Sans-10'")
-- mods-s screenshot window
-- , ((mod4Mask, xK_s ), spawn "xwd | convert - /tmp/screen.png && gimp /tmp/screen.png")
@@ -236,7 +217,7 @@ main = do
[
((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) -- Replace 'mod1Mask' with your mod key of choice.
- | (key, sc) <- zip [xK_q,xK_w, xK_e, xK_r] [3,2,0,1] -- was [0..] *** change to match your screen order ***
+ | (key, sc) <- zip [xK_q,xK_w, xK_e, xK_r] [2,0,1,3] -- was [0..] *** change to match your screen order ***
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
]