feat: add some work related config
This commit is contained in:
parent
c4b8f9c475
commit
a7f1e587be
4
justfile
4
justfile
@ -9,11 +9,11 @@ install-dependencies:
|
|||||||
|
|
||||||
alias s := setup
|
alias s := setup
|
||||||
setup tags=allTags:
|
setup tags=allTags:
|
||||||
just setup-{{ if hostname == "qwerty" { "qwerty" } else if hostname == "LE-ARCH-MHO" { "t460p" } else { "x220" } }} "{{ tags }}"
|
just setup-{{ if hostname == "qwerty" { "qwerty" } else if hostname == "LE-MHO" { "t460p" } else { "x220" } }} "{{ tags }}"
|
||||||
|
|
||||||
alias c := config
|
alias c := config
|
||||||
config tags=allTags:
|
config tags=allTags:
|
||||||
just config-{{ if hostname == "qwerty" { "qwerty" } else if hostname == "LE-ARCH-MHO" { "t460p" } else { "x220" } }} "{{ tags }}"
|
just config-{{ if hostname == "qwerty" { "qwerty" } else if hostname == "LE-MHO" { "t460p" } else { "x220" } }} "{{ tags }}"
|
||||||
|
|
||||||
setup-qwerty tags=allTags:
|
setup-qwerty tags=allTags:
|
||||||
ansible-playbook site.yml -K -t "pc,qwerty,{{tags}}"
|
ansible-playbook site.yml -K -t "pc,qwerty,{{tags}}"
|
||||||
|
40
roles/scripts/files/t460p/compiledoc
Normal file
40
roles/scripts/files/t460p/compiledoc
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# takes a file and compiles it into a pdf file, if possible
|
||||||
|
# inspiration from https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/compiler
|
||||||
|
|
||||||
|
file=$(readlink -f "$1")
|
||||||
|
dir=${file%/*}
|
||||||
|
base="${file%.*}"
|
||||||
|
ext="${file##*.}"
|
||||||
|
|
||||||
|
cd "$dir" || exit 1
|
||||||
|
|
||||||
|
compile_tex() { \
|
||||||
|
if [ -e "$dir/../Tectonic.toml" -o -e "$dir/../../Tectonic.toml" ]; then
|
||||||
|
tectonic -X build
|
||||||
|
else
|
||||||
|
params=""
|
||||||
|
( grep -q minted $file) && params="$params -Z shell-escape-cwd=$dir"
|
||||||
|
tectonic -X compile$params $file
|
||||||
|
rm "$base.aux" "$base.bbl" "$base.bcf" "$base.blg" "$base.log" "$base.out" "$base.run.xml" "$base.toc" "$base.xdv"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$ext" in
|
||||||
|
md) pandoc -t pdf \
|
||||||
|
--pdf-engine tectonic \
|
||||||
|
-f gfm \
|
||||||
|
-V linkcolor:blue \
|
||||||
|
-V geometry:a4paper \
|
||||||
|
-V geometry:top=2cm \
|
||||||
|
-V geometry:right=2cm \
|
||||||
|
-V geometry:left=2cm \
|
||||||
|
-V geometry:bottom=3.5cm \
|
||||||
|
-V mainfont="Liberation Sans" \
|
||||||
|
-V monofont="Liberation Mono" \
|
||||||
|
--highlight-style tango \
|
||||||
|
--include-in-header ~/.local/bin/inline_code.tex \
|
||||||
|
-o "$base".pdf "$file" ;;
|
||||||
|
tex) compile_tex ;;
|
||||||
|
puml) plantuml "$file" ;;
|
||||||
|
esac
|
28
roles/scripts/files/t460p/inline_code.tex
Normal file
28
roles/scripts/files/t460p/inline_code.tex
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
\usepackage{fancyvrb,newverbs,xcolor,lastpage,fancyhdr,sectsty,graphicx,hyperref}
|
||||||
|
\usepackage[datesep=.,style=ddmmyyyy]{datetime2}
|
||||||
|
\usepackage{fvextra}
|
||||||
|
|
||||||
|
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}}
|
||||||
|
|
||||||
|
\pagestyle{fancy}
|
||||||
|
\fancyhf{}
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
\fancyhead[R]{\includegraphics[height=0.71cm]{/home/max/bilder/logo.png}}
|
||||||
|
\fancyfoot[C]{\textbf{\thepage\ von \pageref*{LastPage}}\\\vspace{12pt}\color{Gray}it factum GmbH Landsberger Straße 94 80339 München\\ Tel: +49 89 4161221 0 | Email: \href{mailto:info@it-factum.de}{\color{Gray}info@it-factum.de} | Web: \href{https://www.it-factum.de}{\color{Gray}https://www.it-factum.de}}
|
||||||
|
\fancyfoot[R]{\today}
|
||||||
|
|
||||||
|
\definecolor{Light}{HTML}{F8F8F8}
|
||||||
|
\definecolor{factum}{HTML}{77263C}
|
||||||
|
|
||||||
|
\sectionfont{\color{factum}}
|
||||||
|
\subsectionfont{\color{factum}}
|
||||||
|
|
||||||
|
\renewcommand{\labelitemi}{\color{factum}\rule[.5mm]{1.5mm}{1.5mm}}
|
||||||
|
\renewcommand{\labelitemii}{\color{factum}$\bullet$}
|
||||||
|
\renewcommand{\labelitemiii}{\color{factum}\textendash}
|
||||||
|
\renewcommand{\labelitemiv}{\color{factum}$\cdot$}
|
||||||
|
|
||||||
|
\let\oldtexttt\texttt
|
||||||
|
\renewcommand{\texttt}[1]{
|
||||||
|
\colorbox{Light}{\oldtexttt{#1}}
|
||||||
|
}
|
@ -33,3 +33,13 @@
|
|||||||
- { src: dmenu_kill, dest: ~/.local/bin/dmenu_kill }
|
- { src: dmenu_kill, dest: ~/.local/bin/dmenu_kill }
|
||||||
- { src: run_in_bash, dest: ~/.local/bin/run_in_bash }
|
- { src: run_in_bash, dest: ~/.local/bin/run_in_bash }
|
||||||
tags: pc
|
tags: pc
|
||||||
|
|
||||||
|
- name: Overwrite t460 specific scripts
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "t460p/{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
mode: '0755'
|
||||||
|
with_items:
|
||||||
|
- { src: compiledoc, dest: ~/.local/bin/compiledoc }
|
||||||
|
- { src: inline_code.tex, dest: ~/.local/bin/inline_code.tex }
|
||||||
|
tags: t460p
|
||||||
|
26
roles/xmonad/files/mimeapps_t460p.list
Normal file
26
roles/xmonad/files/mimeapps_t460p.list
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[Default Applications]
|
||||||
|
application/pdf=org.pwmt.zathura.desktop;
|
||||||
|
audio/flac=mpv.desktop;
|
||||||
|
audio/mpeg=mpv.desktop;
|
||||||
|
video/mp4=mpv.desktop;
|
||||||
|
video/mpeg=mpv.desktop;
|
||||||
|
video/x-matroska=mpv.desktop;
|
||||||
|
image/gif=feh.desktop;
|
||||||
|
image/jpeg=feh.desktop;
|
||||||
|
image/png=feh.desktop;
|
||||||
|
image/tiff=feh.desktop;
|
||||||
|
image/svg+xml=feh.desktop;
|
||||||
|
text/plain=nvim.desktop;
|
||||||
|
text/markdown=nvim.desktop;
|
||||||
|
text/html=firefox.desktop
|
||||||
|
x-scheme-handler/http=firefox.desktop
|
||||||
|
x-scheme-handler/https=firefox.desktop
|
||||||
|
x-scheme-handler/about=firefox.desktop
|
||||||
|
x-scheme-handler/unknown=firefox.desktop
|
||||||
|
x-scheme-handler/chrome=firefox.desktop
|
||||||
|
application/x-extension-htm=firefox.desktop
|
||||||
|
application/x-extension-html=firefox.desktop
|
||||||
|
application/x-extension-shtml=firefox.desktop
|
||||||
|
application/xhtml+xml=firefox.desktop
|
||||||
|
application/x-extension-xhtml=firefox.desktop
|
||||||
|
application/x-extension-xht=firefox.desktop
|
@ -65,8 +65,8 @@ myModMask = mod4Mask
|
|||||||
myScratchpads :: [NamedScratchpad]
|
myScratchpads :: [NamedScratchpad]
|
||||||
myScratchpads =
|
myScratchpads =
|
||||||
[ NS "keepassxc" "keepassxc ~/db.kdbx" (title =? "it factum Max Hohlfeld - KeePassXC" <||> title =? "db.kdbx [Gesperrt] - KeePassXC") defaultFloating
|
[ NS "keepassxc" "keepassxc ~/db.kdbx" (title =? "it factum Max Hohlfeld - KeePassXC" <||> title =? "db.kdbx [Gesperrt] - KeePassXC") defaultFloating
|
||||||
, NS "nnn" "alacritty -t nnn -e nnnwrapper" (title =? "nnn") (customFloating $ W.RationalRect (1/4) (1/6) (2/4) (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 "vimwiki" "alacritty -t vimwiki -e vwwrapper" (title =? "vimwiki") (customFloating $ W.RationalRect (1/10) (1/10) (4/5) (4/5))
|
, NS "vimwiki" "alacritty -t vimwiki -e run_in_bash vw" (title =? "vimwiki") (customFloating $ W.RationalRect (1/10) (1/10) (4/5) (4/5))
|
||||||
, NS "pavucontrol" "pavucontrol" (title =? "Lautstärkeregler") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
, NS "pavucontrol" "pavucontrol" (title =? "Lautstärkeregler") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
||||||
, NS "cmus" "alacritty -t 'cmus' -e cmus" (title =? "cmus") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
, NS "cmus" "alacritty -t 'cmus' -e cmus" (title =? "cmus") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
||||||
, NS "qalculate" "qalculate-gtk" (title =? "Qalculate!") (customFloating $ W.RationalRect (3/6) (1/6) (1/6) (1/6))
|
, NS "qalculate" "qalculate-gtk" (title =? "Qalculate!") (customFloating $ W.RationalRect (3/6) (1/6) (1/6) (1/6))
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
- mpv
|
- mpv
|
||||||
- nsxiv
|
- nsxiv
|
||||||
- zathura
|
- zathura
|
||||||
|
- zathura-pdf-mupdf
|
||||||
- ttc-iosevka
|
- ttc-iosevka
|
||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
@ -33,6 +34,7 @@
|
|||||||
- pamixer
|
- pamixer
|
||||||
- brightnessctl
|
- brightnessctl
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
tags: [t460p, x220, setup]
|
tags: [t460p, x220, setup]
|
||||||
|
|
||||||
- name: Build and install dmenu
|
- name: Build and install dmenu
|
||||||
@ -141,6 +143,7 @@
|
|||||||
- { src: xmobarrc_t460p, dest: ~/.config/xmobar/xmobarrc }
|
- { src: xmobarrc_t460p, dest: ~/.config/xmobar/xmobarrc }
|
||||||
- { src: bashrc_t460p, dest: ~/.bashrc }
|
- { src: bashrc_t460p, dest: ~/.bashrc }
|
||||||
- { src: profile_t460p, dest: ~/.profile }
|
- { src: profile_t460p, dest: ~/.profile }
|
||||||
|
- { src: mimeapps_t460p.list, dest: ~/.config/mimeapps.list }
|
||||||
tags: t460p
|
tags: t460p
|
||||||
|
|
||||||
- name: Copy over qwerty config files
|
- name: Copy over qwerty config files
|
||||||
@ -181,4 +184,5 @@
|
|||||||
name: lightdm
|
name: lightdm
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
become: true
|
||||||
tags: [pc, setup]
|
tags: [pc, setup]
|
||||||
|
Loading…
Reference in New Issue
Block a user