Compare commits

...

5 Commits

Author SHA1 Message Date
Frieder Schlesier 9150ecd155 Merge branch 'master' into tower
* master:
  even more updates
  update .spacemacs
  updates
  add current VPN to status bar
  update .spacemacs from current template after pulling current dev branch
  remove unused stuff
2021-10-17 19:35:22 +02:00
Frieder Schlesier d01bb81ea1 even more updates 2021-10-17 19:25:04 +02:00
Frieder Schlesier c1f47b94f8 updates for desktop 2021-10-17 19:04:49 +02:00
Frieder Schlesier 49a5940eab Merge branch 'master' of https://gitlab.com/fschl/dotfiles
* 'master' of https://gitlab.com/fschl/dotfiles:
  update documentation for wireguard
  update wireguard documentation, fix install, add example for server
  show status of wg0 interface in main status line
  add documentation for wireguard
  fix whitespace
  add wireguard to install
  extend .spacemacs (especially org config)
  add dual extern screen for notebook
  updates
  add cups-browsed to standard desktop install
  update license year
  update arduino and audacity
2021-06-02 22:28:56 +02:00
Frieder Schlesier e22a12f583 even more updates 2019-10-15 22:02:16 +02:00
8 changed files with 133 additions and 61 deletions

View File

@ -2,7 +2,7 @@ alias ..='cd ..'
alias ...='cd ../..' alias ...='cd ../..'
alias ....='cd ../../..' alias ....='cd ../../..'
alias .....='cd ../../../..' alias .....='cd ../../../..'
alias rs='rsync --progress -v' alias rs='rsync --progress -vur '
alias up='sudo apt update && sudo apt upgrade' alias up='sudo apt update && sudo apt upgrade'
alias upnodock='sudo apt-mark hold docker-ce docker-ce-cli && sudo apt update && sudo apt upgrade && sudo apt-mark unhold docker-ce docker-ce-cli' alias upnodock='sudo apt-mark hold docker-ce docker-ce-cli && sudo apt update && sudo apt upgrade && sudo apt-mark unhold docker-ce docker-ce-cli'
@ -37,8 +37,12 @@ alias dvl='docker volume ls'
alias dip="docker container inspect -f '{{ .NetworkSettings.IPAddress }}'" # call with <container name> or ID alias dip="docker container inspect -f '{{ .NetworkSettings.IPAddress }}'" # call with <container name> or ID
alias dih="docker container inspect -f '{{ .Config.Hostname }}'" # call with <container name> or ID alias dih="docker container inspect -f '{{ .Config.Hostname }}'" # call with <container name> or ID
alias dstats="docker stats "'$(sudo docker ps -aq)' # shows stats thingy for all containers alias dstats="docker stats "'$(sudo docker ps -aq)' # shows stats thingy for all containers
alias drmsc="docker container ls -a | grep Exited | awk '{print $1}' | xargs docker container rm" # removes stopped containers
alias drmdi="docker image remove "'$(docker image ls -q -f dangling=true)' # removes non-tagged images alias drmsc="docker container prune"
#alias drmsc="docker container ls -a | grep Exited | awk '{print $1}' | xargs docker container rm" # removes stopped containers
alias drmdi="docker image prune"
#alias drmdi="docker image remove "'$(docker image ls -q -f dangling=true)' # removes non-tagged images
# docker swarm # docker swarm
alias dss='docker stack services ' alias dss='docker stack services '

View File

@ -544,3 +544,19 @@ wireshark() {
jess/wireshark jess/wireshark
} }
woeusb() {
del_stopped woeusb
docker run -it \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $(pwd):/home/woe \
-v /dev/:/shared_devs \
-v /mnt/:/mnted_devs \
-e DISPLAY=unix$DISPLAY \
--privileged \
--name woeusb \
${DOCKER_REPO_PREFIX}/woeusb
}

View File

