Updates
This commit is contained in:
@@ -11,7 +11,6 @@ dots for my lenovo yoga slim 7i pro 「itomori」
|
||||
+ alacritty
|
||||
+ zsh
|
||||
+ dunst
|
||||
+ picom
|
||||
+ polybar
|
||||
+ rofi
|
||||
+ xlock
|
||||
@@ -23,14 +22,17 @@ dots for my lenovo yoga slim 7i pro 「itomori」
|
||||
+ okular / zathura
|
||||
** control stuff
|
||||
+ [[https://github.com/bulletmark/libinput-gestures][libinput-gestures]]
|
||||
+ amixer
|
||||
+ pactl
|
||||
+ playerctl
|
||||
+ light
|
||||
+ feh
|
||||
+ [[https://github.com/marcothms/enact/tree/new_primary][enact]]
|
||||
+ nm-applet
|
||||
+ xdotool
|
||||
+ wmctrl
|
||||
+ redshift-gtk
|
||||
** special stuff
|
||||
+ fcitx5 (with mozc)
|
||||
+ hunspell DE
|
||||
** GTK theming
|
||||
+ papirus icons
|
||||
+ materia gtk theme
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Xft.dpi: 180
|
||||
Xft.dpi: 140
|
||||
|
||||
! Font
|
||||
XTerm.vt100.faceName: xft:SFMono Nerd Font Mono:antialias=true
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
follow = mouse
|
||||
width = 400
|
||||
origin = "top-center"
|
||||
offset = "0x80"
|
||||
offset = "0x20"
|
||||
indicate_hidden = yes
|
||||
shrink = no
|
||||
separator_height = 1
|
||||
transparency = 0
|
||||
padding = 8
|
||||
padding = 10
|
||||
horizontal_padding = 8
|
||||
frame_width = 2
|
||||
frame_color = "#A6CC70"
|
||||
frame_color = "#5c6773"
|
||||
separator_color = frame
|
||||
sort = yes
|
||||
idle_threshold = 120
|
||||
@@ -57,16 +57,16 @@
|
||||
|
||||
|
||||
[urgency_low]
|
||||
background="#ffffff"
|
||||
background="#eeeeee"
|
||||
foreground="#050505"
|
||||
timeout = 3
|
||||
|
||||
[urgency_normal]
|
||||
background="#ffffff"
|
||||
background="#eeeeee"
|
||||
foreground="#050505"
|
||||
timeout = 3
|
||||
|
||||
[urgency_critical]
|
||||
background="#ffffff"
|
||||
background="#eeeeee"
|
||||
foreground="#050505"
|
||||
timeout = 0
|
||||
|
||||
@@ -2,6 +2,11 @@ set $mod Mod4
|
||||
font pango:JuliaMono 10
|
||||
floating_modifier $mod
|
||||
|
||||
# bindings idea:
|
||||
# mod + KEY = open sth
|
||||
# mod + shift = move sth
|
||||
# mod + ctrl = manipulate display
|
||||
|
||||
# applications
|
||||
bindsym $mod+Return exec --no-startup-id alacritty
|
||||
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
|
||||
|
||||
# audio and brightness
|
||||
bindsym XF86AudioMute exec --no-startup-id amixer -q set Master toggle
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 1%-
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 1%+
|
||||
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
|
||||
bindsym XF86AudioNext exec --no-startup-id playerctl next
|
||||
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioPlay exec --no-startup-id playerctl -p spotify play-pause
|
||||
bindsym XF86AudioNext exec --no-startup-id playerctl -p spotify next
|
||||
bindsym XF86AudioPrev exec --no-startup-id playerctl -p spotify previous
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 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
|
||||
bindsym $mod+Shift+BackSpace kill
|
||||
|
||||
# lock
|
||||
bindsym $mod+Control+BackSpace exec --no-startup-id xlock -mode maze
|
||||
# lock etc
|
||||
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
|
||||
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+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
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
@@ -116,10 +128,10 @@ set $blue "#55b4d4"
|
||||
set $yellow "#e7c547"
|
||||
|
||||
# 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.unfocused $white $white $black $white $black
|
||||
client.urgent $red $red $white $red $black
|
||||
client.urgent $red $red $white $red $red
|
||||
|
||||
# i3 bar
|
||||
# flaoting on start
|
||||
@@ -129,24 +141,18 @@ for_window [class="flameshot"] floating enable
|
||||
|
||||
# border
|
||||
hide_edge_borders smart
|
||||
for_window [class="^.*"] border pixel 0
|
||||
|
||||
# bar
|
||||
exec_always --no-startup-id ~/dots/scripts/polybar.sh
|
||||
for_window [class="^.*"] border pixel 2
|
||||
|
||||
# gaps
|
||||
gaps inner 10
|
||||
|
||||
# wallpaper
|
||||
exec_always --no-startup-id feh --bg-fill ~/data/Seafile/images/wallpaper/wallpaper.png
|
||||
# desktop (wallpaper, bar, picom)
|
||||
exec_always --no-startup-id ~/dots/scripts/reload_desktop.sh
|
||||
|
||||
# startup
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id keepassxc
|
||||
exec --no-startup-id seafile-applet
|
||||
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_always --no-startup-id notify-send -i ~/data/Seafile/images/anime/dashboard.png "よろしくマルコさん!" "「i3」へようこそ。"
|
||||
exec --no-startup-id redshift-gtk -l 48.13333:11.56667
|
||||
|
||||
@@ -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'",
|
||||
];
|
||||
@@ -1,13 +1,14 @@
|
||||
[colors]
|
||||
white = #ffffff
|
||||
black = #5c6773
|
||||
grey = #eeeeee
|
||||
green = #a6cc70
|
||||
red = #ff3333
|
||||
|
||||
[bar/bar]
|
||||
|
||||
font-0 = "JuliaMono:pixelsize=10;4"
|
||||
font-1 = "Noto Sans Mono CJK JP:pixelsize=10;3"
|
||||
font-0 = "PT Sans:pixelsize=10:weight=bold;4"
|
||||
font-1 = "Noto Sans Mono CJK JP:pixelsize=10:weight=bold;3"
|
||||
font-2 = "FontAwesome:pixelsize=10;4"
|
||||
|
||||
monitor = ${env:MON}
|
||||
@@ -18,18 +19,18 @@ scroll-down = i3wm-wsnext
|
||||
fixed-center = true
|
||||
|
||||
width = 100%
|
||||
height = 50
|
||||
height = 40
|
||||
|
||||
dpi = ${xrdb:Xft.dpi:-1}
|
||||
|
||||
background = ${colors.white}
|
||||
foreground = ${colors.black}
|
||||
background = ${colors.black}
|
||||
foreground = ${colors.white}
|
||||
|
||||
bottom = false
|
||||
|
||||
screenchange-reload = true
|
||||
|
||||
tray-position = right
|
||||
tray-position = ${env:TRAYPOS:right}
|
||||
tray-scale = 1.0
|
||||
tray-maxsize = 25
|
||||
|
||||
@@ -39,9 +40,9 @@ padding-left = 1
|
||||
padding-right = 1
|
||||
module-margin = 2
|
||||
|
||||
modules-left = logo i3 polywins spotify
|
||||
modules-left = logo i3 polywins sep spotify
|
||||
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]
|
||||
strip-wsnumbers = true
|
||||
@@ -63,28 +64,25 @@ ws-icon-8 = 9;九
|
||||
ws-icon-9 = 10;十
|
||||
|
||||
label-focused = %icon%
|
||||
label-focused-background = ${colors.green}
|
||||
label-focused-padding = 1
|
||||
label-focused-padding = 2
|
||||
label-focused-overline = ${colors.green}
|
||||
|
||||
label-unfocused = %icon%
|
||||
label-unfocused-padding = 1
|
||||
label-unfocused-padding = 2
|
||||
|
||||
label-visible = %icon%
|
||||
label-visible-padding = 1
|
||||
label-visible-padding = 2
|
||||
|
||||
label-urgent = %icon%
|
||||
label-urgent-overline = ${colors.red}
|
||||
label-urgent-padding = 1
|
||||
label-urgent-padding = 2
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1.0
|
||||
date = %a, %d %b
|
||||
|
||||
[module/time]
|
||||
type = internal/date
|
||||
interval = 1.0
|
||||
date = %H:%M
|
||||
date = %a, %d %b
|
||||
time = %H:%M
|
||||
label = %date% %time%
|
||||
|
||||
[module/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
|
||||
click-left = alacritty --command ~/dots/scripts/conservation_mode.sh
|
||||
format = <label>
|
||||
label = %output%
|
||||
label = %output%
|
||||
tail = true
|
||||
|
||||
[module/backlight]
|
||||
@@ -158,10 +156,40 @@ tail = true
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
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 '{artist}: {song}'
|
||||
exec = python3 ~/dots/scripts/spotify.py -f '{artist}: {song}' -t 50
|
||||
|
||||
click-left = playerctl play-pause
|
||||
click-right = playerctl next
|
||||
click-middle = playerctl previous
|
||||
click-left = playerctl -p spotify play-pause
|
||||
click-right = playerctl -p spotify next
|
||||
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>
|
||||
|
||||
10
files/.config/rofi/colors.rasi
Normal file
10
files/.config/rofi/colors.rasi
Normal file
@@ -0,0 +1,10 @@
|
||||
* {
|
||||
background: #eeeeee;
|
||||
background-alt: #eeeeee;
|
||||
foreground: #000000;
|
||||
accent: #A6CC70;
|
||||
border: #eeeeee;
|
||||
border-alt: #eeeeee;
|
||||
selected: @accent;
|
||||
urgent: #ff3333;
|
||||
}
|
||||
32
files/.config/rofi/confirm.rasi
Normal file
32
files/.config/rofi/confirm.rasi
Normal 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;
|
||||
}
|
||||
@@ -11,23 +11,15 @@ configuration {
|
||||
|
||||
}
|
||||
|
||||
// blur version
|
||||
* {
|
||||
bg: #ffffff;
|
||||
ac: #A6CC70;
|
||||
}
|
||||
@import "~/.config/rofi/colors.rasi"
|
||||
|
||||
* {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
font: "JuliaMono 18";
|
||||
font: "JuliaMono 18";
|
||||
}
|
||||
|
||||
|
||||
|
||||
window {
|
||||
background-color: @bg;
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
background-color: @background;
|
||||
padding: 30;
|
||||
width: 30%;
|
||||
height: 45%;
|
||||
@@ -41,8 +33,8 @@ mainbox {
|
||||
}
|
||||
|
||||
listview {
|
||||
columns: 2;
|
||||
lines: 3;
|
||||
columns: 3;
|
||||
lines: 1;
|
||||
padding: 8;
|
||||
spacing: 0;
|
||||
cycle: false;
|
||||
@@ -58,14 +50,14 @@ element {
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @ac;
|
||||
background-color: @accent;
|
||||
border-color: #ffffff0A;
|
||||
text-color: #000000;
|
||||
text-color: @foreground;
|
||||
transition: 20;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 100;
|
||||
size: 4%;
|
||||
horizontal-align: 0.5;
|
||||
vertical-align: 0.5;
|
||||
}
|
||||
@@ -78,7 +70,6 @@ element-text {
|
||||
|
||||
inputbar {
|
||||
children: [ prompt, entry ];
|
||||
padding: 4 8 4 8;
|
||||
background-color: #ffffff00;
|
||||
}
|
||||
|
||||
@@ -89,8 +80,9 @@ prompt {
|
||||
}
|
||||
|
||||
entry {
|
||||
text-color: @txt;
|
||||
padding: 8 12 8 12;
|
||||
font: "JuliaMono 20";
|
||||
margin: 0% 0% 0% 0%;
|
||||
placeholder: "Search";
|
||||
placeholder-color: #444444;
|
||||
}
|
||||
|
||||
32
files/.config/rofi/message.rasi
Normal file
32
files/.config/rofi/message.rasi
Normal 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;
|
||||
}
|
||||
112
files/.config/rofi/powermenu.rasi
Normal file
112
files/.config/rofi/powermenu.rasi
Normal 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;
|
||||
}
|
||||
@@ -7,7 +7,6 @@ xrdb -merge $HOME/.Xresources
|
||||
setxkbmap eu
|
||||
setxkbmap -option caps:none
|
||||
xmodmap -e "keycode 66 = grave asciitilde"
|
||||
xmodmap -e "keycode 49 = Escape"
|
||||
|
||||
# energy options
|
||||
xset s off
|
||||
|
||||
@@ -19,9 +19,9 @@ ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ"
|
||||
DIR="%{$fg[blue]%}%~"
|
||||
GIT="%{$fg[red]%}\$vcs_info_msg_0_"
|
||||
|
||||
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
# if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
NAME="%B%{$fg[yellow]%}%m%b "
|
||||
fi
|
||||
# fi
|
||||
|
||||
case $TERM in
|
||||
(*xterm* | rxvt | alacritty)
|
||||
@@ -55,6 +55,7 @@ alias cp='cp -i' # Ask before removal
|
||||
alias mv='mv -i' # Ask before removal
|
||||
|
||||
alias nssh='SSH_AUTH_SOCK= ssh'
|
||||
alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"'
|
||||
|
||||
if [ -f ~/.zshrc_local ]; then
|
||||
source ~/.zshrc_local
|
||||
|
||||
133
files/init.org
133
files/init.org
@@ -37,12 +37,14 @@ tracking again with:
|
||||
git update-index --no-assume-unchanged init.el
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** Startup
|
||||
=lexical-binding= can improve speed.
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
;;; -*- lexical-binding: t -*-
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** Tangle
|
||||
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
|
||||
@@ -405,7 +407,6 @@ Sometimes I want to see all of my files.
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
||||
|
||||
** Mini buffers
|
||||
*** ivy
|
||||
Ivy - a generic completion frontend for Emacs.
|
||||
@@ -446,12 +447,12 @@ Spice up some of those old buffers.
|
||||
|
||||
|
||||
** ORG MODE <3
|
||||
*** Setup
|
||||
TODO: split up this box
|
||||
*** Setup and keys
|
||||
Bootstrap =org-mode= together with keybindings.
|
||||
=C-c C-t= for =org-todo=.
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(use-package org
|
||||
:straight t
|
||||
;; C-c C-t org rotate
|
||||
:general
|
||||
(vim-leader-def 'normal 'global
|
||||
"oci" 'org-clock-in
|
||||
@@ -462,47 +463,53 @@ TODO: split up this box
|
||||
"oti" 'org-toggle-inline-images
|
||||
"odi" 'org-display-inline-images)
|
||||
:hook
|
||||
;; dont make real spaces at the start
|
||||
(org-mode . (lambda () (electric-indent-local-mode -1)))
|
||||
;; add virtual spaces
|
||||
(org-mode . org-indent-mode)
|
||||
(org-mode . (lambda () (electric-indent-local-mode -1))) ;; dont make real spaces at the start of a line
|
||||
(org-mode . org-indent-mode) ;; add virtual spaces
|
||||
:config
|
||||
(define-key evil-normal-state-map (kbd "TAB") 'org-cycle)
|
||||
(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"))
|
||||
(define-key evil-normal-state-map (kbd "TAB") 'org-cycle)) ;; use TAB to FOLD in every evil-mode
|
||||
#+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
|
||||
(org-babel-do-load-languages 'org-babel-load-languages '((python . t)
|
||||
(shell . t)
|
||||
(haskell . t)
|
||||
(C . t)
|
||||
(dot . t))))
|
||||
(dot . t)))
|
||||
|
||||
(use-package sage-shell-mode
|
||||
:straight t)
|
||||
@@ -512,25 +519,37 @@ Inline code execution is the shit!
|
||||
#+end_src
|
||||
|
||||
*** 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
|
||||
(defun mth/beamer-bold (contents backend info)
|
||||
(when (eq backend 'beamer)
|
||||
(replace-regexp-in-string "\\`\\\\[A-Za-z0-9]+" "\\\\textbf" contents)))
|
||||
#+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
|
||||
(use-package ox
|
||||
:after org
|
||||
:config
|
||||
(add-to-list 'org-export-filter-bold-functions 'mth/beamer-bold)
|
||||
(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)))
|
||||
(add-to-list 'org-latex-logfiles-extensions "tex"))
|
||||
#+end_src
|
||||
|
||||
Show me my math equations inline!
|
||||
Show math equations inline!
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(use-package org-fragtog
|
||||
:straight t
|
||||
@@ -538,7 +557,7 @@ Show me my math equations inline!
|
||||
(org-mode . org-fragtog-mode))
|
||||
#+end_src
|
||||
|
||||
Who needs fancy online tooling anyway...
|
||||
Use graphivz to draw graphs.
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(use-package graphviz-dot-mode
|
||||
:straight t
|
||||
@@ -548,7 +567,15 @@ Who needs fancy online tooling anyway...
|
||||
(setq graphviz-dot-indent-width 4))
|
||||
#+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.
|
||||
Use =(setq inhibit-compacting-font-caches t)=, if performance is low.
|
||||
#+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=
|
||||
|
||||
|
||||
** 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
|
||||
*** spelling
|
||||
@@ -806,7 +848,6 @@ Sjoe my speling misttakes.
|
||||
(text-mode . flyspell-mode))
|
||||
#+end_src
|
||||
|
||||
|
||||
*** math
|
||||
Who needs LaTeX when you can the power of unicode?
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
|
||||
BIN
fonts/PTSans-Regular.ttf
Normal file
BIN
fonts/PTSans-Regular.ttf
Normal file
Binary file not shown.
21
scripts/monitor.sh
Executable file
21
scripts/monitor.sh
Executable 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
|
||||
@@ -1,9 +1,13 @@
|
||||
killall -q polybar
|
||||
connected=$(xrandr --query | grep "DP-3" | grep " connected" | cut -d" " -f1)
|
||||
|
||||
if type "xrandr"; then
|
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||
echo $m
|
||||
MON=$m polybar --reload bar &
|
||||
# workaround to always show tray, when external mon is connected
|
||||
if [ "$m" == "eDP-1" ] && [ "$connected" == "DP-3" ]; then
|
||||
pos="none"
|
||||
fi
|
||||
MON=$m TRAYPOS=$pos polybar --reload bar &
|
||||
pos=
|
||||
done
|
||||
else
|
||||
polybar --reload bar &
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
# SETTINGS {{{ ---
|
||||
|
||||
active_text_color="#5c6773"
|
||||
active_text_color="#ffffff"
|
||||
active_bg=
|
||||
active_underline="#a6cc70"
|
||||
|
||||
inactive_text_color="#5c6773"
|
||||
inactive_text_color="#ffffff"
|
||||
inactive_bg=
|
||||
inactive_underline=
|
||||
|
||||
@@ -167,14 +167,14 @@ generate_window_list() {
|
||||
window_count=$(( window_count + 1 ))
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
# Show the user-selected window property
|
||||
case "$show" in
|
||||
"window_class") w_name="$cls" ;;
|
||||
"window_classname") w_name="$cname" ;;
|
||||
"window_title") w_name="$title" ;;
|
||||
esac
|
||||
|
||||
|
||||
# Use user-selected character case
|
||||
case "$char_case" in
|
||||
"lower") w_name=$(
|
||||
@@ -232,7 +232,7 @@ generate_window_list() {
|
||||
if [ "$window_count" = 0 ]; then
|
||||
printf "%s" "$empty_desktop_message"
|
||||
fi
|
||||
|
||||
|
||||
# Print newline
|
||||
echo ""
|
||||
}
|
||||
|
||||
76
scripts/powermenu.sh
Executable file
76
scripts/powermenu.sh
Executable 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
18
scripts/reload_desktop.sh
Executable 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"
|
||||
Reference in New Issue
Block a user