mirror of
https://github.com/vale981/dotfiles
synced 2025-03-05 17:41:42 -05:00
push updates to desktop
This commit is contained in:
parent
120460619c
commit
22338c0578
11 changed files with 311 additions and 83 deletions
2
dots/bspwm/.link
Normal file
2
dots/bspwm/.link
Normal file
|
@ -0,0 +1,2 @@
|
|||
TASKNAME="Configuring bspwm"
|
||||
LINKTO=".config/bspwm"
|
37
dots/bspwm/bspwmrc
Executable file
37
dots/bspwm/bspwmrc
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
# don't use fish
|
||||
export SXHKD_SHELL sh
|
||||
|
||||
bspc config border_width 0
|
||||
bspc config window_gap 0
|
||||
|
||||
bspc config split_ratio 0.50
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
bspc config focus_follows_pointer true
|
||||
bspc config pointer_follows_focus true
|
||||
|
||||
bspc rule -a Chromium desktop='II'
|
||||
bspc rule -a Firefox desktop='II'
|
||||
bspc rule -a Emacs desktop='I' state=tiled
|
||||
bspc rule -a Evince desktop='IV'
|
||||
bspc rule -a mplayer2 state=floating
|
||||
bspc rule -a TelegramDesktop desktop='X'
|
||||
bspc rule -a Thunderbird desktop='X'
|
||||
bspc rule -a Skype desktop='X'
|
||||
bspc rule -a Anki desktop='^V'
|
||||
bspc rule -a zoom desktop='^VII'
|
||||
bspc rule -a .obs-wrapped desktop='VIII'
|
||||
bspc rule -a Zeal desktop='IX'
|
||||
bspc rule -a Xournal desktop='VI'
|
||||
bspc rule -a Pavucontrol state=floating
|
||||
|
||||
xsetroot -cursor_name left_ptr
|
||||
bspc config remove_unplugged_monitors true
|
||||
|
||||
###############################################################################
|
||||
# Scripts #
|
||||
###############################################################################
|
||||
|
||||
~/.config/bspwm/monitor_laptop.sh
|
||||
~/.config/polybar/launch.sh
|
29
dots/bspwm/monitor_laptop.sh
Executable file
29
dots/bspwm/monitor_laptop.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
###############################################################################
|
||||
# External Monitor #
|
||||
###############################################################################
|
||||
|
||||
workspaces=(I II III V VI VIII IX X IV VII)
|
||||
mon_1=(I II III V VI VIII IX X)
|
||||
mon_2=(IV VII)
|
||||
|
||||
bspc monitor eDP-1 -d ${workspaces[*]}
|
||||
|
||||
MONITOR=$(xrandr | rg -i "\sconnected" | rg -v eDP | cut -d" " -f1)
|
||||
|
||||
# move_to_monitor() {
|
||||
# local -n workspaces=$1
|
||||
# for D in "${workspaces[@]}"; do
|
||||
# bspc desktop $D --to-monitor $2
|
||||
# done
|
||||
# }
|
||||
|
||||
if [ -n "$MONITOR" ]; then
|
||||
bspc monitor HDMI-2 -d IV VII
|
||||
|
||||
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x1080\
|
||||
--rotate normal --output DP-1 --off --output HDMI-2 --off\
|
||||
--output DP-2 --off --output $MONITOR --mode 1920x1080i --pos 0x0\
|
||||
--rotate normal
|
||||
|
||||
# move_to_monitor $mon_1 $MONITOR
|
||||
fi
|
|
@ -2,3 +2,4 @@
|
|||
Name=Default
|
||||
Comment=Default Cursor Theme
|
||||
Inherits=capitaine-cursors
|
||||
Size=16
|
||||
|
|
|
@ -12,7 +12,6 @@ Allow downcase.
|
|||
Shortcut to edit this file.
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
(defun find-config ()
|
||||
"Edit config.org"
|
||||
(interpactive)
|
||||
(find-file "~/.emacs/emacs.org"))
|
||||
|
||||
|
@ -67,21 +66,9 @@ Taken from https://github.com/Atman50/emacs-config.
|
|||
|
||||
** Packages
|
||||
*** Straight
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 5))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
(straight-use-package 'use-package)
|
||||
#+end_src
|
||||
Straight is loaded in =~/.emacs= before anything else to then load the
|
||||
latest org mode which loads this file.
|
||||
|
||||
*** Packages
|
||||
Set up package sources.
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
|
@ -820,7 +807,11 @@ Buff the agenda to use Groups.
|
|||
|
||||
Agenda Files:
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
(setq org-agenda-files (list "~/Documents/org/todo.org" "~/Documents/org/calendar.org"))
|
||||
(setq
|
||||
org-agenda-files
|
||||
(list "~/Documents/org/todo.org"
|
||||
"~/Documents/org/general.org"
|
||||
"/home/hiro/Documents/Projects/UNI/master/sem_1/courses.org"))
|
||||
#+END_SRC
|
||||
|
||||
**** Automatically mark task as done if all subtasks are done
|
||||
|
@ -896,12 +887,15 @@ Agenda Files:
|
|||
"**** %?\n%U\n")
|
||||
("m" "Meeting"
|
||||
entry
|
||||
(file org-default-notes-file)
|
||||
"** %? :MEETING:\n"))))
|
||||
(file+headline "~/Documents/org/general.org" "Meetings")
|
||||
"** %? :MEETING:\n")
|
||||
("p" "Appointment"
|
||||
entry
|
||||
(file+headline "~/Documents/org/general.org" "Appointments")
|
||||
"** %? :APPOINTMENT:\n"))))
|
||||
#+END_SRC
|
||||
**** Babel
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(add-to-list 'org-babel-load-languages '(ein . t))
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((shell . t)
|
||||
|
@ -913,7 +907,8 @@ Agenda Files:
|
|||
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
|
||||
(setq org-startup-with-inline-images t)
|
||||
(setq imagemagick-types-inhibit t)
|
||||
(setq ein:output-area-inlined-images t)
|
||||
|
||||
|
||||
#+end_src
|
||||
|
||||
Htmlize for nice org html export.
|
||||
|
@ -928,20 +923,20 @@ And dont evaluate code again.
|
|||
|
||||
And a hack to make ob-ipython open the source in a python buffer.
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(use-package jupyter
|
||||
:config
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((jupyter . t))))
|
||||
'((jupyter . t)))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
Automatically tangle on save.
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda ()
|
||||
(add-hook 'after-save-hook 'org-babel-tangle nil 'make-it-local)))
|
||||
#+end_src
|
||||
**** Evince for PDF
|
||||
**** Evince for PDF, Xournal for xoj
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(eval-after-load "org"
|
||||
'(setq org-file-apps
|
||||
|
@ -950,7 +945,8 @@ Automatically tangle on save.
|
|||
("\\.pdf\\(::[0-9]+\\)?\\'" . whatacold/org-pdf-app)
|
||||
("\\.gif\\'" . "eog \"%s\"")
|
||||
("\\.mp4\\'" . "vlc \"%s\"")
|
||||
("\\.mkv" . "vlc \"%s\""))))
|
||||
("\\.mkv" . "vlc \"%s\"")
|
||||
("\\.xoj" . "xournal \"%s\""))))
|
||||
|
||||
(defun whatacold/org-pdf-app (file-path link-without-schema)
|
||||
"Open pdf file using pdf-tools and go to the specified page."
|
||||
|
@ -968,6 +964,15 @@ Org tree slide is a presentation tool for org mode.
|
|||
:bind (("<f10>" . 'org-tree-slide-move-next-tree)
|
||||
("<f9>" . 'org-tree-slide-move-previous-tree)))
|
||||
#+end_src
|
||||
**** LaTeX preview size
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0))
|
||||
#+end_src
|
||||
**** Instant latex preview
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
;; (use-package org-fragtog
|
||||
;; :hook org-mode)
|
||||
#+end_src
|
||||
*** Git
|
||||
**** Magit
|
||||
- Just load magit and give it a key.
|
||||
|
@ -1232,13 +1237,6 @@ Support for sphinx style docstrings.
|
|||
:init (setq xref-show-definitions-function #'ivy-xref-show-defs))
|
||||
#+END_SRC
|
||||
|
||||
*** Jupyter-Notebooks
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
(use-package ein
|
||||
:config (setq ein:output-type-preference
|
||||
'(emacs-lisp svg png jpeg html text latex javascript)))
|
||||
#+END_SRC
|
||||
|
||||
*** Fish
|
||||
Fish shell script mode.
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
|
@ -1338,6 +1336,10 @@ Debugging yay!
|
|||
#+begin_src emacs-lisp :tangle yes
|
||||
(use-package nix-mode)
|
||||
#+end_src
|
||||
*** Julia
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(use-package julia-mode)
|
||||
#+end_src
|
||||
** Custom Scripts
|
||||
*** Close all Buffers
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
|
@ -1377,3 +1379,49 @@ Debugging yay!
|
|||
,@args
|
||||
,@',common-args)))
|
||||
#+END_SRC
|
||||
*** Insert a new exercise into an org file
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(require 'org)
|
||||
(require 'org-element)
|
||||
(defun insert-uebung (file org-path)
|
||||
(interactive
|
||||
(list (read-file-name "Select Uebung: " "~/Downloads") (org-get-outline-path t)))
|
||||
(when (and
|
||||
(eq (length org-path) 2)
|
||||
(string= (nth 1 org-path) "Uebungen"))
|
||||
(save-match-data
|
||||
(let* ((subject (first (org-get-outline-path)))
|
||||
(last-heading
|
||||
(first (last (org-map-entries
|
||||
(lambda ()
|
||||
(nth 4 (org-heading-components)))
|
||||
nil 'tree))))
|
||||
(last-ex-number
|
||||
(progn
|
||||
(string-match ".*?\\([0-9]+\\)\\..*" last-heading)
|
||||
(string-to-number (match-string 1 last-heading))))
|
||||
(ueb-dir (format "%s%s/uebungen/%d/"
|
||||
(file-name-directory (buffer-file-name))
|
||||
subject
|
||||
(1+ last-ex-number)))
|
||||
(new-file (format "%s%s" ueb-dir (file-name-nondirectory file)))
|
||||
(solution-file (format "%s/lsg.xoj" ueb-dir))
|
||||
(template-file (format "%s/lsg.xoj"
|
||||
(file-name-directory (buffer-file-name))))
|
||||
(template-bg-file (format "%s/lsg.xoj.bg_2.png"
|
||||
(file-name-directory (buffer-file-name)))))
|
||||
(make-directory ueb-dir t)
|
||||
(copy-file file new-file t)
|
||||
(org-insert-heading-after-current)
|
||||
(insert (format "TODO %d. Uebung" (1+ last-ex-number)))
|
||||
(org-demote)
|
||||
(forward-line)
|
||||
(insert (format "- [[%s][Blatt]]\n" new-file))
|
||||
(copy-file template-file solution-file nil)
|
||||
(copy-file template-bg-file ueb-dir nil)
|
||||
(insert (format "- [[%s][meine loesung]]\n\n" solution-file))
|
||||
(forward-line -4)
|
||||
(org-set-tags "EXERCISE")
|
||||
(call-interactively 'org-deadline)))))
|
||||
|
||||
#+end_src
|
||||
|
|
|
@ -1 +1,15 @@
|
|||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 5))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
(straight-use-package 'use-package)
|
||||
(straight-use-package 'org)
|
||||
(org-babel-load-file "~/.emacs.d/emacs.org")
|
||||
|
|
|
@ -4,3 +4,4 @@ xmodmap ~/.xmodmaprc &
|
|||
dunst &
|
||||
picom --config .picom.conf &
|
||||
xrdb .Xresources &
|
||||
kdeconnect-indicator &
|
||||
|
|
2
dots/polybar/.link
Normal file
2
dots/polybar/.link
Normal file
|
@ -0,0 +1,2 @@
|
|||
TASKNAME="Configuring polybar"
|
||||
LINKTO=".config/polybar"
|
89
dots/polybar/config
Normal file
89
dots/polybar/config
Normal file
|
@ -0,0 +1,89 @@
|
|||
[colors]
|
||||
background = ${xrdb:color8:#222}
|
||||
background-alt = ${xrdb:color0:#222}
|
||||
foreground = ${xrdb:color7:#222}
|
||||
linecolor = ${xrdb:color2:#222}
|
||||
bordercolor = ${xrdb:color3:#222}
|
||||
primary = #ffb52a
|
||||
secondary = #e60053
|
||||
alert = #bd2c40
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 0
|
||||
|
||||
[bar/base]
|
||||
enable-ipc = true
|
||||
override-redirect = true
|
||||
width = 100%
|
||||
height = 27
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
linecolor = ${colors.linecolor}
|
||||
border-bottom-size = 2
|
||||
border-bottom-color = ${colors.bordercolor}
|
||||
|
||||
font-0 = Fira Code:size=10;2
|
||||
font-1 = FontAwesome:size=10;2
|
||||
|
||||
[bar/ext]
|
||||
inherit = bar/base
|
||||
|
||||
monitor = HDMI-2
|
||||
modules-left = bspwm
|
||||
|
||||
[bar/main]
|
||||
inherit = bar/base
|
||||
monitor = eDP-1
|
||||
|
||||
spacing = 3
|
||||
lineheight = 2
|
||||
padding-right = 1
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
separator = |
|
||||
|
||||
modules-left = bspwm
|
||||
modules-right = battery clock
|
||||
|
||||
tray-position = center
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
format = <label-state>
|
||||
|
||||
pin-workspaces = true
|
||||
inline-mode = true
|
||||
enable-click = true
|
||||
enable-scroll = true
|
||||
reverse-scroll = true
|
||||
|
||||
label-focused-background = ${colors.bordercolor}
|
||||
ws-icon-0 = "IV;"
|
||||
ws-icon-1 = "VII;7"
|
||||
ws-icon-2 = "I;"
|
||||
ws-icon-3 = "II;"
|
||||
ws-icon-4 = "III;"
|
||||
ws-icon-5 = "V;"
|
||||
ws-icon-6 = "VI;6"
|
||||
ws-icon-7 = "VIII;8"
|
||||
ws-icon-8 = "IX;"
|
||||
ws-icon-9 = "X;"
|
||||
|
||||
label-focused = %icon%
|
||||
label-focused-padding = 1
|
||||
|
||||
label-occupied = %icon%
|
||||
label-occupied-padding = 1
|
||||
|
||||
label-empty =
|
||||
|
||||
[module/clock]
|
||||
type = internal/date
|
||||
date = %%{T3}%Y-%m-%d %H:%M%%{T-}
|
||||
interval = 5
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full-at = 98
|
5
dots/polybar/launch.sh
Executable file
5
dots/polybar/launch.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
polybar-msg cmd quit
|
||||
polybar main & disown
|
||||
polybar ext & disown
|
||||
xdo id -m -N Polybar && polybar-msg cmd hide
|
Loading…
Add table
Reference in a new issue