Compare commits
2 Commits
736ad64904
...
b02c0fbf06
Author | SHA1 | Date | |
---|---|---|---|
b02c0fbf06 | |||
5f4da558f6 |
@ -158,8 +158,7 @@ end
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local servers = { 'rust_analyzer', 'texlab', 'pyright', 'tsserver', 'ccls', 'html', 'yamlls', 'ansiblels', 'csharp_ls',
|
||||
'hls' }
|
||||
local servers = { 'rust_analyzer', 'texlab', 'pyright', 'tsserver', 'ccls', 'html', 'yamlls', 'ansiblels', 'csharp_ls', 'hls', 'cssls', 'eslint' }
|
||||
for _, server in ipairs(servers) do
|
||||
lsp[server].setup {
|
||||
on_attach = on_attach,
|
||||
|
@ -7,6 +7,7 @@
|
||||
- git
|
||||
- xclip
|
||||
state: present
|
||||
become: true
|
||||
tags: [always, setup]
|
||||
|
||||
- name: Create a config directory if it doesn't exist
|
||||
|
5
roles/scripts/files/run_in_bash
Normal file
5
roles/scripts/files/run_in_bash
Normal file
@ -0,0 +1,5 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
source /home/max/.bashrc
|
||||
cd /home/max
|
||||
$1 $2
|
@ -9,7 +9,7 @@
|
||||
- xdotool
|
||||
state: present
|
||||
become: true
|
||||
tags: pc
|
||||
tags: [pc, setup]
|
||||
|
||||
- name: Create a local bin directory if it doesn't exist
|
||||
ansible.builtin.file:
|
||||
@ -28,4 +28,5 @@
|
||||
- { src: inline_code.tex, dest: ~/.local/bin/inline_code.tex }
|
||||
- { src: open_editor_in_new_shell, dest: ~/.local/bin/open_editor_in_new_shell }
|
||||
- { src: dmenu_screenshot, dest: ~/.local/bin/dmenu_screenshot }
|
||||
- { src: run_in_bash, dest: ~/.local/bin/run_in_bash }
|
||||
tags: pc
|
||||
|
90
roles/xmonad/files/bashrc_qwerty
Normal file
90
roles/xmonad/files/bashrc_qwerty
Normal file
@ -0,0 +1,90 @@
|
||||
# ~/.bashrc
|
||||
|
||||
# colouring terminal
|
||||
export PS1='\[\033[38;5;174m\]\u\[\033[38;5;187m\]@\h\[\033[00m\]:\[\033[38;5;174m\] \w \[\033[00m\]\$ '
|
||||
|
||||
# colouring ls
|
||||
eval $( dircolors -b $HOME/.config/dircolours)
|
||||
|
||||
# set vi mode for bash
|
||||
set -o vi
|
||||
|
||||
# aliases
|
||||
alias ls='ls --color'
|
||||
alias la='ls -lah'
|
||||
|
||||
alias gf='git fetch'
|
||||
alias gd='git diff'
|
||||
alias gl='git log'
|
||||
alias gpl='git pull'
|
||||
alias gps='git push'
|
||||
alias ga='git add'
|
||||
alias gst='git status'
|
||||
alias gck='git checkout'
|
||||
alias gcm='git commit'
|
||||
alias gcl='git clone'
|
||||
alias gb='git branch'
|
||||
alias gr='git reset'
|
||||
alias grm='git rm'
|
||||
|
||||
alias lg='lazygit'
|
||||
|
||||
# starting ssh-agent
|
||||
if [ -z "$SSH_AUTH_SOCK" ] ; then
|
||||
eval `ssh-agent -s` 2>&1 >/dev/null
|
||||
fi
|
||||
|
||||
# nnn config
|
||||
export NNN_OPTS="eEr"
|
||||
export NNN_COLORS='#a744b322'
|
||||
export NNN_FCOLORS='dfdfdf6c0000df42bbbaba5f'
|
||||
export NNN_TRASH=1
|
||||
export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$"
|
||||
export NNN_BMS='b:~/bilder;d:~/downloads;D:~/dokumente;v:~/videos;B:~/ba;m:~/musik;s:~/.steam/steam;h:/run/media/max/hdd;c:~/.config;M:/mnt/'
|
||||
export NNN_PLUG='k:kdeconnect;t:opennewterm;i:imgview;m:nmount;p:preview-tui'
|
||||
|
||||
# nnn cd on quit
|
||||
n ()
|
||||
{
|
||||
# Block nesting of nnn in subshells
|
||||
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
|
||||
echo "nnn is already running"
|
||||
return
|
||||
fi
|
||||
|
||||
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||
# To cd on quit only on ^G, remove the "export" as in:
|
||||
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||
# NOTE: NNN_TMPFILE is fixed, should not be modified
|
||||
NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||
|
||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||
# stty start undef
|
||||
# stty stop undef
|
||||
# stty lwrap undef
|
||||
# stty lnext undef
|
||||
|
||||
nnn "$@"
|
||||
|
||||
if [ -f "$NNN_TMPFILE" ]; then
|
||||
. "$NNN_TMPFILE"
|
||||
rm -f "$NNN_TMPFILE" > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# vimwiki
|
||||
vw () {
|
||||
if [[ $# == 0 ]]
|
||||
then
|
||||
git -C ~/dokumente/wiki pull
|
||||
nvim ~/dokumente/wiki/index.md
|
||||
git -C ~/dokumente/wiki add -A
|
||||
git -C ~/dokumente/wiki commit -m "autosync-$(date +%FT%T)"
|
||||
git -C ~/dokumente/wiki push
|
||||
elif [[ $1 == 'g' ]]
|
||||
then
|
||||
git -C ~/dokumente/wiki ${@:2}
|
||||
else
|
||||
echo 'Usage: vw [g] [args ...]'
|
||||
fi
|
||||
}
|
61
roles/xmonad/files/profile_qwerty
Normal file
61
roles/xmonad/files/profile_qwerty
Normal file
@ -0,0 +1,61 @@
|
||||
# first read by bash on login
|
||||
|
||||
# colour scheme for terminal
|
||||
export TERM=xterm-256color
|
||||
|
||||
# colour scheme for gtk applications
|
||||
export GTK_THEME=Adwaita:dark
|
||||
|
||||
# default programs
|
||||
export EDITOR="nvim"
|
||||
export VISUAL="open_editor_in_new_shell"
|
||||
export TERMINAL="alacritty"
|
||||
export READER="zathura"
|
||||
export BROWSER="librewolf"
|
||||
|
||||
# environment variables
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_RUNTIME_DIR="/run/user/1000"
|
||||
|
||||
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
||||
export WINEPREFIX="$XDG_DATA_HOME/wine"
|
||||
export LESSHISTFILE=-
|
||||
#export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
|
||||
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
|
||||
export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc"
|
||||
export HISTFILE="$XDG_DATA_HOME/bash/history"
|
||||
export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
|
||||
export KDEHOME="$XDG_CONFIG_HOME/kde4"
|
||||
export ANDROID_SDK_ROOT="$XDG_CONFIG_HOME/android"
|
||||
export ADB_VENDOR_KEY="$XDG_CONFIG_HOME/android"
|
||||
export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
|
||||
export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/de.pws; repl $XDG_CONFIG_HOME/aspell/de.prepl"
|
||||
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
|
||||
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
|
||||
export TS3_CONFIG_DIR="$XDG_CONFIG_HOME/ts3client"
|
||||
export XMONAD_CONFIG_HOME="$XDG_CONFIG_HOME/xmonad"
|
||||
export XMONAD_DATA_HOME="$XDG_DATA_HOME/xmonad"
|
||||
export XMONAD_CACHE_HOME="$XDG_CACHE_HOME/xmonad"
|
||||
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
|
||||
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
|
||||
export DVDCSS_CACHE="$XDG_DATA_HOME/dvdcss"
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
|
||||
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
|
||||
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
|
||||
export AZURE_CONFIG_DIR="$XDG_DATA_HOME/azure"
|
||||
export NUGET_PACKAGES="$XDG_CACHE_HOME/NuGetPackages"
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# add private bin and its subdirectories to the $PATH
|
||||
export PATH="$PATH:$XDG_DATA_HOME/cargo/bin:$(du "$HOME/.local/bin" | cut -f2 | grep -v git | paste -s -d ':')"
|
11
roles/xmonad/files/redshiftrc
Normal file
11
roles/xmonad/files/redshiftrc
Normal file
@ -0,0 +1,11 @@
|
||||
[redshift]
|
||||
temp-day=5700
|
||||
temp-night=3000
|
||||
brightness-day=1.0
|
||||
brightness-night=0.6
|
||||
adjustment-method=randr
|
||||
location-provider=manual
|
||||
|
||||
[manual]
|
||||
lat=51.4
|
||||
lon=12.4
|
@ -7,7 +7,7 @@ Config { font = "Iosevka Normal 11"
|
||||
, lowerOnStart = True
|
||||
, commands = [Run DynNetwork ["-t", "<fc=#dca3a3><dev>:</fc> ↓ <rx> | ↑ <tx> kbps"] 10
|
||||
, Run Date "<fc=#dca3a3>%a, %d.%m.%Y</fc> - <fc=#ffcfaf>%H:%M</fc>" "date" 10
|
||||
, Run Alsa "default" "Master" ["-t", "<fc=#8c8cbc>Vol:</fc> <volume>%"]
|
||||
, Run Com "pamixer" ["--get-volume-human"] "vol" 1
|
||||
, Run Kbd [("de", "de"), ("de(dsb_qwertz)", "dsb"), ("ru(phonetic)", "ru")]
|
||||
, Run Memory ["-t", "<fc=#7f9f7f>RAM:</fc> <usedratio>%"] 10
|
||||
, Run MultiCpu ["-t", "<fc=#ffcfaf>CPU:</fc> <total>%"] 10
|
||||
@ -16,5 +16,5 @@ Config { font = "Iosevka Normal 11"
|
||||
]
|
||||
, sepChar = "%"
|
||||
, alignSep = "}{"
|
||||
, template = " | %StdinReader% }{ %dynnetwork% | %multicpu% | %memory% | <fc=#8cd0d3>%uname%</fc> | <fc=#efef8f>%kbd%</fc> | %alsa:default:Master% | %date% | "
|
||||
, template = " | %StdinReader% }{ %dynnetwork% | %multicpu% | %memory% | <fc=#8cd0d3>%uname%</fc> | <fc=#efef8f>%kbd%</fc> | <fc=#7f9f7f>Vol:</fc> %vol% | %date% | "
|
||||
}
|
||||
|
@ -48,12 +48,11 @@ darkGrey = "#262626"
|
||||
-- scratchpads
|
||||
myScratchpads :: [NamedScratchpad]
|
||||
myScratchpads =
|
||||
[ NS "cmus" "st -n cmus -e cmus" (resource =? "cmus") (customFloating $ W.RationalRect (1/6) (1/6) (4/6) (4/6))
|
||||
, NS "nnn" "st -t nnn -e nnnwrapper" (title =? "nnn") (customFloating $ W.RationalRect (1/4) (1/6) (2/4) (4/6))
|
||||
, NS "neomutt" "st -t neomutt -e neomutt -f posteo-Inbox" (title =? "neomutt") (customFloating $ W.RationalRect (1/10) (1/10) (8/10) (8/10))
|
||||
, NS "vimwiki" "st -t vimwiki -e vwwrapper" (title =? "vimwiki") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
||||
[ NS "cmus" "alacritty -n cmus -e cmus" (resource =? "cmus") (customFloating $ W.RationalRect (1/6) (1/6) (4/6) (4/6))
|
||||
, NS "nnn" "alacritty -t nnn -e run_in_bash n" (title =? "nnn") (customFloating $ W.RationalRect (1/4) (1/6) (2/4) (4/6))
|
||||
, NS "neomutt" "alacritty -t neomutt -e neomutt -f posteo-Inbox" (title =? "neomutt") (customFloating $ W.RationalRect (1/10) (1/10) (8/10) (8/10))
|
||||
, NS "vimwiki" "alacritty -t vimwiki -e run_in_bash vw" (title =? "vimwiki") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
||||
, NS "keepassxc" "keepassxc ~/dokumente/Database.kdbx" (title =? "Database.kdbx - KeePassXC" <||> title =? "Database.kdbx [Gesperrt] - KeePassXC") defaultFloating
|
||||
, NS "discord" "firejail discord" (title *!? "Discord") (customFloating $ W.RationalRect (1/10) (1/10) (8/10) (8/10))
|
||||
, NS "qalculate" "qalculate-gtk" (title =? "Qalculate!") (customFloating $ W.RationalRect (3/6) (1/6) (1/6) (1/6))
|
||||
, NS "pavucontrol" "pavucontrol" (title =? "Lautstärkeregler") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
||||
]
|
||||
@ -72,6 +71,8 @@ topicItems =
|
||||
, TI "game" "~" (switchToLayout "Full")
|
||||
, TI "micro" "~/projekte/microcontroller" (switchToLayout "Programming" *> spawnShell *> spawnEditor)
|
||||
, TI "aoc" "~/projekte/aoc" (switchToLayout "Programming" *> spawnShell *> spawnEditor)
|
||||
, TI "brass" "~/projekte/brass" (switchToLayout "Programming" *> spawnShell *> spawnEditor)
|
||||
, TI "infra" "~/projekte/infrastruktuuri" (switchToLayout "Programming" *> spawnShell *> spawnEditor)
|
||||
]
|
||||
|
||||
myTopicConfig :: TopicConfig
|
||||
@ -156,14 +157,13 @@ myAdditionalKeys =
|
||||
|
||||
-- dmenu prompts
|
||||
, ("M-<Return>", spawn "dmenu_run")
|
||||
, ("M-p s", spawn "dmenu_scrreenshot")
|
||||
, ("M-p s", spawn "dmenu_screenshot")
|
||||
, ("M-p k", spawn "dm-kill")
|
||||
|
||||
-- scratchpads
|
||||
, ("M-s c", namedScratchpadAction myScratchpads "cmus")
|
||||
, ("M-s m", namedScratchpadAction myScratchpads "neomutt")
|
||||
, ("M-s v", namedScratchpadAction myScratchpads "vimwiki")
|
||||
, ("M-s d", namedScratchpadAction myScratchpads "discord")
|
||||
|
||||
, ("M-S-a", namedScratchpadAction myScratchpads "keepassxc")
|
||||
, ("M-n", namedScratchpadAction myScratchpads "nnn")
|
||||
@ -182,11 +182,10 @@ myAdditionalKeys =
|
||||
, ("M-S-f", withFocused $ windows . W.sink)
|
||||
|
||||
-- media keys
|
||||
, ("<XF86AudioMute>", spawn "amixer sset Master toggle")
|
||||
, ("<XF86AudioLowerVolume>", spawn "amixer sset Master 5%- unmute")
|
||||
, ("<XF86AudioRaiseVolume>", spawn "amixer sset Master 5%+ unmute")
|
||||
, ("<XF86AudioMicMute>", spawn "amixer sset Capture toggle")
|
||||
, ("M-S-m", spawn "amixer sset Capture toggle")
|
||||
, ("<XF86AudioMute>", spawn "pamixer -t")
|
||||
, ("<XF86AudioLowerVolume>", spawn "pamixer -d 5")
|
||||
, ("<XF86AudioRaiseVolume>", spawn "pamixer -i 5")
|
||||
, ("<XF86AudioMicMute>", spawn "pamixer --default-source -t")
|
||||
|
||||
-- lock screen
|
||||
, ("M-S-l", spawn "slock")
|
||||
|
@ -12,6 +12,7 @@
|
||||
- lightdm
|
||||
- lightdm-gtk-greeter
|
||||
- nnn
|
||||
- trash-cli
|
||||
- tar
|
||||
- zip
|
||||
- unzip
|
||||
@ -67,6 +68,7 @@
|
||||
- ~/.config/xmobar
|
||||
- ~/.config/dunst
|
||||
- ~/.config/cmus
|
||||
- ~/.config/redshift
|
||||
tags: [pc, setup]
|
||||
|
||||
- name: Copy over alacritty config
|
||||
@ -98,6 +100,13 @@
|
||||
with_fileglob: "cmus/*"
|
||||
tags: pc
|
||||
|
||||
- name: Copy over redshiftrc
|
||||
ansible.builtin.copy:
|
||||
src: redshiftrc
|
||||
dest: ~/.config/redshift/redshiftrc
|
||||
mode: '0644'
|
||||
tags: pc
|
||||
|
||||
- name: Create nnn config directory
|
||||
ansible.builtin.file:
|
||||
path: "~/.config/nnn"
|
||||
@ -115,8 +124,8 @@
|
||||
- name: Move nnn plugins into right place
|
||||
ansible.builtin.copy:
|
||||
remote_src: true
|
||||
src: /tmp/nnn/plugins
|
||||
dest: ~/.config/nnn/plugins
|
||||
src: /tmp/nnn/plugins/
|
||||
dest: ~/.config/nnn/plugins/
|
||||
mode: '0755'
|
||||
tags: [pc, setup]
|
||||
|
||||
@ -140,6 +149,8 @@
|
||||
with_items:
|
||||
- { src: xmonad_qwerty.hs, dest: ~/.config/xmonad/xmonad.hs }
|
||||
- { src: xmobarrc_qwerty, dest: ~/.config/xmobar/xmobarrc }
|
||||
- { src: bashrc_qwerty, dest: ~/.bashrc }
|
||||
- { src: profile_qwerty, dest: ~/.profile }
|
||||
tags: qwerty
|
||||
|
||||
- name: Enable Lightdm
|
||||
|
Loading…
Reference in New Issue
Block a user