From efb2439ab82052f6eeb4728d5df774cccb121a8a Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 7 Mar 2020 22:59:24 +0100 Subject: carbon x1 Arch linux config --- .pluggins.vim | 2 +- .vimrc | 3 +-- .xinitrc | 2 ++ .zprofile | 3 +++ .zsh_aliases | 2 +- install.sh | 3 +++ xmonad.hs | 14 +++----------- 7 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 .xinitrc create mode 100755 .zprofile diff --git a/.pluggins.vim b/.pluggins.vim index c3951a5..796473a 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -1,6 +1,6 @@ " plugins call plug#begin() - Plug 'joshdick/onedark.vim' " theme + Plug 'dracula/vim' " theme Plug 'ctrlpvim/ctrlp.vim' " Ctrl-P similar to vsc Plug 'tpope/vim-eunuch' " basic unix command in vim Plug 'tomtom/tcomment_vim' " mininal commenter diff --git a/.vimrc b/.vimrc index 9d7059e..14428ef 100644 --- a/.vimrc +++ b/.vimrc @@ -61,8 +61,7 @@ set wildignore=*/tmp/*,*.o,*.so,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/ let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] " colorscheme -let g:onedark_terminal_italics=1 -colorscheme onedark +colorscheme dracula let g:lightline = {} let g:lightline.colorscheme = 'one' " lightline theme to onedark diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..c3213b0 --- /dev/null +++ b/.xinitrc @@ -0,0 +1,2 @@ +redshift -c /home/charles/.config/redshift.conf & +exec xmonad diff --git a/.zprofile b/.zprofile new file mode 100755 index 0000000..7cebc9e --- /dev/null +++ b/.zprofile @@ -0,0 +1,3 @@ +if [[ "$(tty)" = "/dev/tty1" ]]; then + startx +fi diff --git a/.zsh_aliases b/.zsh_aliases index 6644105..37e213d 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -65,4 +65,4 @@ alias zshrc="vim $DOTFILES/.zshrc && source $DOTFILES/.zshrc" alias zshaliasrc="vim $DOTFILES/.zsh_aliases && source $DOTFILES/.zshrc" alias vimrc="vim $DOTFILES/.vimrc" alias vimplugrc="vim $DOTFILES/.pluggins.vim" -alias xmonadrc="vim $DOTFILES/xmonad.hs && cp $DOTFILES/xmonad.hs $HOME/.xmonad/xmonad.hs" +alias xmonadrc="vim $DOTFILES/xmonad.hs" diff --git a/install.sh b/install.sh index 4076d59..63298c6 100755 --- a/install.sh +++ b/install.sh @@ -21,6 +21,9 @@ ln -sf $DOTDIR/.gitconfig $HOME/.gitconfig [ ! -d $HOME/.config ] && mkdir $HOME/.config ln -sf $DOTDIR/redshift.conf $HOME/.config/redshift.conf +ln -sf $DOTDIR/.xinitrc $HOME/.xinitrc +ln -sf $DOTDIR/.zprofile $HOME/.zprofile + ################ # dependencies # ################ diff --git a/xmonad.hs b/xmonad.hs index eb9edb3..6e379cc 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -6,7 +6,7 @@ import XMonad.Util.SpawnOnce import XMonad.Util.EZConfig(additionalKeysP) myModMask = mod4Mask -myTerminal = "konsole" +myTerminal = "st" myTextEditor = "vim" myBorderWidth = 2 @@ -14,22 +14,14 @@ main = do xmonad $ desktopConfig { modMask = myModMask , terminal = myTerminal - , startupHook = myStartupHook , borderWidth = myBorderWidth , normalBorderColor = "#292d3e" , focusedBorderColor = "#bbc5ff" } `additionalKeysP` myKeys -myStartupHook = do - spawnOnce "redshift -c /home/charles/.config/redshift.conf &" - spawnOnce "xinput disable 'ETPS/2 Elantech Touchpad' &" - myKeys = [ ("", spawn "pulseaudio-ctl up") , ("", spawn "pulseaudio-ctl down") , ("", spawn "pulseaudio-ctl mute") + , ("", spawn "xbacklight -inc 5") + , ("", spawn "xbacklight -dec 5") ] - -- , ("", spawn "playerctl play-pause") - -- , ("", spawn "playerctl previous") - -- , ("", spawn "playerctl next") - -- , ("", spawn "lux -a 5%") - -- , ("", spawn "lux -s 5%") -- cgit From afec91ac7504ec03649fa0410f05a9bf750a0ade Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 8 Mar 2020 22:56:18 +0100 Subject: poweroff after xmonad exit, git store credentials --- .gitconfig | 2 +- .zprofile | 1 + .zshrc | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitconfig b/.gitconfig index 577206f..2aa7aac 100644 --- a/.gitconfig +++ b/.gitconfig @@ -2,7 +2,7 @@ name = Charles email = sircharlesaze@gmail.com [credential] - helper = cache + helper = store username = HappyTramp [log] decorate = full diff --git a/.zprofile b/.zprofile index 7cebc9e..de50afc 100755 --- a/.zprofile +++ b/.zprofile @@ -1,3 +1,4 @@ if [[ "$(tty)" = "/dev/tty1" ]]; then startx + poweroff fi diff --git a/.zshrc b/.zshrc index 7512fcf..6704db9 100644 --- a/.zshrc +++ b/.zshrc @@ -34,9 +34,9 @@ bindkey -v '^?' backward-delete-char bindkey -v export KEYTIMEOUT=1 -setopt auto_cd # cd without `cd` command +setopt auto_cd # cd without `cd` command # setopt pushd_ignore_dups -# setopt list_rows_first +setopt list_rows_first # iterate in completion menu by row # setopt extendedglob # executed when changind directory -- cgit From 69fd7ddf3a16d996f24918d229dfa9baff342275 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 13 Mar 2020 20:06:33 +0100 Subject: vim dracula status bar, date alias --- .pluggins.vim | 16 ++++++++-------- .vimrc | 2 +- .zsh_aliases | 3 +++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.pluggins.vim b/.pluggins.vim index 796473a..18cefbe 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -1,13 +1,13 @@ " plugins call plug#begin() - Plug 'dracula/vim' " theme - Plug 'ctrlpvim/ctrlp.vim' " Ctrl-P similar to vsc - Plug 'tpope/vim-eunuch' " basic unix command in vim - Plug 'tomtom/tcomment_vim' " mininal commenter - Plug 'itchyny/lightline.vim' " minimal status bar + Plug 'dracula/vim', {'as': 'dracula' } " theme + Plug 'ctrlpvim/ctrlp.vim' " Ctrl-P similar to vsc + Plug 'tpope/vim-eunuch' " basic unix command in vim + Plug 'tomtom/tcomment_vim' " mininal commenter + Plug 'itchyny/lightline.vim' " minimal status bar " bloat?? - Plug 'romainl/vim-cool' " disable highlight after search - Plug 'justinmk/vim-syntax-extra' " better syntax highlight - Plug 'sheerun/vim-polyglot' " better syntax highlight + Plug 'romainl/vim-cool' " disable highlight after search + Plug 'justinmk/vim-syntax-extra' " better syntax highlight + Plug 'sheerun/vim-polyglot' " better syntax highlight call plug#end() diff --git a/.vimrc b/.vimrc index 14428ef..7e4c9d5 100644 --- a/.vimrc +++ b/.vimrc @@ -63,7 +63,7 @@ let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standar " colorscheme colorscheme dracula let g:lightline = {} -let g:lightline.colorscheme = 'one' " lightline theme to onedark +let g:lightline.colorscheme = 'dracula' " lightline theme to onedark """""""""""" " mappings " diff --git a/.zsh_aliases b/.zsh_aliases index 37e213d..1fe984a 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -66,3 +66,6 @@ alias zshaliasrc="vim $DOTFILES/.zsh_aliases && source $DOTFILES/.zshrc" alias vimrc="vim $DOTFILES/.vimrc" alias vimplugrc="vim $DOTFILES/.pluggins.vim" alias xmonadrc="vim $DOTFILES/xmonad.hs" + +# other +alias date="date -R" -- cgit From 2cb01951327a16835ea89196fe001cbde6977ea2 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 13 Mar 2020 21:31:40 +0100 Subject: xmonad config from master --- xmonad.hs | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/xmonad.hs b/xmonad.hs index 6e379cc..c22c11b 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -5,23 +5,27 @@ import XMonad.Config.Desktop import XMonad.Util.SpawnOnce import XMonad.Util.EZConfig(additionalKeysP) -myModMask = mod4Mask -myTerminal = "st" -myTextEditor = "vim" -myBorderWidth = 2 +-- Layouts +import XMonad.Layout.NoBorders + main = do xmonad $ desktopConfig - { modMask = myModMask - , terminal = myTerminal - , borderWidth = myBorderWidth + { modMask = mod4Mask -- mod key to super + , terminal = "st" + , borderWidth = 1 + , focusFollowsMouse = False -- don't change window based on mouse position (need to click) , normalBorderColor = "#292d3e" , focusedBorderColor = "#bbc5ff" + , layoutHook = myLayouts } `additionalKeysP` myKeys -myKeys = [ ("", spawn "pulseaudio-ctl up") - , ("", spawn "pulseaudio-ctl down") - , ("", spawn "pulseaudio-ctl mute") - , ("", spawn "xbacklight -inc 5") - , ("", spawn "xbacklight -dec 5") - ] +myLayouts = tiled ||| Mirror tiled ||| noBorders Full + where tiled = Tall 1 (3 / 100) (1 / 2) + +myKeys = [ ("", spawn "pulseaudio-ctl up") + , ("", spawn "pulseaudio-ctl down") + , ("", spawn "pulseaudio-ctl mute") + , ("", spawn "xbacklight -inc 5") + , ("", spawn "xbacklight -dec 5") + ] -- cgit From 9279d013bb1ce88860c560a04dbc926ce55f3093 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 13 Mar 2020 22:34:58 +0100 Subject: Dracula theme not shitty background --- .vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.vimrc b/.vimrc index 7e4c9d5..212ad31 100644 --- a/.vimrc +++ b/.vimrc @@ -61,6 +61,7 @@ set wildignore=*/tmp/*,*.o,*.so,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/ let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] " colorscheme +let g:dracula_colorterm = 0 " actually dark background colorscheme dracula let g:lightline = {} let g:lightline.colorscheme = 'dracula' " lightline theme to onedark -- cgit From 1eab52cfcbcc9f510d1f5c6c1bcdd5b359971c2b Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 22 May 2020 14:39:13 +0200 Subject: Added lock screen, prettier gdb and valgrind --- .gdbinit | 2 ++ .zsh_aliases | 1 + xmonad.hs | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gdbinit b/.gdbinit index 9422460..f8b971d 100644 --- a/.gdbinit +++ b/.gdbinit @@ -1 +1,3 @@ set disassembly-flavor intel +set print pretty on +set prompt \ngdb> diff --git a/.zsh_aliases b/.zsh_aliases index 676940a..87ae2e9 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -7,6 +7,7 @@ alias ls="ls --color" alias grep="grep --color=auto" alias tree="tree -C" alias pacman="pacman --color=auto" +alias valgrind="colour-valgrind" # common commands alias less="less -N" # enable line number diff --git a/xmonad.hs b/xmonad.hs index 5420664..b726236 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -32,8 +32,8 @@ myLayouts = tiledBigMaster -- bigger master for code and smaller slave fo tiledEven = Tall 1 (3 / 100) (1 / 2) myStartupHook = do - spawnOnce "redshift -c /home/charles/.config/redshift.conf &" -- start redshift spawnOnce "xinput disable 'ETPS/2 Elantech Touchpad' &" -- disable touchpad + -- spawnOnce "redshift -c /home/charles/.config/redshift.conf &" -- start redshift myManageHook = insertPosition End Newer -- insert new window at the end of the current layout @@ -42,4 +42,5 @@ myKeys = [ ("", spawn "pulseaudio-ctl up") -- volume u , ("", spawn "pulseaudio-ctl mute") -- volume mute , ("", spawn "xbacklight -inc 5") -- backlight up , ("", spawn "xbacklight -dec 5") -- backlight down + , ("", spawn "slock") -- lock screen ] -- cgit