This commit is contained in:
Marco Thomas
2022-01-13 23:38:21 +01:00
parent fc02553f69
commit 61628a5400
20 changed files with 504 additions and 148 deletions

View File

@@ -11,7 +11,6 @@ dots for my lenovo yoga slim 7i pro 「itomori」
+ alacritty + alacritty
+ zsh + zsh
+ dunst + dunst
+ picom
+ polybar + polybar
+ rofi + rofi
+ xlock + xlock
@@ -23,14 +22,17 @@ dots for my lenovo yoga slim 7i pro 「itomori」
+ okular / zathura + okular / zathura
** control stuff ** control stuff
+ [[https://github.com/bulletmark/libinput-gestures][libinput-gestures]] + [[https://github.com/bulletmark/libinput-gestures][libinput-gestures]]
+ amixer + pactl
+ playerctl + playerctl
+ light + light
+ feh + feh
+ [[https://github.com/marcothms/enact/tree/new_primary][enact]]
+ nm-applet + nm-applet
+ xdotool + xdotool
+ wmctrl + wmctrl
+ redshift-gtk
** special stuff ** special stuff
+ fcitx5 (with mozc) + fcitx5 (with mozc)
+ hunspell DE + hunspell DE
** GTK theming
+ papirus icons
+ materia gtk theme

View File

@@ -1,4 +1,4 @@
Xft.dpi: 180 Xft.dpi: 140
! Font ! Font
XTerm.vt100.faceName: xft:SFMono Nerd Font Mono:antialias=true XTerm.vt100.faceName: xft:SFMono Nerd Font Mono:antialias=true

View File

@@ -6,15 +6,15 @@
follow = mouse follow = mouse
width = 400 width = 400
origin = "top-center" origin = "top-center"
offset = "0x80" offset = "0x20"
indicate_hidden = yes indicate_hidden = yes
shrink = no shrink = no
separator_height = 1 separator_height = 1
transparency = 0 transparency = 0
padding = 8 padding = 10
horizontal_padding = 8 horizontal_padding = 8
frame_width = 2 frame_width = 2
frame_color = "#A6CC70" frame_color = "#5c6773"
separator_color = frame separator_color = frame
sort = yes sort = yes
idle_threshold = 120 idle_threshold = 120
@@ -57,16 +57,16 @@
[urgency_low] [urgency_low]
background="#ffffff" background="#eeeeee"
foreground="#050505" foreground="#050505"
timeout = 3 timeout = 3
[urgency_normal] [urgency_normal]
background="#ffffff" background="#eeeeee"
foreground="#050505" foreground="#050505"
timeout = 3 timeout = 3
[urgency_critical] [urgency_critical]
background="#ffffff" background="#eeeeee"
foreground="#050505" foreground="#050505"
timeout = 0 timeout = 0

View File

@@ -2,6 +2,11 @@ set $mod Mod4
font pango:JuliaMono 10 font pango:JuliaMono 10
floating_modifier $mod floating_modifier $mod
# bindings idea:
# mod + KEY = open sth
# mod + shift = move sth
# mod + ctrl = manipulate display
# applications # applications
bindsym $mod+Return exec --no-startup-id alacritty bindsym $mod+Return exec --no-startup-id alacritty
bindsym $mod+d exec --no-startup-id rofi -theme ~/.config/rofi/light.rasi -show drun bindsym $mod+d exec --no-startup-id rofi -theme ~/.config/rofi/light.rasi -show drun
@@ -9,12 +14,12 @@ bindsym $mod+Shift+s exec --no-startup-id flameshot gui
bindsym XF86Calculator exec --no-startup-id emacs bindsym XF86Calculator exec --no-startup-id emacs
# audio and brightness # audio and brightness
bindsym XF86AudioMute exec --no-startup-id amixer -q set Master toggle bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 1%- bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 1%+ bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause bindsym XF86AudioPlay exec --no-startup-id playerctl -p spotify play-pause
bindsym XF86AudioNext exec --no-startup-id playerctl next bindsym XF86AudioNext exec --no-startup-id playerctl -p spotify next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous bindsym XF86AudioPrev exec --no-startup-id playerctl -p spotify previous
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 5 bindsym XF86MonBrightnessUp exec --no-startup-id light -A 5
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 5 bindsym XF86MonBrightnessDown exec --no-startup-id light -U 5
@@ -25,8 +30,12 @@ bindsym Ctrl+Shift+space exec --no-startup-id dunstctl history-pop
# kill focused window # kill focused window
bindsym $mod+Shift+BackSpace kill bindsym $mod+Shift+BackSpace kill
# lock # lock etc
bindsym $mod+Control+BackSpace exec --no-startup-id xlock -mode maze bindsym $mod+Control+BackSpace exec --no-startup-id ~/dots/scripts/powermenu.sh
# change monitor layout
bindsym $mod+Control+d exec --no-startup-id ~/dots/scripts/monitor.sh dual
bindsym $mod+Control+s exec --no-startup-id ~/dots/scripts/monitor.sh single
# change focus # change focus
bindsym $mod+h focus left bindsym $mod+h focus left
@@ -97,6 +106,9 @@ bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+Left workspace prev bindsym $mod+Left workspace prev
bindsym $mod+Right workspace next bindsym $mod+Right workspace next
bindsym $mod+Ctrl+h move workspace to output left
bindsym $mod+Ctrl+l move workspace to output right
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
@@ -116,10 +128,10 @@ set $blue "#55b4d4"
set $yellow "#e7c547" set $yellow "#e7c547"
# class border backgr. text indicator child_border # class border backgr. text indicator child_border
client.focused $green $green $black $green $black client.focused $green $green $black $green $green
client.focused_inactive $yellow $yellow $black $yellow $black client.focused_inactive $yellow $yellow $black $yellow $black
client.unfocused $white $white $black $white $black client.unfocused $white $white $black $white $black
client.urgent $red $red $white $red $black client.urgent $red $red $white $red $red
# i3 bar # i3 bar
# flaoting on start # flaoting on start
@@ -129,24 +141,18 @@ for_window [class="flameshot"] floating enable
# border # border
hide_edge_borders smart hide_edge_borders smart
for_window [class="^.*"] border pixel 0 for_window [class="^.*"] border pixel 2
# bar
exec_always --no-startup-id ~/dots/scripts/polybar.sh
# gaps # gaps
gaps inner 10 gaps inner 10
# wallpaper # desktop (wallpaper, bar, picom)
exec_always --no-startup-id feh --bg-fill ~/data/Seafile/images/wallpaper/wallpaper.png exec_always --no-startup-id ~/dots/scripts/reload_desktop.sh
# startup # startup
exec --no-startup-id nm-applet exec --no-startup-id nm-applet
exec --no-startup-id keepassxc exec --no-startup-id keepassxc
exec --no-startup-id seafile-applet exec --no-startup-id seafile-applet
exec --no-startup-id fcitx5 exec --no-startup-id fcitx5
exec --no-startup-id picom --backend glx --no-vsync
exec --no-startup-id enact --watch --pos top -n 1
exec --no-startup-id libinput-gestures-setup start exec --no-startup-id libinput-gestures-setup start
exec --no-startup-id redshift-gtk -l 48.13333:11.56667
exec_always --no-startup-id notify-send -i ~/data/Seafile/images/anime/dashboard.png "よろしくマルコさん!" "「i3」へようこそ。"

View File

@@ -1,18 +0,0 @@
# corner-radius = 40;
# rounded-corners-exclude = [
# "class_g = 'i3bar'",
# "class_g = 'Polybar'",
# ];
# detect-rounded-corners = true
shadow = true;
shadow-radius = 15;
shadow-opacity = 0.2
shadow-exclude = [
"class_g = 'i3-frame'",
"class_g = 'Polybar'",
"class_g = 'Firefox'",
];

View File

@@ -1,13 +1,14 @@
[colors] [colors]
white = #ffffff white = #ffffff
black = #5c6773 black = #5c6773
grey = #eeeeee
green = #a6cc70 green = #a6cc70
red = #ff3333 red = #ff3333
[bar/bar] [bar/bar]
font-0 = "JuliaMono:pixelsize=10;4" font-0 = "PT Sans:pixelsize=10:weight=bold;4"
font-1 = "Noto Sans Mono CJK JP:pixelsize=10;3" font-1 = "Noto Sans Mono CJK JP:pixelsize=10:weight=bold;3"
font-2 = "FontAwesome:pixelsize=10;4" font-2 = "FontAwesome:pixelsize=10;4"
monitor = ${env:MON} monitor = ${env:MON}
@@ -18,18 +19,18 @@ scroll-down = i3wm-wsnext
fixed-center = true fixed-center = true
width = 100% width = 100%
height = 50 height = 40
dpi = ${xrdb:Xft.dpi:-1} dpi = ${xrdb:Xft.dpi:-1}
background = ${colors.white} background = ${colors.black}
foreground = ${colors.black} foreground = ${colors.white}
bottom = false bottom = false
screenchange-reload = true screenchange-reload = true
tray-position = right tray-position = ${env:TRAYPOS:right}
tray-scale = 1.0 tray-scale = 1.0
tray-maxsize = 25 tray-maxsize = 25
@@ -39,9 +40,9 @@ padding-left = 1
padding-right = 1 padding-right = 1
module-margin = 2 module-margin = 2
modules-left = logo i3 polywins spotify modules-left = logo i3 polywins sep spotify
modules-center = modules-center =
modules-right = backlight pulseaudio battery conservation date time modules-right = cpu sep cpu_temp sep temp sep ram sep backlight sep pulseaudio sep conservation sep battery sep date sep
[module/i3] [module/i3]
strip-wsnumbers = true strip-wsnumbers = true
@@ -63,28 +64,25 @@ ws-icon-8 = 9;九
ws-icon-9 = 10;十 ws-icon-9 = 10;十
label-focused = %icon% label-focused = %icon%
label-focused-background = ${colors.green} label-focused-padding = 2
label-focused-padding = 1 label-focused-overline = ${colors.green}
label-unfocused = %icon% label-unfocused = %icon%
label-unfocused-padding = 1 label-unfocused-padding = 2
label-visible = %icon% label-visible = %icon%
label-visible-padding = 1 label-visible-padding = 2
label-urgent = %icon% label-urgent = %icon%
label-urgent-overline = ${colors.red} label-urgent-overline = ${colors.red}
label-urgent-padding = 1 label-urgent-padding = 2
[module/date] [module/date]
type = internal/date type = internal/date
interval = 1.0 interval = 1.0
date = %a, %d %b date = %a, %d %b
time = %H:%M
[module/time] label =  %date% %time%
type = internal/date
interval = 1.0
date =  %H:%M
[module/pulseaudio] [module/pulseaudio]
type = internal/pulseaudio type = internal/pulseaudio
@@ -135,7 +133,7 @@ type = custom/script
exec = if [ /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode ]; then echo "On"; else echo "Off"; fi exec = if [ /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode ]; then echo "On"; else echo "Off"; fi
click-left = alacritty --command ~/dots/scripts/conservation_mode.sh click-left = alacritty --command ~/dots/scripts/conservation_mode.sh
format = <label> format = <label>
label =  %output% label =  %output%
tail = true tail = true
[module/backlight] [module/backlight]
@@ -158,10 +156,40 @@ tail = true
[module/spotify] [module/spotify]
type = custom/script type = custom/script
interval = 1 interval = 1
format = <label> format = <label>
#exec = python3 ~/dots/scripts/spotify.py -f '{play_pause} {artist}: {song}' --font=2 #exec = python3 ~/dots/scripts/spotify.py -f '{play_pause} {artist}: {song}' --font=2
exec = python3 ~/dots/scripts/spotify.py -f '{artist}: {song}' exec = python3 ~/dots/scripts/spotify.py -f '{artist}: {song}' -t 50
click-left = playerctl play-pause click-left = playerctl -p spotify play-pause
click-right = playerctl next click-right = playerctl -p spotify next
click-middle = playerctl previous click-middle = playerctl -p spotify previous
[module/sep]
type = custom/text
content = "|"
content-foreground = ${colors.grey}
[module/temp]
type = internal/temperature
interval = 5
format =  <label>
[module/cpu_temp]
type = internal/temperature
interval = 5
# 0 is acpi next to cpu
# 10 is inside the cpu
thermal-zone = 10
format =  <label>
[module/cpu]
type = internal/cpu
interval = 5
label = %percentage%%
format =  <label>
[module/ram]
type = internal/memory
interval = 5
label = %gb_used%
format =  <label>

View File

@@ -0,0 +1,10 @@
* {
background: #eeeeee;
background-alt: #eeeeee;
foreground: #000000;
accent: #A6CC70;
border: #eeeeee;
border-alt: #eeeeee;
selected: @accent;
urgent: #ff3333;
}

View File

@@ -0,0 +1,32 @@
/* Confirm Dialog */
colors {
background: #425775ff;
background-alt: #475C7Bff;
foreground: #ffffffcc;
border: #FDBB6Dff;
border-alt: #DA717Fff;
selected: #685E79ff;
urgent: #DA4453FF;
}
* {
background-color: @background;
text-color: @foreground;
font: "JuliaMono 11";
}
window {
width: 225px;
padding: 25px;
border: 1px;
border-radius: 0px;
border-color: @border;
location: center;
y-offset: -2em;
}
entry {
expand: true;
text-color: @border;
}

View File

@@ -11,23 +11,15 @@ configuration {
} }
// blur version @import "~/.config/rofi/colors.rasi"
* {
bg: #ffffff;
ac: #A6CC70;
}
* { * {
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
font: "JuliaMono 18"; font: "JuliaMono 18";
} }
window { window {
background-color: @bg; background-color: @background;
border: 0;
border-radius: 4px;
padding: 30; padding: 30;
width: 30%; width: 30%;
height: 45%; height: 45%;
@@ -41,8 +33,8 @@ mainbox {
} }
listview { listview {
columns: 2; columns: 3;
lines: 3; lines: 1;
padding: 8; padding: 8;
spacing: 0; spacing: 0;
cycle: false; cycle: false;
@@ -58,14 +50,14 @@ element {
} }
element selected { element selected {
background-color: @ac; background-color: @accent;
border-color: #ffffff0A; border-color: #ffffff0A;
text-color: #000000; text-color: @foreground;
transition: 20; transition: 20;
} }
element-icon { element-icon {
size: 100; size: 4%;
horizontal-align: 0.5; horizontal-align: 0.5;
vertical-align: 0.5; vertical-align: 0.5;
} }
@@ -78,7 +70,6 @@ element-text {
inputbar { inputbar {
children: [ prompt, entry ]; children: [ prompt, entry ];
padding: 4 8 4 8;
background-color: #ffffff00; background-color: #ffffff00;
} }
@@ -89,8 +80,9 @@ prompt {
} }
entry { entry {
text-color: @txt;
padding: 8 12 8 12; padding: 8 12 8 12;
font: "JuliaMono 20"; font: "JuliaMono 20";
margin: 0% 0% 0% 0%; margin: 0% 0% 0% 0%;
placeholder: "Search";
placeholder-color: #444444;
} }

View File

@@ -0,0 +1,32 @@
/* Message Dialog */
colors {
background: #425775ff;
background-alt: #475C7Bff;
foreground: #ffffffcc;
border: #FDBB6Dff;
border-alt: #DA717Fff;
selected: #685E79ff;
urgent: #DA4453FF;
}
* {
background-color: @background;
text-color: @foreground;
font: "FantasqueSansMono Nerd Font 12";
}
window {
width: 360px;
padding: 25px;
border: 1px;
border-radius: 0px;
border-color: @border;
location: center;
y-offset: -2em;
}
entry {
expand: true;
text-color: @border;
}

View File

@@ -0,0 +1,112 @@
configuration {
font: "JuliaMono 18";
show-icons: false;
icon-theme: "Papirus";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "~/.config/rofi/colors.rasi"
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border-radius: 0px;
height: 28%;
width: 15%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.5% 0.5% 0.5% 0%;
background-color: @background-alt;
text-color: @foreground;
}
textbox-prompt-colon {
expand: false;
str: "Powermenu";
background-color: @background-alt;
text-color: @foreground;
padding: 0.5% 0.5% 0.5% 0%;
}
inputbar {
children: [ textbox-prompt-colon, prompt ];
background-color: @background-alt;
text-color: @foreground;
expand: false;
border: 0% 0% 0% 0.2%;
border-radius: 0% 0% 0% 0%;
border-color: @border;
padding: 0.5%;
position: center;
}
listview {
background-color: @background;
margin: 0% 0% 0% 0%;
spacing: 1%;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
children: [ inputbar, listview ];
padding: 1% 1% 1% 1%;
}
element {
background-color: @background-alt;
text-color: @foreground;
orientation: vertical;
border-radius: 0%;
}
element-text {
background-color: #00000000;
text-color: inherit;
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 1% 1% 1% 1%;
}
element normal.urgent,
element alternate.urgent {
background-color: @urgent;
text-color: @foreground;
border-radius: 0.2%;
}
element normal.active,
element alternate.active {
background-color: @background-alt;
text-color: @foreground;
}
element selected {
background-color: @selected;
text-color: @foreground;
border: 0% 0% 0% 0.2%;
border-radius: 0%;
border-color: @border;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @background-alt;
color: @foreground;
}

View File

@@ -7,7 +7,6 @@ xrdb -merge $HOME/.Xresources
setxkbmap eu setxkbmap eu
setxkbmap -option caps:none setxkbmap -option caps:none
xmodmap -e "keycode 66 = grave asciitilde" xmodmap -e "keycode 66 = grave asciitilde"
xmodmap -e "keycode 49 = Escape"
# energy options # energy options
xset s off xset s off

View File

@@ -19,9 +19,9 @@ ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ"
DIR="%{$fg[blue]%}%~" DIR="%{$fg[blue]%}%~"
GIT="%{$fg[red]%}\$vcs_info_msg_0_" GIT="%{$fg[red]%}\$vcs_info_msg_0_"
if [[ -n "$SSH_CONNECTION" ]]; then # if [[ -n "$SSH_CONNECTION" ]]; then
NAME="%B%{$fg[yellow]%}%m%b " NAME="%B%{$fg[yellow]%}%m%b "
fi # fi
case $TERM in case $TERM in
(*xterm* | rxvt | alacritty) (*xterm* | rxvt | alacritty)
@@ -55,6 +55,7 @@ alias cp='cp -i' # Ask before removal
alias mv='mv -i' # Ask before removal alias mv='mv -i' # Ask before removal
alias nssh='SSH_AUTH_SOCK= ssh' alias nssh='SSH_AUTH_SOCK= ssh'
alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"'
if [ -f ~/.zshrc_local ]; then if [ -f ~/.zshrc_local ]; then
source ~/.zshrc_local source ~/.zshrc_local

View File

@@ -37,12 +37,14 @@ tracking again with:
git update-index --no-assume-unchanged init.el git update-index --no-assume-unchanged init.el
#+END_SRC #+END_SRC
** Startup ** Startup
=lexical-binding= can improve speed. =lexical-binding= can improve speed.
#+BEGIN_SRC emacs-lisp :tangle yes #+BEGIN_SRC emacs-lisp :tangle yes
;;; -*- lexical-binding: t -*- ;;; -*- lexical-binding: t -*-
#+END_SRC #+END_SRC
** Tangle ** Tangle
The =init.el= should (after the first run) mirror the source blocks in The =init.el= should (after the first run) mirror the source blocks in
the =init.org=. We can use =C-c C-v t= to run =org-babel-tangle=, which the =init.org=. We can use =C-c C-v t= to run =org-babel-tangle=, which
@@ -405,7 +407,6 @@ Sometimes I want to see all of my files.
:straight t) :straight t)
#+end_src #+end_src
** Mini buffers ** Mini buffers
*** ivy *** ivy
Ivy - a generic completion frontend for Emacs. Ivy - a generic completion frontend for Emacs.
@@ -446,12 +447,12 @@ Spice up some of those old buffers.
** ORG MODE <3 ** ORG MODE <3
*** Setup *** Setup and keys
TODO: split up this box Bootstrap =org-mode= together with keybindings.
=C-c C-t= for =org-todo=.
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package org (use-package org
:straight t :straight t
;; C-c C-t org rotate
:general :general
(vim-leader-def 'normal 'global (vim-leader-def 'normal 'global
"oci" 'org-clock-in "oci" 'org-clock-in
@@ -462,47 +463,53 @@ TODO: split up this box
"oti" 'org-toggle-inline-images "oti" 'org-toggle-inline-images
"odi" 'org-display-inline-images) "odi" 'org-display-inline-images)
:hook :hook
;; dont make real spaces at the start (org-mode . (lambda () (electric-indent-local-mode -1))) ;; dont make real spaces at the start of a line
(org-mode . (lambda () (electric-indent-local-mode -1))) (org-mode . org-indent-mode) ;; add virtual spaces
;; add virtual spaces
(org-mode . org-indent-mode)
:config :config
(define-key evil-normal-state-map (kbd "TAB") 'org-cycle) (define-key evil-normal-state-map (kbd "TAB") 'org-cycle)) ;; use TAB to FOLD in every evil-mode
(set-face-attribute 'org-document-title nil :weight 'bold :inherit 'default :height 250)
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5)
org-hidden-keywords '(title) ; hide title
org-startup-with-inline-images t
org-image-actual-width nil ; rescale inline images
org-directory "~/org"
org-agenda-files (quote ("~/org"))
org-ellipsis ""
;; org-hide-emphasis-markers t ; hide bold and underline markers
org-todo-keywords '((sequence "TODO" "PROGRESS" "REVIEW" "|" "DONE"))
org-todo-keyword-faces '(("TODO" . "#cc241d") ("PROGRESS" . "#a6cc70") ("REVIEW" . "#b16286") ("DONE" . "#abb0b6"))
org-edit-src-content-indentation 0
org-log-done nil ; just mark DONE without a time stamp
org-log-repeat nil
org-agenda-start-on-weekday nil ; my week starts on a monday
calendar-week-start-day 1
org-capture-templates
(quote (("w" "Work" entry (file "~/org/work.org") "* TODO %?\n" :empty-lines-before 1)
("u" "University" entry (file "~/org/uni.org") "* TODO %?\n" :empty-lines-before 1)
("p" "Personal" entry (file "~/org/personal.org") "* TODO %?\n" :empty-lines-before 1)))
org-latex-listings 'minted ; export with code highlighting
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
#+end_src #+end_src
Inline code execution is the shit! *** Misc
#+begin_src emacs-lisp :tangle yes
(setq org-hidden-keywords '(title) ;; hide title
org-startup-with-inline-images t ;; start with inline images enabled
org-image-actual-width nil ;; rescale inline images
org-directory "~/org" ;; set org file directory
org-agenda-files (quote ("~/org")) ;; indexed files by org agenda
org-edit-src-content-indentation 0 ;; don't indent stupidly in org-edit-src-code
org-log-done nil ;; just mark DONE without a time stamp
org-log-repeat nil ;; don't set a time after marking sth DONE
org-agenda-start-on-weekday nil ;; my week starts on a monday
calendar-week-start-day 1 ;; my week starts on a monday
)
#+end_src
*** org-todo faces
Which =org-todo= keywords should be used and how they look.
#+begin_src emacs-lisp :tangle yes
(setq org-todo-keywords '((sequence "TODO" "PROGRESS" "REVIEW" "|" "DONE"))
org-todo-keyword-faces '(("TODO" . "#cc241d") ("PROGRESS" . "#a6cc70") ("REVIEW" . "#b16286") ("DONE" . "#abb0b6")))
#+end_src
*** org-capture
Set some capture templates, for quick notes.
#+begin_src emacs-lisp :tangle yes
(setq org-capture-templates
(quote (("w" "Work" entry (file "~/org/work.org") "* TODO %?\n" :empty-lines-before 1)
("u" "University" entry (file "~/org/uni.org") "* TODO %?\n" :empty-lines-before 1)
("p" "Personal" entry (file "~/org/personal.org") "* TODO %?\n" :empty-lines-before 1))))
#+end_src
*** org-babel
Executing code inline is just a breeze.
Firstly tho, they must be enabled here.
Also be *careful* with =haskell= recursion, it can lead to system crashes (at least for me).
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(org-babel-do-load-languages 'org-babel-load-languages '((python . t) (org-babel-do-load-languages 'org-babel-load-languages '((python . t)
(shell . t) (shell . t)
(haskell . t) (haskell . t)
(C . t) (C . t)
(dot . t)))) (dot . t)))
(use-package sage-shell-mode (use-package sage-shell-mode
:straight t) :straight t)
@@ -512,25 +519,37 @@ Inline code execution is the shit!
#+end_src #+end_src
*** LaTeX Export *** LaTeX Export
For some reason =\alert= is misinterpreted in LaTeX... Enable LaTeX export with =pdflatex= and use =minted= for code highlighting.
Also fix math =utf8= chars.
#+begin_src emacs-lisp :tangle yes
(setq org-latex-listings 'minted
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")
org-latex-inputenc-alist '(("utf8" . "utf8x"))
org-latex-default-packages-alist (cons '("mathletters" "ucs" nil) org-latex-default-packages-alist)
org-format-latex-options (plist-put org-format-latex-options :scale 1.5))
#+end_src
For some reason =\alert= is misinterpreted in LaTeX.
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(defun mth/beamer-bold (contents backend info) (defun mth/beamer-bold (contents backend info)
(when (eq backend 'beamer) (when (eq backend 'beamer)
(replace-regexp-in-string "\\`\\\\[A-Za-z0-9]+" "\\\\textbf" contents))) (replace-regexp-in-string "\\`\\\\[A-Za-z0-9]+" "\\\\textbf" contents)))
#+end_src #+end_src
I also want some special export settings for my =.org= to =.tex=. Use the above fix and disable creating of =.tex= files.
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package ox (use-package ox
:after org :after org
:config :config
(add-to-list 'org-export-filter-bold-functions 'mth/beamer-bold) (add-to-list 'org-export-filter-bold-functions 'mth/beamer-bold)
(add-to-list 'org-latex-logfiles-extensions "tex") (add-to-list 'org-latex-logfiles-extensions "tex"))
(setq org-latex-inputenc-alist '(("utf8" . "utf8x")) ; export unicode as correct latex
org-latex-default-packages-alist (cons '("mathletters" "ucs" nil) org-latex-default-packages-alist)))
#+end_src #+end_src
Show me my math equations inline! Show math equations inline!
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package org-fragtog (use-package org-fragtog
:straight t :straight t
@@ -538,7 +557,7 @@ Show me my math equations inline!
(org-mode . org-fragtog-mode)) (org-mode . org-fragtog-mode))
#+end_src #+end_src
Who needs fancy online tooling anyway... Use graphivz to draw graphs.
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package graphviz-dot-mode (use-package graphviz-dot-mode
:straight t :straight t
@@ -548,7 +567,15 @@ Who needs fancy online tooling anyway...
(setq graphviz-dot-indent-width 4)) (setq graphviz-dot-indent-width 4))
#+end_src #+end_src
*** Fancy *** Fonts and fancy
Some custom fonts stuff.
#+begin_src emacs-lisp :tangle yes
(set-face-attribute 'org-document-title nil :weight 'bold :inherit 'default :height 250)
(setq org-ellipsis "" ;; folding icon
;; org-hide-emphasis-markers t ;; hide markers such as *, =, _
)
#+end_src
I want my =org-bullets= to look fancy, so I'm using some UTF8 chars. I want my =org-bullets= to look fancy, so I'm using some UTF8 chars.
Use =(setq inhibit-compacting-font-caches t)=, if performance is low. Use =(setq inhibit-compacting-font-caches t)=, if performance is low.
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
@@ -787,6 +814,21 @@ In order for =lsp-mode= to work, it needs to compile code on the =fly=.
Python's lsp has auto configuration for =lsp-mode= Python's lsp has auto configuration for =lsp-mode=
** Debugging with dap-mode
#+begin_src emacs-lisp :tangle yes
(use-package dap-mode
:straight t)
#+end_src
*** python
Setup some things to use dap-mode together with python.
It depends on =ptvsd=, which can be installed via =pip=.
#+begin_src emacs-lisp :tangle yes
(require 'dap-python)
#+end_src
*** rust
TODO: add rust config for debugging
** Input methods ** Input methods
*** spelling *** spelling
@@ -806,7 +848,6 @@ Sjoe my speling misttakes.
(text-mode . flyspell-mode)) (text-mode . flyspell-mode))
#+end_src #+end_src
*** math *** math
Who needs LaTeX when you can the power of unicode? Who needs LaTeX when you can the power of unicode?
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes

BIN
fonts/PTSans-Regular.ttf Normal file

Binary file not shown.

21
scripts/monitor.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
mon=$1
if [ ${mon} == "dual" ]; then
notify-send -i /usr/share/icons/Papirus/48x48/devices/computer.svg "Screen update" "Switching to dual monitor..."
sleep 2
# set layout for dual monitor at home
xrandr --output eDP-1 --mode 2880x1800 --pos 4816x1474 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --primary --mode 3440x1440 --pos 0x0 --rotate normal --output DP-4 --off
# built in screen has higher dpi, so scale the bigger one
xrandr --output DP-3 --scale 1.4
elif [ ${mon} == "single" ]; then
notify-send -i /usr/share/icons/Papirus/48x48/devices/computer.svg "Screen update" "Switching to single monitor..."
sleep 2
# set layout for built in display
xrandr --output eDP-1 --mode 2880x1800 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --off
fi
# reload wallpaper etc
$HOME/dots/scripts/reload_desktop.sh

View File

@@ -1,9 +1,13 @@
killall -q polybar connected=$(xrandr --query | grep "DP-3" | grep " connected" | cut -d" " -f1)
if type "xrandr"; then if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
echo $m # workaround to always show tray, when external mon is connected
MON=$m polybar --reload bar & if [ "$m" == "eDP-1" ] && [ "$connected" == "DP-3" ]; then
pos="none"
fi
MON=$m TRAYPOS=$pos polybar --reload bar &
pos=
done done
else else
polybar --reload bar & polybar --reload bar &

View File

@@ -3,11 +3,11 @@
# SETTINGS {{{ --- # SETTINGS {{{ ---
active_text_color="#5c6773" active_text_color="#ffffff"
active_bg= active_bg=
active_underline="#a6cc70" active_underline="#a6cc70"
inactive_text_color="#5c6773" inactive_text_color="#ffffff"
inactive_bg= inactive_bg=
inactive_underline= inactive_underline=
@@ -167,14 +167,14 @@ generate_window_list() {
window_count=$(( window_count + 1 )) window_count=$(( window_count + 1 ))
continue continue
fi fi
# Show the user-selected window property # Show the user-selected window property
case "$show" in case "$show" in
"window_class") w_name="$cls" ;; "window_class") w_name="$cls" ;;
"window_classname") w_name="$cname" ;; "window_classname") w_name="$cname" ;;
"window_title") w_name="$title" ;; "window_title") w_name="$title" ;;
esac esac
# Use user-selected character case # Use user-selected character case
case "$char_case" in case "$char_case" in
"lower") w_name=$( "lower") w_name=$(
@@ -232,7 +232,7 @@ generate_window_list() {
if [ "$window_count" = 0 ]; then if [ "$window_count" = 0 ]; then
printf "%s" "$empty_desktop_message" printf "%s" "$empty_desktop_message"
fi fi
# Print newline # Print newline
echo "" echo ""
} }

