Compare commits
16 commits
bbd3d42bfd
...
1443064ca8
Author | SHA1 | Date | |
---|---|---|---|
1443064ca8 | |||
28fff48c92 | |||
c2ebacde6f | |||
bb77a33a5c | |||
04fe5522c8 | |||
a83048a29e | |||
57af2a4831 | |||
ad2ba063c8 | |||
371d5a8a81 | |||
194d515474 | |||
054e978233 | |||
413ab19136 | |||
444357d6e6 | |||
ee400ef94c | |||
c2ceafddcd | |||
585f1404b3 |
30 changed files with 2915 additions and 74 deletions
46
README.md
46
README.md
|
@ -1,2 +1,48 @@
|
|||
# dotfiles
|
||||
This repo will hold a copy of most of my dotfiles.
|
||||
|
||||
## flake.nix
|
||||
|
||||
You can use these dotfiles ad-hoc under nixos using:
|
||||
```bash
|
||||
nix run nixpkgs#home-manager -- switch --impure --flake .
|
||||
```
|
||||
|
||||
## Self build dependencies
|
||||
|
||||
- dwm
|
||||
- st
|
||||
- slstatus
|
||||
|
||||
## Dependencies
|
||||
|
||||
- aur/zsh-manydots-magic
|
||||
- aur/breeze-red-cursor-theme
|
||||
- aur/hyprland-git
|
||||
- aur/hyprsome-git
|
||||
- aur/mimi-git
|
||||
- aur/picom-animations-git
|
||||
- aur/shellgpt-git
|
||||
- aur/vifmimg-git
|
||||
- aur/waybar-hyprland-git 0.9.17.r159.ga9a22234-1
|
||||
- aur/xdg-desktop-portal-hyprland-git 1:r272.04f5793-1
|
||||
- dunst
|
||||
- feh
|
||||
- ffmpeg-python
|
||||
- ffmpegthumbnailer
|
||||
- gallery-dl
|
||||
- i3lock
|
||||
- jq
|
||||
- mpv
|
||||
- nvim
|
||||
- python-eyed3
|
||||
- python-pynvim
|
||||
- qutebrowser
|
||||
- sxiv
|
||||
- ueberzug
|
||||
- unclutter
|
||||
- vifm
|
||||
- youtube-dl
|
||||
- zathura
|
||||
- zsh-completions
|
||||
- zsh-syntax-highlighting
|
||||
|
|
53
_Xresources
Normal file
53
_Xresources
Normal file
|
@ -0,0 +1,53 @@
|
|||
URxvt.scrollBar: false
|
||||
|
||||
urxvt*depth: 32
|
||||
urxvt.imLocale: de_DE.UTF-8
|
||||
urxvt*background: rgba:0000/0000/0200/DDDD
|
||||
URxvt*foreground: white
|
||||
|
||||
URxvt*font: xft:Source Code Pro:size=10:antialias=true:hinting=true
|
||||
URxvt*boldFont: xft:Source Code Pro:size=10:antialias=true:hinting=true
|
||||
URxvt*italicFont: xft:Source Code Pro:style=Oblique:size=10:antialias=true:hinting=true
|
||||
URxvt*boldItalicFont: xft:Source Code Pro:style=Bold Oblique:size=10:antialias=true:hinting=true
|
||||
URxvt*letterSpace: -2
|
||||
|
||||
!black
|
||||
*color0: #251f1f
|
||||
*color8: #5e5e5e
|
||||
!red
|
||||
*color1: #eb4509
|
||||
*color9: #eb4509
|
||||
!green
|
||||
*color2: #94e76b
|
||||
*color10: #95e76b
|
||||
!yellow
|
||||
*color3: #ffac18
|
||||
*color11: #ffac18
|
||||
!blue
|
||||
*color4: #46aede
|
||||
*color12: #46aede
|
||||
!magenta
|
||||
*color5: #e32c57
|
||||
*color13: #e32c57
|
||||
!cyan
|
||||
*color6: #d6dbac
|
||||
*color14: #d6dbac
|
||||
!white
|
||||
*color7: #efefef
|
||||
*color15: #efefef
|
||||
|
||||
rofi.lines: 5
|
||||
rofi.eh: 2
|
||||
rofi.padding: 200
|
||||
rofi.fullscreen: true
|
||||
rofi.bw: 0
|
||||
rofi.separator-style: none
|
||||
rofi.hide-scrollbar: true
|
||||
rofi.opacity: 10000
|
||||
|
||||
! 'background', 'border', 'separator'
|
||||
rofi.color-window: argb:c82d303b, #7c8389, #1d1f21
|
||||
! State: 'bg', 'fg', 'bgalt', 'hlbg', 'hlfg'
|
||||
rofi.color-normal: argb:031d1f21, #f3f4f5, argb:031d1f21, argb:031d1f21, #9575cd
|
||||
|
||||
rofi.font: Source Code Pro 12
|
41
_bash_aliases
Executable file
41
_bash_aliases
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
|
||||
alias e="$EDITOR"
|
||||
alias p="sudo pacman"
|
||||
alias SS="sudo systemctl"
|
||||
alias v="nvim"
|
||||
alias vi='nvim'
|
||||
alias vim='nvim'
|
||||
alias sv="sudo nvim"
|
||||
alias n="nnn"
|
||||
alias sn="sudo nnn"
|
||||
alias ka="killall"
|
||||
alias g="git"
|
||||
alias mkd="mkdir -pv"
|
||||
|
||||
alias yv='youtube-viewer -C'
|
||||
alias yd="youtube-dl --add-metadata -ic" # Download video link
|
||||
alias yda="youtube-dl --add-metadata -xic" # Download only audio
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias ll='ls -l --color=auto'
|
||||
alias la='ls -la --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias feh='feh -F'
|
||||
alias sudo='sudo '
|
||||
|
||||
function mandelbrot {
|
||||
local lines columns colour a b p q i pnew
|
||||
((columns=COLUMNS-1, lines=LINES-1, colour=0))
|
||||
for ((b=-1.5; b<=1.5; b+=3.0/lines)) do
|
||||
for ((a=-2.0; a<=1; a+=3.0/columns)) do
|
||||
for ((p=0.0, q=0.0, i=0; p*p+q*q < 4 && i < 32; i++)) do
|
||||
((pnew=p*p-q*q+a, q=2*p*q+b, p=pnew))
|
||||
done
|
||||
((colour=(i/4)%8))
|
||||
echo -n "\\e[4${colour}m "
|
||||
done
|
||||
echo
|
||||
done
|
||||
}
|
3
_bash_logout
Normal file
3
_bash_logout
Normal file
|
@ -0,0 +1,3 @@
|
|||
#
|
||||
# ~/.bash_logout
|
||||
#
|
16
_bash_profile
Executable file
16
_bash_profile
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
export BROWSER="qutebrowser"
|
||||
export GOPATH="$HOME/Programming/go"
|
||||
export PATH="$HOME/.local/bin:$GOPATH/bin:$PATH"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=0
|
||||
export EDITOR="nvim"
|
||||
export SYSTEMD_EDITOR="$EDITOR"
|
||||
export TERMINAL="st"
|
||||
|
||||
export WINEPREFIX="$HOME/.wine64"
|
||||
|
||||
[ "$(tty)" == "/dev/tty1" ] && exec sx
|
||||
|
||||
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
|
29
_bashrc
Executable file
29
_bashrc
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
alias la='ls --color=auto -la'
|
||||
alias ll='ls --color=auto -l'
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
|
||||
alias :e="nvim"
|
||||
alias v="nvim"
|
||||
alias vi="nvim"
|
||||
alias vim="nvim"
|
||||
|
||||
alias f="fuck"
|
||||
|
||||
alias irssi='irssi --config="$XDG_CONFIG_HOME"/irssi/config --home="$XDG_DATA_HOME"/irssi'
|
||||
|
||||
alias unison="unison -logfile ~/.unison/unison.log"
|
||||
alias unison-2.48="unison-2.48 -logfile ~/.unison/unison.log"
|
||||
|
||||
alias pacman="aura"
|
||||
|
||||
mkcd() {
|
||||
mkdir -p "$1"
|
||||
cd "$1"
|
||||
}
|
||||
|
||||
export PS1="
|
||||
$(tput bold)$(tput setaf 1)[$(tput setaf 3)\u$(tput setaf 2)@$(tput setaf 4)\H $(tput setaf 5)\w$(tput setaf 1)]$(tput setaf 7)
|
||||
$ $(tput sgr0)"
|
2
_config/gtk-3.0/settings.ini
Normal file
2
_config/gtk-3.0/settings.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
[Settings]
|
||||
gtk-theme-name = Arc-Dark
|
221
_config/i3/config
Executable file
221
_config/i3/config
Executable file
|
@ -0,0 +1,221 @@
|
|||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:Source Code Pro 8
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
|
||||
# smart fullscreen popup
|
||||
popup_during_fullscreen smart
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
bindsym $mod+Shift+Return exec --no-startup-id samedir
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+x kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+r exec dmenu_run
|
||||
bindsym $mod+Shift+r exec dmenu_run_term
|
||||
|
||||
# run clipmenu using dmenu
|
||||
bindsym $mod+v exec clipmenu
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+n split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+m split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent and child containers
|
||||
bindsym $mod+a focus parent
|
||||
bindsym $mod+d focus child
|
||||
|
||||
# Change multi-display mode
|
||||
bindsym XF86Display exec multipromt "Multi-Display Settings" "same" "multi_display same" "right" "multi_display right" "left" "multi_display left"
|
||||
|
||||
# volume buttons
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
|
||||
bindsym XF86AudioRaiseVolume exec amixer set Master 3%+ ; exec pkill -SIGRTMIN+10 i3blocks
|
||||
bindsym XF86AudioLowerVolume exec amixer set Master 3%- ; exec pkill -SIGRTMIN+10 i3blocks
|
||||
|
||||
# dmenu for lock/shutdown/restart options
|
||||
bindsym Control+mod1+Delete exec multipromt "lock/shutdown/restart" "lock Screen" "lock" "Shutdown" "sudo shutdown now" "reboot" "sudo reboot" "exit I3wm" "i3-msg exit" "restart I3wm" "i3-msg restart" "reload I3wm" "i3-msg reload"
|
||||
|
||||
# lock on Fn-lock
|
||||
bindsym XF86ScreenSaver exec lock
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
set $ws1 "01: TERM"
|
||||
set $ws2 "02: TERM"
|
||||
set $ws3 "03: FIREFOX"
|
||||
set $ws4 "04: GUI EDITOR"
|
||||
set $ws5 "05"
|
||||
set $ws6 "06"
|
||||
set $ws7 "07"
|
||||
set $ws8 "08: MUSIK"
|
||||
set $ws9 "09"
|
||||
set $ws10 "10: MSG"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
# assign windows to workspace ; get class with xprop
|
||||
assign [class="Firefox"] $ws3
|
||||
assign [class="TelegramDesktop"] $ws10
|
||||
|
||||
# for_window specials
|
||||
for_window [title="xzoom*"] floating enable
|
||||
|
||||
# Mute audio and go to workspake 99
|
||||
# by this hiding all nsfw stuff
|
||||
bindsym $mod+Control+Shift+h workspace "NSFW" ; exec pactl set-sink-mute 0 1
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
#mode "resize" {
|
||||
# # These bindings trigger as soon as you enter the resize mode
|
||||
#
|
||||
# # Pressing left will shrink the window’s width.
|
||||
# # Pressing right will grow the window’s width.
|
||||
# # Pressing up will shrink the window’s height.
|
||||
# # Pressing down will grow the window’s height.
|
||||
# bindsym j resize shrink width 10 px or 10 ppt
|
||||
# bindsym k resize grow height 10 px or 10 ppt
|
||||
# bindsym l resize shrink height 10 px or 10 ppt
|
||||
# bindsym semicolon resize grow width 10 px or 10 ppt
|
||||
#
|
||||
# # same bindings, but for the arrow keys
|
||||
# bindsym Left resize shrink width 10 px or 10 ppt
|
||||
# bindsym Down resize grow height 10 px or 10 ppt
|
||||
# bindsym Up resize shrink height 10 px or 10 ppt
|
||||
# bindsym Right resize grow width 10 px or 10 ppt
|
||||
#
|
||||
# # back to normal: Enter or Escape or $mod+r
|
||||
# bindsym Return mode "default"
|
||||
# bindsym Escape mode "default"
|
||||
# bindsym $mod+Shift+r mode "default"
|
||||
#}
|
||||
#
|
||||
#bindsym $mod+Shift+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||
position top
|
||||
}
|
||||
|
||||
gaps outer 5
|
||||
gaps inner 5
|
||||
|
||||
set $border #2e9ef4
|
||||
# class border backgr. text indicator child_border
|
||||
client.focused #4c7899 #285577 #ffffff $border $border
|
||||
client.focused_inactive #333333 #5f676a #ffffff #5f676a #5f676a
|
||||
client.unfocused #333333 #222222 #888888 #222222 #222222
|
||||
client.urgent #2f343a #900000 #ffffff #900000 #900000
|
||||
client.placeholder #000000 #0c0c0c #ffffff #0c0c0c #0c0c0c
|
||||
|
||||
exec_always feh --bg-fill --randomize ~/.config/i3/wallpapers/*
|
||||
|
||||
for_window [class=".*"] border pixel 2
|
||||
hide_edge_borders both
|
||||
|
||||
# clear clipboard cache
|
||||
exec clipdel ".*"
|
||||
|
||||
# autostart services
|
||||
exec compton -f
|
||||
#exec devmon
|
||||
exec clipmenud
|
||||
exec unclutter -idle 1 -jitter 2 -root
|
||||
|
||||
# autostart apps
|
||||
#exec keepassxc
|
||||
#exec telegram-desktop
|
||||
exec sleep 1 ; i3-sensible-terminal
|
155
_config/i3/i3blocks.conf
Executable file
155
_config/i3/i3blocks.conf
Executable file
|
@ -0,0 +1,155 @@
|
|||
# i3blocks config file
|
||||
#
|
||||
# Please see man i3blocks for a complete reference!
|
||||
# The man page is also hosted at http://vivien.github.io/i3blocks
|
||||
#
|
||||
# List of valid properties:
|
||||
#
|
||||
# align
|
||||
# color
|
||||
# command
|
||||
# full_text
|
||||
# instance
|
||||
# interval
|
||||
# label
|
||||
# min_width
|
||||
# name
|
||||
# separator
|
||||
# separator_block_width
|
||||
# short_text
|
||||
# signal
|
||||
# urgent
|
||||
|
||||
# Global properties
|
||||
#
|
||||
# The top properties below are applied to every block, but can be overridden.
|
||||
# Each block command defaults to the script name to avoid boilerplate.
|
||||
command=/usr/lib/i3blocks/$BLOCK_NAME
|
||||
separator_block_width=20
|
||||
markup=none
|
||||
|
||||
# Volume indicator
|
||||
#
|
||||
# The first parameter sets the step (and units to display)
|
||||
# The second parameter overrides the mixer selection
|
||||
# See the script for details.
|
||||
[volume]
|
||||
label=VOL
|
||||
instance=Master
|
||||
#instance=PCM
|
||||
interval=1
|
||||
signal=10
|
||||
|
||||
# Memory usage
|
||||
#
|
||||
# The type defaults to "mem" if the instance is not specified.
|
||||
[memory]
|
||||
label=MEM
|
||||
separator=false
|
||||
interval=30
|
||||
|
||||
[memory]
|
||||
label=SWAP
|
||||
instance=swap
|
||||
separator=false
|
||||
interval=30
|
||||
|
||||
[battery]
|
||||
interval=10
|
||||
|
||||
# Disk usage
|
||||
#
|
||||
# The directory defaults to $HOME if the instance is not specified.
|
||||
# The script may be called with a optional argument to set the alert
|
||||
# (defaults to 10 for 10%).
|
||||
[disk]
|
||||
label=HOME
|
||||
#instance=/mnt/data
|
||||
interval=30
|
||||
|
||||
# Network interface monitoring
|
||||
#
|
||||
# If the instance is not specified, use the interface used for default route.
|
||||
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
|
||||
[iface]
|
||||
#instance=wlan0
|
||||
color=#00FF00
|
||||
interval=10
|
||||
separator=false
|
||||
|
||||
[wifi]
|
||||
#instance=wlp3s0
|
||||
interval=10
|
||||
separator=false
|
||||
|
||||
[bandwidth]
|
||||
#instance=eth0
|
||||
interval=5
|
||||
|
||||
# CPU usage
|
||||
#
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
[cpu_usage]
|
||||
label=CPU
|
||||
interval=10
|
||||
min_width=CPU: 100.00%
|
||||
#separator=false
|
||||
|
||||
#[load_average]
|
||||
#interval=10
|
||||
|
||||
# Battery indicator
|
||||
#
|
||||
# The battery instance defaults to 0.
|
||||
[battery]
|
||||
label=BAT
|
||||
#label=⚡
|
||||
instance=1
|
||||
interval=30
|
||||
|
||||
# Date Time
|
||||
#
|
||||
[time]
|
||||
command=date '+%d.%m.%Y %H:%M:%S'
|
||||
interval=1
|
||||
|
||||
# Generic media player support
|
||||
#
|
||||
# This displays "ARTIST - SONG" if a music is playing.
|
||||
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
|
||||
#[mediaplayer]
|
||||
#instance=spotify
|
||||
#interval=5
|
||||
#signal=10
|
||||
|
||||
# OpenVPN support
|
||||
#
|
||||
# Support multiple VPN, with colors.
|
||||
#[openvpn]
|
||||
#interval=20
|
||||
|
||||
# Temperature
|
||||
#
|
||||
# Support multiple chips, though lm-sensors.
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
#[temperature]
|
||||
#label=TEMP
|
||||
#interval=10
|
||||
|
||||
# Key indicators
|
||||
#
|
||||
# Add the following bindings to i3 config file:
|
||||
#
|
||||
# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks
|
||||
# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks
|
||||
#[keyindicator]
|
||||
#instance=CAPS
|
||||
#interval=once
|
||||
#signal=11
|
||||
|
||||
#[keyindicator]
|
||||
#instance=NUM
|
||||
#interval=once
|
||||
#signal=11
|
BIN
_config/i3/wallpapers/lsdCat.jpg
Normal file
BIN
_config/i3/wallpapers/lsdCat.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 238 KiB |
19
_config/nvim/lsp/luals.lua
Normal file
19
_config/nvim/lsp/luals.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
-- Command and arguments to start the server.
|
||||
cmd = { 'lua-language-server' },
|
||||
-- Filetypes to automatically attach to.
|
||||
filetypes = { 'lua' },
|
||||
-- Sets the "workspace" to the directory where any of these files is found.
|
||||
-- Files that share a root directory will reuse the LSP server connection.
|
||||
-- Nested lists indicate equal priority, see |vim.lsp.Config|.
|
||||
root_markers = { { '.luarc.json', '.luarc.jsonc' }, '.git' },
|
||||
-- Specific settings to send to the server. The schema is server-defined.
|
||||
-- Example: https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,49 +1,56 @@
|
|||
vim.diagnostic.config({ virtual_text = true })
|
||||
vim.lsp.enable('ts_ls')
|
||||
vim.lsp.enable('luals')
|
||||
vim.lsp.enable('clangd')
|
||||
|
||||
local lsp = require('lsp-zero').preset({})
|
||||
-- LSP keymaps to mimic lsp-zero's defaults
|
||||
-- Source for lsp-zero defaults: see note at bottom
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
-- Create the autocommand once
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspKeymaps', { clear = true }),
|
||||
callback = function(ev)
|
||||
local buf = ev.buf
|
||||
|
||||
-- " (Optional) Configure lua language server for neovim
|
||||
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
|
||||
local function map(mode, lhs, rhs, desc)
|
||||
vim.keymap.set(mode, lhs, rhs, { buffer = buf, silent = true, noremap = true, desc = desc })
|
||||
end
|
||||
|
||||
-- Hover
|
||||
map('n', 'K', vim.lsp.buf.hover, 'LSP: Hover')
|
||||
|
||||
-- Go to...
|
||||
map('n', 'gd', vim.lsp.buf.definition, 'LSP: Go to Definition')
|
||||
map('n', 'gD', vim.lsp.buf.declaration, 'LSP: Go to Declaration')
|
||||
map('n', 'gi', vim.lsp.buf.implementation, 'LSP: Go to Implementation')
|
||||
map('n', 'go', vim.lsp.buf.type_definition, 'LSP: Go to Type Definition')
|
||||
map('n', 'gr', vim.lsp.buf.references, 'LSP: List References')
|
||||
|
||||
-- Signatures
|
||||
map('n', 'gs', vim.lsp.buf.signature_help, 'LSP: Signature Help')
|
||||
|
||||
-- Rename / Actions / Format (normal + visual)
|
||||
map('n', '<F2>', vim.lsp.buf.rename, 'LSP: Rename')
|
||||
map({ 'n', 'x' }, '<F3>', function()
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end, 'LSP: Format')
|
||||
map({ 'n', 'x' }, '<F4>', vim.lsp.buf.code_action, 'LSP: Code Action')
|
||||
end,
|
||||
})
|
||||
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({})
|
||||
|
||||
-- You need to setup `cmp` after lsp-zero
|
||||
local cmp = require('cmp')
|
||||
local cmp_action = require('lsp-zero').cmp_action()
|
||||
local cmp_nvim_lsp = require('cmp_nvim_lsp')
|
||||
|
||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
cmp.setup({
|
||||
mapping = {
|
||||
-- `Enter` key to confirm completion
|
||||
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||
|
||||
-- Ctrl+Space to trigger completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
|
||||
-- Navigate between snippet placeholder
|
||||
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||
}
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
||||
}),
|
||||
})
|
||||
|
||||
lsp.ensure_installed({
|
||||
'ts_ls',
|
||||
})
|
||||
|
||||
local null_ls = require('null-ls')
|
||||
local null_opts = lsp.build_options('null-ls', {})
|
||||
|
||||
null_ls.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
null_opts.on_attach(client, bufnr)
|
||||
--- you can add more stuff here if you need it
|
||||
end,
|
||||
sources = {
|
||||
null_ls.builtins.formatting.black,
|
||||
}
|
||||
})
|
||||
|
||||
lsp.setup()
|
||||
cmp_nvim_lsp.default_capabilities()
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
local rt = require("rust-tools")
|
||||
|
||||
rt.setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
},
|
||||
require('rust-tools').setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Example keymaps
|
||||
vim.keymap.set("n", "<C-space>", require("rust-tools").hover_actions.hover_actions, { buffer = bufnr })
|
||||
vim.keymap.set("n", "<Leader>a", require("rust-tools").code_action_group.code_action_group,
|
||||
{ buffer = bufnr })
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -4,14 +4,7 @@ Plug 'tpope/vim-fugitive'
|
|||
Plug 'vim-syntastic/syntastic'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'tpope/vim-surround'
|
||||
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
" Plug 'deoplete-plugins/deoplete-clang'
|
||||
" Plug 'deoplete-plugins/deoplete-jedi'
|
||||
" Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'}
|
||||
" Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install tern'}
|
||||
" Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
|
||||
Plug 'mg979/vim-visual-multi'
|
||||
" Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
||||
" Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' }
|
||||
Plug 'luochen1990/rainbow'
|
||||
" Plug 'wlangstroth/vim-racket'
|
||||
|
@ -24,18 +17,14 @@ Plug 'neovim/nvim-lspconfig'
|
|||
Plug 'williamboman/mason.nvim'
|
||||
Plug 'williamboman/mason-lspconfig.nvim'
|
||||
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvimtools/none-ls.nvim'
|
||||
|
||||
" Autocompletion
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'L3MON4D3/LuaSnip'
|
||||
|
||||
Plug 'VonHeikemen/lsp-zero.nvim', {'branch': 'v2.x'}
|
||||
|
||||
Plug 'simrat39/rust-tools.nvim'
|
||||
|
||||
" Debugging
|
||||
Plug 'mfussenegger/nvim-dap'
|
||||
Plug 'rcarriga/nvim-dap-ui'
|
||||
Plug 'nvim-neotest/nvim-nio'
|
||||
|
|
1
_gtkrc-2.0
Normal file
1
_gtkrc-2.0
Normal file
|
@ -0,0 +1 @@
|
|||
gtk-theme-name = "Arc-Dark"
|
6
_scripts/dmenu_run_term
Executable file
6
_scripts/dmenu_run_term
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# select a command with dmenu_run but run it in the terminal emulator
|
||||
|
||||
command=$(dmenu_path | dmenu "$@")
|
||||
[[ $command != "" ]] && exec urxvt -e $command
|
19
_scripts/excelDecode.py
Executable file
19
_scripts/excelDecode.py
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import re
|
||||
import string
|
||||
|
||||
alphabet = "0" + string.ascii_lowercase
|
||||
goodRe = re.compile("^[0a-z]*$")
|
||||
|
||||
for s in [s.lower() for s in sys.argv[1:]]:
|
||||
if not goodRe.match(s):
|
||||
print(f"failed to decode {s}: wrong format", file=sys.stderr)
|
||||
continue
|
||||
result = 0
|
||||
for c in s:
|
||||
result *= 26
|
||||
result += alphabet.index(c)
|
||||
print(f"{s} = {result-1}")
|
||||
|
3
_scripts/fi_fos
Executable file
3
_scripts/fi_fos
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
python ~/Documents/fi_fos $@
|
6
_scripts/lock
Executable file
6
_scripts/lock
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
bg_file=/tmp/$(dd if=/dev/urandom bs=8 count=1 2> /dev/null | base32).png
|
||||
scrot $bg_file -q 30
|
||||
convert $bg_file -blur 8x8 $bg_file
|
||||
exec i3lock -i $bg_file
|
22
_scripts/multi_display
Executable file
22
_scripts/multi_display
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
same)
|
||||
xrandr --output VGA-1 --same-as LVDS-1
|
||||
;;
|
||||
right)
|
||||
xrandr --output VGA-1 --right-of LVDS-1
|
||||
;;
|
||||
left)
|
||||
xrandr --output VGA-1 --left-of LVDS-1
|
||||
;;
|
||||
*)
|
||||
echo $0 "same|right|left"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
|
24
_scripts/multipromt
Executable file
24
_scripts/multipromt
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# runs dmenu with the first value of $@ as promt, each even value of $@ as option and the following odd value as command for that option
|
||||
# for example $ ./multipromt "Power Button Pressed?" "Shutdown" "sudo shutdown now" "Reboot" "sudo reboot now" "Exit I3wm" "i3-msg exit"
|
||||
|
||||
import subprocess
|
||||
from sys import argv
|
||||
|
||||
def pairs(iterable):
|
||||
return zip(iterable[::2], iterable[1::2])
|
||||
|
||||
def demnu_select(options, promt=""):
|
||||
return subprocess.run(["dmenu", "-p", promt], stdout=subprocess.PIPE, input="\n".join(options).encode("UTF-8")).stdout.decode().strip()
|
||||
|
||||
def main():
|
||||
cmds = dict(pairs(["Abort", ""] + argv[2:]))
|
||||
selected = demnu_select(cmds, argv[1])
|
||||
cmd = cmds.get(selected, "").split()
|
||||
if len(cmd) > 0:
|
||||
subprocess.run(cmd)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
5
_scripts/processing
Executable file
5
_scripts/processing
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd ~/.programs/processing
|
||||
|
||||
./processing
|
11
_scripts/promt
Executable file
11
_scripts/promt
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Use dmenu to promt no or yes with $1 as promt. If the use clickes yes run $2"
|
||||
# example: promt "Shutdown?" "sudo shutdown now"
|
||||
|
||||
posRep="Yes"
|
||||
negRep="No"
|
||||
choosen=$(echo -e "$negRep\n$posRep" | dmenu -p "$1")
|
||||
|
||||
[[ "$choosen" == "$posRep" ]] && $2
|
||||
|
28
_scripts/samedir
Executable file
28
_scripts/samedir
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152
|
||||
|
||||
CMD=$TERMINAL
|
||||
CWD=''
|
||||
|
||||
# Get window ID
|
||||
ID=$(xdpyinfo | grep focus | cut -f4 -d " ")
|
||||
|
||||
# Get PID of process whose window this is
|
||||
PID=$(xprop -id $ID | grep -m 1 PID | cut -d " " -f 3)
|
||||
|
||||
# Get last child process (shell, vim, etc)
|
||||
if [ -n "$PID" ]; then
|
||||
TREE=$(pstree -lpA $PID | tail -n 1)
|
||||
PID=$(echo $TREE | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')
|
||||
|
||||
# If we find the working directory, run the command in that directory
|
||||
if [ -e "/proc/$PID/cwd" ]; then
|
||||
CWD=$(readlink /proc/$PID/cwd)
|
||||
fi
|
||||
fi
|
||||
if [ -n "$CWD" ]; then
|
||||
cd $CWD && $CMD
|
||||
else
|
||||
$CMD
|
||||
fi
|
||||
|
124
_vimrc
Normal file
124
_vimrc
Normal file
|
@ -0,0 +1,124 @@
|
|||
" This section is for vundle
|
||||
set nocompatible " be iMproved, required
|
||||
filetype off " required
|
||||
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
" alternatively, pass a path where Vundle should install plugins
|
||||
"call vundle#begin('~/some/path/here')
|
||||
|
||||
" let Vundle manage Vundle, required
|
||||
"Plugin 'Valloric/YouCompleteMe'
|
||||
Plugin 'VundleVim/Vundle.vim'
|
||||
Plugin 'jreybert/vimagit'
|
||||
Plugin 'sbdchd/vim-run'
|
||||
Plugin 'scrooloose/nerdtree'
|
||||
"Plugin 'takac/vim-hardtime'
|
||||
|
||||
" All of your Plugins must be added before the following line
|
||||
call vundle#end() " required
|
||||
filetype plugin indent on " required
|
||||
" To ignore plugin indent changes, instead use:
|
||||
"filetype plugin on
|
||||
"
|
||||
" Brief help
|
||||
" :PluginList - lists configured plugins
|
||||
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
|
||||
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
|
||||
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
|
||||
"
|
||||
" see :h vundle for more details or wiki for FAQ
|
||||
" Put your non-Plugin stuff after this line
|
||||
|
||||
|
||||
|
||||
" Get the defaults that most users want.
|
||||
source $VIMRUNTIME/defaults.vim
|
||||
|
||||
if has("vms")
|
||||
set nobackup " do not keep a backup file, use versions instead
|
||||
else
|
||||
set backup " keep a backup file (restore to previous version)
|
||||
if has('persistent_undo')
|
||||
set undofile " keep an undo file (undo changes after closing)
|
||||
endif
|
||||
endif
|
||||
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
" Switch on highlighting the last used search pattern.
|
||||
set hlsearch
|
||||
endif
|
||||
|
||||
" Only do this part when compiled with support for autocommands.
|
||||
if has("autocmd")
|
||||
|
||||
" Put these in an autocmd group, so that we can delete them easily.
|
||||
augroup vimrcEx
|
||||
au!
|
||||
|
||||
" For all text files set 'textwidth' to 78 characters.
|
||||
autocmd FileType text setlocal textwidth=78
|
||||
|
||||
augroup END
|
||||
|
||||
else
|
||||
|
||||
set autoindent " always set autoindenting on
|
||||
|
||||
endif " has("autocmd")
|
||||
|
||||
" Add optional packages.
|
||||
"
|
||||
" The matchit plugin makes the % command work better, but it is not backwards
|
||||
" compatible.
|
||||
" The ! means the package won't be loaded right away but when plugins are
|
||||
" loaded during initialization.
|
||||
"if has('syntax') && has('eval')
|
||||
" packadd! matchit
|
||||
"endif
|
||||
|
||||
" -- by osh --
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
map <C-m> :Magit<CR>
|
||||
|
||||
" navigate in splitted buffers
|
||||
nnoremap <C-J> <C-W><C-J>
|
||||
nnoremap <C-K> <C-W><C-K>
|
||||
nnoremap <C-L> <C-W><C-L>
|
||||
nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
" swap lines
|
||||
nnoremap <S-j> :m .+1<CR>==
|
||||
nnoremap <S-k> :m .-2<CR>==
|
||||
vnoremap <S-j> :m '>+1<CR>gv=gv
|
||||
vnoremap <S-k> :m '<-2<CR>gv=gv
|
||||
|
||||
set splitbelow
|
||||
set splitright
|
||||
|
||||
set number relativenumber
|
||||
augroup numbertoggle
|
||||
autocmd!
|
||||
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
||||
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
|
||||
augroup END
|
||||
|
||||
set tabstop=2 shiftwidth=2 expandtab
|
||||
set visualbell
|
||||
|
||||
set complete+=kspell
|
||||
|
||||
autocmd FileType markdown setlocal spell
|
||||
autocmd FileType gitcommit setlocal spell textwidth=72
|
||||
"hi SpellBad cterm=underline ctermfg=red
|
||||
|
||||
" cursor shapes
|
||||
let &t_SI = "\<Esc>[6 q"
|
||||
let &t_SR = "\<Esc>[4 q"
|
||||
let &t_EI = "\<Esc>[2 q"
|
||||
|
||||
" exec current file
|
||||
nnoremap <F6> :Run<CR>
|
||||
nnoremap <F7> :make<CR>
|
||||
|
4
_xinitrc
Normal file
4
_xinitrc
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
xrdb ~/.Xresources
|
||||
exec i3
|
5
_zprofile
Executable file
5
_zprofile
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ -f "$HOME/.bash_profile" ] && emulate sh -c "source $HOME/.bash_profile"
|
||||
|
||||
[ -f "$HOME/.zshrc" ] && source "$HOME/.zshrc"
|
18
_zshrc
18
_zshrc
|
@ -1,25 +1,21 @@
|
|||
#!/bin/zsh
|
||||
|
||||
# The following lines were added by compinstall
|
||||
zstyle ':completion:*' completer _expand _complete _ignored
|
||||
zstyle ':completion:*' list-colors ''
|
||||
zstyle ':completion:*' menu select=0
|
||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||||
zstyle :compinstall filename '/home/osh/.zshrc'
|
||||
|
||||
autoload -Uz compinit
|
||||
autoload -Uz compinit manydots-magic
|
||||
compinit
|
||||
# End of lines added by compinstall
|
||||
manydots-magic
|
||||
|
||||
# Lines configured by zsh-newuser-install
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
SAVEHIST=100000
|
||||
setopt appendhistory nomatch notify extendedglob
|
||||
bindkey -v
|
||||
# End of lines configured by zsh-newuser-install
|
||||
|
||||
# Change cursor shape for different vi modes.
|
||||
function zle-keymap-select {
|
||||
if [[ ${KEYMAP} == vicmd ]] ||
|
||||
[[ $1 = 'block' ]]; then
|
||||
|
@ -34,11 +30,13 @@ function zle-keymap-select {
|
|||
}
|
||||
zle -N zle-keymap-select
|
||||
|
||||
[ -f "$HOME/./config/bashrc" ] && emulate sh -c "source $HOME/./config/bashrc"
|
||||
[ -f "$HOME/.bashrc" ] && emulate sh -c "source $HOME/.bashrc"
|
||||
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
source /usr/share/fzf/completion.zsh
|
||||
[ -f "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ] && source "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
[ -f "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ] && source "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
[ -f "/usr/share/fzf/key-bindings.zsh" ] && source "/usr/share/fzf/key-bindings.zsh"
|
||||
[ -f "/usr/share/fzf/completion.zsh" ] && source "/usr/share/fzf/completion.zsh"
|
||||
|
||||
setopt interactivecomments
|
||||
setopt HIST_IGNORE_SPACE
|
||||
|
|
127
flake.nix
Normal file
127
flake.nix
Normal file
|
@ -0,0 +1,127 @@
|
|||
{
|
||||
description = "OSHs dotfiles";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, neovim-nightly-overlay, ... }:
|
||||
let
|
||||
system = builtins.currentSystem;
|
||||
username = builtins.getEnv "USER";
|
||||
homeDir = builtins.getEnv "HOME";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
neovim-nightly-overlay.overlays.default
|
||||
];
|
||||
|
||||
home.username = username;
|
||||
home.homeDirectory = homeDir;
|
||||
# Only manage what you explicitly turn on below
|
||||
# (this keeps you from overriding distro-level things)
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Oshgnacknak";
|
||||
userEmail = "osh@oshgnacknak.de";
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = neovim-nightly-overlay.packages.${pkgs.system}.default;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
initExtra = ''
|
||||
source ${pkgs.fzf}/share/fzf/key-bindings.zsh
|
||||
source ${pkgs.fzf}/share/fzf/completion.zsh
|
||||
source ${pkgs.fzf-zsh}/share/zsh/plugins/fzf-zsh/fzf-zsh.plugin.zsh
|
||||
|
||||
[ -f "$HOME/.config/zshrc" ] && source $HOME/.config/zshrc
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "manydots-magic";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "knu";
|
||||
repo = "zsh-manydots-magic";
|
||||
rev = "master";
|
||||
sha256 = "sha256-lv7e7+KBR/nxC43H0uvphLcI7fALPvxPSGEmBn0g8HQ=";
|
||||
};
|
||||
file = "manydots-magic";
|
||||
}
|
||||
];
|
||||
|
||||
zplug = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
{ name = "zsh-users/zsh-autosuggestions"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
# Put extra packages in the *user* profile (not system)
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
fd
|
||||
tmux
|
||||
xsel
|
||||
fzf
|
||||
fzf-zsh
|
||||
thefuck
|
||||
rust-analyzer
|
||||
];
|
||||
|
||||
# Link dotfiles without forcing overwrite (fails safely if a file already exists)
|
||||
home.file.".tmux.conf".source = ./_tmux.conf;
|
||||
home.file.".config/zshrc".source = ./_zshrc;
|
||||
home.file.".config/bashrc".source = ./_bashrc;
|
||||
|
||||
home.file.".local/share/nvim/site/autoload/plug.vim".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim";
|
||||
sha256 = "c2d8998469a049a51225a71128a12917b379822d16b639493e29ea02d8787306";
|
||||
};
|
||||
|
||||
xdg.configFile."nvim" = {
|
||||
source = ./_config/nvim;
|
||||
recursive = true;
|
||||
force = true;
|
||||
};
|
||||
|
||||
# Environment variables only for this user/session
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
# Good HM hygiene
|
||||
xdg.enable = true;
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue