mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-22 18:03:11 -05:00
Compare commits
No commits in common. "d3007e791984b61c4d4634a449c37cb8a3701861" and "171d3edd66d52a989c2d18ea93a505c2b519aff7" have entirely different histories.
d3007e7919
...
171d3edd66
47 changed files with 802 additions and 2187 deletions
|
@ -1,3 +0,0 @@
|
|||
LICENSE
|
||||
README.md
|
||||
Packages.txt
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
24
.gitignore.dual-monitor-fhd
Normal file
24
.gitignore.dual-monitor-fhd
Normal file
|
@ -0,0 +1,24 @@
|
|||
bin/mirror-outputs
|
||||
config/*
|
||||
!config/bspwm
|
||||
config/bspwm/*
|
||||
!config/bspwm/bspwmrc
|
||||
!config/dunst
|
||||
!config/kitty
|
||||
!config/nvim
|
||||
config/nvim/*
|
||||
!config/nvim/init.vim
|
||||
!config/polybar
|
||||
config/polybar/*
|
||||
!config/polybar/config.ini
|
||||
!config/polybar/colors.ini
|
||||
!config/polybar/modules.ini
|
||||
!config/polybar/custom_modules.ini
|
||||
!config/ranger
|
||||
!config/rofi
|
||||
!config/sxhkd
|
||||
config/sxhkd/*
|
||||
!config/sxhkd/sxhkdrc
|
||||
emacs.d/*
|
||||
!emacs.d/init.el
|
||||
!emacs.d/snippets
|
23
.gitignore.laptop-hidpi
Normal file
23
.gitignore.laptop-hidpi
Normal file
|
@ -0,0 +1,23 @@
|
|||
config/*
|
||||
!config/bspwm
|
||||
config/bspwm/*
|
||||
!config/bspwm/bspwmrc
|
||||
!config/dunst
|
||||
!config/kitty
|
||||
!config/nvim
|
||||
config/nvim/*
|
||||
!config/nvim/init.vim
|
||||
!config/polybar
|
||||
config/polybar/*
|
||||
!config/polybar/config.ini
|
||||
!config/polybar/colors.ini
|
||||
!config/polybar/modules.ini
|
||||
!config/polybar/custom_modules.ini
|
||||
!config/ranger
|
||||
!config/rofi
|
||||
!config/sxhkd
|
||||
config/sxhkd/*
|
||||
!config/sxhkd/sxhkdrc
|
||||
emacs.d/*
|
||||
!emacs.d/init.el
|
||||
!emacs.d/snippets
|
22
.gitignore.main
Normal file
22
.gitignore.main
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
install.sh
|
||||
Xresources
|
||||
bin/mirror-outputs
|
||||
config/*
|
||||
!config/dunst
|
||||
!config/kitty
|
||||
!config/nvim
|
||||
config/nvim/*
|
||||
!config/nvim/init.vim
|
||||
!config/polybar
|
||||
config/polybar/*
|
||||
!config/polybar/colors.ini
|
||||
!config/polybar/modules.ini
|
||||
!config/polybar/custom_modules.ini
|
||||
!config/ranger
|
||||
!config/rofi
|
||||
!config/xsettingsd
|
||||
emacs.d/*
|
||||
!emacs.d/init.el
|
||||
!emacs.d/snippets
|
||||
|
23
.gitignore.single-monitor-fhd
Normal file
23
.gitignore.single-monitor-fhd
Normal file
|
@ -0,0 +1,23 @@
|
|||
config/*
|
||||
!config/bspwm
|
||||
config/bspwm/*
|
||||
!config/bspwm/bspwmrc
|
||||
!config/dunst
|
||||
!config/kitty
|
||||
!config/nvim
|
||||
config/nvim/*
|
||||
!config/nvim/init.vim
|
||||
!config/polybar
|
||||
config/polybar/*
|
||||
!config/polybar/config.ini
|
||||
!config/polybar/colors.ini
|
||||
!config/polybar/modules.ini
|
||||
!config/polybar/custom_modules.ini
|
||||
!config/ranger
|
||||
!config/rofi
|
||||
!config/sxhkd
|
||||
config/sxhkd/*
|
||||
!config/sxhkd/sxhkdrc
|
||||
emacs.d/*
|
||||
!emacs.d/init.el
|
||||
!emacs.d/snippets
|
31
LICENSE
31
LICENSE
|
@ -1,16 +1,21 @@
|
|||
MIT No Attribution
|
||||
MIT License
|
||||
|
||||
Copyright 2022 Andrew Scott
|
||||
Copyright (c) 2021 Andrew Scott
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
software and associated documentation files (the "Software"), to deal in the Software
|
||||
without restriction, including without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
|
38
README.md
Normal file
38
README.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# dotfiles
|
||||
|
||||
### Configuration files for Arch Linux with bspwm and zenburn
|
||||
|
||||
```
|
||||
git clone https://codeberg.org/acscott/dotfiles.git ~/.dotfiles
|
||||
cd ~/.dotfiles
|
||||
# list branches
|
||||
git branch -a
|
||||
# checkout desired branch
|
||||
git checkout <branch>
|
||||
# update install.sh as needed, then run it
|
||||
./install.sh
|
||||
```
|
||||
|
||||
Note that laptop labeled branches can also be used for single monitor
|
||||
desktops. The difference is that they have Thinkpad specific keybinds for some
|
||||
function keys (sxhkdrc), and the screen dims when idle (xidlehook in bspwmrc).
|
||||
|
||||
If something goes wrong, the install.sh script creates backups
|
||||
in ~/dotfiles_backup. The script is simple enough that it should be
|
||||
easily editable, but obviously feel free to copy or symlink the
|
||||
files how you see fit.
|
||||
|
||||
### laptop-hidpi configuration
|
||||
|
||||
#### Zenburn
|
||||
![Desktop screenshot of the laptop-hidpi configuration](info/screenshots/screenshot.png)
|
||||
|
||||
#### Gruvbox
|
||||
![Desktop screenshot of the laptop-hidpi configuration](info/screenshots/screenshot2.png)
|
||||
[Wallpaper](https://www.reddit.com/r/wallpaper/comments/ll1gov/arch_gruvbox_wallpaper_v2_dark_light_3840x2160/ "Wallpaper")
|
||||
|
||||
### dual-monitor-fhd configuration
|
||||
![Desktop sceenshot of the dual-monitor-fhd configuration](info/screenshots/dual-monitor-screenshot.png)
|
||||
[Wallpaper](https://www.wallpaperflare.com/minimalism-gruvbox-wallpaper-qcaln "Wallpaper")
|
||||
|
||||
Licensed under the [MIT License](LICENSE) unless otherwise noted here, or by placing a separate license in a directory.
|
|
@ -8,3 +8,4 @@
|
|||
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
|
||||
exec startx
|
||||
fi
|
||||
|
|
@ -8,13 +8,9 @@
|
|||
alias ls='ls --color=auto'
|
||||
PS1='[\u@\h \W]\$ '
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
export EDITOR=emacs
|
||||
|
||||
alias nv=nvim
|
||||
alias r="urxvt -name Ranger -e ranger & disown"
|
||||
alias kssh="/usr/bin/kitty +kitten ssh"
|
||||
|
||||
neofetch
|
||||
|
||||
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && source /opt/miniconda3/etc/profile.d/conda.sh
|
13
bin/dual-polybar-launcher
Executable file
13
bin/dual-polybar-launcher
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch Polybar, using default config location ~/.config/polybar/config
|
||||
polybar one -r --config=~/.config/polybar/config.ini &
|
||||
polybar two -r --config=~/.config/polybar/config.ini &
|
||||
|
||||
echo "Polybar launched..."
|
0
dot_local/bin/executable_mirror-outputs → bin/mirror-outputs
Normal file → Executable file
0
dot_local/bin/executable_mirror-outputs → bin/mirror-outputs
Normal file → Executable file
0
dot_local/bin/executable_single-polybar-launcher → bin/single-polybar-launcher
Normal file → Executable file
0
dot_local/bin/executable_single-polybar-launcher → bin/single-polybar-launcher
Normal file → Executable file
0
dot_local/bin/executable_toggle-wifi → bin/toggle-wifi
Normal file → Executable file
0
dot_local/bin/executable_toggle-wifi → bin/toggle-wifi
Normal file → Executable file
|
@ -51,7 +51,7 @@
|
|||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 4
|
||||
separator_height = 2
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8
|
||||
|
@ -86,7 +86,7 @@
|
|||
|
||||
### Text ###
|
||||
|
||||
font = Hack 11
|
||||
font = Fira Mono 11
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
|
@ -23,3 +23,4 @@ color14 #93e0e3
|
|||
color7 #dcdccc
|
||||
color15 #ffffff
|
||||
selection_foreground #3f3f3f
|
||||
|
|
@ -29,7 +29,7 @@ set expandtab " Converts tabs to spaces
|
|||
set smartindent " Makes indenting smart
|
||||
set autoindent " Good auto indent
|
||||
set laststatus=0 " Always display the status line
|
||||
"set number " Line numbers
|
||||
set number " Line numbers
|
||||
"set cursorline " Enable highlighting of the current line
|
||||
set background=dark " tell vim what the background color looks like
|
||||
set showtabline=4 " Always show tabs
|
||||
|
@ -86,7 +86,7 @@ endif
|
|||
" Set contrast.
|
||||
" This configuration option should be placed before `colorscheme everforest`.
|
||||
" Available values: 'hard', 'medium'(default), 'soft'
|
||||
let g:everforest_background = 'soft'
|
||||
let g:everforest_background = 'medium'
|
||||
" For better performance
|
||||
let g:everforest_better_performance = 1
|
||||
colorscheme everforest
|
||||
|
@ -99,15 +99,3 @@ colorscheme everforest
|
|||
|
||||
" NERDTree Toggle
|
||||
nmap <silent> <Leader>k :NERDTreeToggle<CR>
|
||||
|
||||
" CoC completion
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ CheckBackspace() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! CheckBackspace() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
|
@ -83,7 +83,7 @@ tail = true
|
|||
;format-underline = ${colors.cyan}
|
||||
;label-padding = 2
|
||||
;label-foreground = ${color.foreground}
|
||||
label-foreground = ${color.blue}
|
||||
label-foreground = ${color.dark-blue}
|
||||
|
||||
# You can copy-paste your options for each possible action, which is more
|
||||
# trouble-free but repetitive, or apply only the relevant ones (for example
|
|
@ -842,8 +842,7 @@ icon-3 = 4;
|
|||
icon-4 = 5;
|
||||
icon-5 = 6;
|
||||
icon-6 = 7;
|
||||
icon-7 = 8;
|
||||
;
|
||||
icon-7 = 8;
|
||||
icon-8 = 9;
|
||||
icon-9 = 10;
|
||||
icon-default =
|
||||
|
@ -895,3 +894,4 @@ label-active-padding = 1
|
|||
label-urgent-padding = 1
|
||||
label-occupied-padding = 1
|
||||
label-empty-padding = 1
|
||||
|
7
config/rofi/config.gruvbox.rasi
Normal file
7
config/rofi/config.gruvbox.rasi
Normal file
|
@ -0,0 +1,7 @@
|
|||
/** Basic config file **/
|
||||
|
||||
configuration {
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
}
|
||||
@import "/usr/share/rofi/themes/gruvbox-dark-hard.rasi"
|
|
@ -1,8 +1,8 @@
|
|||
/* ==========================================================================
|
||||
Everforest dark theme for rofi
|
||||
Zenburn theme for rofi
|
||||
|
||||
Based on the Everforest color scheme for Vim by sainnhe
|
||||
https://github.com/sainnhe/everforest/
|
||||
Based on the Zenburn color scheme for Vim by jnurmine
|
||||
https://github.com/jnurmine/Zenburn
|
||||
========================================================================== */
|
||||
|
||||
* {
|
||||
|
@ -10,53 +10,53 @@
|
|||
highlight: bold italic;
|
||||
scrollbar: true;
|
||||
|
||||
/* Everforest colors */
|
||||
/* Zenburn colors */
|
||||
|
||||
everforest-bg0: #323d43;
|
||||
everforest-bg1: #525c6d;
|
||||
everforest-fg: #d8cacc;
|
||||
everforest-black: #4a555b;
|
||||
everforest-dark-grey: #525c62;
|
||||
everforest-dark-red: #e26c6e;
|
||||
everforest-red: #e68183;
|
||||
everforest-dark-yellow: #d5b26b;
|
||||
everforest-yellow: #dbbc7f;
|
||||
everforest-dark-blue: #6eb2a9;
|
||||
everforest-blue: #7fbbb3;
|
||||
everforest-dark-magenta: #cf87a9;
|
||||
everforest-magenta: #d699b6;
|
||||
everforest-dark-cyan: #72b783;
|
||||
everforest-cyan: #83c092;
|
||||
everforest-light-grey: #d8caac;
|
||||
everforest-white: #d8caac;
|
||||
zenburn-bg0: #3f3f3f;
|
||||
zenburn-bg1: #4f4f4f;
|
||||
zenburn-fg: #dcdccc;
|
||||
zenburn-black: #282828;
|
||||
zenburn-dark-grey: #709080;
|
||||
zenburn-dark-red: #705050;
|
||||
zenburn-red: #dca3a3;
|
||||
zenburn-dark-yellow: #f0deae;
|
||||
zenburn-yellow: #dfcf9f;
|
||||
zenburn-dark-blue: #506070;
|
||||
zenburn-blue: #94bff3;
|
||||
zenburn-dark-magenta: #dc8cc3;
|
||||
zenburn-magenta: #ec93d3;
|
||||
zenburn-dark-cyan: #8cd0d3;
|
||||
zenburn-cyan: #93e0e3;
|
||||
zenburn-light-grey: #dcdccc;
|
||||
zenburn-white: #ffffff;
|
||||
|
||||
/* Theme colors */
|
||||
background: @everforest-bg0;
|
||||
background: @zenburn-bg0;
|
||||
background-color: @background;
|
||||
foreground: @everforest-fg;
|
||||
border-color: @everforest-dark-yellow;
|
||||
foreground: @zenburn-fg;
|
||||
border-color: @zenburn-dark-yellow;
|
||||
separatorcolor: @border-color;
|
||||
scrollbar-handle: @border-color;
|
||||
|
||||
normal-background: @background;
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: @everforest-bg1;
|
||||
alternate-normal-background: @zenburn-bg1;
|
||||
alternate-normal-foreground: @foreground;
|
||||
selected-normal-background: @everforest-dark-cyan;
|
||||
selected-normal-foreground: @everforest-black;
|
||||
selected-normal-background: @zenburn-dark-cyan;
|
||||
selected-normal-foreground: @zenburn-black;
|
||||
|
||||
active-background: @everforest-yellow;
|
||||
active-background: @zenburn-yellow;
|
||||
active-foreground: @background;
|
||||
alternate-active-background: @active-background;
|
||||
alternate-active-foreground: @active-foreground;
|
||||
selected-active-background: @everforest-cyan;
|
||||
selected-active-background: @zenburn-cyan;
|
||||
selected-active-foreground: @active-foreground;
|
||||
|
||||
urgent-background: @everforest-dark-red;
|
||||
urgent-background: @zenburn-dark-red;
|
||||
urgent-foreground: @background;
|
||||
alternate-urgent-background: @urgent-background;
|
||||
alternate-urgent-foreground: @urgent-foreground;
|
||||
selected-urgent-background: @everforest-red;
|
||||
selected-urgent-background: @zenburn-red;
|
||||
selected-urgent-foreground: @urgent-foreground;
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
Net/IconThemeName "Papirus-Dark"
|
||||
Net/ThemeName "vimix-dark-beryl"
|
||||
Net/ThemeName "Materia-dark"
|
||||
Xft/Hinting 1
|
||||
Xft/HintStyle "hintfull"
|
||||
Xft/Antialias 1
|
|
@ -1,156 +0,0 @@
|
|||
! -----------------------------------------------------------------------------
|
||||
! Colors: gruvbox-dark, forest night, zenburn
|
||||
! Source: https://github.com/morhetz/gruvbox-generalized
|
||||
! https://github.com/jef/forest-night-xresources
|
||||
! https://github.com/jnurmine/Zenburn
|
||||
! -----------------------------------------------------------------------------
|
||||
{{if eq .chezmoi.hostname "helix" }}
|
||||
! Laptop screen DPI
|
||||
Xft.dpi: 216
|
||||
{{- end}}
|
||||
|
||||
Xft.autohint: 0
|
||||
Xft.lcdfilter: lcddefault
|
||||
Xft.hintstyle: hintfull
|
||||
Xft.hinting: 1
|
||||
Xft.antialias: 1
|
||||
Xft.rgba: rgb
|
||||
|
||||
!---------!
|
||||
! Gruvbox !
|
||||
! --------!
|
||||
|
||||
! hard contrast: *background: #1d2021
|
||||
! medium contrast: *background: #282828
|
||||
! soft contrast: *background: #32302f
|
||||
! *background: #1d2021
|
||||
! *foreground: #ebdbb2
|
||||
! ! Black + DarkGrey
|
||||
! *color0: #282828
|
||||
! *color8: #928374
|
||||
! ! DarkRed + Red
|
||||
! *color1: #cc241d
|
||||
! *color9: #fb4934
|
||||
! ! DarkGreen + Green
|
||||
! *color2: #98971a
|
||||
! *color10: #b8bb26
|
||||
! ! DarkYellow + Yellow
|
||||
! *color3: #d79921
|
||||
! *color11: #fabd2f
|
||||
! ! DarkBlue + Blue
|
||||
! *color4: #458588
|
||||
! *color12: #83a598
|
||||
! ! DarkMagenta + Magenta
|
||||
! *color5: #b16286
|
||||
! *color13: #d3869b
|
||||
! ! DarkCyan + Cyan
|
||||
! *color6: #689d6a
|
||||
! *color14: #8ec07c
|
||||
! ! LightGrey + White
|
||||
! *color7: #a89984
|
||||
! *color15: #ebdbb2
|
||||
|
||||
!------------!
|
||||
! Everforest !
|
||||
!------------!
|
||||
|
||||
! special
|
||||
*.foreground: #d8caac
|
||||
*.background: #323d43
|
||||
*.cursorColor: #7fbbb3
|
||||
! black
|
||||
*.color0: #4a555b
|
||||
*.color8: #525c62
|
||||
! red
|
||||
*.color1: #e26c6e
|
||||
*.color9: #e68183
|
||||
! green
|
||||
*.color2: #9bb86f
|
||||
*.color10: #a7c080
|
||||
! yellow
|
||||
*.color3: #d5b26b
|
||||
*.color11: #dbbc7f
|
||||
! blue
|
||||
*.color4: #6eb2a9
|
||||
*.color12: #7fbbb3
|
||||
! magenta
|
||||
*.color5: #cf87a9
|
||||
*.color13: #d699b6
|
||||
! cyan
|
||||
*.color6: #72b783
|
||||
*.color14: #83c092
|
||||
! white
|
||||
*.color7: #d0bf9b
|
||||
*.color15: #d8caac
|
||||
|
||||
!---------!
|
||||
! Zenburn !
|
||||
!---------!
|
||||
|
||||
! *background: #3f3f3f
|
||||
! *foreground: #dcdccc
|
||||
! ! Black + DarkGrey
|
||||
! *color0: #282828
|
||||
! *color8: #709080
|
||||
! ! DarkRed + Red
|
||||
! *color1: #705050
|
||||
! *color9: #dca3a3
|
||||
! ! DarkGreen + Green
|
||||
! *color2: #60b48a
|
||||
! *color10: #c3bf9f
|
||||
! ! DarkYellow + Yellow
|
||||
! *color3: #f0deae
|
||||
! *color11: #dfcf9f
|
||||
! ! DarkBlue + Blue
|
||||
! *color4: #506070
|
||||
! *color12: #94bff3
|
||||
! ! DarkMagenta + Magenta
|
||||
! *color5: #dc8cc3
|
||||
! *color13: #ec93d3
|
||||
! ! DarkCyan + Cyan
|
||||
! *color6: #8cd0d3
|
||||
! *color14: #93e0e3
|
||||
! ! LightGrey + White
|
||||
! *color7: #dcdccc
|
||||
! *color15: #ffffff
|
||||
|
||||
!!! urxvt
|
||||
URxvt.perl-ext-common: default,matcher
|
||||
URxvt*buffered: true
|
||||
URxvt*saveLines: 5000
|
||||
URxvt*cursorBlink: true
|
||||
URxvt*borderless: 1
|
||||
URxvt*internalBorder: 20
|
||||
URxvt*scrollBar: false
|
||||
URxvt.url-launcher: /usr/bin/xdg-open
|
||||
URxvt.matcher.button: 1
|
||||
URxvt.clipboard.autocopy: true
|
||||
|
||||
! do not scroll with output
|
||||
URxvt*scrollTtyOutput: false
|
||||
! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
|
||||
URxvt*scrollWithBuffer: true
|
||||
! scroll back to the bottom on keypress
|
||||
URxvt*scrollTtyKeypress: true
|
||||
! disable scrollback buffer in secondary screen (allows scrolling pager when using 'less' etc)
|
||||
URxvt.secondaryScreen: 1
|
||||
URxvt.secondaryScroll: 0
|
||||
! Disable printing the terminal contents when pressing PrintScreen.
|
||||
URxvt.print-pipe: "cat > /dev/null"
|
||||
!! copy/paste
|
||||
! disable default ctrl-shift binding
|
||||
URxvt.iso14755: false
|
||||
URxvt.iso14755_52: false
|
||||
! disable default copy/paste bindings
|
||||
URxvt.keysym.Control-Meta-c: builtin-string:
|
||||
URxvt.keysym.Control-Meta-v: builtin-string:
|
||||
! new copy/paste bindings
|
||||
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
|
||||
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
||||
!! font
|
||||
!URxvt.letterSpace: -1
|
||||
URxvt.font: xft:Hack:regular:size=12, \
|
||||
xft:Font Awesome 6 Brands:Regular:size=10, \
|
||||
xft:Font Awesome 6 Free:Solid:size=10, \
|
||||
xft:Font Awesome 6 Free:Regular:size=10
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
#!/bin/bash
|
||||
{{ if (or (eq .chezmoi.hostname "helix") (eq .chezmoi.hostname "triangulum")) }}
|
||||
bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9 10
|
||||
{{- end }}
|
||||
{{ if eq .chezmoi.hostname "hydrus"}}
|
||||
bspc monitor DP-0 -d 1 2 3 4 5
|
||||
bspc monitor DVI-I-1 -d 6 7 8 9 10
|
||||
{{ end }}
|
||||
bspc config border_width 2
|
||||
{{- if eq .chezmoi.hostname "helix" }}
|
||||
bspc config window_gap 10
|
||||
bspc config top_padding 70
|
||||
{{ else }}
|
||||
bspc config window_gap 5
|
||||
bspc config top_padding 38
|
||||
{{- end}}
|
||||
bspc config bottom_padding 0
|
||||
bspc config split_ratio 0.50
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
|
||||
bspc rule -a Galculator state=floating
|
||||
bspc rule -a vlc state=floating
|
||||
bspc rule -a Blueman-manager state=floating
|
||||
bspc rule -a Blueberry.py state=floating
|
||||
bspc rule -a Bitwarden state=floating
|
||||
bspc rule -a Leafpad state=floating
|
||||
bspc rule -a KeePassXC state=floating
|
||||
|
||||
bspc rule -a firefox desktop='^1' follow=on
|
||||
bspc rule -a Chromium desktop='^2' follow=on
|
||||
bspc rule -a Vivaldi-stable desktop='^2' follow=on
|
||||
bspc rule -a Evince desktop='4' follow=on
|
||||
bspc rule -a Soffice desktop='^4' follow=on
|
||||
bspc rule -a Simple-scan='^4' follow=on
|
||||
bspc rule -a Xsane desktop='^4' follow=on state=floating
|
||||
bspc rule -a Alacritty desktop='^6' follow=on
|
||||
bspc rule -a kitty desktop='^6' follow=on
|
||||
bspc rule -a URxvt desktop='^6' follow=on
|
||||
bspc rule -a URxvt:Ranger desktop='^3' follow=on
|
||||
bspc rule -a Thunar desktop='3' follow=on
|
||||
bspc rule -a Steam desktop='^5' follow=on state=floating
|
||||
bspc rule -a Lutris desktop='^5' follow=on state=floating
|
||||
bspc rule -a origin.exe desktop='^5' state=floating
|
||||
bspc rule -a Emacs desktop='^7' follow=on state=fullscreen
|
||||
bspc rule -a Dino desktop='^8'
|
||||
bspc rule -a Gajim desktop='^8'
|
||||
bspc rule -a discord desktop='^8'
|
||||
bspc rule -a Element desktop='^9'
|
||||
bspc rule -a Slack desktop='^9'
|
||||
bspc rule -a teams-for-linux desktop='^9'
|
||||
bspc rule -a thunderbird desktop='^10'
|
||||
bspc rule -a tutanota-desktop desktop='^10'
|
||||
|
||||
### Focus on 1st workspace by default
|
||||
bspc desktop -f 1
|
||||
|
||||
### Autostart
|
||||
grep -x sxhkd > /dev/null || sxhkd &
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
|
||||
xsettingsd &
|
||||
sh ~/.fehbg &
|
||||
pa-notify -t 3 &
|
||||
redshift -r &
|
||||
picom &
|
||||
dunst &
|
||||
dex -a &
|
||||
birdtray &
|
||||
{{- if (or (eq .chezmoi.hostname "helix") (eq .chezmoi.hostname "triangulum")) }}
|
||||
xidlehook --not-when-audio --not-when-fullscreen --timer 120 "killall -q redshift && xrandr --output eDP-1 --brightness .1" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" --timer 480 "xset s activate" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" &
|
||||
cbatticon -u 20 -i standard -c "systemctl hibernate" &
|
||||
$HOME/.local/bin/tint2-launcher &
|
||||
{{- end }}
|
||||
{{- if eq .chezmoi.hostname "hydrus"}}
|
||||
xidlehook --not-when-audio --not-when-fullscreen --timer 360 "xset s activate" "" &
|
||||
$HOME/.local/bin/dual-polybar-launcher &
|
||||
{{- end }}
|
||||
sleep 10 && nextcloud --background &
|
|
@ -1,417 +0,0 @@
|
|||
#################################
|
||||
# Shadows #
|
||||
#################################
|
||||
|
||||
|
||||
# Enabled client-side shadows on windows. Note desktop windows
|
||||
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
|
||||
# unless explicitly requested using the wintypes option.
|
||||
#
|
||||
# shadow = false
|
||||
shadow = true;
|
||||
|
||||
# The blur radius for shadows, in pixels. (defaults to 12)
|
||||
# shadow-radius = 12
|
||||
shadow-radius = 7;
|
||||
|
||||
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
|
||||
# shadow-opacity = .75
|
||||
|
||||
# The left offset for shadows, in pixels. (defaults to -15)
|
||||
# shadow-offset-x = -15
|
||||
shadow-offset-x = -7;
|
||||
|
||||
# The top offset for shadows, in pixels. (defaults to -15)
|
||||
# shadow-offset-y = -15
|
||||
shadow-offset-y = -7;
|
||||
|
||||
# Red color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-red = 0
|
||||
|
||||
# Green color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-green = 0
|
||||
|
||||
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-blue = 0
|
||||
|
||||
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
|
||||
# shadow-color = "#000000"
|
||||
|
||||
# Specify a list of conditions of windows that should have no shadow.
|
||||
#
|
||||
# examples:
|
||||
# shadow-exclude = "n:e:Notification";
|
||||
#
|
||||
# shadow-exclude = []
|
||||
shadow-exclude = [
|
||||
"name = 'Notification'",
|
||||
"class_g = 'Conky'",
|
||||
"class_g ?= 'Notify-osd'",
|
||||
"class_g = 'Cairo-clock'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
|
||||
# clip-shadow-above = []
|
||||
|
||||
# Specify a X geometry that describes the region in which shadow should not
|
||||
# be painted in, such as a dock window region. Use
|
||||
# shadow-exclude-reg = "x10+0+0"
|
||||
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
|
||||
#
|
||||
# shadow-exclude-reg = ""
|
||||
|
||||
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
|
||||
# xinerama-shadow-crop = false
|
||||
|
||||
|
||||
#################################
|
||||
# Fading #
|
||||
#################################
|
||||
|
||||
|
||||
# Fade windows in/out when opening/closing and when opacity changes,
|
||||
# unless no-fading-openclose is used.
|
||||
# fading = false
|
||||
fading = true;
|
||||
|
||||
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
|
||||
# fade-in-step = 0.028
|
||||
fade-in-step = 0.03;
|
||||
|
||||
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
|
||||
# fade-out-step = 0.03
|
||||
fade-out-step = 0.03;
|
||||
|
||||
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
|
||||
fade-delta = 5
|
||||
|
||||
# Specify a list of conditions of windows that should not be faded.
|
||||
fade-exclude = [ "class_g = 'xsecurelock'" ];
|
||||
|
||||
# Do not fade on window open/close.
|
||||
# no-fading-openclose = false
|
||||
|
||||
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
|
||||
# no-fading-destroyed-argb = false
|
||||
|
||||
|
||||
#################################
|
||||
# Transparency / Opacity #
|
||||
#################################
|
||||
|
||||
|
||||
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
|
||||
# inactive-opacity = 1
|
||||
inactive-opacity = 0.95;
|
||||
|
||||
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
|
||||
# frame-opacity = 1.0
|
||||
frame-opacity = 0.9;
|
||||
|
||||
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
|
||||
# inactive-opacity-override = true
|
||||
inactive-opacity-override = false;
|
||||
|
||||
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
|
||||
# active-opacity = 1.0
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
|
||||
# inactive-dim = 0.0
|
||||
|
||||
# Specify a list of conditions of windows that should never be considered focused.
|
||||
# focus-exclude = []
|
||||
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
||||
|
||||
# Use fixed inactive dim value, instead of adjusting according to window opacity.
|
||||
# inactive-dim-fixed = 1.0
|
||||
|
||||
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
|
||||
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
|
||||
# Note we don't make any guarantee about possible conflicts with other
|
||||
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
|
||||
# example:
|
||||
# opacity-rule = [ "80:class_g = 'URxvt'" ];
|
||||
#
|
||||
# opacity-rule = []
|
||||
|
||||
|
||||
#################################
|
||||
# Corners #
|
||||
#################################
|
||||
|
||||
# Sets the radius of rounded window corners. When > 0, the compositor will
|
||||
# round the corners of windows. Does not interact well with
|
||||
# `transparent-clipping`.
|
||||
corner-radius = 0
|
||||
|
||||
# Exclude conditions for rounded corners.
|
||||
rounded-corners-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'"
|
||||
];
|
||||
|
||||
|
||||
#################################
|
||||
# Background-Blurring #
|
||||
#################################
|
||||
|
||||
|
||||
# Parameters for background blurring, see the *BLUR* section for more information.
|
||||
# blur-method =
|
||||
# blur-size = 12
|
||||
#
|
||||
# blur-deviation = false
|
||||
#
|
||||
# blur-strength = 5
|
||||
|
||||
# Blur background of semi-transparent / ARGB windows.
|
||||
# Bad in performance, with driver-dependent behavior.
|
||||
# The name of the switch may change without prior notifications.
|
||||
#
|
||||
# blur-background = false
|
||||
|
||||
# Blur background of windows when the window frame is not opaque.
|
||||
# Implies:
|
||||
# blur-background
|
||||
# Bad in performance, with driver-dependent behavior. The name may change.
|
||||
#
|
||||
# blur-background-frame = false
|
||||
|
||||
|
||||
# Use fixed blur strength rather than adjusting according to window opacity.
|
||||
# blur-background-fixed = false
|
||||
|
||||
|
||||
# Specify the blur convolution kernel, with the following format:
|
||||
# example:
|
||||
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
|
||||
#
|
||||
# blur-kern = ""
|
||||
blur-kern = "3x3box";
|
||||
|
||||
|
||||
# Exclude conditions for background blur.
|
||||
# blur-background-exclude = []
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
#################################
|
||||
# General Settings #
|
||||
#################################
|
||||
|
||||
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||
# daemon = false
|
||||
|
||||
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
|
||||
# `xrender` is the default one.
|
||||
#
|
||||
# backend = "glx"
|
||||
backend = "glx";
|
||||
|
||||
# Enable/disable VSync.
|
||||
# vsync = false
|
||||
vsync = true;
|
||||
|
||||
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||
# dbus = false
|
||||
|
||||
# Try to detect WM windows (a non-override-redirect window with no
|
||||
# child that has 'WM_STATE') and mark them as active.
|
||||
#
|
||||
# mark-wmwin-focused = false
|
||||
mark-wmwin-focused = true;
|
||||
|
||||
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
|
||||
# mark-ovredir-focused = false
|
||||
mark-ovredir-focused = true;
|
||||
|
||||
# Try to detect windows with rounded corners and don't consider them
|
||||
# shaped windows. The accuracy is not very high, unfortunately.
|
||||
#
|
||||
# detect-rounded-corners = false
|
||||
detect-rounded-corners = true;
|
||||
|
||||
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
|
||||
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
|
||||
#
|
||||
# detect-client-opacity = false
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
|
||||
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
|
||||
# provided that the WM supports it.
|
||||
#
|
||||
# use-ewmh-active-win = false
|
||||
|
||||
# Unredirect all windows if a full-screen opaque window is detected,
|
||||
# to maximize performance for full-screen windows. Known to cause flickering
|
||||
# when redirecting/unredirecting windows.
|
||||
#
|
||||
# unredir-if-possible = false
|
||||
|
||||
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
|
||||
# unredir-if-possible-delay = 0
|
||||
|
||||
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
|
||||
# unredir-if-possible-exclude = []
|
||||
|
||||
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
|
||||
# in the same group focused at the same time.
|
||||
#
|
||||
# detect-transient = false
|
||||
detect-transient = true;
|
||||
|
||||
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
|
||||
# group focused at the same time. This usually means windows from the same application
|
||||
# will be considered focused or unfocused at the same time.
|
||||
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
|
||||
#
|
||||
# detect-client-leader = false
|
||||
|
||||
# Resize damaged region by a specific number of pixels.
|
||||
# A positive value enlarges it while a negative one shrinks it.
|
||||
# If the value is positive, those additional pixels will not be actually painted
|
||||
# to screen, only used in blur calculation, and such. (Due to technical limitations,
|
||||
# with use-damage, those pixels will still be incorrectly painted to screen.)
|
||||
# Primarily used to fix the line corruption issues of blur,
|
||||
# in which case you should use the blur radius value here
|
||||
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
|
||||
# with a 5x5 one you use `--resize-damage 2`, and so on).
|
||||
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
|
||||
#
|
||||
# resize-damage = 1
|
||||
|
||||
# Specify a list of conditions of windows that should be painted with inverted color.
|
||||
# Resource-hogging, and is not well tested.
|
||||
#
|
||||
# invert-color-include = []
|
||||
|
||||
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
|
||||
# Might cause incorrect opacity when rendering transparent content (but never
|
||||
# practically happened) and may not work with blur-background.
|
||||
# My tests show a 15% performance boost. Recommended.
|
||||
#
|
||||
glx-no-stencil = true;
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes,
|
||||
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
||||
# Recommended if it works.
|
||||
#
|
||||
# glx-no-rebind-pixmap = false
|
||||
|
||||
# Disable the use of damage information.
|
||||
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
||||
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
|
||||
# The opposing option is use-damage
|
||||
#
|
||||
# no-use-damage = false
|
||||
use-damage = true;
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls, to make sure all draw
|
||||
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
||||
# with GLX backend for some users.
|
||||
#
|
||||
# xrender-sync-fence = false
|
||||
|
||||
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
|
||||
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
|
||||
# in the source tree for examples.
|
||||
#
|
||||
# glx-fshader-win = ""
|
||||
|
||||
# Force all windows to be painted with blending. Useful if you
|
||||
# have a glx-fshader-win that could turn opaque pixels transparent.
|
||||
#
|
||||
# force-win-blend = false
|
||||
|
||||
# Do not use EWMH to detect fullscreen windows.
|
||||
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
|
||||
#
|
||||
# no-ewmh-fullscreen = false
|
||||
|
||||
# Dimming bright windows so their brightness doesn't exceed this set value.
|
||||
# Brightness of a window is estimated by averaging all pixels in the window,
|
||||
# so this could comes with a performance hit.
|
||||
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
|
||||
#
|
||||
# max-brightness = 1.0
|
||||
|
||||
# Make transparent windows clip other windows like non-transparent windows do,
|
||||
# instead of blending on top of them.
|
||||
#
|
||||
# transparent-clipping = false
|
||||
|
||||
# Set the log level. Possible values are:
|
||||
# "trace", "debug", "info", "warn", "error"
|
||||
# in increasing level of importance. Case doesn't matter.
|
||||
# If using the "TRACE" log level, it's better to log into a file
|
||||
# using *--log-file*, since it can generate a huge stream of logs.
|
||||
#
|
||||
# log-level = "debug"
|
||||
log-level = "warn";
|
||||
|
||||
# Set the log file.
|
||||
# If *--log-file* is never specified, logs will be written to stderr.
|
||||
# Otherwise, logs will to written to the given file, though some of the early
|
||||
# logs might still be written to the stderr.
|
||||
# When setting this option from the config file, it is recommended to use an absolute path.
|
||||
#
|
||||
# log-file = "/path/to/your/log/file"
|
||||
|
||||
# Show all X errors (for debugging)
|
||||
# show-all-xerrors = false
|
||||
|
||||
# Write process ID to a file.
|
||||
# write-pid-path = "/path/to/your/log/file"
|
||||
|
||||
# Window type settings
|
||||
#
|
||||
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
|
||||
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
|
||||
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
|
||||
# "tooltip", "notification", "combo", and "dnd".
|
||||
#
|
||||
# Following per window-type options are available: ::
|
||||
#
|
||||
# fade, shadow:::
|
||||
# Controls window-type-specific shadow and fade settings.
|
||||
#
|
||||
# opacity:::
|
||||
# Controls default opacity of the window type.
|
||||
#
|
||||
# focus:::
|
||||
# Controls whether the window of this type is to be always considered focused.
|
||||
# (By default, all window types except "normal" and "dialog" has this on.)
|
||||
#
|
||||
# full-shadow:::
|
||||
# Controls whether shadow is drawn under the parts of the window that you
|
||||
# normally won't be able to see. Useful when the window has parts of it
|
||||
# transparent, and you want shadows in those areas.
|
||||
#
|
||||
# clip-shadow-above:::
|
||||
# Controls wether shadows that would have been drawn above the window should
|
||||
# be clipped. Useful for dock windows that should have no shadow painted on top.
|
||||
#
|
||||
# redir-ignore:::
|
||||
# Controls whether this type of windows should cause screen to become
|
||||
# redirected again after been unredirected. If you have unredir-if-possible
|
||||
# set, and doesn't want certain window to cause unnecessary screen redirection,
|
||||
# you can set this to `true`.
|
||||
#
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
|
||||
dock = { shadow = false; clip-shadow-above = true; }
|
||||
dnd = { shadow = false; }
|
||||
popup_menu = { opacity = 0.9; }
|
||||
dropdown_menu = { opacity = 0.9; }
|
||||
# menu = { shadow = false; };
|
||||
# dropdown_menu = { shadow = false; };
|
||||
# popup_menu = { shadow = false; };
|
||||
# utility = { shadow = false; };
|
||||
};
|
|
@ -1,132 +0,0 @@
|
|||
[global/wm]
|
||||
include-file = ~/.config/polybar/colors.ini
|
||||
include-file = ~/.config/polybar/modules.ini
|
||||
include-file = ~/.config/polybar/custom_modules.ini
|
||||
|
||||
margin-bottom = 0
|
||||
margin-top = 0
|
||||
|
||||
[bar/one]
|
||||
monitor = eDP-1
|
||||
monitor-fallback =
|
||||
monitor-strict = false
|
||||
enable-ipc = true
|
||||
override-redirect = true
|
||||
bottom = false
|
||||
fixed-center = true
|
||||
width = 100%
|
||||
height = 72
|
||||
offset-x = 0%
|
||||
offset-y = 0%
|
||||
dpi-x = 216
|
||||
dpi-y = 216
|
||||
background = ${color.background}
|
||||
foreground = ${color.foreground}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
line-size = 0
|
||||
line-color = ${color.background}
|
||||
border-bottom-size = 0
|
||||
border-bottom-color = ${color.foreground}
|
||||
padding = 1
|
||||
module-margin-left = 1
|
||||
module-margin-right = 0
|
||||
seperator =
|
||||
dim-value = 1.0
|
||||
locale = en_US.UTF-8
|
||||
|
||||
font-0 = Hack:size=10;3
|
||||
font-1 = Font Awesome 6 Free:style=Solid:size=12;3
|
||||
font-2 = Font Awesome 6 Free:style=Regular:size=12;3
|
||||
font-3 = Font Awesome 6 Brands:style=Regular:size=12;3
|
||||
|
||||
modules-left = workspaces sep title
|
||||
modules-center = spotify
|
||||
modules-right = keyboard sep pulseaudio-control sep battery0 sep date sep powermenu
|
||||
|
||||
tray-position = right
|
||||
tray-detached = false
|
||||
tray-maxsize = 40
|
||||
tray-background = ${color.background}
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
tray-padding = 0
|
||||
tray-scale = 1.0
|
||||
|
||||
wm-name = bspwm
|
||||
wm-restack = bspwm
|
||||
scroll-up = bspwm-desknext
|
||||
scroll-down = bspwm-deskprev
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
;scroll-up = bspc desktop -f prev.local
|
||||
;scroll-down = bspc desktop -f next.local
|
||||
double-click-left =
|
||||
double-click-middle =
|
||||
double-click-right =
|
||||
cursor-click =
|
||||
cursor-scroll =
|
||||
|
||||
[bar/two]
|
||||
monitor = eDP-1
|
||||
monitor-fallback =
|
||||
monitor-strict = false
|
||||
enable-ipc = true
|
||||
override-redirect = true
|
||||
bottom = true
|
||||
fixed-center = true
|
||||
width = 100%
|
||||
height = 32
|
||||
offset-x = 0%
|
||||
offset-y = 0%
|
||||
background = ${color.background}
|
||||
foreground = ${color.foreground}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
line-size = 0
|
||||
line-color = ${color.background}
|
||||
border-bottom-size = 0
|
||||
border-bottom-color = ${color.foreground}
|
||||
padding = 1
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
seperator =
|
||||
dim-value = 1.0
|
||||
locale = en_US.UTF-8
|
||||
|
||||
font-0 = Hack:size=10;3
|
||||
font-1 = Font Awesome 5 Free:style=Solid:size=12;3
|
||||
font-2 = Font Awesome 5 Free:style=Regular:size=12;3
|
||||
font-3 = Font Awesome 5 Brands:style=Regular:size=12;3
|
||||
|
||||
modules-left = workspaces sep title
|
||||
modules-center = spotify
|
||||
modules-right = cpu sep memory sep filesystem
|
||||
|
||||
tray-position = none
|
||||
tray-detached = false
|
||||
tray-maxsize = 16
|
||||
tray-background = ${color.background}
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
tray-padding = 0
|
||||
tray-scale = 1.0
|
||||
|
||||
wm-name = bspwm
|
||||
wm-restack = bspwm
|
||||
scroll-up = bspwm-desknext
|
||||
scroll-down = bspwm-deskprev
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
;scroll-up = bspc desktop -f prev.local
|
||||
;scroll-down = bspc desktop -f next.local
|
||||
double-click-left =
|
||||
double-click-middle =
|
||||
double-click-right =
|
||||
cursor-click =
|
||||
cursor-scroll =
|
||||
|
||||
[settings]
|
||||
screenchange-reload = false
|
|
@ -1,188 +0,0 @@
|
|||
#
|
||||
# wm independent hotkeys
|
||||
#
|
||||
|
||||
# terminal emulator
|
||||
super + Return
|
||||
kitty
|
||||
{{ if eq .chezmoi.hostname "helix"}}
|
||||
# power menu
|
||||
super + @End
|
||||
rofi -dpi 240 -show power-menu -modi power-menu:/usr/bin/rofi-power-menu
|
||||
|
||||
# program launcher
|
||||
super + @space
|
||||
rofi -dpi 240 -modi drun, run -show drun -show-icons
|
||||
{{ else }}
|
||||
# power menu
|
||||
super + @End
|
||||
rofi -show power-menu -modi power-menu:/usr/bin/rofi-power-menu
|
||||
|
||||
# program launcher
|
||||
super + @space
|
||||
rofi -modi drun, run -show drun -show-icons
|
||||
{{ end }}
|
||||
# make sxhkd reload its configuration files:
|
||||
super + Escape
|
||||
pkill -USR1 -x sxhkd
|
||||
|
||||
# Show list of open windows
|
||||
alt + @Tab
|
||||
rofi -show window
|
||||
|
||||
# Lock the screen
|
||||
ctrl + alt + l
|
||||
xset s activate
|
||||
|
||||
# Screenshot
|
||||
Print
|
||||
maim | xclip -selection clipboard -t image/png
|
||||
|
||||
alt + Print
|
||||
maim -s | xclip -selection clipboard -t image/png
|
||||
|
||||
shift + Print
|
||||
maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
|
||||
|
||||
# bspwm hotkeys
|
||||
#
|
||||
|
||||
# quit/restart bspwm
|
||||
super + alt + {q,r}
|
||||
bspc {quit,wm -r}
|
||||
|
||||
# close and kill
|
||||
super + {_,shift + }q
|
||||
bspc node -{c,k}
|
||||
|
||||
# alternate between the tiled and monocle layout
|
||||
super + m
|
||||
bspc desktop -l next
|
||||
|
||||
# send the newest marked node to the newest preselected node
|
||||
super + y
|
||||
bspc node newest.marked.local -n newest.!automatic.local
|
||||
|
||||
# swap the current node and the biggest window
|
||||
super + g
|
||||
bspc node -s biggest.window
|
||||
|
||||
#
|
||||
# state/flags
|
||||
#
|
||||
|
||||
# set the window state
|
||||
super + {t,shift + t,s,f}
|
||||
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
|
||||
|
||||
# set the node flags
|
||||
super + ctrl + {m,x,y,z}
|
||||
bspc node -g {marked,locked,sticky,private}
|
||||
|
||||
#
|
||||
# focus/swap
|
||||
#
|
||||
|
||||
# focus the node in the given direction
|
||||
super + {_,shift + }{h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
|
||||
# focus the node for the given path jump
|
||||
super + {p,b,comma,period}
|
||||
bspc node -f @{parent,brother,first,second}
|
||||
|
||||
# focus the next/previous window in the current desktop
|
||||
super + {_,shift + }c
|
||||
bspc node -f {next,prev}.local.!hidden.window
|
||||
|
||||
# focus the next/previous desktop in the current monitor
|
||||
super + bracket{left,right}
|
||||
bspc desktop -f {prev,next}.local
|
||||
|
||||
# focus the last node/desktop
|
||||
super + {grave,Tab}
|
||||
bspc {node,desktop} -f last
|
||||
|
||||
# focus the older or newer node in the focus history
|
||||
super + {o,i}
|
||||
bspc wm -h off; \
|
||||
bspc node {older,newer} -f; \
|
||||
bspc wm -h on
|
||||
|
||||
# focus or send to the given desktop
|
||||
super + {_,shift + }{1-9,0}
|
||||
bspc {desktop -f,node -d} '^{1-9,10}'
|
||||
|
||||
#
|
||||
# preselect
|
||||
#
|
||||
|
||||
# preselect the direction
|
||||
super + ctrl + {h,j,k,l}
|
||||
bspc node -p {west,south,north,east}
|
||||
|
||||
# preselect the ratio
|
||||
super + ctrl + {1-9}
|
||||
bspc node -o 0.{1-9}
|
||||
|
||||
# cancel the preselection for the focused node
|
||||
super + ctrl + space
|
||||
bspc node -p cancel
|
||||
|
||||
# cancel the preselection for the focused desktop
|
||||
super + ctrl + shift + space
|
||||
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
|
||||
|
||||
#
|
||||
# move/resize
|
||||
#
|
||||
|
||||
# expand a window by moving one of its side outward
|
||||
super + alt + {h,j,k,l}
|
||||
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
||||
|
||||
# contract a window by moving one of its side inward
|
||||
super + alt + shift + {h,j,k,l}
|
||||
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
||||
|
||||
# move a floating window
|
||||
super + {Left,Down,Up,Right}
|
||||
bspc node -v {-20 0,0 20,0 -20,20 0}
|
||||
|
||||
### Function Keys
|
||||
|
||||
XF86AudioMute
|
||||
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
|
||||
XF86AudioLowerVolume
|
||||
pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
|
||||
XF86AudioRaiseVolume
|
||||
pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
|
||||
XF86AudioMicMute
|
||||
pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
|
||||
XF86MonBrightnessDown
|
||||
xbacklight -dec 2
|
||||
|
||||
XF86MonBrightnessUp
|
||||
xbacklight -inc 2
|
||||
|
||||
XF86Display
|
||||
mirror-outputs
|
||||
|
||||
XF86WLAN
|
||||
toggle-wifi
|
||||
|
||||
XF86Tools
|
||||
lxappearance
|
||||
|
||||
XF86Search
|
||||
pamac-manager
|
||||
|
||||
XF86LaunchA
|
||||
rofi -show window
|
||||
|
||||
XF86Explorer
|
||||
thunar
|
|
@ -1,280 +0,0 @@
|
|||
#---- Generated by tint2conf aeaf ----
|
||||
# See https://gitlab.com/o9000/tint2/wikis/Configure for
|
||||
# full documentation of the configuration options.
|
||||
|
||||
#-------------------------------------
|
||||
# Gradients
|
||||
|
||||
# Gradient 1: thin film effect
|
||||
gradient = horizontal
|
||||
start_color = #111122 30
|
||||
end_color = #112211 30
|
||||
color_stop = 60 #221111 30
|
||||
|
||||
# Gradient 2: radial glow
|
||||
gradient = radial
|
||||
start_color = #ffffff 20
|
||||
end_color = #ffffff 0
|
||||
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
|
||||
# Background 1: Panel
|
||||
rounded = 0
|
||||
border_width = 0
|
||||
border_sides = TBLR
|
||||
background_color = #323d43 100
|
||||
border_color = #323d43 30
|
||||
background_color_hover = #323d43 70
|
||||
border_color_hover = #323d43 30
|
||||
background_color_pressed = #323d43 100
|
||||
border_color_pressed = #323d43 30
|
||||
|
||||
# Background 2: Default task, Iconified task
|
||||
rounded = 4
|
||||
border_width = 1
|
||||
border_sides = TBLR
|
||||
background_color = #4a555b 20
|
||||
border_color = #525c62 30
|
||||
background_color_hover = #aaaaaa 22
|
||||
border_color_hover = #eaeaea 44
|
||||
background_color_pressed = #555555 4
|
||||
border_color_pressed = #eaeaea 44
|
||||
|
||||
# Background 3: Active task
|
||||
rounded = 4
|
||||
border_width = 1
|
||||
border_sides = TBLR
|
||||
background_color = #7fbbb3 40
|
||||
border_color = #d8caac 40
|
||||
background_color_hover = #aaaaaa 22
|
||||
border_color_hover = #eaeaea 44
|
||||
background_color_pressed = #555555 4
|
||||
border_color_pressed = #eaeaea 44
|
||||
|
||||
# Background 4: Urgent task
|
||||
rounded = 4
|
||||
border_width = 1
|
||||
border_sides = TBLR
|
||||
background_color = #e26c6e 100
|
||||
border_color = #d5b26b 100
|
||||
background_color_hover = #dbbc7f 100
|
||||
border_color_hover = #d5b26b 100
|
||||
background_color_pressed = #555555 4
|
||||
border_color_pressed = #d5b26b 100
|
||||
|
||||
# Background 5: Tooltip
|
||||
rounded = 1
|
||||
border_width = 1
|
||||
border_sides = TBLR
|
||||
background_color = #9bb86f 100
|
||||
border_color = #4a555b 100
|
||||
background_color_hover = #ffffaa 100
|
||||
border_color_hover = #000000 100
|
||||
background_color_pressed = #ffffaa 100
|
||||
border_color_pressed = #000000 100
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = TEEB:SCP
|
||||
panel_size = 100% 48
|
||||
scale_relative_to_dpi = 216
|
||||
panel_margin = 0 0
|
||||
panel_padding = 2 0 2
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = top center horizontal
|
||||
panel_layer = bottom
|
||||
panel_monitor = all
|
||||
panel_shrink = 0
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 1
|
||||
mouse_effects = 1
|
||||
font_shadow = 0
|
||||
mouse_hover_icon_asb = 100 0 10
|
||||
mouse_pressed_icon_asb = 100 0 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = multi_desktop
|
||||
taskbar_hide_if_empty = 1
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_hide_different_desktop = 0
|
||||
taskbar_always_show_all_desktop_tasks = 0
|
||||
taskbar_name_padding = 4 2
|
||||
taskbar_name_background_id = 0
|
||||
taskbar_name_active_background_id = 0
|
||||
taskbar_name_font = Hack 18
|
||||
taskbar_name_font_color = #d8caac 100
|
||||
taskbar_name_active_font_color = #d0bf9b 100
|
||||
taskbar_distribute_size = 0
|
||||
taskbar_sort_order = none
|
||||
task_align = left
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 1
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 150 35
|
||||
task_padding = 2 4 2
|
||||
task_tooltip = 1
|
||||
task_thumbnail = 0
|
||||
task_thumbnail_size = 210
|
||||
task_font = Hack 10
|
||||
task_font_color = #d8caac 100
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 2 4 4
|
||||
systray_background_id = 0
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 28
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
systray_name_filter =
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 2 4 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_background_id = 0
|
||||
launcher_icon_size = 24
|
||||
launcher_icon_asb = 100 0 0
|
||||
launcher_icon_theme_override = 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = tint2conf.desktop
|
||||
launcher_item_app = firefox.desktop
|
||||
launcher_item_app = iceweasel.desktop
|
||||
launcher_item_app = chromium-browser.desktop
|
||||
launcher_item_app = google-chrome.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %a %d %b
|
||||
time1_font = Hack 14
|
||||
time2_font = Hack 10
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
clock_font_color = #d8caac 100
|
||||
clock_padding = 6 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip = %H:%M %A %d %B %Y
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = gsimplecal
|
||||
clock_rclick_command =
|
||||
clock_mclick_command =
|
||||
clock_uwheel_command =
|
||||
clock_dwheel_command =
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_tooltip = 1
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "Low battery: 10%"
|
||||
battery_full_cmd = notify-send "Battery done charging"
|
||||
bat1_font = Hack 14
|
||||
battery_font_color = #d8caac 100
|
||||
bat1_format = | Bat: %s %p %t
|
||||
bat2_format =
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
battery_lclick_command =
|
||||
battery_rclick_command =
|
||||
battery_mclick_command =
|
||||
battery_uwheel_command =
|
||||
battery_dwheel_command =
|
||||
ac_connected_cmd = notify-send "AC Power connected"
|
||||
ac_disconnected_cmd = "AC Power disconnected"
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 4 4
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #4a555b 100
|
||||
tooltip_font = Hack 14
|
||||
|
||||
#-------------------------------------
|
||||
# Separators
|
||||
|
||||
# Separator1
|
||||
separator = new
|
||||
separator_background_id = 0
|
||||
separator_color = #7fbbb3
|
||||
separator_style = dots
|
||||
separator_size = 4
|
||||
separator_padding = 12 0
|
||||
|
||||
# Separator2
|
||||
separator = new
|
||||
separator_background_id = 0
|
||||
separator_color = #7fbbb3 80
|
||||
separator_style = line
|
||||
separator_size = 2
|
||||
separator_padding = 12 0
|
||||
|
||||
# Separator3
|
||||
separator = new
|
||||
separator_background_id = 0
|
||||
separator_color = #7fbbb3
|
||||
separator_style = empty
|
||||
separator_size = 6
|
||||
separator_padding = 12 0
|
||||
|
||||
#-------------------------------------
|
||||
# Executors
|
||||
|
||||
# Exec1
|
||||
# Note the use of "stdbuf -oL" to force the program to flush the output line by line.
|
||||
execp = new
|
||||
execp_command = free -b -s10| stdbuf -oL awk '/^Mem:/ { printf "Mem: %s / \n", $3 }' | stdbuf -oL numfmt --to=iec-i --field=2 -d' '
|
||||
execp_interval = 10
|
||||
execp_continuous = 1
|
||||
execp_font = Hack 14
|
||||
execp_font_color = #d8caac 100
|
||||
|
||||
# Exec2
|
||||
execp = new
|
||||
execp_command = free -b -s10| stdbuf -oL awk '/^Mem:/ { printf "%s %.0f%%\n", $2, 100 * ($2 - $7) / $2 }' | stdbuf -oL numfmt --to=iec-i --field=1 -d' '
|
||||
execp_interval = 10
|
||||
execp_continuous = 1
|
||||
execp_font = Hack 14
|
||||
execp_font_color = #d8caac 100
|
||||
|
||||
#-------------------------------------
|
||||
# Buttons
|
||||
|
||||
#Button1
|
||||
button = new
|
||||
button_text =
|
||||
button_icon = /usr/share/icons/Papirus-Dark/24x24/actions/exit.svg
|
||||
button_background_id = 0
|
||||
button_lclick_command = rofi -dpi 240 -show power-menu -modi power-menu:/usr/bin/rofi-power-menu
|
||||
button_mclick_command = rofi -dpi 240 -show power-menu -modi power-menu:"/usr/bin/rofi-power-menu --choose suspend/hibernate"
|
||||
button_rclick_command = rofi -dpi 240 -show power-menu -modi power-menu:"/usr/bin/rofi-power-menu --choices reboot/shutdown"
|
|
@ -1,774 +0,0 @@
|
|||
; Disable package.el early so it won't start loading packages before init is loaded
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
;; No thanks
|
||||
(setq inhibit-startup-message t) ; Disable startup message
|
||||
(scroll-bar-mode -1) ; Disable visible scrollbar
|
||||
(tool-bar-mode -1) ; Disable the toolbar
|
||||
(tooltip-mode -1) ; Disable tooltips
|
||||
(set-fringe-mode 10) ; Add come extra space to the left/right sides
|
||||
(menu-bar-mode -1) ; Disable the menu bar
|
||||
(setq-default custom-file null-device) ; Write customizations not in this file to the null device (AKA stop littering in my init.el)
|
||||
(setq confirm-kill-processes nil) ; Stop asking about running processes on exit
|
||||
|
||||
;; Visible bell
|
||||
(setq visible-bell t)
|
||||
|
||||
; Font - Does nothing if mixed-pitch package is used
|
||||
;(set-face-attribute 'default nil :font "ibm plex mono light" :height 100)
|
||||
|
||||
;; Make ESC quit prompts
|
||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||
|
||||
;; paren/bracket pairs
|
||||
(show-paren-mode t)
|
||||
(setq-default show-paren-style 'parenthesis)
|
||||
(electric-pair-mode 1)
|
||||
|
||||
;; Profile emacs startup
|
||||
(add-hook 'emacs-startup-hook
|
||||
(lambda ()
|
||||
(message "*** Emacs loaded in %s with %d garbage collections."
|
||||
(format "%.2f seconds"
|
||||
(float-time
|
||||
(time-subtract after-init-time before-init-time)))
|
||||
gcs-done)))
|
||||
|
||||
;; Change the user-emacs-directory to keep ~/.emacs.d clean
|
||||
(setq user-emacs-directory (expand-file-name "~/.cache/emacs/")
|
||||
url-history-file (expand-file-name "url/history" user-emacs-directory))
|
||||
|
||||
;; Store autosaves in cache dir instead of littering all over the filesystem
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" "~/.cache/emacs/autosave/" t)))
|
||||
|
||||
;; No annoying Windows errors
|
||||
(set-default-coding-systems 'utf-8)
|
||||
|
||||
;; Disable suspend-frame shortcut
|
||||
(define-key global-map "\C-z" nil)
|
||||
|
||||
;; More reasonable keybinds for resizing windows
|
||||
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
|
||||
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
|
||||
(global-set-key (kbd "S-C-<down>") 'shrink-window)
|
||||
(global-set-key (kbd "S-C-<up>") 'enlarge-window)
|
||||
|
||||
;; scrolling
|
||||
(setq mouse-wheel-scroll-amount '(4 ((shift) . 1))) ; 1: lines to scroll, 2: while holding shift
|
||||
(setq mouse-wheel-progressive-speed nil) ; acceleration
|
||||
(setq mouse-wheel-follow-mouse 't) ; scroll window under cursor
|
||||
(setq scroll-step 1) ; keyboard scrolling
|
||||
|
||||
;; Tabs
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(setq indent-line-function 'insert-tab)
|
||||
|
||||
;; Recent files
|
||||
(recentf-mode 1)
|
||||
(setq recentf-max-menu-items 25)
|
||||
(setq recentf-max-saved-items 25)
|
||||
|
||||
;; Line numbers
|
||||
(setq column-number-mode t)
|
||||
(dolist (mode '(text-mode-hook
|
||||
prog-mode-hook
|
||||
conf-mode-hook))
|
||||
(add-hook mode (lambda () (display-line-numbers-mode 1))))
|
||||
|
||||
;; Show vertical line at column 80 in prog-mode
|
||||
(setq-default fill-column 80)
|
||||
(add-hook 'prog-mode-hook #'display-fill-column-indicator-mode)
|
||||
|
||||
;; Install and load straight.el
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 5))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
|
||||
;;;;;;;;;;;;;; Not needed when using straight.el ;;;;;;;;;;;;;;
|
||||
;; Initialize package sources
|
||||
;(require 'package)
|
||||
|
||||
;(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
; ("org" . "https://orgmode.org/elpa/")
|
||||
; ("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
|
||||
;(package-initialize)
|
||||
;(unless package-archive-contents
|
||||
; (package-refresh-contents))
|
||||
|
||||
;; Initialize use-package on non-Linux platforms
|
||||
;(unless (package-installed-p 'use-package)
|
||||
; (package-install 'use-package))
|
||||
|
||||
;(require 'use-package)
|
||||
;(setq use-package-always-ensure t)
|
||||
;;;;;;;;;;;;;;
|
||||
|
||||
;; Install use-package
|
||||
(straight-use-package 'use-package)
|
||||
|
||||
;; Make use-package use straight.el
|
||||
(use-package straight
|
||||
:custom (straight-use-package-by-default t))
|
||||
|
||||
;; Theme
|
||||
|
||||
(setq custom-safe-themes t)
|
||||
|
||||
;; (use-package everforest
|
||||
;; :straight (:type git :repo "https://git.sr.ht/~theorytoe/everforest-theme"))
|
||||
|
||||
(add-to-list 'custom-theme-load-path "~/.cache/emacs/custom/everforest-theme")
|
||||
(load-theme 'everforest-hard-dark t)
|
||||
|
||||
;; Help distinguish work buffers from others like sidebars and terminal
|
||||
;; (use-package solaire-mode
|
||||
;; :init
|
||||
;; (solaire-global-mode t))
|
||||
|
||||
;; Icons
|
||||
(use-package all-the-icons)
|
||||
|
||||
;; Modeline
|
||||
|
||||
(use-package minions
|
||||
:hook (doom-modeline-mode . minions-mode)
|
||||
(simple-modeline-mode . minions-mode))
|
||||
|
||||
(use-package doom-modeline
|
||||
:init (doom-modeline-mode)
|
||||
:custom
|
||||
(doom-modeline-height 30)
|
||||
(doom-modeline-bar-width .75)
|
||||
(doom-modeline-window-width-limit fill-column)
|
||||
(doom-modeline-lsp t)
|
||||
(doom-modeline-minor-modes t)
|
||||
(doom-modeline-persp-name nil)
|
||||
(doom-modeline-buffer-file-name-style 'truncate-upto-project)
|
||||
(doom-modeline-major-mode-icon t)
|
||||
(doom-modeline-major-mode-color-icon t)
|
||||
(doom-modeline-enable-word-count t)
|
||||
(doom-modeline-env-version t)
|
||||
(doom-modeline-env-load-string "..."))
|
||||
|
||||
;; Don't remind me about some minor modes
|
||||
(use-package diminish)
|
||||
|
||||
;; Automatically set paths to the new user-emacs-directory
|
||||
(use-package no-littering)
|
||||
|
||||
;; Automatically clean whitespace
|
||||
(use-package ws-butler
|
||||
:hook ((text-mode . ws-butler-mode)
|
||||
(prog-mode . ws-butler-mode)))
|
||||
|
||||
;; Overview of keybindings available based on prefix keys
|
||||
(use-package which-key
|
||||
:init (which-key-mode)
|
||||
:config
|
||||
(setq which-key-idle-delay 0.3))
|
||||
|
||||
;; Save history over restarts
|
||||
(use-package savehist
|
||||
:init
|
||||
(savehist-mode))
|
||||
|
||||
;; Completion with vertico/consult
|
||||
|
||||
(use-package vertico
|
||||
:init
|
||||
(vertico-mode)
|
||||
|
||||
;; Different scroll margin
|
||||
;; (set vertico-scroll-margin 0)
|
||||
|
||||
;; Show more candidates
|
||||
;; (setq vertico-count 20)
|
||||
|
||||
;; Grow and shrink the Vertico minibuffer
|
||||
;; (setq vertico-resize t)
|
||||
|
||||
;; Optionally enable cycling for `vertico-next' and `vertico-previous'.
|
||||
;; (setq vertico-cycle t)
|
||||
)
|
||||
|
||||
(use-package emacs
|
||||
:init
|
||||
;; Add prompt indicator to `completing-read-multiple'.
|
||||
(defun crm-indicator (args)
|
||||
(cons (format "[CRM%s] %s"
|
||||
(replace-regexp-in-string
|
||||
"\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" ""
|
||||
crm-separator)
|
||||
(car args))
|
||||
(cdr args)))
|
||||
(advice-add #'completing-read-multiple :filter-args #'crm-indicator)
|
||||
;; Do not allow the cursor in the minibuffer prompt
|
||||
(setq minibuffer-prompt-properties
|
||||
'(read-only t cursor-intangible t face minibuffer-prompt))
|
||||
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
|
||||
;; Emacs 28: Hide commands in M-x which do not work in the current mode.
|
||||
;; Vertico commands are hidden in normal buffers.
|
||||
(setq read-extended-command-predicate
|
||||
#'command-completion-default-include-p)
|
||||
(setq enable-recursive-minibuffers t))
|
||||
|
||||
(use-package consult
|
||||
:bind (;; C-c bindings (mode-specific-map)
|
||||
("C-c h" . consult-history)
|
||||
("C-c m" . consult-mode-command)
|
||||
("C-c k" . consult-kmacro)
|
||||
;; C-x bindings (ctl-x-map)
|
||||
("C-x C-r" . consult-recent-file)
|
||||
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
|
||||
("C-x b" . consult-buffer) ;; orig. switch-to-buffer
|
||||
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
|
||||
("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
|
||||
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
|
||||
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
|
||||
;; Custom M-# bindings for fast register access
|
||||
("M-#" . consult-register-load)
|
||||
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
|
||||
("C-M-#" . consult-register)
|
||||
;; Other custom bindings
|
||||
("M-y" . consult-yank-pop) ;; orig. yank-pop
|
||||
("<help> a" . consult-apropos) ;; orig. apropos-command
|
||||
;; M-g bindings (goto-map)
|
||||
("M-g e" . consult-compile-error)
|
||||
;; ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
|
||||
("M-g f" . consult-flycheck)
|
||||
("M-g g" . consult-goto-line) ;; orig. goto-line
|
||||
("M-g M-g" . consult-goto-line) ;; orig. goto-line
|
||||
("M-g o" . consult-outline) ;; Alternative: consult-org-heading
|
||||
("M-g m" . consult-mark)
|
||||
("M-g k" . consult-global-mark)
|
||||
("M-g i" . consult-imenu)
|
||||
("M-g I" . consult-imenu-multi)
|
||||
;; M-s bindings (search-map)
|
||||
("M-s d" . consult-find)
|
||||
("M-s D" . consult-locate)
|
||||
("M-s g" . consult-grep)
|
||||
("M-s G" . consult-git-grep)
|
||||
("M-s r" . consult-ripgrep)
|
||||
("M-s l" . consult-line)
|
||||
("M-s L" . consult-line-multi)
|
||||
("M-s m" . consult-multi-occur)
|
||||
("M-s k" . consult-keep-lines)
|
||||
("M-s u" . consult-focus-lines)
|
||||
;; Isearch integration
|
||||
("M-s e" . consult-isearch-history)
|
||||
:map isearch-mode-map
|
||||
("M-e" . consult-isearch-history) ;; orig. isearch-edit-string
|
||||
("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string
|
||||
("M-s l" . consult-line) ;; needed by consult-line to detect isearch
|
||||
("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch
|
||||
;; Minibuffer history
|
||||
:map minibuffer-local-map
|
||||
("M-s" . consult-history) ;; orig. next-matching-history-element
|
||||
("M-r" . consult-history)) ;; orig. previous-matching-history-element
|
||||
|
||||
;; Enable automatic preview at point in the *Completions* buffer. This is
|
||||
;; relevant when you use the default completion UI.
|
||||
:hook (completion-list-mode . consult-preview-at-point-mode)
|
||||
|
||||
;; The :init configuration is always executed (Not lazy)
|
||||
:init
|
||||
|
||||
;; Optionally configure the register formatting. This improves the register
|
||||
;; preview for `consult-register', `consult-register-load',
|
||||
;; `consult-register-store' and the Emacs built-ins.
|
||||
(setq register-preview-delay 0.5
|
||||
register-preview-function #'consult-register-format)
|
||||
|
||||
;; Optionally tweak the register preview window.
|
||||
;; This adds thin lines, sorting and hides the mode line of the window.
|
||||
(advice-add #'register-preview :override #'consult-register-window)
|
||||
|
||||
;; Use Consult to select xref locations with preview
|
||||
(setq xref-show-xrefs-function #'consult-xref
|
||||
xref-show-definitions-function #'consult-xref)
|
||||
|
||||
;; Configure other variables and modes in the :config section,
|
||||
;; after lazily loading the package.
|
||||
:config
|
||||
|
||||
;; Optionally configure preview. The default value
|
||||
;; is 'any, such that any key triggers the preview.
|
||||
;; (setq consult-preview-key 'any)
|
||||
(setq consult-preview-key (kbd "M-."))
|
||||
;; (setq consult-preview-key (list (kbd "<S-down>") (kbd "<S-up>")))
|
||||
;; For some commands and buffer sources it is useful to configure the
|
||||
;; :preview-key on a per-command basis using the `consult-customize' macro.
|
||||
(consult-customize
|
||||
consult-theme :preview-key '(:debounce 0.2 any)
|
||||
consult-ripgrep consult-git-grep consult-grep
|
||||
consult-bookmark consult-recent-file consult-xref
|
||||
consult--source-bookmark consult--source-file-register
|
||||
consult--source-recent-file consult--source-project-recent-file
|
||||
;; :preview-key (kbd "M-.")
|
||||
:preview-key '(:debounce 0.4 any))
|
||||
|
||||
;; Optionally configure the narrowing key.
|
||||
;; Both < and C-+ work reasonably well.
|
||||
(setq consult-narrow-key "<") ;; (kbd "C-+")
|
||||
|
||||
;; Optionally make narrowing help available in the minibuffer.
|
||||
;; You may want to use `embark-prefix-help-command' or which-key instead.
|
||||
;; (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help)
|
||||
|
||||
;; By default `consult-project-function' uses `project-root' from project.el.
|
||||
;; Optionally configure a different project root function.
|
||||
;; There are multiple reasonable alternatives to chose from.
|
||||
;;;; 1. project.el (the default)
|
||||
;; (setq consult-project-function #'consult--default-project--function)
|
||||
;;;; 2. projectile.el (projectile-project-root)
|
||||
;; (autoload 'projectile-project-root "projectile")
|
||||
;; (setq consult-project-function (lambda (_) (projectile-project-root)))
|
||||
;;;; 3. vc.el (vc-root-dir)
|
||||
;; (setq consult-project-function (lambda (_) (vc-root-dir)))
|
||||
;;;; 4. locate-dominating-file
|
||||
;; (setq consult-project-function (lambda (_) (locate-dominating-file "." ".git")))
|
||||
)
|
||||
|
||||
(use-package consult-flycheck)
|
||||
|
||||
(use-package consult-git-log-grep
|
||||
:custom
|
||||
(consult-git-log-grep-open-function #'magit-show-commit))
|
||||
|
||||
(use-package consult-company
|
||||
:bind
|
||||
(:map company-mode-map
|
||||
([remap completion-at-point] . consult-company)))
|
||||
|
||||
(use-package consult-lsp
|
||||
:bind
|
||||
(:map lsp-mode-map
|
||||
([remap xref-find-apropos] . consult-lsp-symbols)))
|
||||
|
||||
;; (use-package consult-projectile)
|
||||
|
||||
(use-package consult-yasnippet)
|
||||
|
||||
;; Alternate completion style
|
||||
|
||||
(use-package orderless
|
||||
:init
|
||||
;; Configure a custom style dispatcher (see the Consult wiki)
|
||||
;; (setq orderless-style-dispatchers '(+orderless-dispatch)
|
||||
;; orderless-component-separator #'orderless-escapable-split-on-space)
|
||||
(setq completion-styles '(orderless basic)
|
||||
completion-category-defaults nil
|
||||
completion-category-overrides '((file (styles partial-completion)))))
|
||||
|
||||
;; Contextual actions
|
||||
|
||||
(use-package marginalia
|
||||
:config
|
||||
(marginalia-mode))
|
||||
|
||||
(use-package embark
|
||||
:bind
|
||||
(("C-." . embark-act) ;; pick some comfortable binding
|
||||
("C-;" . embark-dwim) ;; good alternative: M-.
|
||||
("C-h B" . embark-bindings)) ;; alternative for `describe-bindings'
|
||||
:init
|
||||
;; Optionally replace the key help with a completing-read interface
|
||||
(setq prefix-help-command #'embark-prefix-help-command)
|
||||
:config
|
||||
;; Hide the mode line of the Embark live/completions buffers
|
||||
(add-to-list 'display-buffer-alist
|
||||
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
||||
nil
|
||||
(window-parameters (mode-line-format . none)))))
|
||||
|
||||
(use-package embark-consult
|
||||
:hook
|
||||
(embark-collect-mode . consult-preview-at-point-mode))
|
||||
|
||||
;; Org-mode
|
||||
|
||||
; No line numbers in org-mode
|
||||
(dolist (mode '(org-mode-hook))
|
||||
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
||||
|
||||
(setq org-startup-indented t ; Indentation
|
||||
org-pretty-entities t ; Rich text/Special chars
|
||||
org-hide-emphasis-markers t ; Hide markup - see org-appear
|
||||
org-startup-with-inline-images t ; Image previews
|
||||
org-image-actual-width '(300))
|
||||
|
||||
(use-package org-appear
|
||||
:hook (org-mode . org-appear-mode))
|
||||
|
||||
(use-package mixed-pitch
|
||||
:hook
|
||||
(text-mode . mixed-pitch-mode)
|
||||
:config
|
||||
(set-face-attribute 'default nil :font "IBM Plex Mono Light" :height 105)
|
||||
(set-face-attribute 'fixed-pitch nil :font "IBM Plex Mono Light")
|
||||
(set-face-attribute 'variable-pitch nil :font "DejaVu Sans"))
|
||||
;(add-hook 'mixed-pitch-mode-hook #'solaire-mode-reset)
|
||||
|
||||
(use-package org-superstar
|
||||
:hook
|
||||
(org-mode . org-superstar-mode)
|
||||
:config
|
||||
(setq org-superstar-special-todo-items t))
|
||||
|
||||
;; LSP
|
||||
|
||||
(use-package lsp-mode
|
||||
:init
|
||||
(setq lsp-keymap-prefix "C-c l")
|
||||
:commands (lsp lsp-deferred)
|
||||
:hook
|
||||
((c-mode . lsp)
|
||||
(c++-mode . lsp)
|
||||
(go-mode . lsp)
|
||||
(java-mode . lsp)
|
||||
(js-mode . lsp)
|
||||
(latex-mode . lsp)
|
||||
(python-mode . lsp)
|
||||
(rust-mode . lsp)
|
||||
(tex-mode . lsp)
|
||||
(typescript-mode . lsp)
|
||||
(web-mode . lsp)
|
||||
(zig-mode . lsp)
|
||||
(lsp-mode . lsp-enable-which-key-integration))
|
||||
:custom
|
||||
(lsp-eldoc-render-all nil)
|
||||
(lsp-idle-delay 0.6)
|
||||
;; (lsp-rust-analyzer-cargo-watch-command "clippy")
|
||||
;; (lsp-rust-analyzer-server-display-inlay-hints t)
|
||||
;; (lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial")
|
||||
;; (lsp-rust-analyzer-display-chaining-hints t)
|
||||
;; (lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil)
|
||||
;; (lsp-rust-analyzer-display-closure-return-type-hints t)
|
||||
;; (lsp-rust-analyzer-display-parameter-hints nil)
|
||||
;; (lsp-rust-analyzer-display-reborrow-hints nil)
|
||||
:config
|
||||
(setq lsp-prefer-flymake nil)) ; prefer lsp-ui (flycheck) to flymake
|
||||
; (setq lsp-disabled-clients '(clangd))) ; prefer ccls to clangd
|
||||
; :bind
|
||||
; (:map lsp-mode-map
|
||||
; ("TAB" . completion-at-point)))
|
||||
|
||||
(use-package lsp-ui
|
||||
:requires lsp-mode flycheck
|
||||
:hook (lsp-mode . lsp-ui-mode)
|
||||
:commands lsp-ui-mode
|
||||
:config
|
||||
(setq lsp-ui-doc-enable t)
|
||||
(setq lsp-ui-doc-use-childframe t)
|
||||
(setq lsp-ui-doc-position 'bottom-and-right)
|
||||
(setq lsp-ui-doc-include-signature t)
|
||||
(setq lsp-ui-sideline-enable t)
|
||||
(setq lsp-ui-sideline-show-hover t)
|
||||
(setq lsp-ui-flycheck-enable t)
|
||||
(setq lsp-ui-flycheck-list-position 'right)
|
||||
(setq lsp-ui-flycheck-live-reporting t)
|
||||
(setq lsp-ui-peek-enable t)
|
||||
(setq lsp-ui-peek-list-width 60)
|
||||
(setq lsp-ui-peek-peek-height 25)
|
||||
(lsp-ui-doc-show))
|
||||
|
||||
|
||||
;; Text completion
|
||||
|
||||
(use-package company
|
||||
:config
|
||||
(global-company-mode 1)
|
||||
(setq company-global-modes '(not gud-mode))
|
||||
(setq company-global-modes '(not comint-mode))
|
||||
:custom
|
||||
(company-idle-delay 0)
|
||||
(company-minimum-prefix-length 1)
|
||||
(company-tooltip-align-annotations t)
|
||||
:bind
|
||||
(:map company-active-map
|
||||
("RET" . nil)
|
||||
("[return]" . nil)
|
||||
("TAB" . company-complete-selection)
|
||||
("<tab>" . company-complete-selection)
|
||||
("C-n" . company-select-next)
|
||||
("C-p" . company-select-previous)))
|
||||
|
||||
;; Debugging
|
||||
|
||||
(use-package dap-mode
|
||||
:after lsp-mode
|
||||
:commands dap-debug
|
||||
:config
|
||||
(dap-ui-mode 1)
|
||||
(dap-tooltip-mode 1)
|
||||
(eval-when-compile
|
||||
(require 'cl-lib))
|
||||
(require 'dap-python)
|
||||
;(require 'dap-node)
|
||||
(require 'dap-lldb)
|
||||
(require 'dap-gdb-lldb)
|
||||
(dap-gdb-lldb-setup)
|
||||
(dap-register-debug-template
|
||||
"Rust :: LLDB Run Configuration"
|
||||
(list :type "lldb"
|
||||
:request "launch"
|
||||
:name "LLDB::Run"
|
||||
:gdbpath "rust-lldb"))
|
||||
:bind
|
||||
(:map dap-mode-map
|
||||
("<f5>" . dap-debug)
|
||||
("<f10>" . dap-next)
|
||||
("<f11>" . dap-step-in)
|
||||
("S-<f5>" . dap-disconnect)
|
||||
("C-S-<f5>" . dap-debug-restart)))
|
||||
|
||||
(use-package realgud)
|
||||
|
||||
(use-package realgud-lldb)
|
||||
|
||||
;; Treemacs
|
||||
(use-package treemacs
|
||||
:bind
|
||||
(:map global-map
|
||||
("M-0" . treemacs-select-window)
|
||||
("C-x t 1" . treemacs-delete-other-windows)
|
||||
("C-x t t" . treemacs)
|
||||
("C-x t B" . treemacs-bookmark)
|
||||
("C-x t C-t" . treemacs-find-file)
|
||||
("C-x t M-t" . treemacs-find-tag)))
|
||||
|
||||
(use-package lsp-treemacs
|
||||
:config
|
||||
(lsp-treemacs-sync-mode 1))
|
||||
|
||||
;; Syntax checking
|
||||
(use-package flycheck
|
||||
:hook (lsp-mode . flycheck-mode)
|
||||
:config
|
||||
(setq flycheck-python-flake8-executable "flake8"))
|
||||
|
||||
;; Git
|
||||
(use-package magit
|
||||
:bind ("C-M-;" . magit-status)
|
||||
:commands (magit-status magit-get-current-branch)
|
||||
:custom
|
||||
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
|
||||
|
||||
;;; Languages/Tools
|
||||
|
||||
;; Highlighting/Formatting
|
||||
|
||||
(use-package apheleia
|
||||
:init
|
||||
(apheleia-global-mode +1))
|
||||
|
||||
(use-package tree-sitter
|
||||
:config
|
||||
(global-tree-sitter-mode)
|
||||
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
|
||||
|
||||
(use-package tree-sitter-langs
|
||||
:after tree-sitter)
|
||||
|
||||
;; C/C++
|
||||
|
||||
(setq dap-lldb-debug-program '("/usr/bin/lldb-vscode"))
|
||||
(setq-default c-default-style "k&r")
|
||||
(setq-default c-basic-offset 2)
|
||||
|
||||
;; (use-package ccls
|
||||
;; :hook ((c-mode c++-mode objc-mode cuda-mode) .
|
||||
;; (lambda () (require 'ccls) (lsp))))
|
||||
|
||||
;(use-package modern-cpp-font-lock
|
||||
; :config
|
||||
; (modern-c++-font-lock-global-mode))
|
||||
|
||||
;; Golang
|
||||
|
||||
;; (use-package go-mode
|
||||
;; :config
|
||||
;; (add-hook 'before-save-hook #'lsp-organize-imports))
|
||||
|
||||
;; Java
|
||||
|
||||
;(use-package lsp-java)
|
||||
|
||||
;; JavaScript/TypeScript, HTML, CSS
|
||||
|
||||
(setq css-indent-level 2)
|
||||
(setq css-indent-offset 2)
|
||||
(setq js-indent-level 2)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.mjs\\'" . js-mode))
|
||||
|
||||
(use-package js2-mode
|
||||
:config
|
||||
(add-to-list 'interpreter-mode-alist '("#!/usr/bin/env node" . js2-mode))
|
||||
;(setq js2-strict-missing-semi-warning t)
|
||||
(setq js2-mode-show-strict-warnings t)
|
||||
:hook (js-mode . js2-minor-mode))
|
||||
|
||||
(use-package typescript-mode
|
||||
:config
|
||||
(setq typescript-indent-level 2)
|
||||
:mode ("\\.ts\\'" . typescript-mode)
|
||||
("\\.tsx\\'" . typescript-mode))
|
||||
|
||||
;; (use-package restclient
|
||||
;; :init
|
||||
;; (use-package company-restclient)
|
||||
;; :mode ("\\.http\\'" . restclient-mode))
|
||||
|
||||
(use-package rainbow-mode
|
||||
:hook
|
||||
((js-mode . rainbow-mode)
|
||||
(typescript-mode . rainbow-mode)
|
||||
(web-mode . rainbow-mode)))
|
||||
|
||||
;; (use-package skewer-mode
|
||||
;; :init
|
||||
;; (setq httpd-port 8080)
|
||||
;; :hook
|
||||
;; (('js-mode-hook 'skewer-mode)
|
||||
;; ('css-mode-hook 'skewer-css-mode)
|
||||
;; ('html-mode-hook 'skewer-html-mode)))
|
||||
|
||||
;; (use-package skewer-reload-stylesheets
|
||||
;; :hook
|
||||
;; (('css-mode-hook 'skewer-reload-stylesheets-start-editing)
|
||||
;; ('scss-mode-hook 'skewer-reload-stylesheets-start-editing)))
|
||||
|
||||
;; (use-package simple-httpd)
|
||||
|
||||
(use-package web-mode
|
||||
:config
|
||||
(setq web-mode-code-indent-offset 2)
|
||||
(setq web-mode-markup-indent-offset 2)
|
||||
(setq web-mode-attribute-indent-offset 2)
|
||||
:mode
|
||||
(("\\.phtml\\'" . web-mode)
|
||||
("\\.tpl\\.php\\'" . web-mode)
|
||||
("\\.jsp\\'" . web-mode)
|
||||
("\\.as[cp]x\\'" . web-mode)
|
||||
("\\.erb\\'" . web-mode)
|
||||
("\\.mustache\\'" . web-mode)
|
||||
("\\.djhtml\\'" . web-mode)
|
||||
("\\.jst.ejs\\'" . web-mode)
|
||||
("\\.html?\\'" . web-mode)))
|
||||
|
||||
(use-package jsdoc
|
||||
:straight (jsdoc :type git :host github :repo "isamert/jsdoc.el")
|
||||
:bind ("C-c C-n" . jsdoc))
|
||||
|
||||
;; LaTeX
|
||||
|
||||
;; (use-package lsp-latex)
|
||||
|
||||
;; (setq lsp-tex-server 'digestif)
|
||||
|
||||
|
||||
;; Protocol Buffers
|
||||
|
||||
;; (use-package protobuf-mode)
|
||||
|
||||
;; Python
|
||||
|
||||
(setq dap-python-debugger 'debugpy)
|
||||
|
||||
(use-package lsp-pyright
|
||||
:hook (python-mode . (lambda ()
|
||||
(require 'lsp-pyright)
|
||||
(lsp)))) ; or lsp-deferred
|
||||
|
||||
(use-package numpydoc
|
||||
:after python
|
||||
:bind (:map python-mode-map
|
||||
("C-c C-n" . numpydoc-generate))
|
||||
:config
|
||||
(setq numpydoc-insert-examples-block nil))
|
||||
|
||||
(use-package conda
|
||||
:init
|
||||
(setq conda-anaconda-home (expand-file-name "/opt/miniconda3"))
|
||||
(setq conda-env-home-directory (expand-file-name "~/.conda/envs"))
|
||||
(conda-env-initialize-interactive-shells)
|
||||
;(conda-env-autoactivate-mode)
|
||||
:hook
|
||||
('find-file-hook . (lambda ()
|
||||
(when (bound-and-true-p conda-project-env-path)
|
||||
(conda-env-activate-for-buffer)))))
|
||||
|
||||
;; Rust
|
||||
|
||||
(use-package rustic
|
||||
:ensure
|
||||
:bind (:map rustic-mode-map
|
||||
("M-j" . lsp-ui-imenu)
|
||||
("M-?" . lsp-find-references)
|
||||
("C-c C-c l" . flycheck-list-errors)
|
||||
("C-c C-c a" . lsp-execute-code-action)
|
||||
("C-c C-c r" . lsp-rename)
|
||||
("C-c C-c q" . lsp-workspace-restart)
|
||||
("C-c C-c Q" . lsp-workspace-shutdown)
|
||||
("C-c C-c s" . lsp-rust-analyzer-status)
|
||||
("C-c C-c e" . lsp-rust-analyzer-expand-macro)
|
||||
("C-c C-c d" . dap-hydra)
|
||||
("C-c C-c h" . lsp-ui-doc-glance)))
|
||||
:config
|
||||
;; uncomment for less flashiness
|
||||
;; (setq lsp-eldoc-hook nil)
|
||||
;; (setq lsp-enable-symbol-highlighting nil)
|
||||
;; (setq lsp-signature-auto-activate nil)
|
||||
|
||||
;; comment to disable rustfmt on save
|
||||
;; (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))
|
||||
|
||||
;; (defun rk/rustic-mode-hook ()
|
||||
;; ;; so that run C-c C-c C-r works without having to confirm, but don't try to
|
||||
;; ;; save rust buffers that are not file visiting. Once
|
||||
;; ;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should
|
||||
;; ;; no longer be necessary.
|
||||
;; (when buffer-file-name
|
||||
;; (setq-local buffer-save-without-query t))
|
||||
;; (add-hook 'before-save-hook 'lsp-format-buffer nil t))
|
||||
|
||||
;; TOML config files
|
||||
|
||||
(use-package toml-mode)
|
||||
|
||||
;; Zig
|
||||
|
||||
;(use-package zig-mode
|
||||
; :custom (zig-format-on-save nil)
|
||||
; :config
|
||||
; (add-to-list 'lsp-language-id-configuration '(zig-mode . "zig"))
|
||||
; (make-lsp-client
|
||||
; :new-connection (lsp-stdio-connection "/usr/bin/zls")
|
||||
; :major-modes '(zig-mode)
|
||||
; :server-id 'zls))
|
||||
|
||||
;; Templating
|
||||
(use-package yasnippet
|
||||
:bind
|
||||
("C-c y s" . yas-insert-snippet)
|
||||
("C-c y v" . yas-visit-snippet-file)
|
||||
:config
|
||||
(add-to-list 'yas-snippet-dirs "~/.emacs.d/snippets")
|
||||
(yas-reload-all)
|
||||
(yas-global-mode))
|
||||
|
||||
(use-package yasnippet-snippets)
|
||||
;;; End init.el
|
|
@ -1,11 +0,0 @@
|
|||
[user]
|
||||
name = Andrew Scott
|
||||
email = git@andyscott.me
|
||||
signingKey = 7CD5A5977E4931C1
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[commit]
|
||||
pgpsign = true
|
||||
gpgsign = true
|
||||
[pull]
|
||||
rebase = false
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q tint2
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x tint2 >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch tint2
|
||||
tint2 & disown
|
||||
|
||||
# Final command won't work without sleep
|
||||
sleep 1 &&
|
||||
|
||||
# Keep tint2 below other windows in fullscreen
|
||||
if pgrep -x "tint2" > /dev/null ; then
|
||||
xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" $(xdo id -n tint2)
|
||||
fi
|
|
@ -1,18 +0,0 @@
|
|||
# make Java behave when not using a DE
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
# move $GOPATH to .local
|
||||
export GOPATH="$HOME/.local/opt/go"
|
||||
export PATH="$HOME/.local/opt/go/bin:$PATH"
|
||||
# add .local/bin to $PATH
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
{{- if eq .chezmoi.hostname "helix" }}
|
||||
# make GTK apps scale correctly on hidpi
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 thunar
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE="0.50 Simple-scan"
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 lutris
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 spotify
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 pinta
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 Gajim
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 Ristretto
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE=0.50 ghex
|
||||
{{- end }}
|
497
emacs.d/init.el
Normal file
497
emacs.d/init.el
Normal file
|
@ -0,0 +1,497 @@
|
|||
;; Disable package.el early so it won't start loading packages before init is loaded
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
;; No thanks
|
||||
(setq inhibit-startup-message t) ; Disable startup message
|
||||
(scroll-bar-mode -1) ; Disable visible scrollbar
|
||||
(tool-bar-mode -1) ; Disable the toolbar
|
||||
(tooltip-mode -1) ; Disable tooltips
|
||||
(set-fringe-mode 10) ; Add come extra space to the left/right sides
|
||||
(menu-bar-mode -1) ; Disable the menu bar
|
||||
(setq-default custom-file null-device) ; Write customizations not in this file to the null device (AKA stop littering in my init.el)
|
||||
(setq confirm-kill-processes nil) ; Stop asking about running processes on exit
|
||||
|
||||
;; Visible bell
|
||||
(setq visible-bell t)
|
||||
|
||||
; Font
|
||||
(set-face-attribute 'default nil :font "Hack" :height 110)
|
||||
|
||||
;; Make ESC quit prompts
|
||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||
|
||||
;; paren/bracket pairs
|
||||
(show-paren-mode t)
|
||||
(setq-default show-paren-style 'parenthesis)
|
||||
(electric-pair-mode 1)
|
||||
|
||||
;; Profile emacs startup
|
||||
(add-hook 'emacs-startup-hook
|
||||
(lambda ()
|
||||
(message "*** Emacs loaded in %s with %d garbage collections."
|
||||
(format "%.2f seconds"
|
||||
(float-time
|
||||
(time-subtract after-init-time before-init-time)))
|
||||
gcs-done)))
|
||||
|
||||
;; Change the user-emacs-directory to keep ~/.emacs.d clean
|
||||
(setq user-emacs-directory (expand-file-name "~/.cache/emacs/")
|
||||
url-history-file (expand-file-name "url/history" user-emacs-directory))
|
||||
|
||||
;; No annoying Windows errors
|
||||
(set-default-coding-systems 'utf-8)
|
||||
|
||||
;; Disable suspend-frame shortcut
|
||||
(define-key global-map "\C-z" nil)
|
||||
|
||||
;; More reasonable keybinds for resizing windows
|
||||
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
|
||||
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
|
||||
(global-set-key (kbd "S-C-<down>") 'shrink-window)
|
||||
(global-set-key (kbd "S-C-<up>") 'enlarge-window)
|
||||
|
||||
;; Improve scrolling
|
||||
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ; one line at a time
|
||||
(setq mouse-wheel-progressive-speed nil) ; don't accelerate scrolling
|
||||
(setq mouse-wheel-follow-mouse 't) ; scroll window under mouse
|
||||
(setq scroll-step 1) ; keyboard scroll one line at a time
|
||||
|
||||
;; Tabs
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(setq indent-line-function 'insert-tab)
|
||||
|
||||
;;Line numbers
|
||||
(setq column-number-mode t)
|
||||
(dolist (mode '(text-mode-hook
|
||||
prog-mode-hook
|
||||
conf-mode-hook))
|
||||
(add-hook mode (lambda () (display-line-numbers-mode 1))))
|
||||
|
||||
;; Show vertical line at column 80 in prog-mode
|
||||
(setq-default fill-column 80)
|
||||
(add-hook 'prog-mode-hook #'display-fill-column-indicator-mode)
|
||||
|
||||
; No line numbers in org-mode
|
||||
(dolist (mode '(org-mode-hook))
|
||||
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
||||
|
||||
;; Install and load straight.el
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 5))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
|
||||
;;;;;;;;;;;;;; Not needed when using straight.el ;;;;;;;;;;;;;;
|
||||
;; Initialize package sources
|
||||
;(require 'package)
|
||||
|
||||
;(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
; ("org" . "https://orgmode.org/elpa/")
|
||||
; ("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
|
||||
;(package-initialize)
|
||||
;(unless package-archive-contents
|
||||
; (package-refresh-contents))
|
||||
|
||||
;; Initialize use-package on non-Linux platforms
|
||||
;(unless (package-installed-p 'use-package)
|
||||
; (package-install 'use-package))
|
||||
|
||||
;(require 'use-package)
|
||||
;(setq use-package-always-ensure t)
|
||||
;;;;;;;;;;;;;;
|
||||
|
||||
;; Install use-package
|
||||
(straight-use-package 'use-package)
|
||||
|
||||
;; Make use-package use straight.el
|
||||
(use-package straight
|
||||
:custom (straight-use-package-by-default t))
|
||||
|
||||
;; Theme
|
||||
|
||||
(setq custom-safe-themes t)
|
||||
|
||||
;; (use-package everforest
|
||||
;; :straight (:type git :repo "https://git.sr.ht/~theorytoe/everforest-theme"))
|
||||
|
||||
;; (use-package gruvbox-theme
|
||||
;; :config
|
||||
;; (load-theme 'gruvbox-dark-soft t))
|
||||
|
||||
(add-to-list 'custom-theme-load-path "~/.cache/emacs/custom/everforest-theme")
|
||||
(load-theme 'everforest-hard-dark t)
|
||||
|
||||
;; Help distinguish work buffers from others like sidebars and terminal
|
||||
(use-package solaire-mode
|
||||
:init
|
||||
(solaire-global-mode t))
|
||||
|
||||
;; Icons
|
||||
(use-package all-the-icons)
|
||||
|
||||
;; Modeline
|
||||
|
||||
(use-package minions
|
||||
:hook (doom-modeline-mode . minions-mode)
|
||||
(simple-modeline-mode . minions-mode))
|
||||
|
||||
(use-package doom-modeline
|
||||
:init (doom-modeline-mode)
|
||||
:custom
|
||||
(doom-modeline-height 30)
|
||||
(doom-modeline-bar-width .75)
|
||||
(doom-modeline-window-width-limit fill-column)
|
||||
(doom-modeline-lsp t)
|
||||
(doom-modeline-minor-modes t)
|
||||
(doom-modeline-persp-name nil)
|
||||
(doom-modeline-buffer-file-name-style 'truncate-upto-project)
|
||||
(doom-modeline-major-mode-icon t)
|
||||
(doom-modeline-major-mode-color-icon t)
|
||||
(doom-modeline-enable-word-count t)
|
||||
(doom-modeline-env-version t)
|
||||
(doom-modeline-env-load-string "..."))
|
||||
|
||||
;; Don't remind me about some minor modes
|
||||
(use-package diminish)
|
||||
|
||||
;; Automatically set paths to the new user-emacs-directory
|
||||
(use-package no-littering)
|
||||
|
||||
;; Automatically clean whitespace
|
||||
(use-package ws-butler
|
||||
:hook ((text-mode . ws-butler-mode)
|
||||
(prog-mode . ws-butler-mode)))
|
||||
|
||||
;; Overview of keybindings available based on prefix keys
|
||||
(use-package which-key
|
||||
:init (which-key-mode)
|
||||
:config
|
||||
(setq which-key-idle-delay 0.3))
|
||||
|
||||
;; Navigation: Ivy/Counsel/Swiper
|
||||
(use-package ivy
|
||||
:init
|
||||
(ivy-mode 1)
|
||||
:config
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-wrap t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq enable-recursive-minibuffers t))
|
||||
|
||||
(use-package ivy-rich
|
||||
:after ivy
|
||||
:hook (counsel-mode . ivy-rich-mode)
|
||||
:config
|
||||
(setq ivy-rich-parse-remote-buffer nil))
|
||||
|
||||
(use-package counsel
|
||||
:after ivy
|
||||
:config
|
||||
(counsel-mode 1)
|
||||
(setq ivy-initial-inputs-alist nil))
|
||||
|
||||
(use-package swiper
|
||||
:after ivy
|
||||
:bind (("C-s" . swiper)))
|
||||
|
||||
(use-package treemacs
|
||||
:bind
|
||||
(:map global-map
|
||||
("M-0" . treemacs-select-window)
|
||||
("C-x t 1" . treemacs-delete-other-windows)
|
||||
("C-x t t" . treemacs)
|
||||
("C-x t B" . treemacs-bookmark)
|
||||
("C-x t C-t" . treemacs-find-file)
|
||||
("C-x t M-t" . treemacs-find-tag)))
|
||||
|
||||
(use-package lsp-treemacs
|
||||
:config
|
||||
(lsp-treemacs-sync-mode 1))
|
||||
|
||||
;; Git
|
||||
|
||||
(use-package magit
|
||||
:bind ("C-M-;" . magit-status)
|
||||
:commands (magit-status magit-get-current-branch)
|
||||
:custom
|
||||
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
|
||||
|
||||
;; Project management
|
||||
|
||||
(use-package projectile
|
||||
:init
|
||||
(projectile-mode +1)
|
||||
:bind-keymap
|
||||
(("C-M-p" . projectile-find-file)
|
||||
("C-c p" . projectile-command-map))
|
||||
:bind (:map projectile-mode-map
|
||||
("C-c p" . projectile-command-map)))
|
||||
|
||||
;; LSP & debugging
|
||||
|
||||
(use-package lsp-mode
|
||||
:init
|
||||
(setq lsp-keymap-prefix "C-c l")
|
||||
:commands (lsp lsp-deferred)
|
||||
:hook
|
||||
((c-mode . lsp)
|
||||
(c++-mode . lsp)
|
||||
(go-mode . lsp)
|
||||
(java-mode . lsp)
|
||||
(js-mode . lsp)
|
||||
(latex-mode . lsp)
|
||||
(python-mode . lsp)
|
||||
(rust-mode . lsp)
|
||||
(tex-mode . lsp)
|
||||
(typescript-mode . lsp)
|
||||
(web-mode . lsp)
|
||||
(zig-mode . lsp)
|
||||
(lsp-mode . lsp-enable-which-key-integration))
|
||||
:config
|
||||
(setq lsp-prefer-flymake nil)) ;prefer lsp-ui (flycheck) to flymake
|
||||
; :bind
|
||||
; (:map lsp-mode-map
|
||||
; ("TAB" . completion-at-point)))
|
||||
|
||||
(use-package lsp-ui
|
||||
:requires lsp-mode flycheck
|
||||
:hook (lsp-mode . lsp-ui-mode)
|
||||
:commands lsp-ui-mode
|
||||
:config
|
||||
(setq lsp-ui-doc-enable t)
|
||||
(setq lsp-ui-doc-use-childframe t)
|
||||
(setq lsp-ui-doc-position 'bottom-and-right)
|
||||
(setq lsp-ui-doc-include-signature t)
|
||||
(setq lsp-ui-sideline-enable t)
|
||||
(setq lsp-ui-sideline-show-hover nil)
|
||||
(setq lsp-ui-flycheck-enable t)
|
||||
(setq lsp-ui-flycheck-list-position 'right)
|
||||
(setq lsp-ui-flycheck-live-reporting t)
|
||||
(setq lsp-ui-peek-enable t)
|
||||
(setq lsp-ui-peek-list-width 60)
|
||||
(setq lsp-ui-peek-peek-height 25)
|
||||
(lsp-ui-doc-show))
|
||||
|
||||
(use-package dap-mode
|
||||
:after lsp-mode
|
||||
:commands dap-debug
|
||||
:config
|
||||
(dap-ui-mode 1)
|
||||
(dap-tooltip-mode 1)
|
||||
(eval-when-compile
|
||||
(require 'cl-lib))
|
||||
(require 'dap-python)
|
||||
;(require 'dap-node)
|
||||
(require 'dap-lldb)
|
||||
:bind
|
||||
(:map dap-mode-map
|
||||
("<f5>" . dap-debug)
|
||||
("<f10>" . dap-next)
|
||||
("<f11>" . dap-step-in)
|
||||
("S-<f5>" . dap-disconnect)
|
||||
("C-S-<f5>" . dap-debug-restart)))
|
||||
|
||||
(use-package company
|
||||
:config
|
||||
(global-company-mode 1)
|
||||
:custom
|
||||
(company-idle-delay 0)
|
||||
(company-minimum-prefix-length 1)
|
||||
(company-tooltip-align-annotations t)
|
||||
:bind
|
||||
(:map company-active-map
|
||||
("RET" . nil)
|
||||
("[return]" . nil)
|
||||
("TAB" . company-complete-selection)
|
||||
("<tab>" . company-complete-selection)
|
||||
("C-n" . company-select-next)
|
||||
("C-p" . company-select-previous)))
|
||||
|
||||
;;; Languages/Tools
|
||||
|
||||
;; Highlighting/Formatting
|
||||
|
||||
(use-package apheleia
|
||||
:init
|
||||
(apheleia-global-mode +1))
|
||||
|
||||
(use-package tree-sitter
|
||||
:config
|
||||
(global-tree-sitter-mode)
|
||||
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
|
||||
|
||||
(use-package tree-sitter-langs
|
||||
:after tree-sitter)
|
||||
|
||||
;; C/C++
|
||||
|
||||
(setq dap-lldb-debug-program '("/usr/bin/lldb-vscode"))
|
||||
(setq-default c-default-style "k&r")
|
||||
(setq-default c-basic-offset 2)
|
||||
|
||||
;(use-package ccls
|
||||
; :hook ((c-mode c++-mode objc-mode cuda-mode) .
|
||||
; (lambda () (require 'ccls) (lsp))))
|
||||
|
||||
;(use-package modern-cpp-font-lock
|
||||
; :config
|
||||
; (modern-c++-font-lock-global-mode))
|
||||
|
||||
;; Golang
|
||||
|
||||
;; (use-package go-mode
|
||||
;; :config
|
||||
;; (add-hook 'before-save-hook #'lsp-organize-imports))
|
||||
|
||||
;; Java
|
||||
|
||||
;(use-package lsp-java)
|
||||
|
||||
;; JavaScript/TypeScript, HTML, CSS
|
||||
|
||||
;; (setq css-indent-level 2)
|
||||
;; (setq css-indent-offset 2)
|
||||
;; (setq js-indent-level 2)
|
||||
|
||||
;; (add-to-list 'auto-mode-alist '("\\.mjs\\'" . js-mode))
|
||||
|
||||
;; (use-package js2-mode
|
||||
;; :config
|
||||
;; (add-to-list 'interpreter-mode-alist '("#!/usr/bin/env node" . js2-mode))
|
||||
;; ;(setq js2-strict-missing-semi-warning t)
|
||||
;; (setq js2-mode-show-strict-warnings t)
|
||||
;; :hook (js-mode . js2-minor-mode))
|
||||
|
||||
;; (use-package typescript-mode
|
||||
;; :config
|
||||
;; (setq typescript-indent-level 2)
|
||||
;; :mode ("\\.ts\\'" . typescript-mode)
|
||||
;; ("\\.tsx\\'" . typescript-mode))
|
||||
|
||||
;; (use-package restclient
|
||||
;; :init
|
||||
;; (use-package company-restclient)
|
||||
;; :mode ("\\.http\\'" . restclient-mode))
|
||||
|
||||
;; (use-package rainbow-mode
|
||||
;; :hook
|
||||
;; ((js-mode . rainbow-mode)
|
||||
;; (typescript-mode . rainbow-mode)
|
||||
;; (web-mode . rainbow-mode)))
|
||||
|
||||
;; (use-package skewer-mode
|
||||
;; :init
|
||||
;; (setq httpd-port 8080)
|
||||
;; :hook
|
||||
;; (('js-mode-hook 'skewer-mode)
|
||||
;; ('css-mode-hook 'skewer-css-mode)
|
||||
;; ('html-mode-hook 'skewer-html-mode)))
|
||||
|
||||
;; (use-package skewer-reload-stylesheets
|
||||
;; :hook
|
||||
;; (('css-mode-hook 'skewer-reload-stylesheets-start-editing)
|
||||
;; ('scss-mode-hook 'skewer-reload-stylesheets-start-editing)))
|
||||
|
||||
;; (use-package simple-httpd)
|
||||
|
||||
;; (use-package web-mode
|
||||
;; :config
|
||||
;; (setq web-mode-code-indent-offset 2)
|
||||
;; (setq web-mode-markup-indent-offset 2)
|
||||
;; (setq web-mode-attribute-indent-offset 2)
|
||||
;; :mode
|
||||
;; (("\\.phtml\\'" . web-mode)
|
||||
;; ("\\.tpl\\.php\\'" . web-mode)
|
||||
;; ("\\.jsp\\'" . web-mode)
|
||||
;; ("\\.as[cp]x\\'" . web-mode)
|
||||
;; ("\\.erb\\'" . web-mode)
|
||||
;; ("\\.mustache\\'" . web-mode)
|
||||
;; ("\\.djhtml\\'" . web-mode)
|
||||
;; ("\\.jst.ejs\\'" . web-mode)
|
||||
;; ("\\.html?\\'" . web-mode)))
|
||||
|
||||
;; (use-package jsdoc
|
||||
;; :straight (jsdoc :type git :host github :repo "isamert/jsdoc.el")
|
||||
;; :bind ("C-c C-n" . jsdoc))
|
||||
|
||||
;; LaTeX
|
||||
|
||||
;; (use-package lsp-latex)
|
||||
|
||||
;; (setq lsp-tex-server 'digestif)
|
||||
|
||||
|
||||
;; Protocol Buffers
|
||||
|
||||
;; (use-package protobuf-mode)
|
||||
|
||||
;; Python
|
||||
|
||||
(setq dap-python-debugger 'debugpy)
|
||||
|
||||
(use-package lsp-pyright
|
||||
:hook (python-mode . (lambda ()
|
||||
(require 'lsp-pyright)
|
||||
(lsp)))) ; or lsp-deferred
|
||||
|
||||
(use-package numpydoc
|
||||
:after python
|
||||
:bind (:map python-mode-map
|
||||
("C-c C-n" . numpydoc-generate))
|
||||
:config
|
||||
(setq numpydoc-insert-examples-block nil))
|
||||
|
||||
(use-package conda
|
||||
:init
|
||||
(setq conda-anaconda-home (expand-file-name "/opt/miniconda3"))
|
||||
(setq conda-env-home-directory (expand-file-name "~/.conda/envs"))
|
||||
(conda-env-initialize-interactive-shells)
|
||||
;(conda-env-autoactivate-mode)
|
||||
:hook
|
||||
('find-file-hook . (lambda ()
|
||||
(when (bound-and-true-p conda-project-env-path)
|
||||
(conda-env-activate-for-buffer)))))
|
||||
|
||||
;; Rust
|
||||
|
||||
;(use-package rust-mode)
|
||||
|
||||
;; Zig
|
||||
|
||||
;(use-package zig-mode
|
||||
; :custom (zig-format-on-save nil)
|
||||
; :config
|
||||
; (add-to-list 'lsp-language-id-configuration '(zig-mode . "zig"))
|
||||
; (make-lsp-client
|
||||
; :new-connection (lsp-stdio-connection "/usr/bin/zls")
|
||||
; :major-modes '(zig-mode)
|
||||
; :server-id 'zls))
|
||||
|
||||
;; Syntax checking
|
||||
(use-package flycheck
|
||||
:hook (lsp-mode . flycheck-mode)
|
||||
:config
|
||||
(setq flycheck-python-flake8-executable "flake8"))
|
||||
|
||||
;; Templating
|
||||
(use-package yasnippet
|
||||
:bind
|
||||
("C-c y s" . yas-insert-snippet)
|
||||
("C-c y v" . yas-visit-snippet-file)
|
||||
:config
|
||||
(add-to-list 'yas-snippet-dirs "~/.emacs.d/snippets")
|
||||
(yas-reload-all)
|
||||
(yas-global-mode))
|
||||
|
||||
(use-package yasnippet-snippets)
|
||||
;;; End init.el
|
27
emacs.d/snippets/latex-mode/discrete-math-hw.yasnippet
Normal file
27
emacs.d/snippets/latex-mode/discrete-math-hw.yasnippet
Normal file
|
@ -0,0 +1,27 @@
|
|||
# -*- mode: snippet -*-
|
||||
# key : 225
|
||||
# group: school
|
||||
# name : discrete math
|
||||
# --
|
||||
\documentclass[12pt,letterpaper]{article}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{setspace}
|
||||
\usepackage{parskip}
|
||||
\usepackage[margin=1in]{geometry}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{amsmath}
|
||||
|
||||
\linespread{1.25}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\large
|
||||
$1\\\\
|
||||
CS-225: Discrete Structures in CS\\\\
|
||||
Homework $2, Part $3\\\\
|
||||
Exercise Set $4: Problems $5
|
||||
$6
|
||||
\normalsize
|
||||
|
||||
|
||||
\end{document}
|
9
emacs.d/snippets/python-mode/programming-hw.yasnippet
Normal file
9
emacs.d/snippets/python-mode/programming-hw.yasnippet
Normal file
|
@ -0,0 +1,9 @@
|
|||
# -*- mode: snippet -*-
|
||||
# key : 162
|
||||
# group: school
|
||||
# name : cs hw header
|
||||
# --
|
||||
# Author: $1
|
||||
# GitHub username: $2
|
||||
# Date: `(format-time-string "%Y-%m-%d")`$0
|
||||
# Description: $3
|
|
@ -2,48 +2,29 @@
|
|||
# Adjust as necessary.
|
||||
|
||||
# Arch repos
|
||||
bind
|
||||
bspwm
|
||||
sxhkd
|
||||
pulseaudio
|
||||
pulseaudio-bluetooth
|
||||
pavucontrol
|
||||
neofetch
|
||||
dunst
|
||||
emacs
|
||||
galculator
|
||||
git
|
||||
gsimplecal
|
||||
htop
|
||||
dex
|
||||
feh
|
||||
firefox
|
||||
emacs
|
||||
gnome-keyring
|
||||
logrotate
|
||||
ncdu
|
||||
neofetch
|
||||
neovim
|
||||
nextcloud-client
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
kitty
|
||||
ranger
|
||||
redshift
|
||||
rofi
|
||||
rxvt-unicode
|
||||
papirus-icon-theme
|
||||
pavucontrol
|
||||
pipewire
|
||||
wireplumber
|
||||
pipewire-pulse
|
||||
snapper # btrfs only
|
||||
sxhkd
|
||||
thunderbird
|
||||
ttf-dejavu
|
||||
ttf-fira-code
|
||||
ttf-font-awesome
|
||||
ttf-hack
|
||||
ttf-ibm-plex
|
||||
ttf-liberation
|
||||
xsecurelock
|
||||
xss-lock
|
||||
polkit-gnome
|
||||
gnome-keyring
|
||||
xorg-xserver
|
||||
xorg-xinit
|
||||
xorg-xsetroot
|
||||
|
@ -55,27 +36,19 @@ xdotool
|
|||
dbus-pyton
|
||||
|
||||
# AUR
|
||||
arkenfox-user.js
|
||||
birdtray
|
||||
btrfs-du # more accurate du for btrfs
|
||||
pa-notify
|
||||
polybar
|
||||
pulseaudio-control
|
||||
needrestart
|
||||
neovim-plug-git
|
||||
xidlehook
|
||||
gruvbox-dark-gtk
|
||||
sbkeys
|
||||
sbupdate-git
|
||||
spotify
|
||||
spotify-adblock-git
|
||||
polybar-spotify
|
||||
rofi-power-menu
|
||||
st
|
||||
vimix-gtk-themes-git
|
||||
xidlehook
|
||||
|
||||
# Laptop/Thinkpads (for xbacklight etc., your needs may vary)
|
||||
tlp
|
||||
acpi_call
|
||||
acpi_call-lts # only if LTS kernel installed, see 'acpi_call-dkms' for other variants
|
||||
acpilight # or 'light' is sometimes needed for older thinkpads
|
31
info/post-checkout
Normal file
31
info/post-checkout
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
### Post checkout hook to update .git/info/exclude with
|
||||
### branch specific .gitignore.[branch-name] files.
|
||||
### Copy to .git/hooks and chmod +x after fresh clone
|
||||
### to ensure proper .gitignore configuration.
|
||||
|
||||
branch_switched=$3
|
||||
|
||||
if [ "$branch_switched" != "1" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
echo "---- POST CHECKOUT ----"
|
||||
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
root_dir="$(pwd -P)"
|
||||
info_dir="$root_dir/.git/info"
|
||||
|
||||
exclude_target='.gitignore'
|
||||
if [ -f "$root_dir/$exclude_target.$current_branch" ]
|
||||
then
|
||||
echo "Prepare to use .gitignore.$current_branch as exclude file"
|
||||
exclude_target=.gitignore.$current_branch
|
||||
fi
|
||||
cd "$info_dir" || exit
|
||||
rm exclude
|
||||
#ln -s $exclude_target exclude
|
||||
echo "Copy .gitignore.$current_branch file in place of exclude"
|
||||
cp "$root_dir/$exclude_target" exclude
|
||||
echo "--- POST CHECKOUT END ---"
|
BIN
info/screenshots/dual-monitor-screenshot.png
Normal file
BIN
info/screenshots/dual-monitor-screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 435 KiB |
BIN
info/screenshots/screenshot.png
Normal file
BIN
info/screenshots/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 241 KiB |
BIN
info/screenshots/screenshot2.png
Normal file
BIN
info/screenshots/screenshot2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 238 KiB |
2
vimrc
Normal file
2
vimrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
source $VIMRUNTIME/defaults.vim
|
||||
set mouse-=a
|
|
@ -2,14 +2,21 @@
|
|||
|
||||
userresources=$HOME/.Xresources
|
||||
usermodmap=$HOME/.Xmodmap
|
||||
sysresources=/etc/X11/xinit/Xresources
|
||||
sysmodmap=/etc/X11/xinit/Xmodmap
|
||||
|
||||
sysresources=/etc/X11/xinit/.Xresources
|
||||
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||
|
||||
# merge in defaults and keymaps
|
||||
|
||||
if [ -f $sysresources ]; then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
xrdb -merge $sysresources
|
||||
|
||||
fi
|
||||
|
||||
if [ -f $sysmodmap ]; then
|
||||
|
@ -17,7 +24,15 @@ if [ -f $sysmodmap ]; then
|
|||
fi
|
||||
|
||||
if [ -f "$userresources" ]; then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
xrdb -merge "$userresources"
|
||||
|
||||
fi
|
||||
|
||||
if [ -f "$usermodmap" ]; then
|
||||
|
@ -33,10 +48,5 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
|||
unset f
|
||||
fi
|
||||
|
||||
{{ if eq .chezmoi.hostname "helix" -}}
|
||||
xinput set-prop 13 312 .8 &
|
||||
{{ else if eq .chezmoi.hostname "triangulum" -}}
|
||||
xinput set-prop 10 306 1 &
|
||||
{{- end }}
|
||||
xsetroot -cursor_name left_ptr &
|
||||
exec bspwm
|
Loading…
Reference in a new issue