76
scripts/powermenu.sh Executable file
View File

@@ -0,0 +1,76 @@
#!/usr/bin/env bash
dir="$HOME/.config/rofi"
rofi_command="rofi -theme $dir/powermenu.rasi"
# Options
shutdown="Shutdown"
reboot="Reboot"
lock="Lock"
suspend="Suspend"
logout="Logout"
# Confirmation
confirm_exit() {
rofi -dmenu\
-i\
-no-fixed-num-lines\
-p "Are You Sure? : "\
-theme $dir/confirm.rasi
}
# Message
msg() {
rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
}
# Variable passed to rofi
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
chosen="$(echo -e "$options" | $rofi_command -p "" -dmenu -selected-row 2)"
case $chosen in
$shutdown)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl poweroff
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$reboot)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl reboot
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$lock)
xlock -mode maze
;;
$suspend)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl suspend
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$logout)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
i3-msg exit
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
esac

18
scripts/reload_desktop.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
# send notification
notify-send -i /usr/share/icons/Papirus/48x48/devices/computer-laptop.svg "Reload" "Reloading desktop..."
# bar
killall -q polybar
while pgrep -u $UID -x polybar > /dev/null; do sleep 1; done
$HOME/dots/scripts/polybar.sh
# wallpaper
feh --bg-fill $HOME/data/Seafile/images/wallpaper/wallpaper.png
# for some reason xmodmap and xset settings reset
source $HOME/.profile
# send notification
notify-send -i /usr/share/icons/Papirus/48x48/devices/computer-laptop.svg "Reload" "Reloaded desktop"