diff --git a/config.desktop.sh b/config.desktop.sh index 9e63f2f..28629a0 100644 --- a/config.desktop.sh +++ b/config.desktop.sh @@ -7,4 +7,5 @@ MAIN_FONT="Source Code Pro 8" MAIN_MONITOR=DisplayPort-1 MONITORS=(DVI-D-1 DisplayPort-0) SCREENLAYOUT="desktop" +RYGEL="true" BAR_POS="bottom" diff --git a/config.sh b/config.sh index d727cce..e16534c 100644 --- a/config.sh +++ b/config.sh @@ -1,11 +1,10 @@ -WIFI_DEV="wlp2s0" -ETH_DEV="enp1s0" +WIFI_DEV="wlp4s0" +ETH_DEV="enp0s31f6" MAIN_NET=$WIFI_DEV -BATTERY="BAT1" +BATTERIES=(BAT0 BAT1) MAIN_FONT="Source Code Pro 8" -MAIN_MONITOR=HDMI-0 - +MAIN_MONITOR=eDP-1 #MONITORS=(VGA-0 DVI-D-0) BAR_POS="bottom" diff --git a/dots/home/.emacs b/dots/home/.emacs index 2540a4c..20dedcc 100644 --- a/dots/home/.emacs +++ b/dots/home/.emacs @@ -36,7 +36,7 @@ '(haskell-process-suggest-remove-import-lines t) '(package-selected-packages (quote - (counsel sage-shell-mode frames-only-mode dummyparens anaconda-mode magit-filenotify docker-compose-mode docker xref-js2 js2-refactor indium flycheck-rtags flycheck ivy-rtags rtags auctex magit php-mode php+-mode flycheck-rust avy-flycheck company racer cargo rust-mode restart-emacs nix-mode json-mode multiple-cursors swiper ivy xresources-theme powerline))) + (counsel sage-shell-mode frames-only-mode dummyparens anaconda-mode magit-filenotify docker-compose-mode docker xref-js2 js2-refactor indium flycheck-rtags flycheck ivy-rtags rtags auctex magit flycheck-rust avy-flycheck company racer cargo rust-mode restart-emacs nix-mode json-mode multiple-cursors swiper ivy xresources-theme powerline))) '(safe-local-variable-values (quote ((TeX-master . t)))) '(tramp-syntax (quote default) nil (tramp))) (custom-set-faces @@ -46,6 +46,19 @@ ;; If there is more than one, they won't work right. ) +(defun unpop-to-mark-command () + "Unpop off mark ring. Does nothing if mark ring is empty." + (interactive) + (when mark-ring + (let ((pos (marker-position (car (last mark-ring))))) + (if (not (= (point) pos)) + (goto-char pos) + (setq mark-ring (cons (copy-marker (mark-marker)) mark-ring)) + (set-marker (mark-marker) pos) + (setq mark-ring (nbutlast mark-ring)) + (goto-char (marker-position (car (last mark-ring)))))))) +(global-set-key (kbd "C-c m c") 'mc/edit-lines) +(global-set-key (kbd "C-x ") 'mc/edit-lines) ;;; Packages diff --git a/dots/i3/config.template b/dots/i3/config.template index 715efed..48b6f76 100644 --- a/dots/i3/config.template +++ b/dots/i3/config.template @@ -211,7 +211,9 @@ exec --no-startup-id sh {{ HOME }}/.screenlayout/{{ SCREENLAYOUT }}.sh {{/MONITORS[*]}} # Rygel -exec --no-startup-id rygel +{{#RYGEL}} + exec --no-startup-id rygel +{{/RYGEL}} # Compton exec --no-startup-id compton --vsync opengl @@ -226,6 +228,10 @@ exec --no-startup-id dunst bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound +bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness +bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness + + bindsym $mod+Shift+S exec --no-startup-id xfce4-screenshooter -c -r bindsym XF86AudioPrev exec playerctl prev @@ -237,7 +243,7 @@ bindsym $mod+m move workspace to output left bindsym $mod+Shift+m move workspace to output right bindsym $mod+p exec ~/.scripts/ec -c -client.focused {{S_base02}} {{S_base02}} {{S_base00}} #6c71c4 +client.focused {{S_base02}} {{S_base00}} {{S_base00}} #6c71c4 client.focused_inactive {{S_base02}} {{S_base03}} {{S_base00}} #6c71c4 client.unfocused {{S_base02}} {{S_base03}} {{S_base00}} #586e75 client.urgent {{S_orange}} {{S_base03}} {{S_base00}} #dc322f @@ -257,4 +263,6 @@ exec --no-startup-id sudo skiller-ctl -w 1 exec --no-startup-id udiskie exec --no-startup-id xfce4-clipman exec --no-startup-id udiskie -exec ~/.scripts ec -e '' +exec --no-startup-id ~/.scripts ec -e '' +exec --no-startup-id setxkbmap -layout us -option ctrl:nocaps +exec --no-startup-id xmodmap -e "keycode 107 = Super_L" diff --git a/dots/i3status/config.toml.template b/dots/i3status/config.toml.template index 4b661f2..2d759ba 100644 --- a/dots/i3status/config.toml.template +++ b/dots/i3status/config.toml.template @@ -48,12 +48,12 @@ block = "net" interval = 5 device = "{{ MAIN_NET }}" -{{ #BATTERY }} +{{#BATTERIES}} [[block]] block = "battery" interval = 10 -device = "{{ BATTERY }}" -{{ /BATTERY }} +device = "{{.}}" +{{/BATTERIES}} [[block]] block = "toggle" diff --git a/install.sh b/install.sh index 76a444f..f0f29ee 100644 --- a/install.sh +++ b/install.sh @@ -109,7 +109,7 @@ function linkall { DIRS=$(find $DOTFILES_DIR/$DIR -type d | sed -n "s|^${DOTFILES_DIR}/${DIR}/||p") # Create Base-Dir - grey "Creating Directory: $HOME/$INSTALL_PREFIX/" + grey "Creating Directory: $HOME/$INSTALL_PREFIX" mkdir -p $HOME/$INSTALL_PREFIX for d in $DIRS diff --git a/install_init.sh b/install_init.sh index 0c611cd..d1e0419 100644 --- a/install_init.sh +++ b/install_init.sh @@ -2,9 +2,7 @@ function installInit { printHeading "Install OMF" - OMF_TMP=$(mktemp) - curl -L https://get.oh-my.fish > $OMF_TMP - fish $OMF_TMP + curl -L https://get.oh-my.fish | fish printSubHeading "Install OMF Theme" fish -c "omf install bobthefish" diff --git a/setup_t470.sh b/setup_t470.sh new file mode 100755 index 0000000..b09494c --- /dev/null +++ b/setup_t470.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# Requirement: User + Sudo + +# Packages +TEMP=$(mktemp -d) +cd TEMP +git clone https://aur.archlinux.org/yay.git +cd yay +makepkg -si + +yay -Syu +yay -S $(cat t470/pkgs) + + +# Powersaving +sudo powertop --calibrate + +sudo cp t470/tlp > /etc/default/tlp + +sudo cat < /etc/systemd/system/powertop.service +[Unit] +Description=Powertop tunings + +[Service] +Type=oneshot +ExecStart=/usr/bin/powertop --auto-tune + +[Install] +WantedBy=multi-user.target +EOF + +sudo systemctl enable powertop +sudo systemctl enable tlp.service +sudo systemctl enable tlp-sleep.service + diff --git a/t470/pkgs b/t470/pkgs new file mode 100644 index 0000000..6a022e4 --- /dev/null +++ b/t470/pkgs @@ -0,0 +1,117 @@ +acpi_call 1.1.0-159 +acpid 2.0.30-1 +acpilight 1.1-1 +adobe-source-code-pro-fonts 2.030ro+1.050it-4 +alacritty-scrollback-git 0.1.0+896+g43882ad-1 +alsa-utils 1.1.6-1 +autoconf 2.69-4 +automake 1.15.1-1 +awesome-terminal-fonts 1.1.0-1 +bash 4.4.023-1 +binutils 2.31.1-3 +bison 3.0.5-1 +bzip2 1.0.6-8 +compton 2.0-1 +coreutils 8.30-1 +cryptsetup 2.0.4-1 +cups 2.2.8-3 +device-mapper 2.02.181-1 +dhcpcd 7.0.8-1 +diffutils 3.6-1 +e2fsprogs 1.44.4-1 +efibootmgr 16-1 +emacs 26.1-2 +fakeroot 1.23-1 +feh 2.27.1-1 +file 5.34-1 +filesystem 2018.8-1 +findutils 4.6.0-2 +firefox 62.0-1 +fish 2.7.1-1 +flex 2.6.4-1 +fprintd 0.8.1-1 +gawk 4.2.1-1 +gcc 8.2.1+20180831-1 +gcc-libs 8.2.1+20180831-1 +gettext 0.19.8.1-2 +git 2.19.0-1 +glibc 2.28-4 +gopass 1.8.2-2 +grep 3.1-1 +groff 1.22.3-7 +grub 2:2.02-7 +gtk-engine-murrine 0.98.2-3 +gzip 1.9-1 +htop 2.2.0-2 +i3-gaps 4.15.0.1-2 +i3blocks 1.4-6 +i3lock 2.10-1 +i3status 2.12-1 +i3status-rust-git 0.9.0.r542.g5246ce2-1 +inetutils 1.9.4-5 +intel-ucode 20180807.a-1 +iproute2 4.18.0-1 +iputils 20180629.f6aac8d-2 +jfsutils 1.1.15-5 +jq 1.5-6 +less 530-1 +libfprint-vfs0097-git 0.7.0.r97.gd031869-1 +libtool 2.4.6+42+gb88cebd5-2 +licenses 20171006-1 +linux 4.18.7.arch1-1 +linux-headers 4.18.7.arch1-1 +logrotate 3.14.0-1 +lvm2 2.02.181-1 +m4 1.4.18-1 +make 4.2.1-2 +man-db 2.8.4-1 +man-pages 4.16-2 +mdadm 4.0-1 +nano 3.0-2 +netctl 1.18-1 +networkmanager 1.14.0-1 +oomox 1.7.0.2-5 +pacman 5.1.1-1 +patch 2.7.6-1 +pciutils 3.6.1-1 +perl 5.28.0-1 +pkgconf 1.5.3-1 +powerline-fonts-git r196.eb05ede-1 +powertop 2.9-1 +procps-ng 3.3.15-1 +psmisc 23.1-1 +pstate-frequency 3.10.0-1 +pulseaudio 12.2-2 +pulseaudio-alsa 2-4 +pulsemixer 1.4.0-3 +reiserfsprogs 3.6.27-1 +rofi 1.5.1-1 +rust-racer 2.1.5-1 +s-nail 14.9.11-1 +sddm 0.18.0-1 +sed 4.5-1 +shadow 4.6-1 +sudo 1.8.25.p1-1 +sysfsutils 2.1.0-10 +systemd 239.2-1 +systemd-sysvcompat 239.2-1 +tar 1.30-1 +texinfo 6.5-1 +the_silver_searcher 2.2.0-1 +thunderbird 60.0-4 +tlp 1.1-1 +tlp-rdw 1.1-1 +tree 1.7.0-2 +ttf-dejavu 2.37-2 +udiskie 1.7.5-2 +unzip 6.0-12 +usbutils 010-1 +util-linux 2.32.1-2 +vi 1:070224-3 +virtualbox 5.2.18-1 +which 2.21-2 +xfsprogs 4.17.0-1 +xorg-xrandr 1.5.0-1 +xorg-xrdb 1.1.1-1 +xst-git 20180912.bcc622d-1 +yay 8.1115-1 diff --git a/t470/tlp b/t470/tlp new file mode 100644 index 0000000..e62fc80 --- /dev/null +++ b/t470/tlp @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------ +# tlp - Parameters for power save + +# Hint: some features are disabled by default, remove the leading # to enable +# them. + +# Set to 0 to disable, 1 to enable TLP. +TLP_ENABLE=1 + +# Dirty page values (timeouts in secs). +MAX_LOST_WORK_SECS_ON_BAT=15 + +# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module +# required). Charging starts when the remaining capacity falls below the +# START_CHARGE_TRESH value and stops when exceeding the STOP_CHARGE_TRESH value. +# Main / Internal battery (values in %) +START_CHARGE_THRESH_BAT0=75 +STOP_CHARGE_THRESH_BAT0=99 +# Ultrabay / Slice / Replaceable battery (values in %) +START_CHARGE_THRESH_BAT1=75 +STOP_CHARGE_THRESH_BAT1=99