@ -105,26 +105,28 @@ set $WS8 "8 "
set $WS9 "9 " set $WS9 "9 "
assign [class="^Firefox$"] $WS1 assign [class="^Firefox$"] $WS1
assign [class="^DebugScreen"] $WS3
assign [class="^Eclipse$"] $WS5 assign [class="^Eclipse$"] $WS5
assign [class="^Thunderbird$"] $WS4 assign [class="^Thunderbird$"] $WS4
assign [class=".*ee.*ass.*"] $WS8 assign [class=".*ee.*ass.*"] $WS8
# https://faq.i3wm.org/question/3726/workspace-output-multiple-values/index.html%3Fanswer=3731.html#post-id-3731 # https://faq.i3wm.org/question/3726/workspace-output-multiple-values/index.html%3Fanswer=3731.html#post-id-3731
set $LAPTOP LVDS-1 set $LAPTOP LVDS-1
set $CENTER HDMI-1 set $CENTER DP-2
set $RIGHT VGA-1 set $RIGHT DP-1
set $LEFT DVI-D-0
# monitor settings # monitor settings
bindsym $mod+m mode "monitor" bindsym $mod+m mode "monitor"
mode "monitor" { mode "monitor" {
# only laptop # only laptop
bindsym 1 exec xrandr --output $LAPTOP --auto --primary --output $CENTER --off $RIGHT --off bindsym 1 exec xrandr --output $LAPTOP --auto --primary --output $CENTER --off $RIGHT --off
# HDMI main, laptop secondary # CENTER main, RIGHT secondary
bindsym 2 exec xrandr --output $CENTER --primary --auto --output $LAPTOP --auto --left-of $CENTER --output $RIGHT --off bindsym 2 exec xrandr --output $CENTER --primary --auto --output $LAPTOP --auto --left-of $CENTER --output $RIGHT --off
# HDMI main, laptop left, VGA right, *not* supported on X230 # HDMI main, laptop left, VGA right, *not* supported on X230
bindsym 3 exec xrandr --output $CENTER --primary --auto --output $LAPTOP --auto --left-of $CENTER --output $RIGHT --auto --right-of $CENTER bindsym 3 exec xrandr --output $CENTER --primary --auto --output $LAPTOP --auto --left-of $CENTER --output $RIGHT --auto --right-of $CENTER
# HDMI main, VGA right, laptop off # CENTER main, RIGHT right, rotated
bindsym 4 exec xrandr --output $CENTER --primary --auto --output $RIGHT --right-of $CENTER --rotate left --auto --output $LAPTOP --off bindsym 4 exec xrandr --output $CENTER --primary --auto --output $RIGHT --auto --right-of $CENTER --rotate left --output $LAPTOP --off --output $LEFT --off
# VGA main, laptop left, HDMI off # VGA main, laptop left, HDMI off
bindsym 8 exec xrandr --output $RIGHT --primary --auto --output $LAPTOP --auto --left-of $RIGHT --output $CENTER --off bindsym 8 exec xrandr --output $RIGHT --primary --auto --output $LAPTOP --auto --left-of $RIGHT --output $CENTER --off
# HDMI main, VGA right, laptop off # HDMI main, VGA right, laptop off
@ -136,15 +138,13 @@ mode "monitor" {
bindsym $mod+m mode "default" bindsym $mod+m mode "default"
} }
bindsym $mod+p exec xrandr-toggle
workspace $WS1 output $CENTER workspace $WS1 output $CENTER
workspace $WS2 output $CENTER workspace $WS2 output $CENTER
workspace $WS3 output $LAPTOP workspace $WS3 output $RIGHT
workspace $WS4 output $LAPTOP workspace $WS4 output $RIGHT
workspace $WS5 output $CENTER workspace $WS5 output $CENTER
workspace $WS8 output $LAPTOP workspace $WS8 output $RIGHT
workspace $WS9 output $LAPTOP workspace $WS9 output $RIGHT
# switch to workspace # switch to workspace
bindsym $mod+1 workspace $WS1 bindsym $mod+1 workspace $WS1
@ -228,13 +228,13 @@ bar {
output $CENTER output $CENTER
font pango:DejaVu Sans Mono, FontAwesome 7 font pango:DejaVu Sans Mono, FontAwesome 7
status_command i3status --config ~/.i3/status.conf status_command i3status --config ~/.i3/status.conf
tray_output $CENTER
} }
bar { bar {
# output $CENTER
output $RIGHT output $RIGHT
status_command i3status --config ~/.i3/status_small.conf status_command i3status --config ~/.i3/status_small.conf
tray_output $LAPTOP tray_output $CENTER
} }
# auto run commands # auto run commands
@ -252,9 +252,10 @@ bar {
exec amixer set Master 1+ off exec amixer set Master 1+ off
exec amixer set Master 54 exec amixer set Master 54
exec --no-startup-id nm-applet exec --no-startup-id nm-applet
exec --no-startup-id xrandr --output LVDS1 --left-of VGA1 --auto # exec --no-startup-id xrandr --output LVDS1 --left-of VGA1 --auto
exec --no-startup-id xrandr --output VGA1 --auto # exec --no-startup-id xrandr --output VGA1 --auto
#exec --no-startup-id clipit #exec --no-startup-id clipit
exec --no-startup-id xrandr --output $CENTER --primary --auto --output $RIGHT --auto --right-of $CENTER --rotate left --output $LAPTOP --off --output $LEFT --off
exec --no-startup-id i3-msg 'workspace $WS1; exec firefox;' exec --no-startup-id i3-msg 'workspace $WS1; exec firefox;'
exec --no-startup-id i3-msg 'workspace $WS2; exec emacs' exec --no-startup-id i3-msg 'workspace $WS2; exec emacs'
exec --no-startup-id i3-msg 'exec thunderbird' exec --no-startup-id i3-msg 'exec thunderbird'

View File

@ -23,9 +23,9 @@ order += "disk /media/driveBay"
#order += "run_watch DHCP" #order += "run_watch DHCP"
order += "path_exists VPN" order += "path_exists VPN"
#order += "ipv6" #order += "ipv6"
order += "wireless wlp3s0"
order += "ethernet fschl-vpn" order += "ethernet fschl-vpn"
order += "ethernet enp0s25" order += "ethernet sl-optigem"
order += "ethernet enp31s0"
order += "volume Master" order += "volume Master"
order += "battery 0" order += "battery 0"
#order += "cpu_temperature 0" #order += "cpu_temperature 0"
@ -35,19 +35,19 @@ order += "tztime DE"
#order += "tztime KG" #order += "tztime KG"
# order += "tztime UK" # order += "tztime UK"
# look for icons: https://fontawesome.com/icons?d=gallery
wireless wlp3s0 {
format_up = " %essid(%quality) %ip"
format_down = "-"
}
ethernet fschl-vpn { ethernet fschl-vpn {
# if you use %speed, i3status requires root privileges # if you use %speed, i3status requires root privileges
format_up = "VPN: %ip " format_up = "fschl-vpn: %ip"
format_down = "VPN:-" format_down = "fschl-vpn: -"
} }
ethernet enp0s25 { ethernet sl-optigem {
# if you use %speed, i3status requires root privileges
format_up = "optigem: %ip"
format_down = "optigem: -"
}
ethernet enp31s0 {
# if you use %speed, i3status requires root privileges # if you use %speed, i3status requires root privileges
format_up = "E: %ip (%speed)" format_up = "E: %ip (%speed)"
format_down = "E:-" format_down = "E:-"

View File

@ -22,7 +22,7 @@ order += "run_watch DHCP"
order += "path_exists VPN" order += "path_exists VPN"
order += "wireless wlp3s0" order += "wireless wlp3s0"
# order += "ethernet eth0" # order += "ethernet eth0"
order += "ethernet enp0s25" order += "ethernet enp31s0"
order += "volume master" order += "volume master"
order += "battery 0" order += "battery 0"
order += "load" order += "load"
@ -39,13 +39,8 @@ battery 0 {
} }
wireless wlp3s0 {
format_up = " %essid (%quality)"
format_down = " -"
}
# ethernet eth0 { # ethernet eth0 {
ethernet enp0s25 { ethernet enp31s0 {
# if you use %speed, i3status requires root privileges # if you use %speed, i3status requires root privileges
format_up = "E: up" format_up = "E: up"
format_down = "E: down" format_down = "E: down"

View File

@ -247,9 +247,9 @@ It should only modify the values of Spacemacs settings."
dotspacemacs-default-font '("DejaVu Sans Mono" dotspacemacs-default-font '("DejaVu Sans Mono"
:size 11 :size 11
:weight normal :weight normal
:width normal :width normal)
:powerline-scale 1.0)
;; The leader key ;; The leader key (default "SPC")
dotspacemacs-leader-key "SPC" dotspacemacs-leader-key "SPC"
;; The key used for Emacs commands `M-x' (after pressing on the leader key). ;; The key used for Emacs commands `M-x' (after pressing on the leader key).
@ -403,7 +403,7 @@ It should only modify the values of Spacemacs settings."
;; :size-limit-kb 1000) ;; :size-limit-kb 1000)
;; When used in a plist, `visual' takes precedence over `relative'. ;; When used in a plist, `visual' takes precedence over `relative'.
;; (default nil) ;; (default nil)
dotspacemacs-line-numbers nil dotspacemacs-line-numbers 'visual
;; Code folding method. Possible values are `evil', `origami' and `vimish'. ;; Code folding method. Possible values are `evil', `origami' and `vimish'.
;; (default 'evil) ;; (default 'evil)
@ -468,7 +468,7 @@ It should only modify the values of Spacemacs settings."
;; performance issues, instead of calculating the frame title by ;; performance issues, instead of calculating the frame title by
;; `spacemacs/title-prepare' all the time. ;; `spacemacs/title-prepare' all the time.
;; (default "%I@%S") ;; (default "%I@%S")
dotspacemacs-frame-title-format "%I@%S" dotspacemacs-frame-title-format "%I@%t %f (%p)"
;; Format specification for setting the icon title format ;; Format specification for setting the icon title format
;; (default nil - same as frame-title-format) ;; (default nil - same as frame-title-format)

View File

@ -5,7 +5,7 @@ set -x
# backup.sh # backup.sh
pre="/home/fschl" pre="/home/fschl"
target="/media/black_Backups/2018-12" target="/media/store/"
# target="/media/driveBay/Backups" # target="/media/driveBay/Backups"
folders=( "Documents" #contains Org files folders=( "Documents" #contains Org files

View File

@ -2,7 +2,7 @@
set -e set -e
# install.sh # install.sh
# This script installs my basic setup for a debian machine # This script installs a basic setup for a debian machine
USERNAME=fschl USERNAME=fschl
SUDO="sudo" SUDO="sudo"
@ -20,7 +20,7 @@ check_root() {
} }
apt_sources() { apt_sources() {
# http://deb.debian.org/ # https://www.debian.org/releases/
ddist=$1 ddist=$1
DIST="${ddist:-stable}" DIST="${ddist:-stable}"
@ -172,7 +172,6 @@ install_nvidia_docker() {
} }
install_latex() { install_latex() {
apt update apt update
apt install -y \ apt install -y \
evince \ evince \
@ -290,6 +289,29 @@ EOF
echo "... setting capslock to control" echo "... setting capslock to control"
sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"ctrl:nocaps\"/" /etc/default/keyboard sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"ctrl:nocaps\"/" /etc/default/keyboard
TARGET="/home/$USERNAME/.emacs.d"
git clone https://github.com/syl20bnr/spacemacs "${TARGET}"
#rm -rf "${TARGET}"/private/snippets
#git clone https://github.com/AndreaCrotti/yasnippet-snippets "${TARGET}"/private/yas-snips
#ln -s "${TARGET}"/private/yas-snips/snippets "${TARGET}"/private/snippets/
}
link_userdirs() {
mount_dir=$1
target_mount="${mount_dir:-/mnt/docs/}"
user_dirs=("Documents Downloads Music Pictures Videos")
for DIR in $user_dirs
do
echo "removing and linking ${DIR}..."
rm -rfv /home/$USERNAME/$DIR
echo "link target: ${target_mount}/${DIR}"
ln -vs ${target_mount}/${DIR} /home/${USERNAME}/${DIR}
done
projects_mount=$docs_mount
} }
install_vscodium() { install_vscodium() {
@ -373,6 +395,49 @@ install_compose() {
/usr/bin/docker-compose version /usr/bin/docker-compose version
} }
install_nvidia() {
echo "Prepare install for NVIDIA proprietary display driver"
apt update
apt install -y \
gcc \
linux-source \
linux-headers-`uname -r` \
--no-install-recommends
echo ""
echo "Please find a link to the current Package"
echo " https://devtalk.nvidia.com/default/topic/533434/linux/current-graphics-driver-releases/"
echo ""
echo "1. Download the self extracting archive. (*.run)"
echo "2. reboot into recovery mode and login as root"
echo "3. sh DRIVER_ARCHIVE.run"
echo ""
echo "... check if driver was installed correctly: $ nvidia-smi"
echo "more information can be found in README at link above"
echo ""
echo "Install NVIDIA-docker"
echo ""
echo "since Docker 19.03 no additional runtime required."
echo " https://github.com/NVIDIA/nvidia-docker"
# https://nvidia.github.io/nvidia-docker/
distribution="debian10"
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
apt update
apt install -y nvidia-container-toolkit
systemctl restart docker
docker pull nvidia/cuda:9.0-base
echo ""
echo "... check if driver was installed correctly: "
echo "$ docker run --gpus all nvidia/cuda:9.0-base nvidia-smi"
echo " should give same output as above"
}
install_virtualbox() { install_virtualbox() {
# https://wiki.debian.org/VirtualBox#Installation_of_non-free_edition # https://wiki.debian.org/VirtualBox#Installation_of_non-free_edition
apt install -y \ apt install -y \
@ -385,17 +450,6 @@ install_virtualbox() {
} }
get_dotfiles() {
(
# git clone https://gitlab.com/fschl/dotfiles.git "/home/$USERNAME/dotfiles"
# cd "/home/$USERNAME/dotfiles" && make
# TODO: propbably dont really need the whole repo
git clone https://gitlab.com/fschl/dockerfiles.git "/home/$USERNAME/dockerfiles"
)
}
# install/update golang from source # install/update golang from source
install_golang() { install_golang() {
export GO_VERSION=1.16.0 export GO_VERSION=1.16.0
@ -423,14 +477,13 @@ main() {
base) base)
# apt_sources buster # apt_sources buster
base_applications base_applications
install_docker
install_compose
;;
dotfiles)
get_dotfiles
;; ;;
server) server)
apt_sources buster
base_applications
install_server_base install_server_base
install_docker
install_compose
;; ;;
desktop) desktop)
# apt_sources buster # apt_sources buster
@ -442,6 +495,9 @@ main() {
source get_private_stuff.sh source get_private_stuff.sh
fi fi
;; ;;
links)
link_userdirs /mnt/docs/
;;
latex) latex)
install_latex install_latex
;; ;;