From 9bb07b87c743579ddeb4016fda4cefb9ac54092c Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Sun, 29 Aug 2021 12:48:49 +0200 Subject: [PATCH] Add terminal script --- files/.bashrc | 16 +++++++++++----- files/.config/i3/config | 5 ++--- files/.zshrc | 16 +++++----------- files/init.el | 15 ++++++++++++++- files/scripts/compress_pdf.sh | 15 --------------- files/scripts/terminal.sh | 7 +++++++ 6 files changed, 39 insertions(+), 35 deletions(-) delete mode 100755 files/scripts/compress_pdf.sh create mode 100755 files/scripts/terminal.sh diff --git a/files/.bashrc b/files/.bashrc index 87a88c4..ee82fd6 100644 --- a/files/.bashrc +++ b/files/.bashrc @@ -22,11 +22,17 @@ alias cp='cp -i' # ask before removal alias mv='mv -i' # ask before removal # ============================== SSH-Agent -if ! [ -S /tmp/mthomas-agent.sock ]; then - echo "Starting ssh-agent" - ssh-agent -a /tmp/mthomas-agent.sock - ssh-add -fi +agent() { + if ! [ -S /tmp/mthomas-agent.sock ]; then + echo "Starting ssh-agent" + ssh-agent -a /tmp/mthomas-agent.sock + ssh-add + else + echo "Agent already running" + fi +} + +alias ssha=agent # ============================== vi-Mode set -o vi diff --git a/files/.config/i3/config b/files/.config/i3/config index 3956641..5b516f9 100644 --- a/files/.config/i3/config +++ b/files/.config/i3/config @@ -11,9 +11,8 @@ floating_modifier $mod workspace_layout stacking ### keybinds for starting -bindsym $mod+Return exec --no-startup-id alacritty -bindsym $mod+Ctrl+Return exec --no-startup-id xterm -bindsym $mod+d exec --no-startup-id dmenu_run +bindsym $mod+Return exec --no-startup-id "terminal.sh" +bindsym $mod+d exec --no-startup-id "dmenu_run" bindsym $mod+Shift+s exec --no-startup-id "flameshot gui" ### keybinds for moving windows diff --git a/files/.zshrc b/files/.zshrc index f0ca530..4d017d8 100644 --- a/files/.zshrc +++ b/files/.zshrc @@ -93,17 +93,11 @@ export HISTFILE="$HOME/.zsh_history" export SAVEHIST=5000 # ============================== ssh-agent -function start_agent() { - if ! [ -S /tmp/mthomas-agent.sock ]; then - echo "Starting ssh-agent" - ssh-agent -a /tmp/mthomas-agent.sock - ssh-add - else - echo "Agent already running..." - fi -} - -alias ssha=start_agent +if ! [ -S /tmp/mthomas-agent.sock ]; then + echo "Starting ssh-agent" + ssh-agent -a /tmp/mthomas-agent.sock + ssh-add +fi # ============================== vi-Mode bindkey -v diff --git a/files/init.el b/files/init.el index 45ebbbb..8005b90 100644 --- a/files/init.el +++ b/files/init.el @@ -389,7 +389,20 @@ treemacs-recenter-after-tag-follow t treemacs-tag-follow-delay 1) (treemacs-follow-mode t) - (treemacs-load-theme "doom-atom") + (treemacs-load-theme "Default") + (dolist (face '(treemacs-root-face + treemacs-git-unmodified-face + treemacs-git-modified-face + treemacs-git-renamed-face + treemacs-git-ignored-face + treemacs-git-untracked-face + treemacs-git-added-face + treemacs-git-conflict-face + treemacs-directory-face + treemacs-directory-collapsed-face + treemacs-file-face + treemacs-tags-face)) + (set-face-attribute face nil :family "Product Sans" :height 120)) :bind (:map global-map ("C-x t t" . treemacs))) diff --git a/files/scripts/compress_pdf.sh b/files/scripts/compress_pdf.sh deleted file mode 100755 index 4eeaa51..0000000 --- a/files/scripts/compress_pdf.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -OUT=$2 -IN=$1 - -# /printer = bigger -# /ebook = smaller - -gs \ - -sOutputFile=${OUT} \ - -sDEVICE=pdfwrite \ - -dNOPAUSE \ - -dBATCH \ - -dPDFSETTINGS=/printer \ - ${IN} diff --git a/files/scripts/terminal.sh b/files/scripts/terminal.sh new file mode 100755 index 0000000..d81d105 --- /dev/null +++ b/files/scripts/terminal.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ $USER == "marc" ]; then + alacritty +else + xterm +fi