Initial commit

Joe Bellus 1 year ago
commit 0f58b91f7e

File diff suppressed because it is too large Load Diff

@ -0,0 +1,431 @@
* Desktop File
#+begin_src text :tangle ~/.emacs.d/exwm/exwm.desktop :mkdirp yes
[Desktop Entry]
Name=EXWM
Comment=Emacs Window Manager
Exec=sh /home/joe/.emacs.d/exwm/launch.sh
TryExec=sh
Type=Application
X-LightDM-DesktopName=exwm
DesktopNames=exwm
#+end_src
* Startup Script
#+begin_src sh :tangle ~/.emacs.d/exwm/launch.sh :mkdirp yes :shebang #!/bin/sh
picom --experimental-backend &
exec dbus-launch /usr/bin/emacs -mm --debug-init -l /home/joe/.emacs.d/exwm/exwm.el
#+end_src
* Utility Functions
** Run application in background
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/run-in-background (command)
(let ((command-parts (split-string command "[ ]+")))
(apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
#+end_src
* Polybar
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defvar fs/polybar-process nil
"Holds the process of the running Polybar instance, if any")
(defun fs/kill-panel ()
(interactive)
(when fs/polybar-process
(ignore-errors
(kill-process fs/polybar-process)))
(setq fs/polybar-process nil))
(defun fs/start-panel ()
(interactive)
(fs/kill-panel)
(setq fs/polybar-process (start-process-shell-command "polybar" nil "polybar panel")))
(defun fs/send-polybar-hook (module-name hook-index)
(start-process-shell-command "polybar-msg" nil (format "polybar-msg hook %s %s" module-name hook-index)))
(defun fs/send-polybar-exwm-workspace ()
(fs/send-polybar-hook "exwm-workspace" 1))
#+end_src
* Wallpaper
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/set-wallpaper () (interactive) (start-process-shell-command
"feh" nil "feh --bg-fill /mnt/data-drive/NextCloud/Wallpapers/automata.jpg"))
#+end_src
* Configure Windows
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/exwm-update-class ()
(exwm-workspace-rename-buffer exwm-class-name))
(defun fs/exwm-update-title ()
(pcase exwm-class-name
("Firefox" (exwm-workspace-rename-buffer (format "Firefox: %s" exwm-title)))))
(defun fs/position-window ()
(let* ((pos (frame-position))
(pos-x (car pos))
(pos-y (cdr pos)))
(exwm-floating-move (- pos-x) (- pos-y))))
(defun fs/configure-window-by-class ()
(interactive)
(pcase exwm-class-name
("Sol" (exwm-workspace-move-window 3))
("1password" (exwm-floating-toggle-floating))
("mpv" (exwm-floating-toggle-floating)
(exwm-layout-toggle-mode-line))))
(setq exwm-manage-configurations
'(((member exwm-class-name '("Emacs" "Alacritty")) char-mode t)))
#+end_src
* Desktop Environments
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(use-package desktop-environment
:after exwm
:config
(desktop-environment-mode)
(define-key desktop-environment-mode-map [?\s-l] nil))
:custom
#+end_src
* Update Displays
Fix displays on connect/disconnect
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/update-displays ()
(fs/run-in-background "autorandr --change --force")
(fs/set-wallpaper)
(message "Display config: %s"
(string-trim (shell-command-to-string "autorandr --current"))))
#+end_src
* Setup Displays
Setup initial display settings
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/setup-displays ()
(require 'exwm-randr)
(exwm-randr-enable)
(start-process-shell-command "xrandr" nil " xrandr --output HDMI-0 --primary --mode 3840x2160 --pos 3840x0 --rotate normal --output DVI-D-0 --off --output DP-0 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-1 --off")
(setq exwm-randr-workspace-monitor-plist '(
1 "DP-0"
2 "DP-0"
3 "DP-0"
4 "DP-0"
5 "DP-0"
0 "DVI-D-0"
6 "DVI-D-0"
7 "DVI-D-0"
8 "DVI-D-0"
9 "DVI-D-0"
)))
#+end_src
* Mouse
Sets workspace focus to follow cursor and sets mouse to warp to workspace during change
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/setup-mouse ()
;; Automatically send the mouse cursor to the selected workspace's display
(setq exwm-workspace-warp-cursor t)
;; Window focus should follow the mouse pointer
(setq mouse-autoselect-window t focus-follows-mouse t))
#+end_src
* Pass through keys
These keys will pass through into emacs
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/passthrough-keys ()
;; These keys should always pass through to Emacs
(setq exwm-input-prefix-keys
'(?\C-x
?\C-u
?\M-x
?\M-`
?\M-&
?\M-f
?\M-:
?\C-\s-`
?\s-h
?\s-j
?\s-k
?\s-l
?\s-r
?\s-c
?\C-\ )))
#+end_src
* Global Keys
Global keybinds. These keybinds always work no matter the application or input state
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/global-keys ()
(setq exwm-input-global-keys
`(
;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard)
([?\s-r] . exwm-reset)
([?\s-c] . exwm-input-release-keyboard)
([?\s-`] . counsel-switch-buffer)
([?\s-f] . exwm-floating-toggle-floating)
;; Move between windows
([?\s-h] . windmove-left)
([?\s-l] . windmove-right)
([?\s-k] . windmove-up)
([?\s-q] . kill-current-buffer)
([?\s-j] . windmove-down)
;; Launch applications via shell command
([?\s-&] . (lambda (command)
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command)))
;; Switch workspace
([?\s-w] . exwm-workspace-switch)
;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9)
,@(mapcar (lambda (i)
`(,(kbd (format "s-%d" i)) .
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
(number-sequence 0 9))))
(exwm-input-set-key (kbd "s-SPC") 'counsel-linux-app))
#+end_src
* Key overrides
Override various keys that are begin set by packages and are conflicting with window management.
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/key-overrides ()
;;override keybinding for lsp mode
(define-key lsp-mode-map [?\s-l] 'windmove-right))
#+end_src
* Exwm Configuration
#+begin_src emacs-lisp :tangle ~/.emacs.d/exwm/exwm.el
(defun fs/exwm-init-hook ()
;; Make workspace 1 be the one where we land at startup
(exwm-workspace-switch-create 1)
;; Open eshell by default
;;(eshell)
;; Launch apps that will run in the background
(fs/run-in-background "pasystray")
(fs/run-in-background "blueman-applet")
(fs/run-in-background "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloud com.nextcloud.desktopclient.nextcloud")
(fs/run-in-background "1password --silent"))
(use-package exwm
:config
;; Set the default number of workspaces
(setq exwm-workspace-number 5)
;; When window "class" updates, use it to set the buffer name
(add-hook 'exwm-update-class-hook #'fs/exwm-update-class)
;; When window title updates, use it to set the buffer name
(add-hook 'exwm-update-title-hook #'fs/exwm-update-title)
;; Configure windows as they're created
(add-hook 'exwm-manage-finish-hook #'fs/configure-window-by-class)
;; When EXWM starts up, do some extra confifuration
(add-hook 'exwm-init-hook #'fs/exwm-init-hook)
(fs/setup-displays)
(add-hook 'exwm-randr-screen-change-hook #'fs/update-displays)
(add-hook 'exwm-workspace-switch-hook #'fs/send-polybar-exwm-workspace)
(fs/update-displays)
(fs/set-wallpaper)
(fs/start-panel)
(fs/setup-mouse)
(fs/passthrough-keys)
(fs/global-keys)
(fs/key-overrides)
;; Ctrl+Q will enable the next key to be sent directly
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
(exwm-enable))
#+end_src
* Polybar
Docs: https://github.com/polybar/polybar
#+begin_src conf :tangle ~/.config/polybar/config :mkdirp yes
[settings]
screenchange-reload = true
[global/wm]
margin-top = 0
margin-bottom = 0
[colors]
background = #f0232635
background-alt = #576075
foreground = #A6Accd
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
underline-1 = #c792ea
[bar/panel]
width = 100%
height = 35
offset-x = 0
offset-y = 0
fixed-center = true
enable-ipc = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2
line-color = #f00
border-size = 0
border-color = #00000000
padding-top = 5
padding-left = 1
padding-right = 5
module-margin = 1
font-0 = "Cantarell:size=18:weight=bold;2"
font-1 = "Font Awesome:size=14;2"
font-2 = "Material Icons:size=20;5"
font-3 = "Fira Mono:size=13;-3"
modules-left = exwm-workspace
modules-right = memory cpu temperature date
tray-position = right
tray-padding = 2
tray-maxsize = 28
cursor-click = pointer
cursor-scroll = ns-resize
[module/exwm-workspace]
type = custom/ipc
hook-0 = emacsclient -e "exwm-workspace-current-index" | sed -e 's/^"//' -e 's/"$//'
initial = 1
format-underline = ${colors.underline-1}
format-padding = 1
[module/cpu]
type = internal/cpu
interval = 2
format = <label> <ramp-coreload>
format-underline = ${colors.underline-1}
click-left = emacsclient -e "(proced)"
label = %percentage:2%%
ramp-coreload-spacing = 0
ramp-coreload-0 = ▁
ramp-coreload-0-foreground = ${colors.foreground-alt}
ramp-coreload-1 = ▂
ramp-coreload-2 = ▃
ramp-coreload-3 = ▄
ramp-coreload-4 = ▅
ramp-coreload-5 = ▆
ramp-coreload-6 = ▇
[module/memory]
type = internal/memory
interval = 30
format-underline = ${colors.underline-1}
click-left = emacsclient -e "(proced)"
label = %gb_free%
ramp-coreload-spacing = 0
ramp-coreload-0 = ▁
ramp-coreload-0-foreground = ${colors.foreground-alt}
ramp-coreload-1 = ▂
ramp-coreload-2 = ▃
ramp-coreload-3 = ▄
ramp-coreload-4 = ▅
ramp-coreload-5 = ▆
ramp-coreload-6 = ▇
[module/date]
type = internal/date
interval = 5
date = "%a %b %e"
date-alt = "%A %B %d %Y"
time = %l:%M %p
time-alt = %H:%M:%S
format-prefix-foreground = ${colors.foreground-alt}
format-underline = ${colors.underline-1}
label = %date% %time%
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 98
time-format = %-l:%M
label-charging = %percentage%% / %time%
format-charging = <animation-charging> <label-charging>
format-charging-underline = ${colors.underline-1}
label-discharging = %percentage%% / %time%
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full = <ramp-capacity> <label-full>
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <label>
format-underline = ${colors.underline-1}
format-warn = <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%!
label-warn-foreground = ${colors.secondary}
#+end_src
** Launch Script
#+begin_src sh :tangle ~/.config/polybar/launch.sh :mkdirp yes :shebang #!/bin/sh
BAR_NAME=panel
IFS=$'\n'
for item in $(polybar --list-monitors); do
MONITOR=$(echo $item | cut -d" " -f1 | cut -d":" -f1)
IS_PRIMARY=$(echo $item | cut -d" " -f3)
if [[ $IS_PRIMARY == *"primary"* ]]; then
TRAY_POSITION=right MONITOR=$MONITOR polybar --reload $BAR_NAME &
else
MONITOR=$MONITOR polybar --reload $BAR_NAME &
fi
done
#+end_src

@ -0,0 +1,21 @@
#+TITLE: Kitty Terminal Configuration
#+PROPERTY: header-args+ :tangle ~/.config/kitty/kitty.conf :mkdirp yes
* Fonts
#+begin_src conf
font_size 16.0
font_family FiraCode Nerd Font
bold_font auto
italic_font auto
bold_italic_font auto
#+end_src
* Cursor
#+begin_src conf
cursor_shape beam
#+end_src
* Color
#+begin_src conf
background #222222
#+end_src

@ -0,0 +1,206 @@
* Dunst
#+begin_src conf :tangle ~/.config/dunst/dunstrc :mkdirp yes
[global]
### Display ###
monitor = 0
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
geometry = "500x10-10+50"
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = no
# The transparency of the window. Range: [0; 100].
transparency = 10
# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised
# to the font height and padding.
notification_height = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 1
separator_color = frame
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 8
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 0
# Defines color of the frame around the notification window.
frame_color = "#89AAEB"
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
idle_threshold = 120
### Text ###
font = Cantarell 12
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# Stack together notifications with the same content
stack_duplicates = true
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
### Icons ###
# Align icons left/right/off
icon_position = left
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 88
# Paths to default icons.
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/:/usr/share/icons/Adwaita/16x16/legacy/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = no
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# Browser for opening urls in context menu.
browser = qutebrowser
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Dunst
# Define the class of the windows spawned by dunst
class = Dunst
startup_notification = false
verbosity = mesg
# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0
mouse_left_click = close_current
mouse_middle_click = do_action
mouse_right_click = close_all
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
#close = ctrl+space
# Close all notifications.
#close_all = ctrl+shift+space
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1". Make sure this key actually exists on your keyboard layout,
# e.g. check output of 'xmodmap -pke'
history = ctrl+grave
# Context menu.
context = ctrl+shift+period
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#222222"
foreground = "#888888"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#icon = /path/to/icon
[urgency_normal]
background = "#1c1f26"
foreground = "#ffffff"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#icon = /path/to/icon
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#icon = /path/to/icon
#+end_src

@ -0,0 +1,409 @@
#+TITLE: Picom Configuration
#+PROPERTY: header-args+ :tangle ~/.config/picom.conf :mkdirp yes
* Corners
#+begin_src conf
# corner-radius = 12;
# rounded-corners-exclude = [
# #"window_type = 'normal'",
# "class_g = 'Rofi'",
# #"class_g = 'Tint2'",
# "name = 'Notification area'",
# #"class_g = 'kitty'",
# #"class_g = 'Alacritty'",
# "class_g = 'Polybar'",
# "class_g = 'code-oss'",
# "class_g = 'firefox'",
# "class_g = 'Thunderbird'",
# "name = 'xmobar'",
# "class_g = 'dmenu'"
# ];
# round-borders = 1;
# round-borders-exclude = [
# #"class_g = 'TelegramDesktop'",
# ];
#+end_src
* Shadows
Enable client-side shadows on windows
#+begin_src conf
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
shadow-radius = 12;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
shadow-offset-x = -15;
# The top offset for shadows, in pixels. (defaults to -15)
shadow-offset-y = -15;
# Avoid drawing shadows on dock/panel windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dock-shadow = false
# Don't draw shadows on drag-and-drop windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dnd-shadow = false
# Red color value of shadow (0.0 - 1.0, defaults to 0).
shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
shadow-blue = 0
# Specify a list of conditions of windows that should have no shadow.
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
];
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#+end_src
* Fading
Fade windows in and out on open and close
#+begin_src conf
fading = true
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
fade-in-step = 0.028;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
fade-out-step = 0.028;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 10
# Specify a list of conditions of windows that should not be faded.
fade-exclude = []
# Do not fade on window open/close.
no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
no-fading-destroyed-argb = false
#+end_src
* Transparency & Opacity
#+begin_src conf
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
inactive-opacity = 0.9;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
frame-opacity = 1.0;
# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
# menu-opacity = 1.0
# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
# inactive-opacity-override = true
inactive-opacity-override = true;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.3
# Specify a list of conditions of windows that should always be considered focused.
# focus-exclude = []
focus-exclude = [
"class_g = 'Cairo-clock'",
"name *= 'Hulu'",
"name = 'Picture in picture'"
];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
opacity-rule = [
"90:class_g = 'URxvt' && focused",
"60:class_g = 'URxvt' && !focused",
"100:name = 'Picture in picture'",
"100:name *= 'Oracle'"
]
#+end_src
* Background Bluring
#+begin_src conf
# Parameters for background blurring, see the *BLUR* section for more information.
blur_method = "dual_kawase"
blur_deviation = true
blur-size = 12
#
# blur-deviation = false
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
blur-background = true;
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
blur-background-frame = true;
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ''
# blur-kern = "3x3box";
# # Exclude conditions for background blur.
# # blur-background-exclude = []
# blur-background-exclude = [
# "window_type = 'dock'",
# "window_type = 'desktop'",
# "_GTK_FRAME_EXTENTS@:c"
# ];
#+end_src
* General
#+begin_src conf
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
backend = "glx"
# Enable/disable VSync.
# vsync = false
vsync = true
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = false;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Specify refresh rate of the screen. If not specified or 0, picom will
# try detecting this with X RandR extension.
#
refresh-rate = 0
# refresh-rate = 0
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to
# boost performance. This should not be used with
# vsync drm/opengl/opengl-oml
# as they essentially does sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#
# sw-opti =
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
# detect-transient is enabled, too.
#
# detect-client-leader = false
detect-client-leader = true
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
# glx-fshader-win = ''
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = '/path/to/your/log/file'
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = '/path/to/your/log/file'
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};
#+end_src

@ -0,0 +1,5 @@
#+TITLE: Rotate Wallpapers
#+begin_src sh :tangle ~/.local/bin/rotate_wallpaper :mkdirp yes :shebang #!/bin/sh
feh --bg-fill --randomize /mnt/data-drive/NextCloud/Wallpapers
#+end_src

@ -0,0 +1,101 @@
#+TITLE: Starship Configuration
#+PROPERTY: header-args+ :tangle ~/.config/starship.toml
#+PROPERTY: header-args+ :mkdirp yes
* General
Insert new line between prompts
#+begin_src
add_newline = true
format = "$all"
#+end_src
* Git
#+begin_src
[git_state]
format = '[\($state($progress_current of $progress_total)\)]($style) '
cherry_pick = "[🍒 PICKING](bold red)"
#+end_src
* Symbols
#+begin_src
[aws]
symbol = " "
[conda]
symbol = " "
[dart]
symbol = " "
[directory]
read_only = " "
[docker_context]
symbol = " "
[elixir]
symbol = " "
[elm]
symbol = " "
[git_branch]
symbol = " "
[golang]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[julia]
symbol = " "
[memory_usage]
symbol = " "
[nim]
symbol = " "
[nix_shell]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
[perl]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[scala]
symbol = " "
[shlvl]
symbol = " "
[swift]
symbol = "ﯣ "
#+end_src
* Rust
#+begin_src toml
[rust]
format = "via [⚙️ $version](red bold)"
symbol = "🦀 "
#+end_src
*

@ -0,0 +1,525 @@
#+TITLE: Xmonad Config
#+PROPERTY: header-args+ :tangle ~/.xmonad/xmonad.hs :mkdirp yes
* Imports
#+begin_src haskell
import XMonad
import Data.Monoid
import System.Exit
import XMonad.Util.SpawnOnce
import XMonad.Util.Run
import XMonad.Layout.NoBorders
import XMonad.Hooks.ManageDocks ( avoidStruts, docks, manageDocks, Direction2D(D, L, R, U) )
import XMonad.Hooks.ManageHelpers ( doFullFloat, isFullscreen )
import XMonad.Layout.Spacing ( spacingRaw, Border(Border) )
import XMonad.Layout.Gaps ( Direction2D(D, L, R, U), gaps, setGaps, GapMessage(DecGap, ToggleGaps, IncGap) )
import qualified XMonad.StackSet as W
import qualified Data.Map as M
#+end_src
* Config Variables
#+begin_src haskell
myTerminal = "kitty"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
-- Whether clicking on a window to focus also passes the click to the window
myClickJustFocuses :: Bool
myClickJustFocuses = False
-- Width of the window border in pixels.
myBorderWidth = 0
-- Mod key set to super key
myModMask = mod4Mask
myWorkspaces = ["web","dev","chat","4","5","6","7","8","9"]
-- Border colors
myNormalBorderColor = "#3b4252"
myFocusedBorderColor = "#bc96da"
#+end_src
* Keybindings
#+begin_src haskell
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
-- launch dmenu
, ((modm, xK_space ), spawn "dmenu_run")
-- , ((modm, xK_space ), spawn "rofi -show drun -modi drun -theme ~/.config/rofi/rofi-collection/dracula/dracula.rasi")
-- close focused window
, ((modm, xK_q ), kill)
-- Rotate through the available layout algorithms
, ((modm .|. shiftMask, xK_n ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((modm, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm, xK_Return), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm, xK_l ), sendMessage Expand)
-- Push window back into tiling
, ((modm, xK_t ), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Volume control
, ((0, 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0, 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0, 0x1008FF12), spawn "amixer set Master toggle")
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
-- , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modm .|. shiftMask, xK_r ), spawn "xmonad --recompile; xmonad --restart")
-- Run xmessage with a summary of the default keybindings (useful for beginners)
, ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -"))
]
++
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_o, xK_p, xK_i] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
#+end_src
* Mouse bindings
#+begin_src haskell
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
#+end_src
* Layout
#+begin_src haskell
myLayout = avoidStruts(tiled ||| Full)
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
delta = 3/100
#+end_src
* Window Rules
#+begin_src haskell
-- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
#+end_src
* Event Handling
#+begin_src haskell
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
--
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
myEventHook = mempty
#+end_src
* Logging
#+begin_src haskell
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
myLogHook = return ()
#+end_src
* Startup
#+begin_src haskell
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
myStartupHook = do
spawnOnce "picom"
spawnOnce "feh --bg-fill /mnt/data-drive/NextCloud/Wallpapers/automata.jpg"
spawnOnce " xrandr --output DVI-D-0 --mode 3840x2160 --pos 6400x0 --rotate normal --output HDMI-0 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-0 --primary --mode 2560x1440 --pos 3840x0 --rotate normal --output DP-1 --off"
spawnOnce "dunst"
spawnOnce "stalonetray"
spawnOnce "nextcloud"
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
#+end_src
* Main Configuration
#+begin_src haskell
main = do
xmproc <- spawnPipe "xmobar -x 0 /home/joe/.config/xmobar/0.rc"
xmproc <- spawnPipe "xmobar -x 1 /home/joe/.config/xmobar/1.rc"
xmproc <- spawnPipe "xmobar -x 2 /home/joe/.config/xmobar/2.rc"
xmproc <- spawnPipe "/usr/bin/emacs --daemon"
xmonad $ docks defaults
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
defaults = def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = gaps [(L,30), (R,30), (U,40), (D,30)] $ spacingRaw True (Border 10 10 10 10) True (Border 10 10 10 10) True $ smartBorders $ myLayout,
manageHook = myManageHook,
handleEventHook = myEventHook,
logHook = myLogHook,
startupHook = myStartupHook
}
-- | Finally, a copy of the default bindings in simple textual tabular format.
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"",
"-- launching and killing programs",
"mod-Shift-Enter Launch xterminal",
"mod-p Launch dmenu",
"mod-Shift-c Close/kill the focused window",
"mod-Space Rotate through the available layout algorithms",
"mod-Shift-Space Reset the layouts on the current workSpace to default",
"mod-n Resize/refresh viewed windows to the correct size",
"",
"-- move focus up or down the window stack",
"mod-Tab Move focus to the next window",
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window",
"mod-k Move focus to the previous window",
"mod-m Move focus to the master window",
"",
"-- modifying the window order",
"mod-Return Swap the focused window and the master window",
"mod-Shift-j Swap the focused window with the next window",
"mod-Shift-k Swap the focused window with the previous window",
"",
"-- resizing the master/slave ratio",
"mod-h Shrink the master area",
"mod-l Expand the master area",
"",
"-- floating layer support",
"mod-t Push window back into tiling; unfloat and re-tile it",
"",
"-- increase or decrease number of windows in the master area",
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area",
"",
"-- quit, or restart",
"mod-Shift-q Quit xmonad",
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N",
"",
"-- Workspaces & screens",
"mod-Shift-[1..9] Move client to workspace N",
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
"",
"-- Mouse bindings: default actions bound to mouse events",
"mod-button1 Set the window to floating mode and move by dragging",
"mod-button2 Raise the window to the top of the stack",
"mod-button3 Set the window to floating mode and resize by dragging"]
#+end_src
* Xmobar Screen 0 (Center)
#+begin_src haskell :tangle ~/.config/xmobar/0.rc :mkdirp yes
Config {
-- appearance
font = "xft:Bitstream Vera Sans Mono:size=9:bold:antialias=true"
, bgColor = "black"
, fgColor = "#646464"
, position = Top
, border = BottomB
, borderColor = "#646464"
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "%front% %KORL% } %date% {%alsa:default:Master%"
-- general behavior
, lowerOnStart = True -- send to bottom of window stack on start
, hideOnStart = False -- start with window unmapped (hidden)
, allDesktops = True -- show on all desktops
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
, pickBroadest = False -- choose widest display (multi-monitor)
, persistent = True -- enable/disable hiding (True = disabled)
-- plugins
-- Numbers can be automatically colored according to their value. xmobar
-- decides color based on a three-tier/two-cutoff system, controlled by
-- command options:
-- --Low sets the low cutoff
-- --High sets the high cutoff
--
-- --low sets the color below --Low cutoff
-- --normal sets the color between --Low and --High cutoffs
-- --High sets the color above --High cutoff
--
-- The --template option controls how the plugin is displayed. Text
-- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands = [
-- weather monitor
Run Weather "KORL" [ "--template", "<skyCondition> | <fc=#4682B4><tempF></fc>°F | <fc=#4682B4><rh></fc>%"
] 36000
, Run Com "echo" [" "] "front" 3600
, Run Alsa "default" "Master" []
-- time and date indicator
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
, Run Date "<fc=#ABABAB>%F (%a) %T</fc>" "date" 10
]
}
#+end_src
* Xmobar Screen 1 (Left)
#+begin_src haskell :tangle ~/.config/xmobar/2.rc :mkdirp yes
Config {
-- appearance
font = "xft:Bitstream Vera Sans Mono:size=9:bold:antialias=true"
, bgColor = "black"
, fgColor = "#999"
, position = Top
, border = BottomB
, borderColor = "#646464"
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "%front% %multicpu% | %memory% | %disku% | %dynnetwork% } {"
-- general behavior
, lowerOnStart = True -- send to bottom of window stack on start
, hideOnStart = False -- start with window unmapped (hidden)
, allDesktops = True -- show on all desktops
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
, pickBroadest = False -- choose widest display (multi-monitor)
, persistent = True -- enable/disable hiding (True = disabled)
-- plugins
-- Numbers can be automatically colored according to their value. xmobar
-- decides color based on a three-tier/two-cutoff system, controlled by
-- command options:
-- --Low sets the low cutoff
-- --High sets the high cutoff
--
-- --low sets the color below --Low cutoff
-- --normal sets the color between --Low and --High cutoffs
-- --High sets the color above --High cutoff
--
-- The --template option controls how the plugin is displayed. Text
-- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands = [
Run Date "<fc=#ABABAB>%F (%a) %T</fc>" "date" 10
, Run Com "echo" [" "] "front" 3600
, Run DiskU [("/", "main: <free>"), ("/mnt/data-drive", "data: <free>")] [] 60
-- network activity monitor (dynamic interface resolution)
, Run DynNetwork [ "--template" , "<dev>: <tx>kB/s|<rx>kB/s"
, "--Low" , "1000" -- units: B/s
, "--High" , "5000" -- units: B/s
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
-- cpu activity monitor
, Run MultiCpu [ "--template" , "Cpu: <total>%"
, "--Low" , "50" -- units: %
, "--High" , "85" -- units: %
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
-- cpu core temperature monitor
, Run CoreTemp [ "--template" , "Temp: <core0>°C|<core1>°C"
, "--Low" , "70" -- units: °C
, "--High" , "80" -- units: °C
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 50
-- memory usage monitor
, Run Memory [ "--template" ,"Mem: <usedratio>%"
, "--Low" , "20" -- units: %
, "--High" , "90" -- units: %
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
]
}
#+end_src
* Xmobar Screen 1 (Right)
#+begin_src haskell :tangle ~/.config/xmobar/1.rc :mkdirp yes
Config {
-- appearance
font = "xft:Bitstream Vera Sans Mono:size=9:bold:antialias=true"
, bgColor = "black"
, fgColor = "#646464"
, position = Top
, border = BottomB
, borderColor = "#646464"
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "} %date% {"
-- general behavior
, lowerOnStart = True -- send to bottom of window stack on start
, hideOnStart = False -- start with window unmapped (hidden)
, allDesktops = True -- show on all desktops
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
, pickBroadest = False -- choose widest display (multi-monitor)
, persistent = True -- enable/disable hiding (True = disabled)
-- plugins
-- Numbers can be automatically colored according to their value. xmobar
-- decides color based on a three-tier/two-cutoff system, controlled by
-- command options:
-- --Low sets the low cutoff
-- --High sets the high cutoff
--
-- --low sets the color below --Low cutoff
-- --normal sets the color between --Low and --High cutoffs
-- --High sets the color above --High cutoff
--
-- The --template option controls how the plugin is displayed. Text
-- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands = [
Run Date "<fc=#ABABAB>%F (%a) %T</fc>" "date" 10
]
}
#+end_src
* Tray Configuration
#+begin_src conf :tangle ~/.stalonetrayrc
decorations none
transparent false
dockapp_mode none
geometry 5x1-25+0
background "#000000"
kludges force_icons_size
grow_gravity NE
icon_gravity NE
icon_size 26
sticky true
#window_strut none
window_type dock
window_layer bottom
no_shrink false
skip_taskbar true
#+end_src

@ -0,0 +1,72 @@
#+TITLE: ZSH Environment
#+PROPERTY: header-args+ :tangle ~/.zshenv
#+PROPERTY: header-args+ :mkdirp yes
* Cargo Setup
#+begin_src sh
. "$HOME/.cargo/env"
#+end_src
* Aliases
** GIT
#+begin_src sh
alias g=git
alias gst= git status
#+end_src
** NVIM
#+begin_src sh
alias v=nvim
#+end_src
** Overrides
#+begin_src sh
alias mkdir="mkdir -pv"
#+end_src
** Utilities
*** Check for large files
#+begin_src sh
function sizecheck() {
if [ -n "$1" ]
then
du -s -BM "$1" | sort -n -r | head -n 10
else
du -s -BM * | sort -n -r | head -n 10
fi
}
#+end_src
*** Test docker files
#+begin_src sh
function docker_test() {
echo "------- BUILDING --------"
docker build -t "$1" .
echo "------- RUNNING --------"
docker run -it --rm "$1"
echo "------- CLEANING UP --------"
docker rmi "$1"
}
#+end_src
* Shell Improvements
** Zoxide
#+begin_src sh
eval "$(zoxide init zsh)"
export EDITOR=nvim
#+end_src
* Go
#+begin_src sh
export PATH="$PATH:$HOME/go/bin"
export GOPRIVATE=*github.com/quikserve*
export GOPATH="$HOME/go"
#+end_src
* KDEConnect
#+begin_src sh
function send-pixel() {
kdeconnect-cli -d $(kdeconnect-cli -l --id-only) --share $1
}
#+end_src

@ -0,0 +1,33 @@
#+TITLE: ZSH Runcon
#+PROPERTY: header-args+ :tangle ~/.zshrc
#+PROPERTY: header-args+ :mkdirp yes
* Manjaro Configuration
#+begin_src sh
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
source /usr/share/zsh/manjaro-zsh-prompt
fi
#+end_src
* Appearance
** Prompt
*** Powerline
#+begin_src sh
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
USE_POWERLINE="true"
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
#+end_src
* Alias Overrides
#+begin_src sh
alias ls=exa
alias cat=bat
#+end_src
Loading…
Cancel
Save