Compare commits

...

136 Commits

Author SHA1 Message Date
Joachim Nielandt
d0fdfed6fd added bandwidth 2024-04-22 10:43:45 +02:00
Joachim Nielandt
b078df4ab8 latest updates 2024-03-15 19:25:56 +01:00
Joachim Nielandt
c985dce6eb Getting comfy in sway 2023-08-30 22:17:40 +02:00
Joachim Nielandt
46df8b7b62 Working on sway changes. 2023-08-23 09:44:16 +02:00
Joachim Nielandt
73b2c72eb0 Fixed ordering for vim zsh bindings 2023-06-08 10:58:02 +02:00
Joachim Nielandt
0c542bbfda Added vimrc and cleanup of zshrc 2023-06-06 13:18:02 +02:00
Joachim Nielandt
271506e2e0 Added sworkstyle and wofi 2023-05-25 10:02:37 +02:00
Joachim Nielandt
0982f4c655 Added work in progress 2023-05-25 10:02:22 +02:00
Joachim Nielandt
f1020825ce Adding stuff. 2023-05-18 20:32:53 +02:00
Joachim Nielandt
b8a9c2bd60 Added mako config 2023-05-18 15:00:42 +02:00
Joachim Nielandt
5966613dfa added swappy 2023-05-18 15:00:24 +02:00
Joachim Nielandt
e26a85f3a9 Added daemons etc 2023-05-18 14:31:04 +02:00
Joachim Nielandt
33f1469afa Audio menu 2023-05-18 13:23:58 +02:00
Joachim Nielandt
9b54911fbf color modification 2023-05-18 11:56:41 +02:00
Joachim Nielandt
c35e40893b Added shutdown mode 2023-05-18 11:53:33 +02:00
Joachim Nielandt
540f3fd989 set step size resize 2023-05-18 11:48:04 +02:00
Joachim Nielandt
bd40b3cdd5 Added resize mode 2023-05-18 11:45:28 +02:00
Joachim Nielandt
258d6f2c4d direction / alternative direction 2023-05-18 11:16:41 +02:00
Joachim Nielandt
1f3ac280d0 integrating manjaro sway config 2023-05-18 11:12:13 +02:00
Joachim Nielandt
74adfecd48 Moving keybindings 2023-05-18 08:32:30 +02:00
Joachim Nielandt
1e29d375de Added foot 2023-05-18 08:03:51 +02:00
Joachim Nielandt
4700eeae1a wallpaper 2023-05-18 08:00:20 +02:00
Joachim Nielandt
f591d917af Added wayland var 2023-05-18 07:58:46 +02:00
Joachim Nielandt
aa2eaa35a2 Cleaning up setup 2023-05-16 13:49:17 +02:00
Joachim Nielandt
14e44eea95 Fixed icon sizing 2023-05-08 10:07:37 +02:00
Joachim Nielandt
b2947d2275 Updated battery definition to latest. 2023-05-07 10:17:15 +02:00
Joachim Nielandt
a36c80eb72 Cleanup 2023-05-07 09:49:57 +02:00
Joachim Nielandt
e793e78c72 Fixed backspace issue 2023-05-07 09:48:51 +02:00
Joachim Nielandt
5b7381e682 Starting fresh with zshrc. Need to include (parts of) old customs. 2023-05-07 09:43:50 +02:00
Joachim Nielandt
dd89164dee Synced old p10k with new generated file. 2023-05-07 09:43:29 +02:00
Joachim Nielandt
8f7e680e92 Fixed minor things. 2023-05-06 08:53:03 +02:00
Joachim Nielandt
4df385648b Fixed 'dancing font' in line numbers 2023-05-03 11:38:37 +02:00
Joachim Nielandt
0fa84e6192 Added ideavimrc dotfile 2023-05-03 11:37:55 +02:00
Joachim Nielandt
69d941f8e6 Updated doom config 2023-04-27 13:33:33 +02:00
Joachim Nielandt
ad700ec86c Set default shell in alacritty 2023-04-26 13:14:42 +02:00
Joachim Nielandt
9153d8d1a8 Added keyring init. 2023-04-26 13:11:19 +02:00
Joachim Nielandt
afa126f2ef Migration in progress. 2023-04-26 08:56:51 +02:00
Joachim Nielandt
fd14552ab6 Fixed comment. 2023-04-25 15:40:26 +02:00
Joachim Nielandt
8f41d1cf2c Latest changes to sway config. 2022-06-29 11:20:30 +02:00
Joachim Nielandt
c9ad912e2a Cleaned up sway config. 2022-06-28 22:45:28 +02:00
Joachim Nielandt
57232ecc13 Did some cleanup for sway. 2022-06-28 22:38:55 +02:00
Joachim Nielandt
15ddaf5f46 Replaced color 2022-06-28 20:52:00 +02:00
Joachim Nielandt
4af84a42b7 Trying sway again. 2022-06-28 20:49:43 +02:00
Joachim Nielandt
f74a21df78 Moving to alacritty, cleaning up font/size 2022-06-28 17:34:57 +02:00
Joachim Nielandt
ed733f17a0 Added dep 2022-06-28 15:29:44 +02:00
Joachim Nielandt
003a57740f Stuff. You know how this goes. 2022-06-28 14:14:27 +02:00
Joachim Nielandt
8d5150f04c fixed console font, added dep, set network for nielanjo 2022-06-24 16:43:35 +02:00
Joachim Nielandt
03b6ee0f3f added dep 2022-06-24 13:59:29 +02:00
Joachim Nielandt
e9d42034fa added dep 2022-06-24 12:13:06 +02:00
Joachim Nielandt
d56f8b6acb added dep 2022-06-24 11:59:42 +02:00
Joachim Nielandt
c9c210608e Merge branch 'master' of ssh://git.nielandt.be:2222/joachim/chezmoi 2022-06-24 11:45:39 +02:00
Joachim Nielandt
a4f24424d2 Added package 2022-06-24 11:45:18 +02:00
Joachim Nielandt
09c62054e7 Added dep 2022-06-24 11:44:53 +02:00
Joachim Nielandt
2b0b9234fd Added dep. 2022-06-23 22:29:24 +02:00
Joachim Nielandt
e8961cc4d2 Added deps. 2022-06-23 22:26:40 +02:00
Joachim Nielandt
fa66c9a9db Moved more stuff from dotfiles. 2022-06-23 22:24:48 +02:00
Joachim Nielandt
63cead81a1 Fixed ohmyzsh location. 2022-06-23 22:14:09 +02:00
Joachim Nielandt
c2e2174441 Fixed dotfiles error. 2022-06-23 22:12:56 +02:00
Joachim Nielandt
3a7492cb16 Moved i3/polybar/ohmyzsh/rofi out of .dotfiles 2022-06-23 22:10:10 +02:00
Joachim Nielandt
29c8f990a0 Cleaning up. 2022-06-23 20:56:02 +02:00
Joachim Nielandt
2a61c4f4bd doom font fix, org templates, i3 picom fix 2022-06-21 11:12:37 +02:00
Joachim Nielandt
45eac401de Working on manjaro. Back to i3! 2022-06-10 11:37:04 +02:00
Joachim Nielandt
6149f2d491 Using light, cleaning up org templates, ... 2022-06-08 22:06:09 +02:00
Joachim Nielandt
f3c2946dc5 Added date 2022-06-08 17:15:35 +02:00
Joachim Nielandt
b806aadaae Working on config. 2022-06-08 16:48:41 +02:00
Joachim Nielandt
138ec836b8 Added alacritty to chezmoi. 2022-06-08 16:35:51 +02:00
Joachim Nielandt
48441e5bfc Got some initial waybar style working. 2022-06-08 16:33:03 +02:00
Joachim Nielandt
2a4eba5449 Fixing up waybar styling. 2022-06-08 16:23:38 +02:00
Joachim Nielandt
f0195aaf41 Playing around with sway(bar) 2022-06-06 23:01:30 +02:00
c348025666 Started modifying the templates. 2022-05-29 20:59:24 +02:00
6a42718f36 Fixed person note template. 2022-05-29 20:14:13 +02:00
ba1629a301 Added some stuff. 2022-05-29 20:09:50 +02:00
15276b7946 Testing emacs chezmoi integration. 2022-05-28 19:50:46 +02:00
b0ef1cacdd Moved omz to zgenom package manager. Some doom changes. 2022-05-28 19:45:08 +02:00
90bf84b255 kiAdded init file. 2022-05-28 14:42:40 +02:00
535919afbb Moved from zinit to zgenom. 2022-05-28 14:18:21 +02:00
0196190666 Cleaned up power notifications, added package, ... 2022-03-11 10:14:27 +01:00
5dbad776a9 Forgot what I did, but it surely needs committing! 2022-03-08 15:51:52 +01:00
606d822aa6 Added some doom packages. 2022-02-25 11:07:30 +01:00
0f9873af19 Did stuff. 2022-01-31 12:34:56 +01:00
aec5889fb6 Added doom config. 2022-01-21 15:24:22 +01:00
49e0469b98 Added doom config. 2022-01-13 12:13:06 +01:00
9e8b32c2d9 Added scripts to path, added selection copy. 2021-12-07 17:00:27 +01:00
6d3e53c68b Added dunst hotkey for replay history. 2021-12-07 12:07:27 +01:00
4ec9e26228 Added df to polybar. 2021-11-15 09:50:52 +01:00
b90822c651 Modified color reboot check, added dddu alias. 2021-11-15 08:50:03 +01:00
5f66f72a83 Added reflector pacman update script. 2021-11-14 12:25:15 +01:00
3219739e8e Added dep 2021-11-09 16:09:24 +01:00
e76bbe3ab1 Fixed print. 2021-11-08 15:09:03 +01:00
cfa3a422ab Modified pulseaudio controls. 2021-11-08 15:07:35 +01:00
38371d0519 Cleaned up updates in polybar. 2021-11-08 11:16:49 +01:00
26b6361793 Added dependency installer. To be updated. 2021-11-08 11:05:22 +01:00
205cd49bf4 Added some scripts to update and diff polybar scripts. 2021-11-08 11:00:41 +01:00
11c51544b9 Removed the polybar-scripts repo from this repository.
- from now on: pull polybar-scripts into ~/.config
- any desired scripts are copied into $CHEZMOI/polybar/polybar-scripts
- then, check for differences between $CHEZMOI/polybar/polybar-scripts
- TODO perform these diff checks using a script
2021-11-08 10:50:56 +01:00
5a2d143831 Fixed sdkman + added interface names to polybar 2021-11-04 09:27:50 +01:00
2cbfd6d5c7 Modified monitor menu i3.
- supporting brightness changes (using brightnessctl)
- supporting redshift values (using redshift)
2021-11-02 09:00:05 +01:00
35c2f22ed9 Removed ripgrep from plugins, caused issue. 2021-10-29 17:14:48 +02:00
6d1b4a30b2 Added blueman applet. 2021-10-29 17:13:23 +02:00
dad00eb174 Fixed dunst. 2021-10-29 13:11:54 +02:00
3a6e303eb3 Modifying README.md with chezmoi now. 2021-10-29 11:48:54 +02:00
dd925d6891 Added default programs, cleanup 2021-10-29 08:39:50 +02:00
18ed1ad83e Added default workspace positioning. 2021-10-28 16:47:22 +02:00
1caf4dce59 No more opacity on unfoused windows, annoying on multi monitor. 2021-10-28 10:44:22 +02:00
7676beb4c2 Updated i3lock config to latest version. 2021-10-27 10:38:14 +02:00
257b9fba2d Added default gruvbox theme to the config. Old config needs update. 2021-10-26 09:05:56 +02:00
8cbf1c2b69 Adapting config to new machine. 2021-10-26 08:49:53 +02:00
d9265cbb18 Small change in settings. 2021-10-25 19:51:11 +02:00
ad0a6beb92 Removed mail-check, set info-hackspeed to be executable. 2021-10-16 10:30:32 +02:00
b8f2096a1c Merge branch 'master' of ssh://nielandt.be:2222/joachim/chezmoi into master 2021-04-18 14:33:59 +02:00
b8d999e0e1 Added dome's netadapter 2021-04-18 14:33:46 +02:00
d458fc0688 Added microsoft-standard to .zshrc template (other osrelease option for
WSL)
2021-03-15 16:15:48 +01:00
358b4192f7 Changed .zshrc to a template file. Now supports WSL2 2021-03-12 16:01:16 +01:00
f25a84d4e3 Merge branch 'master' of ssh://nielandt.be:2222/joachim/chezmoi into master 2021-03-09 18:18:32 +01:00
02d29e0f76 Removed obelisk status, added mail status check. 2021-03-09 18:17:38 +01:00
f56ac10f6a Updated polybar-scripts. 2021-02-25 09:38:16 +01:00
73ca6d4e98 Updates polybar-scripts. 2021-02-25 09:24:33 +01:00
e3a849d8c5 Removed enhancd... 2021-02-25 09:09:33 +01:00
97abd166af Fixed font size for new laptop. 2021-02-24 13:28:11 +01:00
46f8c3c8ea Added reboot.check script to dotfiles. 2021-02-23 14:38:50 +01:00
947b903b34 Merge branch 'master' of ssh://nielandt.be:2222/joachim/chezmoi into master 2021-02-22 10:45:50 +01:00
954918511a Added script. 2021-02-22 10:45:34 +01:00
b10ad789ac Removed border radius. 2021-02-22 10:15:07 +01:00
439d3ee876 Added doom to path 2020-09-12 10:17:42 +02:00
2af742c4aa Better blur on picom. 2020-09-01 19:49:20 +02:00
cea0807acf Removed radius. 2020-09-01 19:32:31 +02:00
Joachim Nielandt
191a1bb1bb Added rofi icons and drun mode 2020-07-19 22:28:29 +02:00
Joachim Nielandt
d5a8c6d1ec Tiny rofi fix. 2020-07-19 21:35:37 +02:00
Joachim Nielandt
0cc655ddba Riced rofi. 2020-07-19 21:30:39 +02:00
Joachim Nielandt
321a04e539 $HOME replacement in fzf zsh file. 2020-07-19 21:11:36 +02:00
Joachim Nielandt
7a81f08af3 Added fzf to config. 2020-07-19 21:10:21 +02:00
5dd35cda06 Tinkering with picom and rofi transparency. 2020-07-19 18:04:23 +02:00
d1e7858a2f Changed to picom experimental. 2020-07-19 17:44:28 +02:00
e91baa3ae5 Tiny fixes. 2020-07-19 17:41:12 +02:00
Joachim Nielandt
a97f5d52ad Added help line 2020-07-18 11:59:19 +02:00
Joachim Nielandt
0adcffeac2 Added chezmoi completion 2020-07-18 11:58:07 +02:00
Joachim Nielandt
2872158486 Added rofi to chezmoi 2020-07-18 11:51:53 +02:00
296 changed files with 10661 additions and 4132 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.css.map

10
README.md Normal file
View File

@ -0,0 +1,10 @@
# Polybar scripts
Clone polybar-scripts into `.config`. Some scripts can be used to check differences with the local copies. Polybar-scripts is not included in the chezmoi repo anymore, only modified copies of selected scripts.
`git clone https://github.com/polybar/polybar-scripts.git ~/.config/`
# Dependencies
Install dependencies by executing the script contained in this repository.

View File

@ -13,6 +13,10 @@ URxvt.background: [90]#1d2021
!URxvt.transparent: true
!URxvt.shading: 10
! Font settings I found on forum
URxvt.utf8: true
URxvt.locale: true
! Included this so you know how to make your foreground not match the color of your background
! light0_hard gruvbox
URxvt.foreground: #f9f5d7
@ -26,16 +30,22 @@ URxvt*saveLines: 65500
URxvt*loginShell: false
!URxvt*termName: screen-256color
{{- if eq .chezmoi.hostname "carbonraptor" }}
URxvt.font: xft:Fura Code Nerd Font Mono:size=10:antialias=true
URxvt.boldfont: xft:Fura Code Nerd Font Mono:bold:size=10
! Warning! For some font sizes, nerd fonts don't render particular glyphs correctly (✘, for example)
{{- if (or (eq .chezmoi.hostname "nielanjo") (eq .chezmoi.hostname "jnielandt") (eq .chezmoi.hostname "zaptorjezus")) }}
URxvt.font: xft:Hasklug Nerd Font Mono:size=11:antialias=true
URxvt.boldfont: xft:Hasklug Nerd Font Mono:bold:size=11:antialias=true
!URxvt.font: xft:OverpassMono Nerd Font:size=10:antialias=true
!URxvt.font: xft:OverpassMono Nerd Font:size=10:antialias=true
!URxvt.font: xft:Fura Code Nerd Font Mono:size=10:antialias=true
!URxvt.font: xft:Hasklug Nerd Font Mono:size=10:antialias=true
!URxvt.boldfont: xft:Hasklug Nerd Font Mono:bold:size=10
{{- else }}
URxvt.font: xft:Fura Code Nerd Font Mono:size=8:antialias=true
URxvt.boldfont: xft:Fura Code Nerd Font Mono:bold:size=8
URxvt.font: xft:Hasklug Nerd Font Mono:size=8:antialias=true
URxvt.boldfont: xft:Hasklug Nerd Font Mono:bold:size=8
{{- end }}
! Give us a nice cursor then
Xcursor.theme: Breeze
Xcursor.theme: Breeze_Obsidian
Xcursor.size: 16
! -----------------------------------------------------------------------------

View File

@ -0,0 +1,911 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
#import:
# - /path/to/alacritty.yml
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
#TERM: alacritty
window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. The number of columns
# must be at least `2`, while using a value of `0` for columns and lines will
# fall back to the window manager's recommended size.
#dimensions:
# columns: 0
# lines: 0
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
#position:
# x: 0
# y: 0
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 10
y: 10
# Spread additional padding evenly around the terminal content.
#dynamic_padding: false
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
#
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background and no title bar buttons
decorations: "None"
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
opacity: 0.9
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
#startup_mode: Windowed
# Window title
title: Alacritty
# Allow terminal applications to change Alacritty's window title.
dynamic_title: true
# Window class (Linux/BSD only):
#class:
# Application instance name
#instance: Alacritty
# General application class
#general: Alacritty
# GTK theme variant (Linux/BSD only)
#
# Override the variant of the GTK theme. Commonly supported values are `dark`
# and `light`. Set this to `None` to use the default theme variant.
#gtk_theme_variant: None
#scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
#history: 10000
# Scrolling distance multiplier.
#multiplier: 3
# Font configuration
font:
# Normal (roman) font face
normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
#family: monospace
#family: FiraCode Nerd Font Mono
family: Hasklug Nerd Font Mono
# The `style` can be specified to pick a specific face.
style: Regular
# Bold font face
bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
family: Hasklug Nerd Font Mono
# The `style` can be specified to pick a specific face.
style: Bold
# Italic font face
italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
family: Hasklug Nerd Font Mono
# The `style` can be specified to pick a specific face.
style: Italic
# Bold italic font face
bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
family: Hasklug Nerd Font Mono
# The `style` can be specified to pick a specific face.
style: Bold Italic
# Point size
size: 9.0
# Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter
# spacing.
#offset:
# x: 0
# y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the
# right, increasing `y` moves the glyph upward.
#glyph_offset:
# x: 0
# y: 0
# Thin stroke font rendering (macOS only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`.
#use_thin_strokes: true
# Use built-in font for box drawing characters.
#
# If `true`, Alacritty will use a custom built-in font for box drawing
# characters (Unicode points 2500 - 259f).
#
#builtin_box_drawing: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: false
# Colors (Gruvbox Material Dark Medium)
colors:
primary:
background: '0x282828'
foreground: '0xdfbf8e'
normal:
black: '0x665c54'
red: '0xea6962'
green: '0xa9b665'
yellow: '0xe78a4e'
blue: '0x7daea3'
magenta: '0xd3869b'
cyan: '0x89b482'
white: '0xdfbf8e'
bright:
black: '0x928374'
red: '0xea6962'
green: '0xa9b665'
yellow: '0xe3a84e'
blue: '0x7daea3'
magenta: '0xd3869b'
cyan: '0x89b482'
white: '0xdfbf8e'
# Colors (Tomorrow Night)
#colors:
# Default colors
#primary:
# background: '#1d1f21'
# foreground: '#c5c8c6'
# Bright and dim foreground colors
#
# The dimmed foreground color is calculated automatically if it is not
# present. If the bright foreground color is not set, or
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
# color will be used.
#dim_foreground: '#828482'
#bright_foreground: '#eaeaea'
# Cursor colors
#
# Colors which should be used to draw the terminal cursor.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#cursor:
# text: CellBackground
# cursor: CellForeground
# Vi mode cursor colors
#
# Colors for the cursor when the vi mode is active.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#vi_mode_cursor:
# text: CellBackground
# cursor: CellForeground
# Search colors
#
# Colors used for the search bar and match highlighting.
#search:
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#matches:
# foreground: '#000000'
# background: '#ffffff'
#focused_match:
# foreground: '#ffffff'
# background: '#000000'
#bar:
# background: '#c5c8c6'
# foreground: '#1d1f21'
# Keyboard regex hints
#hints:
# First character in the hint label
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#start:
# foreground: '#1d1f21'
# background: '#e9ff5e'
# All characters after the first one in the hint label
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#end:
# foreground: '#e9ff5e'
# background: '#1d1f21'
# Line indicator
#
# Color used for the indicator displaying the position in history during
# search and vi mode.
#
# By default, these will use the opposing primary color.
#line_indicator:
# foreground: None
# background: None
# Selection colors
#
# Colors which should be used to draw the selection area.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#selection:
# text: CellBackground
# background: CellForeground
# Normal colors
#normal:
# black: '#1d1f21'
# red: '#cc6666'
# green: '#b5bd68'
# yellow: '#f0c674'
# blue: '#81a2be'
# magenta: '#b294bb'
# cyan: '#8abeb7'
# white: '#c5c8c6'
# Bright colors
#bright:
# black: '#666666'
# red: '#d54e53'
# green: '#b9ca4a'
# yellow: '#e7c547'
# blue: '#7aa6da'
# magenta: '#c397d8'
# cyan: '#70c0b1'
# white: '#eaeaea'
# Dim colors
#
# If the dim colors are not set, they will be calculated automatically based
# on the `normal` colors.
#dim:
# black: '#131415'
# red: '#864343'
# green: '#777c44'
# yellow: '#9e824c'
# blue: '#556a7d'
# magenta: '#75617b'
# cyan: '#5b7d78'
# white: '#828482'
# Indexed Colors
#
# The indexed colors include all colors from 16 to 256.
# When these are not set, they're filled with sensible defaults.
#
# Example:
# `- { index: 16, color: '#ff00ff' }`
#
#indexed_colors: []
# Transparent cell backgrounds
#
# Whether or not `window.opacity` applies to all cell backgrounds or only to
# the default background. When set to `true` all cells will be transparent
# regardless of their background color.
#transparent_background_colors: false
#
# Bell
#
# The bell is rung every time the BEL control character is received.
#bell:
# Visual Bell Animation
#
# Animation effect for flashing the screen when the visual bell is rung.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#animation: EaseOutExpo
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
# disable the visual bell animation.
#duration: 0
# Visual bell animation color.
#color: '#ffffff'
# Bell Command
#
# This program is executed whenever the bell is rung.
#
# When set to `command: None`, no command will be executed.
#
# Example:
# command:
# program: notify-send
# args: ["Hello, World!"]
#
#command: None
#selection:
# This string contains all characters that are used as separators for
# "semantic words" in Alacritty.
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
#save_to_clipboard: false
#cursor:
# Cursor style
#style:
# Cursor shape
#
# Values for `shape`:
# - ▇ Block
# - _ Underline
# - | Beam
#shape: Block
# Cursor blinking state
#
# Values for `blinking`:
# - Never: Prevent the cursor from ever blinking
# - Off: Disable blinking by default
# - On: Enable blinking by default
# - Always: Force the cursor to always blink
#blinking: Off
# Vi mode cursor style
#
# If the vi mode cursor style is `None` or not specified, it will fall back to
# the style of the active value of the normal cursor.
#
# See `cursor.style` for available options.
#vi_mode_style: None
# Cursor blinking interval in milliseconds.
#blink_interval: 750
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
#unfocused_hollow: true
# Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `1.0`.
#thickness: 0.15
# Live config reload (changes require restart)
#live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g.
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
# shell.
#
# Default:
# - (macOS) /bin/bash --login
# - (Linux/BSD) user login shell
# - (Windows) powershell
shell:
program: /bin/zsh
args:
- --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
#working_directory: None
# Send ESC (\x1b) before characters when alt is pressed.
#alt_send_esc: true
# Offer IPC using `alacritty msg` (unix only)
#ipc_socket: true
#mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
#double_click: { threshold: 300 }
#triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
#hide_when_typing: false
# Regex hints
#
# Terminal hints can be used to find text in the visible part of the terminal
# and pipe it to other applications.
#hints:
# Keys used for the hint labels.
#alphabet: "jfkdls;ahgurieowpq"
# List with all available hints
#
# Each hint must have a `regex` and either an `action` or a `command` field.
# The fields `mouse`, `binding` and `post_processing` are optional.
#
# The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and
# `mouse.mods` accept the same values as they do in the `key_bindings` section.
#
# The `mouse.enabled` field controls if the hint should be underlined while
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
#
# If the `post_processing` field is set to `true`, heuristics will be used to
# shorten the match if there are characters likely not to be part of the hint
# (e.g. a trailing `.`). This is most useful for URIs.
#
# Values for `action`:
# - Copy
# Copy the hint's text to the clipboard.
# - Paste
# Paste the hint's text to the terminal or search.
# - Select
# Select the hint's text.
# - MoveViModeCursor
# Move the vi mode cursor to the beginning of the hint.
#enabled:
# - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
# [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
# command: xdg-open
# post_processing: true
# mouse:
# enabled: true
# mods: None
# binding:
# key: U
# mods: Control|Shift
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty
# captures the mouse, the `Shift` modifier is automatically added as a
# requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings for actions not exclusive to mouse mode)
#
# - Mouse exclusive actions:
#
# - ExpandSelection
# Expand the selection to the current mouse cursor location.
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Right, action: ExpandSelection }
# - { mouse: Right, mods: Control, action: ExpandSelection }
# - { mouse: Middle, mode: ~Vi, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - ToggleViMode
# - SearchForward
# Start searching toward the right of the search origin.
# - SearchBackward
# Start searching toward the left of the search origin.
# - Copy
# - Paste
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollHalfPageUp
# - ScrollHalfPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# Remove the terminal's scrollback history.
# - Hide
# Hide the Alacritty window.
# - Minimize
# Minimize the Alacritty window.
# - Quit
# Quit Alacritty.
# - ToggleFullscreen
# - SpawnNewInstance
# Spawn a new instance of Alacritty.
# - CreateNewWindow
# Create a new Alacritty window from the current process.
# - ClearLogNotice
# Clear Alacritty's UI warning and error notice.
# - ClearSelection
# Remove the active selection.
# - ReceiveChar
# - None
#
# - Vi mode exclusive actions:
#
# - Open
# Perform the action of the first matching hint under the vi mode cursor
# with `mouse.enabled` set to `true`.
# - ToggleNormalSelection
# - ToggleLineSelection
# - ToggleBlockSelection
# - ToggleSemanticSelection
# Toggle semantic selection based on `selection.semantic_escape_chars`.
#
# - Vi mode exclusive cursor motion actions:
#
# - Up
# One line up.
# - Down
# One line down.
# - Left
# One character left.
# - Right
# One character right.
# - First
# First column, or beginning of the line when already at the first column.
# - Last
# Last column, or beginning of the line when already at the last column.
# - FirstOccupied
# First non-empty cell in this terminal row, or first non-empty cell of
# the line when already at the first cell of the row.
# - High
# Top of the screen.
# - Middle
# Center of the screen.
# - Low
# Bottom of the screen.
# - SemanticLeft
# Start of the previous semantically separated word.
# - SemanticRight
# Start of the next semantically separated word.
# - SemanticLeftEnd
# End of the previous semantically separated word.
# - SemanticRightEnd
# End of the next semantically separated word.
# - WordLeft
# Start of the previous whitespace separated word.
# - WordRight
# Start of the next whitespace separated word.
# - WordLeftEnd
# End of the previous whitespace separated word.
# - WordRightEnd
# End of the next whitespace separated word.
# - Bracket
# Character matching the bracket at the cursor's location.
# - SearchNext
# Beginning of the next match.
# - SearchPrevious
# Beginning of the previous match.
# - SearchStart
# Start of the match to the left of the vi mode cursor.
# - SearchEnd
# End of the match to the right of the vi mode cursor.
#
# - Search mode exclusive actions:
# - SearchFocusNext
# Move the focus to the next search match.
# - SearchFocusPrevious
# Move the focus to the previous search match.
# - SearchConfirm
# - SearchCancel
# - SearchClear
# Reset the search regex.
# - SearchDeleteWord
# Delete the last word in the search regex.
# - SearchHistoryPrevious
# Go to the previous regex in the search history.
# - SearchHistoryNext
# Go to the next regex in the search history.
#
# - macOS exclusive actions:
# - ToggleSimpleFullscreen
# Enter fullscreen without occupying another space.
#
# - Linux/BSD exclusive actions:
#
# - CopySelection
# Copy from the selection buffer.
# - PasteSelection
# Paste from the selection buffer.
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Search
# - Alt
# - Vi
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
#key_bindings:
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Vi Mode
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
#- { key: Y, mode: Vi|~Search, action: Copy }
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
#- { key: Return, mode: Vi|~Search, action: Open }
#- { key: K, mode: Vi|~Search, action: Up }
#- { key: J, mode: Vi|~Search, action: Down }
#- { key: H, mode: Vi|~Search, action: Left }
#- { key: L, mode: Vi|~Search, action: Right }
#- { key: Up, mode: Vi|~Search, action: Up }
#- { key: Down, mode: Vi|~Search, action: Down }
#- { key: Left, mode: Vi|~Search, action: Left }
#- { key: Right, mode: Vi|~Search, action: Right }
#- { key: Key0, mode: Vi|~Search, action: First }
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
#- { key: W, mode: Vi|~Search, action: SemanticRight }
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
#- { key: N, mode: Vi|~Search, action: SearchNext }
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
# Search Mode
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
#- { key: Escape, mode: Search, action: SearchCancel }
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
#- { key: U, mods: Control, mode: Search, action: SearchClear }
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
#- { key: Down, mode: Search, action: SearchHistoryNext }
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
# (Windows, Linux, and BSD only)
#- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward }
#- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward }
#- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Plus, mods: Control, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Plus, mods: Command, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection }
#- { key: H, mods: Command, action: Hide }
#- { key: H, mods: Command|Alt, action: HideOtherApplications }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: N, mods: Command, action: SpawnNewInstance }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - Off
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Print all received window events.
#print_events: false

172
dot_config/doom/config.el Normal file
View File

@ -0,0 +1,172 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
(setq user-full-name "Joachim Nielandt"
user-mail-address "joachim@nielandt.be")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-unicode-font' -- for unicode glyphs
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function.
;; This is the default:
;; (setq doom-theme 'doom-one)
(setq doom-theme 'doom-gruvbox)
;; Set font
;; (setq doom-font (font-spec :family "FiraCode Nerd Font Mono" :size 12 :weight 'semi-light)
;; doom-unicode-font (font-spec :family "FiraCode Nerd Font Mono" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
;;
;; (font-spec :family "Fira Sans") ; nice, but not mono
(setq doom-font (font-spec :family "Hasklug Nerd Font Mono")
doom-unicode-font (font-spec :family "Hasklug Nerd Font Mono"))
;; doom-variable-pitch-font (font-spec :family "Fira Sans")
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type 'relative)
(setq display-line-numbers-widen 'true)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory (file-truename "~/org-roam"))
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
;; Remapping for clojure / lisp? / ...
(map! "<C-left>" #'sp-backward-slurp-sexp)
(map! "<C-right>" #'sp-forward-slurp-sexp)
(map! "<M-left>" #'sp-backward-barf-sexp)
(map! "<M-right>" #'sp-forward-barf-sexp)
;; modify the evil escape key sequence - this was originally 'jk' and very annoying
(setq-default evil-escape-key-sequence "pz")
; configure org-roam
(setq org-roam-directory (file-truename "~/org-roam"))
(after! org-roam
(setq org-roam-capture-templates
`(("n" "default note" plain (file "~/org-roam/templates/default.org")
:if-new
(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "")
:unnarrowed t)
("p" "person" plain (file "~/org-roam/templates/person.org")
:if-new
(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "")
:immediate-finish t
:unnarrowed t)
("m" "meeting" plain (file "~/org-roam/templates/meeting.org")
:if-new
(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "")
:unnarrowed t)
)
)
; adapt indentation in org files for _all_ lines (headings and content)
(setq org-adapt-indentation t)
; found these here https://lucidmanager.org/productivity/ricing-org-mode/
(setq org-startup-indented t
org-pretty-entities t
org-hide-emphasis-markers t
org-startup-with-inline-images t
org-image-actual-width '(300)))
; enable org-download
; https://github.com/abo-abo/org-download
(require 'org-download)
; configure org-download
(after! org-download
(setq-default org-download-image-dir "~/org-roam/images")
;; Drag-and-drop to `dired`
(add-hook 'dired-mode-hook 'org-download-enable))
; TODO should use (concat (file-name-as-directory dirfile) relfile)
; enable chezmoi
(use-package chezmoi)
; make sure image previews have sane default widths
(setq org-image-actual-width (truncate (* (window-pixel-width) 0.8)))
; https://github.com/ryuslash/git-auto-commit-mode
(use-package! git-auto-commit-mode
:config
(setq-default gac-debounce-interval 300)
(setq-default gac-automatically-push-p t))
; make sure appear-mode is enabled in org-mode
(add-hook! org-mode :append #'org-appear-mode)
;; Nice bullets
(use-package! org-superstar
:config
(setq org-superstar-special-todo-items t)
; alternatives: ? ? ? ? ?
(setq org-superstar-headline-bullets-list '(? ? ? ?))
(add-hook 'org-mode-hook (lambda ()
(org-superstar-mode 1))))
; disable evil snipe mode (modifies the default 's' key)
(remove-hook 'doom-first-input-hook #'evil-snipe-mode)
; enable vimrc mode
(require 'vimrc-mode)
(add-to-list 'auto-mode-alist '("\\.vim\\(rc\\)?\\'" . vimrc-mode))
; add binding for consult-find
(map! :leader :desc "Consult find" "n r c" #'consult-find)

194
dot_config/doom/init.el Normal file
View File

@ -0,0 +1,194 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vi-tilde-fringe ; fringe tildes to mark beyond EOB
(vc-gutter +pretty) ; vcs diff in the fringe
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
;;vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
;;lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org +roam2) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
;;literate
(default +bindings +smartparens))

View File

@ -0,0 +1,83 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/radian-software/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see radian-software/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)
; install clojure and cider
(package! cider)
; rectify some lacking bindings for evil mode
(package! evil-collection)
; add groovy / grails support
(package! groovy-mode)
; allows the terraform files to be properly read
(package! terraform-mode)
; add typescript major mode
(package! typescript-mode)
; chezmoi management functions
(package! chezmoi)
; powershell support
(package! powershell)
; enable image handling in org mode
(package! org-download)
; org-ql for clever orgmode searches
(package! org-ql)
; auto commit to git
(package! git-auto-commit-mode)
; make emphasis markers appear when cursor is close
(package! org-appear)
; nice bullets
(package! org-superstar)
; yaml support
(package! yaml-mode)
; enable ripgrep
(package! ripgrep)
; enable dockerfile major mode
(package! dockerfile-mode)
; enable vimscript
(package! vimrc-mode)

View File

@ -1,3 +1,5 @@
# See dunst(5) for all configuration options
[global]
### Display ###
@ -17,41 +19,61 @@
# will be ignored.
follow = mouse
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "300x5-0+54"
### Geometry ###
# Show how many messages are currently hidden (because of geometry).
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = 300
# The maximum height of a single notification, excluding the frame.
height = 300
# Position the notification in the top right corner
origin = top-right
# Offset from the origin
offset = 10x50
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 0
### Progress bar ###
# Turn on the progess bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true
# Set the progress bar height. This includes the frame, so make sure
# it's at least twice as big as the frame width.
progress_bar_height = 10
# Set the frame width of the progress bar
progress_bar_frame_width = 1
# Set the minimum width for the progress bar
progress_bar_min_width = 150
# Set the maximum width for the progress bar
progress_bar_max_width = 300
# Show how many messages are currently hidden (because of
# notification_limit).
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].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
transparency = 0
# 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_height = 2
# Padding between text and separator.
padding = 8
@ -59,9 +81,12 @@
# Horizontal padding.
horizontal_padding = 8
# Padding between text and icon.
text_icon_padding = 0
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 1
frame_width = 3
# Defines color of the frame around the notification window.
#frame_color = "#aaaaaa"
@ -82,8 +107,9 @@
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# Transient notifications ignore this setting.
idle_threshold = 120
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
# idle_threshold = 120
### Text ###
@ -102,7 +128,7 @@
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
@ -116,7 +142,7 @@
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = no
markup = full
# The format of the message. Possible variables are:
# %a appname
@ -134,26 +160,26 @@
# Possible values are "left", "center" and "right".
alignment = left
# Vertical alignment of message text and icon.
# Possible values are "top", "center" and "bottom".
vertical_alignment = center
# 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 ellipsize long lines.
# 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
# Merge multiple notifications with the same content
# Stack together notifications with the same content
stack_duplicates = true
# Hide the count of merged notifications with the same content
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
@ -164,12 +190,16 @@
# Align icons left/right/off
icon_position = left
# Scale small icons up to this size, set to 0 to disable. Helpful
# for e.g. small files or high-dpi screens. In case of conflict,
# max_icon_size takes precedence over this.
min_icon_size = 0
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 32
# Paths to default icons.
#icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/:/usr/share/icons/hicolor/22x22/apps/
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
### History ###
@ -186,7 +216,7 @@
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/firefox -new-tab
browser = /usr/bin/xdg-open
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
@ -197,10 +227,28 @@
# Define the class of the windows spawned by dunst
class = Dunst
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
# 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
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this
# parameter, an application may close the notification sent before the
# user defined timeout.
ignore_dbusclose = false
### Wayland ###
# These settings are Wayland-specific. They have no effect when using X11
# Uncomment this if you want to let notications appear under fullscreen
# applications (default: overlay)
# layer = top
# Set this to true to use X11 output on Wayland.
force_xwayland = false
### Legacy
@ -214,6 +262,25 @@
# layout changes.
force_xinerama = false
### mouse
# Defines list of actions for each mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: Invoke the action determined by the action_name rule. If there is no
# such action, open the context menu.
# * open_url: If the notification has exactly one url, open it. If there are multiple
# ones, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
# * context: Open context menu for the notification.
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
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]
@ -224,34 +291,13 @@
# 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 = "#32302f"
foreground = "#ebdbb2"
timeout = 10
timeout = 20
# Icon for notifications with low urgency, uncomment to enable
#icon = /path/to/icon
@ -259,7 +305,7 @@
background = "#32302f"
foreground = "#ebdbb2"
frame_color = "#b8bb26"
timeout = 10
timeout = 60
# Icon for notifications with normal urgency, uncomment to enable
#icon = /path/to/icon
@ -273,11 +319,37 @@
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# timeout
# urgency
# action_name
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
@ -285,11 +357,33 @@
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
@ -301,13 +395,18 @@
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
@ -328,4 +427,8 @@
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

156
dot_config/foot/foot.ini Normal file
View File

@ -0,0 +1,156 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
#term=foot-extra #(or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
font=Hasklug Nerd Font:size=9
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# line-height=<font metrics>
# letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# box-drawings-uses-font-glyphs=no
# dpi-aware=yes
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
pad=5x5 # optionally append 'center'
resize-delay-ms=50
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
# bold-text-in-bright=no
# bell=none
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
[bell]
# urgent=no
# notify=no
# command=
# command-focused=no
[scrollback]
lines=10000
# multiplier=3.0
# indicator-position=relative
# indicator-format=
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols = http, https, ftp, ftps, file, gemini, gopher
[cursor]
# style=block
color= 141a1b eeeeee
# blink=no
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
# hide-when-typing=no
# alternate-scroll-mode=yes
[colors]
alpha=0.9
foreground=eeeeee
background=141a1b
regular0=141a1B # black
regular1=cd3f45 # red
regular2=9fca56 # green
regular3=e6cd69 # yellow
regular4=16a085 # blue
regular5=a074c4 # magenta
regular6=55b5db # cyan
regular7=d6d6d6 # white
bright0=41535B # bright black
bright1=cd3f45 # red
bright2=9fca56 # green
bright3=e6cd69 # yellow
bright4=16a085 # blue
bright5=a074c4 # magenta
bright6=55b5db # cyan
bright7=ffffff # bright white
# 16 = <256-color palette #16>
# ...
# 255 = <256-color palette #255>
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3>
# urls=<regular3>
[csd]
# preferred=server
# size=26
# color=<foreground color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# clipboard-copy=Control+Shift+c
# clipboard-paste=Control+Shift+v
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# show-urls-launch=Control+Shift+u
# show-urls-copy=none
[search-bindings]
# cancel=Control+g Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-to-word-boundary=Control+w
# extend-to-next-whitespace=Control+Shift+w
# clipboard-paste=Control+v Control+y
# primary-paste=Shift+Insert
[url-bindings]
# cancel=Control+g Control+d Escape
# toggle-url-visible=t
[mouse-bindings]
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-row=BTN_LEFT-3

View File

@ -2,20 +2,26 @@
# this sets the mod button -> windows key
set $mod Mod4
set $mod1 Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# font pango:monospace 8
# overrides title bars -> makes sure i3-gaps can do its thing
for_window [class="^.*"] border pixel 0
for_window [class="^.*"] border pixel 2
# for jetbrains windows... focus on dialogs!
for_window [class="^jetbrains-.+"][window_type=dialog] focus
# fix citrix windows
for_window [class="Wfica_Seamless"] floating enable
border_radius 15
# === Borders ===
hide_edge_borders smart
# border radius for the rounded windows
# border_radius 0
# === Workspaces ===
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
# Using the prefix of workspaces in order to be able to define ordering for special workspaces.
@ -29,41 +35,56 @@ set $ws7 "7:7"
set $ws8 "8:8"
set $ws9 "9:9"
set $ws10 "10:10"
set $wsleft "11:"
set $wsright "12:"
set $wsleft "11:"
set $wsright "12:"
# automatically assign programs to workspace
# using workspace names here, otherwise doesn't work as expected
# assign [class="Chromium"] $ws1
assign [class="Thunderbird"] $ws2
# workspace 9: chat
assign [class="Slack"] $ws9
assign [class="Mattermost"] $ws9
assign [class="Hamsket"] $ws9
assign [class="discord"] $ws9
assign [class="signal"] $ws9
assign [class="ferdi"] $ws9
assign [class="microsoft teams - preview"] $ws9
assign [class="obsidian"] $ws8
assign [class="Wfica_Seamless"] $ws10
#assign [class="jetbrains-idea"] 7
#assign [class="jetbrains-webstorm"] 8
#assign [class="jetbrains-datagrip"] 9
#disabled this for now, using Ferdi for socials
#exec --no-startup-id "i3-msg 'workspace 9:9; append_layout /home/joachim/.config/i3/workspace-9.json'"
# i3-gaps
gaps inner 10
gaps outer 5
# 10
gaps inner 0
# 5
gaps outer 0
# Disallow endless looping of focus: extreme right is extreme right, don't flip to extreme left whenever you want...
focus_wrapping no
# font pango:DejaVu Sans Mono 8
# font xft:Fantasque Sans Mono 9
font xft:FuraCode Nerd Font 8
# font xft:FuraCode Nerd Font 8
font xft:Hasklug Nerd Font 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec urxvt
bindsym $mod+Shift+Return exec kitty
bindsym $mod+Shift+Return exec urxvt
bindsym $mod+Return exec alacritty
# TODO make this help window a bit fancier
bindsym $mod+F1 exec urxvt -e vim ~/.dotfiles/README.md
bindsym $mod+F1 exec urxvt -e chezmoi edit ~/.dotfiles/README.md
# screenshotting
# Desktop screenshot
@ -83,16 +104,18 @@ bindsym $mod+d exec ~/.config/rofi/runrofi.sh
# this uses the output of greenclip (see here https://wiki.archlinux.org/index.php/Greenclip) to show clipboard history in rofi
bindsym $mod+c exec rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
# symbols 
# do a nice menu with mode
# lock / logout / sleep / hibernate / restart / poweroff
set $mode_system System  l e s鈴 h rﰇ וּsﮤ
set $mode_system System  l e󰍃 s󰤄 h r 󰘶sﮤ
mode "$mode_system" {
bindsym l exec --no-startup-id /home/jnieland/.config/i3/i3exit.sh lock, mode "default"
bindsym e exec --no-startup-id /home/jnieland/.config/i3/i3exit.sh logout, mode "default"
bindsym s exec --no-startup-id /home/jnieland/.config/i3/i3exit.sh suspend, mode "default"
bindsym h exec --no-startup-id /home/jnieland/.config/i3/i3exit.sh hibernate, mode "default"
bindsym r exec --no-startup-id /home/jnieland/.config/i3/i3exit.sh reboot, mode "default"
bindsym Shift+s exec --no-startup-id /home/jnieland/.config/i3/i3exit.sh shutdown, mode "default"
bindsym l exec --no-startup-id ~/.config/i3/i3exit.sh lock, mode "default"
bindsym e exec --no-startup-id ~/.config/i3/i3exit.sh logout, mode "default"
bindsym s exec --no-startup-id ~/.config/i3/i3exit.sh suspend, mode "default"
bindsym h exec --no-startup-id ~/.config/i3/i3exit.sh hibernate, mode "default"
bindsym r exec --no-startup-id ~/.config/i3/i3exit.sh reboot, mode "default"
bindsym Shift+s exec --no-startup-id ~/.config/i3/i3exit.sh shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
@ -100,8 +123,8 @@ mode "$mode_system" {
bindsym $mod+Pause mode "$mode_system"
bindsym $mod+F12 mode "$mode_system"
# do a nice menu for redshift values
set $mode_redshift Redshift <2,3,4,5,6,7,8>k
# do a nice menu for monitor values
set $mode_redshift Monitor 2,3,4,5,6,7,8洞 j/k
mode "$mode_redshift" {
bindsym 2 exec --no-startup-id redshift -P -O 2000
bindsym 3 exec --no-startup-id redshift -P -O 3000
@ -111,6 +134,9 @@ mode "$mode_redshift" {
bindsym 7 exec --no-startup-id redshift -P -O 7000
bindsym 8 exec --no-startup-id redshift -P -O 8000
bindsym k exec --no-startup-id "brightnessctl -c backlight s +10%"
bindsym j exec --no-startup-id "brightnessctl -c backlight s 10%-"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
@ -139,12 +165,19 @@ bindsym $mod+Ctrl+k mode "$mode_xkbmap"
set $mode_audio Audio    - + 0 y
mode "$mode_audio" {
# Pulse Audio controls
# Increase sound volume
bindsym plus exec --no-startup-id pactl set-sink-volume 0 +5%
# Decrease sound volume
bindsym minus exec --no-startup-id pactl set-sink-volume 0 -5%
# Increase / decrease volume for the running sink only
bindsym k exec --no-startup-id pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f 1) +2%
bindsym plus exec --no-startup-id pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f 1) +2%
bindsym bracketleft exec --no-startup-id pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f 1) +2%
# decrease
bindsym j exec --no-startup-id pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f 1) -2%
bindsym minus exec --no-startup-id pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f 1) -2%
bindsym bracketright exec --no-startup-id pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f 1) -2%
# Mute sound
bindsym 0 exec --no-startup-id pactl set-sink-mute 0 toggle
bindsym 0 exec --no-startup-id pactl set-sink-mute $(pactl list short sinks | grep RUNNING | cut -f 1) toggle
# Start mps-youtube
bindsym y exec --no-startup-id urxvt -e mpsyt, mode "default"
@ -166,15 +199,18 @@ bindsym $mod+F11 mode "$mode_audio"
set $mode_launch  adefault start-up bnoise-fix cdual dhorizontal etearing
mode "$mode_launch" {
# These are all the default programs launching at startup.
bindsym a exec hamsket, exec thunderbird, mode "default"
# This fixes audio noise
bindsym b exec sudo hda-verb /dev/snd/hwC*D0 0x1d SET_PIN_WIDGET_CONTROL 0x0, mode "default"
bindsym a exec thunderbird, exec signal-desktop, exec ferdi, exec obsidian mode "default", exec teams --no-sandbox, exec slack
# This fixes audio noise (lenovo)
# bindsym b exec sudo hda-verb /dev/snd/hwC*D0 0x1d SET_PIN_WIDGET_CONTROL 0x0, mode "default"
# This bypasses weird xrandr bug, resets to single display, then goes back to triple monitor setup (use autorandr profile here, needs to be set up in advance)
#bindsym c exec xrandr --output eDP1 --mode 2560x1440, exec autorandr triple, mode "default"
bindsym c exec autorandr dual2k, mode "default"
#bindsym c exec autorandr dual2k, mode "default"
# execute default horizontal layout of monitors
bindsym d exec autorandr horizontal, mode "default"
bindsym e exec nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
# this fixes tearing on nvidia
# bindsym e exec nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
# back to normal: Enter or Escape
bindsym Return mode "default"
@ -219,8 +255,8 @@ bindsym $mod+Shift+bracketleft move workspace to output left
bindsym $mod+Shift+bracketright move workspace to output right
# explicit bindings for arandr's setups: might not need these anymore... using autorandr now
# bindsym $mod+Shift+Ctrl+1 exec /home/jnieland/.screenlayout/laptop-only.sh
# bindsym $mod+Shift+Ctrl+2 exec /home/jnieland/.screenlayout/work-desk.sh
# bindsym $mod+Shift+Ctrl+1 exec ~/.screenlayout/laptop-only.sh
# bindsym $mod+Shift+Ctrl+2 exec ~/.screenlayout/work-desk.sh
# split in horizontal orientation
@ -363,7 +399,7 @@ mode "resize" {
bindsym $mod+r mode "resize"
# Edit config files
bindsym XF86Tools exec --no-startup-id urxvt -e vim /home/jnieland/.config/i3/config
bindsym XF86Tools exec --no-startup-id urxvt -e vim ~/.config/i3/config
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
@ -384,6 +420,12 @@ bindsym XF86AudioPrev exec playerctl previous
bindsym XF86MonBrightnessUp exec xbacklight -inc 20
bindsym XF86MonBrightnessDown exec xbacklight -dec 20
# Dunst controls
bindsym $mod+Ctrl+space exec dunstctl close
bindsym $mod+Ctrl+Shift+space exec dunstctl close-all
bindsym $mod+Ctrl+$mod1+space exec dunstctl history-pop
# start multi touch support
exec --no-startup-id libinput-gestures-setup start
@ -393,17 +435,27 @@ exec_always --no-startup-id ~/.config/polybar/launch-multi.sh
# start the network manager applet
exec --no-startup-id nm-applet
# start bluetooth applet
exec --no-startup-id blueman-applet
# start the xfce4-power-manager -> helping us do lid / laptop things
exec --no-startup-id xfce4-power-manager
# load the wallpaper
exec_always --no-startup-id sh ~/.fehbg
# start compton: compositor that allows, for example, transparency
exec --no-startup-id compton
# start picom: compositor that allows, for example, transparency
# on g8 nvidia laptop, experimental-backends seems to be laggy
{{- if eq .chezmoi.hostname "nielanjo" }}
exec_always --no-startup-id picom
{{ else }}
exec_always --no-startup-id picom --experimental-backends
{{- end }}
# start greenclip, this somehow fails to start at launch (sometimes?)
exec --no-startup-id systemctl --user start greenclip
# exec --no-startup-id systemctl --user start greenclip
exec --no-startup-id greenclip daemon>/dev/null
# reload the walpaper / color configuratin using pywal
# exec --no-startup-id wal -R -q
@ -411,10 +463,9 @@ exec --no-startup-id systemctl --user start greenclip
# GAPS i3-gaps specific things...
# smart gaps: only one window? no gaps!
# smart_gaps on
smart_gaps on
# this removes borders when there's no gaps, nice!
# smart_borders on|no_gaps
smart_borders no_gaps
#smart_borders no_gaps
# gruvbox colors
set $dark0_hard #1d2021
@ -461,7 +512,7 @@ set $transparent #ffffff00
# set_from_resource $color0 i3wm.color0 #000000
# window color class [border| backgr.| text| indicator| child_border]
client.focused $gray_245 $dark0_hard $light0_hard $bright_orange $light0_soft
client.focused $gray_245 $dark0_hard $light0_hard $bright_orange $bright_green
client.focused_inactive $dark0_hard $dark0_hard $light0_hard $dark0_hard $dark0_hard
client.unfocused $dark0_hard $dark0_hard $light0_hard $dark0_hard #FFFFFF00
client.urgent $dark0_hard $dark0 $light0_hard $dark0_hard $bright_orange

View File

@ -24,30 +24,30 @@ lock() {
# --screen 1
# --keylayout 2
i3lock -i /home/jnieland/pictures/great-wall-namib.jpg --blur 5 --clock --indicator \
--insidevercolor=$background \
--ringvercolor=$col4 \
--insidever-color=$background \
--ringver-color=$col4 \
\
--insidewrongcolor=$background \
--ringwrongcolor=$col9 \
--insidewrong-color=$background \
--ringwrong-color=$col9 \
\
--insidecolor=$background \
--ringcolor=$col2 \
--linecolor=$background \
--separatorcolor=$col11 \
--inside-color=$background \
--ring-color=$col2 \
--line-color=$background \
--separator-color=$col11 \
\
--verifcolor=$col4 \
--wrongcolor=$col4 \
--timecolor=$col4 \
--datecolor=$col4 \
--layoutcolor=$col4 \
--keyhlcolor=$col11 \
--bshlcolor=$col9 \
--verif-color=$col4 \
--wrong-color=$col4 \
--time-color=$col4 \
--date-color=$col4 \
--layout-color=$col4 \
--keyhl-color=$col11 \
--bshl-color=$col9 \
\
--blur 5 \
--clock \
--indicator \
--timestr="%H:%M:%S" \
--datestr="%A, %m %Y" \
--time-str="%H:%M:%S" \
--date-str="%A, %m %Y" \
}

View File

@ -0,0 +1,114 @@
{
"border": "normal",
"floating": "auto_off",
"layout": "splitv",
"marks": [],
"percent": 0.4,
"type": "con",
"nodes": [
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 982,
"width": 1886,
"x": 1937,
"y": 713
},
"marks": [],
"name": "Tron intorduction | Microsoft Teams",
"percent": 0.7,
"swallows": [
{
"class": "^Microsoft\\ Teams\\ \\-\\ Preview$",
"instance": "^microsoft\\ teams\\ \\-\\ preview$",
"machine": "^jnielandt$",
"window_role": "^browser\\-window$"
}
],
"type": "con"
},
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 500,
"width": 1000,
"x": 1937,
"y": 732
},
"marks": [],
"name": "Discord",
"percent": 0.3,
"swallows": [
{
"class": "^discord$",
"instance": "^discord$",
"machine": "^jnielandt$",
"window_role": "^browser\\-window$"
}
],
"type": "con"
}
]
}
{
"border": "normal",
"floating": "auto_off",
"layout": "splitv",
"marks": [],
"percent": 0.6,
"type": "con",
"nodes": [
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 687,
"width": 936,
"x": 967,
"y": 376
},
"marks": [],
"name": "Slack | dn_dutch | DN",
"percent": 0.7,
"swallows": [
{
"class": "^Slack$",
"instance": "^slack$",
"machine": "^jnielandt$",
"window_role": "^browser\\-window$"
}
],
"type": "con"
},
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 610,
"width": 2526,
"x": 1937,
"y": 415
},
"marks": [],
"name": "Signal",
"percent": 0.3,
"swallows": [
{
"class": "^Signal$",
"instance": "^signal$",
"machine": "^jnielandt$",
"window_role": "^browser\\-window$"
}
],
"type": "con"
}
]
}

90
dot_config/mako/config Normal file
View File

@ -0,0 +1,90 @@
# Enable Pango markup
markup=1
# Enable application to request an action associated with activating a notification
actions=1
# Gruvbox Colors
#set $dark0_hard #1d2021
#set $dark0_hard_t #1d2021e6
#set $dark0 #282828
#set $dark0_t #282828e6
#set $dark0_soft #32302f
#set $dark1 #3c3836
#set $dark2 #504945
#set $dark3 #665c54
#set $dark4 #7c6f64
#set $gray_245 #928374
#set $gray_244 #928374
#set $light0_hard #f9f5d7
#set $light0 #fbf1c7
#set $light0_soft #f2e5bc
#set $light1 #ebdbb2
#set $light2 #d5c4a1
#set $light3 #bdae93
#set $light4 #a89984
#set $bright_red #fb4934
#set $bright_green #b8bb26
#set $bright_yellow #fabd2f
#set $bright_blue #83a598
#set $bright_purple #d3869b
#set $bright_aqua #8ec07c
#set $bright_orange #fe8019
#set $neutral_red #cc241d
#set $neutral_green #98971a
#set $neutral_yellow #d79921
#set $neutral_blue #458588
#set $neutral_purple #b16286
#set $neutral_aqua #689d6a
#set $neutral_orange #d65d0e
#set $faded_red #9d0006
#set $faded_green #79740e
#set $faded_yellow #b57614
#set $faded_blue #076678
#set $faded_purple #8f3f71
#set $faded_aqua #427b58
#set $faded_orange #af3a03
#set $transparent #ffffff00
# Format
font=Hasklug Nerd Font 8
border-color=#83a598
border-size=2
background-color=#1d2021e6
text-color=#fdf6e3
format=<b>%s</b> <span color="#93a1a1">(%a)</span>\n%b
# Icons
icon-path=/usr/share/icons/Papirus-Adapta-Nokto-Maia:/usr/share/icons/Papirus-Maia:/usr/share/icons/Papirus
# Hidden format
[hidden]
format=Hidden: %h [%t]
[urgency=low]
text-color=#93a1a1
[urgency=low actionable]
border-color=#93a1a1
[urgency=normal actionable]
border-color=#268bd2
[urgency=high]
border-color=#cc241d
[urgency=high actionable]
border-color=#fb4934
[app-name=playerctl]
max-icon-size=96
[app-name=clementine]
max-icon-size=96
[app-name=i3-hint]
max-icon-size=48
format=%s\n%b
width=150
[mode=do-not-disturb]
invisible=1

View File

@ -14,8 +14,6 @@ export EDITOR="vim"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# ZSH History
export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=100000
@ -36,3 +34,13 @@ export MANPATH="/usr/local/man:$MANPATH"
# Add ~/bin to the PATH
[ -d "$HOME/bin" ] && export PATH="$HOME/bin:$PATH"
# add doom emacs to the path
#export PATH=$HOME/.emacs.d/bin:$PATH
export PATH=$HOME/.config/emacs/bin:$PATH
export PATH=/home/joachim/.local/share/gem/ruby/3.0.0/bin:$PATH
# add my own scripts to the path
export PATH=$HOME/scripts:$PATH

View File

@ -0,0 +1,100 @@
#!/usr/bin/env zsh
# Install zgenom if needed
if [[ ! -f $HOME/.zgenom/zgenom.zsh ]]; then
print -P "Installing zgenom"
git clone https://github.com/jandamm/zgenom.git "${HOME}/.zgenom" && \
print -P " - Installation successful." || \
print -P " - The clone has failed."
fi
# load zgenom
source "${HOME}/.zgenom/zgenom.zsh"
# Check for plugin and zgenom updates every 7 days
# This does not increase the startup time.
zgenom autoupdate
# if the init script doesn't exist
if ! zgenom saved; then
# specify plugins here
zgenom ohmyzsh
zgenom ohmyzsh plugins/git
zgenom ohmyzsh plugins/sudo
zgenom ohmyzsh plugins/archlinux
zgenom ohmyzsh plugins/command-not-found
zgenom ohmyzsh plugins/common-aliases
zgenom ohmyzsh plugins/copypath
zgenom ohmyzsh plugins/copyfile
zgenom ohmyzsh plugins/cp
zgenom ohmyzsh plugins/dircycle
zgenom ohmyzsh plugins/docker-compose
zgenom ohmyzsh plugins/encode64
zgenom ohmyzsh plugins/extract
zgenom ohmyzsh plugins/fancy-ctrl-z
zgenom ohmyzsh plugins/gem
zgenom ohmyzsh plugins/git
zgenom ohmyzsh plugins/git/git.plugin.zsh
zgenom ohmyzsh plugins/golang
zgenom ohmyzsh plugins/gpg-agent
zgenom ohmyzsh plugins/history
zgenom ohmyzsh plugins/node
zgenom ohmyzsh plugins/npm
zgenom ohmyzsh plugins/pip
zgenom ohmyzsh plugins/rvm
zgenom ohmyzsh plugins/svn
zgenom ohmyzsh plugins/systemd
zgenom ohmyzsh plugins/terraform
zgenom ohmyzsh plugins/tmux
zgenom ohmyzsh plugins/tmuxinator
zgenom ohmyzsh plugins/urltools
zgenom ohmyzsh plugins/vagrant
zgenom ohmyzsh plugins/web-search
# prezto options
zgenom prezto editor key-bindings 'emacs'
zgenom prezto prompt theme 'sorin'
# This ZSH plugin enables using fzf to search your command history and do file searches.
zgenom load unixorn/fzf-zsh-plugin
# Introduce 256 colors in terminal
zgenom load chrissicool/zsh-256color
# Because your terminal should be able to perform tasks asynchronously without external tools!
zgenom load mafredri/zsh-async
# simplistic interactive filtering tool
zgenom load peco/peco
# Bookmarks and jump
zgenom load jocelynmallon/zshmarks
# Enhanced dir list with git features
zgenom load supercrabtree/k
# Jump back to parent directory
zgenom load tarrasch/zsh-bd
zgenom load djui/alias-tips
zgenom load hlissner/zsh-autopair
# search in zsh history
zgenom load zsh-users/zsh-history-substring-search
# Additional completion definitions for Zsh.
# zgenom load zsh-users/zsh-completions
# Suggests commands as you type based on history and completions.
# zgenom load zsh-users/zsh-autosuggestions
# zsh-syntax-highlighting must be loaded after executing compinit command and sourcing other plugins
zgenom load zsh-users/zsh-syntax-highlighting
# File autocompletions
zgenom load marlonrichert/zsh-autocomplete
# generate the init script from plugins above
zgenom save
fi

View File

@ -48,8 +48,8 @@ zinit light zsh-users/zsh-history-substring-search
# Enhanced CD command
# wait lucid > suppress output on console, messes with p10 setup
zinit wait lucid light-mode for \
b4b4r07/enhancd
#zinit wait lucid light-mode for \
# b4b4r07/enhancd
# Oh-My-Zsh plugins
zinit snippet OMZ::plugins/git/git.plugin.zsh

View File

@ -16,3 +16,11 @@ alias time='time -p ' # -p for POSIX output
# git shortcuts
alias gac="git add -A && git commit -a"
alias dddu="docker-compose down && docker-compose up -d"
# yank the last command from history into the clipboard
alias yk="cat ~/.zsh_history | tail -n 2 | head -n 1 | cut -d ';' -f 2- | xclip -selection clipboard"
# add space after sudo to make it consider aliases, other 'sudo vi' would fail for not aliasing to vim
alias sudo="sudo "

View File

@ -0,0 +1,913 @@
#compdef _chezmoi chezmoi
# generated these with `chezmoi completion`
function _chezmoi {
local -a commands
_arguments -C \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
"1: :->cmnds" \
"*::arg:->args"
case $state in
cmnds)
commands=(
"add:Add an existing file, directory, or symlink to the source state"
"apply:Update the destination directory to match the target state"
"archive:Write a tar archive of the target state to stdout"
"cat:Print the target contents of a file or symlink"
"cd:Launch a shell in the source directory"
"chattr:Change the attributes of a target in the source state"
"completion:Generate shell completion code for the specified shell (bash, fish, or zsh)"
"data:Print the template data"
"diff:Print the diff between the target state and the destination state"
"docs:Print documentation"
"doctor:Check your system for potential problems"
"dump:Write a dump of the target state to stdout"
"edit:Edit the source state of a target"
"edit-config:Edit the configuration file"
"execute-template:Write the result of executing the given template(s) to stdout"
"forget:Remove a target from the source state"
"git:Run git in the source directory"
"help:Print help about a command"
"hg:Run mercurial in the source directory"
"import:Import a tar archive into the source state"
"init:Setup the source directory and update the destination directory to match the target state"
"managed:List the managed files in the destination directory"
"merge:Perform a three-way merge between the destination state, the source state, and the target state"
"purge:Purge all of chezmoi's configuration and data"
"remove:Remove a target from the source state and the destination directory"
"secret:Interact with a secret manager"
"source:Run the source version control system command in the source directory"
"source-path:Print the path of a target in the source state"
"unmanaged:List the unmanaged files in the destination directory"
"update:Pull changes from the source VCS and apply any changes"
"verify:Exit with success if the destination state matches the target state, fail otherwise"
)
_describe "command" commands
;;
esac
case "$words[1]" in
add)
_chezmoi_add
;;
apply)
_chezmoi_apply
;;
archive)
_chezmoi_archive
;;
cat)
_chezmoi_cat
;;
cd)
_chezmoi_cd
;;
chattr)
_chezmoi_chattr
;;
completion)
_chezmoi_completion
;;
data)
_chezmoi_data
;;
diff)
_chezmoi_diff
;;
docs)
_chezmoi_docs
;;
doctor)
_chezmoi_doctor
;;
dump)
_chezmoi_dump
;;
edit)
_chezmoi_edit
;;
edit-config)
_chezmoi_edit-config
;;
execute-template)
_chezmoi_execute-template
;;
forget)
_chezmoi_forget
;;
git)
_chezmoi_git
;;
help)
_chezmoi_help
;;
hg)
_chezmoi_hg
;;
import)
_chezmoi_import
;;
init)
_chezmoi_init
;;
managed)
_chezmoi_managed
;;
merge)
_chezmoi_merge
;;
purge)
_chezmoi_purge
;;
remove)
_chezmoi_remove
;;
secret)
_chezmoi_secret
;;
source)
_chezmoi_source
;;
source-path)
_chezmoi_source-path
;;
unmanaged)
_chezmoi_unmanaged
;;
update)
_chezmoi_update
;;
verify)
_chezmoi_verify
;;
esac
}
function _chezmoi_add {
_arguments \
'(-a --autotemplate)'{-a,--autotemplate}'[auto generate the template when adding files as templates]' \
'(-e --empty)'{-e,--empty}'[add empty files]' \
'--encrypt[encrypt files]' \
'(-x --exact)'{-x,--exact}'[add directories exactly]' \
'(-f --force)'{-f,--force}'[overwrite source state, even if template would be lost]' \
'(-p --prompt)'{-p,--prompt}'[prompt before adding]' \
'(-r --recursive)'{-r,--recursive}'[recurse in to subdirectories]' \
'(-T --template)'{-T,--template}'[add files as templates]' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_apply {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_archive {
_arguments \
'(-o --output)'{-o,--output}'[output filename]:filename:_files' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_cat {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_cd {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_chattr {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :("empty" "-empty" "+empty" "noempty" "e" "-e" "+e" "noe" "encrypt" "-encrypt" "+encrypt" "noencrypt" "exact" "-exact" "+exact" "noexact" "executable" "-executable" "+executable" "noexecutable" "x" "-x" "+x" "nox" "private" "-private" "+private" "noprivate" "p" "-p" "+p" "nop" "template" "-template" "+template" "notemplate" "t" "-t" "+t" "not")' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files ' \
'9: :_files '
}
function _chezmoi_completion {
_arguments \
'(-h --help)'{-h,--help}'[help for completion]' \
'(-o --output)'{-o,--output}'[output filename]:filename:_files' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :("bash" "fish" "zsh")'
}
function _chezmoi_data {
_arguments \
'(-f --format)'{-f,--format}'[format (JSON, TOML, or YAML)]:' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_diff {
_arguments \
'(-f --format)'{-f,--format}'[format, "chezmoi" or "git"]:' \
'--no-pager[disable pager]' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_docs {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_doctor {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_dump {
_arguments \
'(-f --format)'{-f,--format}'[format (JSON, TOML, or YAML)]:' \
'(-r --recursive)'{-r,--recursive}'[recursive]' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_edit {
_arguments \
'(-a --apply)'{-a,--apply}'[apply edit after editing]' \
'(-d --diff)'{-d,--diff}'[print diff after editing]' \
'(-p --prompt)'{-p,--prompt}'[prompt before applying (implies --diff)]' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_edit-config {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_execute-template {
_arguments \
'(-i --init)'{-i,--init}'[simulate chezmoi init]' \
'(-o --output)'{-o,--output}'[output filename]:' \
'(-p --promptString)'{-p,--promptString}'[simulate promptString]:' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_forget {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_git {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_help {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_hg {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_import {
_arguments \
'(-x --exact)'{-x,--exact}'[import directories exactly]' \
'(-r --remove-destination)'{-r,--remove-destination}'[remove destination before import]' \
'--strip-components[strip components]:' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files -g "*.tar" -g "*.tar.bz2" -g "*.tar.gz" -g "*.tgz"'
}
function _chezmoi_init {
_arguments \
'--apply[update destination directory]' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_managed {
_arguments \
'(*-i *--include)'{\*-i,\*--include}'[include]:' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_merge {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_purge {
_arguments \
'(-f --force)'{-f,--force}'[remove without prompting]' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_remove {
_arguments \
'(-f --force)'{-f,--force}'[remove without prompting]' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_secret {
local -a commands
_arguments -C \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
"1: :->cmnds" \
"*::arg:->args"
case $state in
cmnds)
commands=(
"bitwarden:Execute the Bitwarden CLI (bw)"
"generic:Execute a generic secret command"
"gopass:Execute the gopass CLI"
"keepassxc:Execute the KeePassXC CLI (keepassxc-cli)"
"keyring:Interact with keyring"
"lastpass:Execute the LastPass CLI (lpass)"
"onepassword:Execute the 1Password CLI (op)"
"pass:Execute the pass CLI"
"vault:Execute the Hashicorp Vault CLI (vault)"
)
_describe "command" commands
;;
esac
case "$words[1]" in
bitwarden)
_chezmoi_secret_bitwarden
;;
generic)
_chezmoi_secret_generic
;;
gopass)
_chezmoi_secret_gopass
;;
keepassxc)
_chezmoi_secret_keepassxc
;;
keyring)
_chezmoi_secret_keyring
;;
lastpass)
_chezmoi_secret_lastpass
;;
onepassword)
_chezmoi_secret_onepassword
;;
pass)
_chezmoi_secret_pass
;;
vault)
_chezmoi_secret_vault
;;
esac
}
function _chezmoi_secret_bitwarden {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_generic {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_gopass {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_keepassxc {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_keyring {
local -a commands
_arguments -C \
'--service[service]:' \
'--user[user]:' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
"1: :->cmnds" \
"*::arg:->args"
case $state in
cmnds)
commands=(
"get:Get a password from keyring"
"set:Set a password in keyring"
)
_describe "command" commands
;;
esac
case "$words[1]" in
get)
_chezmoi_secret_keyring_get
;;
set)
_chezmoi_secret_keyring_set
;;
esac
}
function _chezmoi_secret_keyring_get {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'--service[service]:' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'--user[user]:' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_keyring_set {
_arguments \
'--password[password]:' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'--service[service]:' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'--user[user]:' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_lastpass {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_onepassword {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_pass {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_secret_vault {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_source {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_source-path {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}
function _chezmoi_unmanaged {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_update {
_arguments \
'(-a --apply)'{-a,--apply}'[apply after pulling]' \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]'
}
function _chezmoi_verify {
_arguments \
'--color[colorize diffs]:' \
'(-c --config)'{-c,--config}'[config file]:filename:_files' \
'--debug[write debug logs]' \
'(-D --destination)'{-D,--destination}'[destination directory]:filename:_files -g "-(/)"' \
'(-n --dry-run)'{-n,--dry-run}'[dry run]' \
'--follow[follow symlinks]' \
'--remove[remove targets]' \
'(-S --source)'{-S,--source}'[source directory]:filename:_files -g "-(/)"' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'1: :_files ' \
'2: :_files ' \
'3: :_files ' \
'4: :_files ' \
'5: :_files ' \
'6: :_files ' \
'7: :_files ' \
'8: :_files '
}

View File

@ -0,0 +1,7 @@
# load fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Set up SDKMAN
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"

View File

@ -106,7 +106,7 @@ shadow-ignore-shaped = false;
#
#################################
inactive-opacity = 0.8;
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
@ -121,12 +121,19 @@ blur-background = true;
blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = true;
# adding rect-overlay should fix sharing of screen over Teams
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
"window_type = 'desktop'",
"name *= 'rect-overlay'",
];
blur-size = 10;
# makes everything smeared out
blur-deviation = 100.0;
blur-method = "gaussian";
#blur-kern = "3x3box";
# this supposedly fixes blur artifacts in terminal (saw some black lines)
use-damage = false
use-damage = false;
#################################
#

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
#!/bin/sh
# perform a diff between the used scripts
diff -r ~/.config/polybar-scripts/polybar-scripts ~/.dotfiles/polybar/polybar-scripts | grep -Ev "\/home\/[^/].+\/\.config"

View File

@ -0,0 +1,7 @@
#!/bin/sh
# make sure the polybar-scripts repo is here
git clone https://github.com/polybar/polybar-scripts.git ~/.config/polybar-scripts
cd ~/.config/polybar-scripts
git pull

View File

@ -0,0 +1 @@
These are local copies of the scripts found on the polybar-scripts (https://github.com/polybar/polybar-scripts.git) repo. Modified to fit the local system. Pull changes of the repo to ~/.config/polybar-scripts and vimdiff between the local copies to see if there's updates.

View File

@ -18,7 +18,7 @@ A small script that shows your typing speed. Happy Hacking!
* `METRIC`: either `cpm` (characters per minute) of `wpm` ([words per minute, 1 word = 5 characters](https://en.wikipedia.org/wiki/Words_per_minute)). Default: `cpm`
* `FORMAT`: format string according to which the metric will be output. Default: `# %d $METRIC`
* `INTERVAL`: amount of seconds to gather data. Default: 20
* `LAYOUT`: keyboard layout, to be able to only count letters and numbers. Currently supported are `qwerty` and `azerty`. If you have a different layout, please contribute a condition for it! See the script's source code. Use the special value `dontcare` to count all keys, not just letters and numbers. Default: `qwerty`
* `LAYOUT`: keyboard layout, to be able to only count letters and numbers. Currently supported are `qwerty`, `azerty`, `qwertz` and `dvorak`. If you have a different layout, please contribute a condition for it! See the script's source code. Use the special value `dontcare` to count all keys, not just letters and numbers. Default: `qwerty`
If after 20 seconds the value stays at 0 even though you're typing, you may have to configure the name of your keyboard. Change the setting `KEYBOARD_ID` (see Configuration below) in the script. You can find your keyboard description with `xinput list --short`.

View File

@ -1,11 +1,12 @@
#!/bin/sh
# shellcheck disable=SC2016,SC2059
KEYBOARD_ID="AT Translated Set 2 keyboard"
# cpm: characters per minute
# wpm: words per minute (1 word = 5 characters)
METRIC=cpm
FORMAT="%d $METRIC"
FORMAT="# %d $METRIC"
INTERVAL=20
@ -18,6 +19,8 @@ LAYOUT=qwerty
case "$LAYOUT" in
qwerty) CONDITION='($3 >= 10 && $3 <= 19) || ($3 >= 24 && $3 <= 33) || ($3 >= 37 && $3 <= 53) || ($3 >= 52 && $3 <= 58)'; ;;
azerty) CONDITION='($3 >= 10 && $3 <= 19) || ($3 >= 24 && $3 <= 33) || ($3 >= 37 && $3 <= 54) || ($3 >= 52 && $3 <= 57)'; ;;
qwertz) CONDITION='($3 >= 10 && $3 <= 20) || ($3 >= 24 && $3 <= 34) || ($3 == 36) || ($3 >= 38 && $3 <= 48) || ($3 >= 52 && $3 <= 58)'; ;;
dvorak) CONDITION='($3 >= 10 && $3 <= 19) || ($3 >= 27 && $3 <= 33) || ($3 >= 38 && $3 <= 47) || ($3 >= 53 && $3 <= 61)'; ;;
dontcare) CONDITION='1'; ;; # Just register all key presses, not only letters and numbers
*) echo "Unsupported layout \"$LAYOUT\""; exit 1; ;;
esac

View File

@ -2,14 +2,24 @@
This script displays the current track and the play-pause status without polling. Information is obtained by listening to MPRIS events, so it is updated instantaneously on change.
![player-mpris-tail](screenshots/1.png) ![player-mpris-tail](screenshots/2.png)
## Dependencies
* `python-dbus`
* `python-gobject`
* `python-gi`
## Configuration
The format of the output can be defined by passing an `-f` or `--format` argument. This argument supports metadata replacement using `{tag}` (e.g. `{title}`) as well as more advanced formatting, described below.
Players can be blacklisted by passing a `-b` or `--blacklist` argument. As an example, VLC can be blacklisted by passing `-b vlc`. To get a list of the current running players (and their status), run the script as `player-mpris-tail.py list`.
![player-mpris-tail](screenshots/1.png) ![player-mpris-tail](screenshots/2.png)
## Commands
### Commands
The current player can be controlled by passing one of the following commands:
@ -33,13 +43,14 @@ list | List the detected players and their status
metadata | Print the metadata object for the current track
## Arguments
### Arguments
The following arguments are supported:
Argument | Description | Default
---|---|---
-b, --blacklist | Blacklist / Ignore the given player
-w, --whitelist | Whitelist / Permit the given player
-f, --format | Use the given `format` string | `{icon} {artist} - {title}`
--truncate-text | Use the given string as the end of truncated text | `…`
--icon-playing | Use the given text as the playing icon | `⏵`
@ -48,7 +59,7 @@ Argument | Description | Default
--icon-none | Use the given text as the icon for when no player is active | ``
## Formatting
### Formatting
Tags can be printed by surrounding them with `{` and `}`. Polybar formatting can also be given and will be passed through, including substituted tags and formatters.
@ -64,6 +75,7 @@ album | The album of the current track
title | The title of the current track
track | The track number of the current track
length | The length of the current track
fmt-length | The formatted length of the current track ([hours:]minutes:seconds)
genre | The genre of the current track
disc | The disc number of the current track
date | The date of the current track
@ -86,74 +98,69 @@ w | Number | Limit the width of the string to `number` | `{:w3:Hello:}`
t | Number | Truncate width of the string to `number`. If the string is shorter than or equal to `number` it is printed as given, else the string is truncated and appended a truncator text | `{:t3:Hello:}` | `He…`
## Dependencies
* `python-dbus`
* `python-gobject`
* `python-gi`
## Module
### Basic output
```ini
[module/player-mpris-tail]
type = custom/script
exec = ~/polybar-scripts/player-mpris-tail.py -f '{icon} {artist} - {title}'
tail = true
label = %output%
```
Example: `⏵ Artist - Title`
### Basic output + mouse controls
### Basic output and mouse controls
```ini
[module/player-mpris-tail]
type = custom/script
exec = ~/polybar-scripts/player-mpris-tail.py -f '{icon} {artist} - {title}'
tail = true
label = %output%
click-left = ~/polybar-scripts/player-mpris-tail.py previous
click-right = ~/polybar-scripts/player-mpris-tail.py next
click-middle = ~/polybar-scripts/player-mpris-tail.py play-pause
click-left = ~/polybar-scripts/player-mpris-tail.py previous &
click-right = ~/polybar-scripts/player-mpris-tail.py next &
click-middle = ~/polybar-scripts/player-mpris-tail.py play-pause &
```
Example: `⏵ Artist - Title`
### Output using formatters
```ini
[module/player-mpris-tail]
type = custom/script
exec = ~/polybar-scripts/player-mpris-tail.py -f '{icon} {:artist:t5:{artist}:}{:artist: - :}{:t4:{title}:}'
tail = true
label = %output%
click-left = ~/polybar-scripts/player-mpris-tail.py previous
click-right = ~/polybar-scripts/player-mpris-tail.py next
click-middle = ~/polybar-scripts/player-mpris-tail.py play-pause
click-left = ~/polybar-scripts/player-mpris-tail.py previous &
click-right = ~/polybar-scripts/player-mpris-tail.py next &
click-middle = ~/polybar-scripts/player-mpris-tail.py play-pause &
```
Example: `⏵ Artis… - Titl…` or `⏵ Titl…`
### Output using formatters and Polybar action handlers
```ini
[module/player-mpris-tail]
type = custom/script
exec = ~/polybar-scripts/player-mpris-tail.py -f '{icon} {:artist:t18:{artist}:}{:artist: - :}{:t20:{title}:} %{A1:~/polybar-scripts/player-mpris-tail.py previous:} ⏮ %{A} %{A1:~/polybar-scripts/player-mpris-tail.py play-pause:} {icon-reversed} %{A} %{A1:~/polybar-scripts/player-mpris-tail.py next:} ⏭ %{A}'
tail = true
label = %output%
```
Example: `⏵ Artis… - Titl… ⏮ ⏸ ⏭ ` or `⏵ Titl… ⏮ ⏸ ⏭ ` or `⏸ Titl… ⏮ ⏵ ⏭ `
### Output using formatters, Polybar action handlers and blacklisting
```ini
[module/player-mpris-tail]
type = custom/script
exec = ~/polybar-scripts/player-mpris-tail.py -f '{icon} {:artist:t18:{artist}:}{:artist: - :}{:t20:{title}:} %{A1:~/polybar-scripts/player-mpris-tail.py previous -b vlc -b plasma-browser-integration:} ⏮ %{A} %{A1:~/polybar-scripts/player-mpris-tail.py play-pause -b vlc -b plasma-browser-integration:} {icon-reversed} %{A} %{A1:~/polybar-scripts/player-mpris-tail.py next -b vlc -b plasma-browser-integration:} ⏭ %{A}' -b vlc -b plasma-browser-integration
tail = true
label = %output%
```
Example: `⏵ Artis… - Titl… ⏮ ⏸ ⏭ ` or `⏵ Titl… ⏮ ⏸ ⏭ ` or `⏸ Titl… ⏮ ⏵ ⏭ `

View File

@ -2,6 +2,7 @@
import sys
import dbus
import os
from operator import itemgetter
import argparse
import re
@ -18,12 +19,17 @@ FORMAT_TAG_REGEX = re.compile(r'(?P<format>[wt])(?P<formatlen>\d+)')
SAFE_TAG_REGEX = re.compile(r'[{}]')
class PlayerManager:
def __init__(self, blacklist = [], connect = True):
self.blacklist = blacklist
def __init__(self, filter_list, block_mode = True, connect = True):
self.filter_list = filter_list
self.block_mode = block_mode
self._connect = connect
self._session_bus = dbus.SessionBus()
self._last_status = ''
self.players = {}
self.print_queue = []
self.connected = False
self.player_states = {}
self.refreshPlayerList()
if self._connect:
@ -36,6 +42,25 @@ class PlayerManager:
def connect(self):
self._session_bus.add_signal_receiver(self.onOwnerChangedName, 'NameOwnerChanged')
self._session_bus.add_signal_receiver(self.onChangedProperties, 'PropertiesChanged',
path = '/org/mpris/MediaPlayer2',
sender_keyword='sender')
def onChangedProperties(self, interface, properties, signature, sender = None):
if sender in self.players:
player = self.players[sender]
# If we know this player, but haven't been able to set up a signal handler
if 'properties_changed' not in player._signals:
# Then trigger the signal handler manually
player.onPropertiesChanged(interface, properties, signature)
else:
# If we don't know this player, get its name and add it
bus_name = self.getBusNameFromOwner(sender)
if bus_name is None:
return
self.addPlayer(bus_name, sender)
player = self.players[sender]
player.onPropertiesChanged(interface, properties, signature)
def onOwnerChangedName(self, bus_name, old_owner, new_owner):
if self.busNameIsAPlayer(bus_name):
@ -46,26 +71,48 @@ class PlayerManager:
else:
self.changePlayerOwner(bus_name, old_owner, new_owner)
def getBusNameFromOwner(self, owner):
player_bus_names = [ bus_name for bus_name in self._session_bus.list_names() if self.busNameIsAPlayer(bus_name) ]
for player_bus_name in player_bus_names:
player_bus_owner = self._session_bus.get_name_owner(player_bus_name)
if owner == player_bus_owner:
return player_bus_name
def busNameIsAPlayer(self, bus_name):
return bus_name.startswith('org.mpris.MediaPlayer2') and bus_name.split('.')[-1] not in self.blacklist
if bus_name.startswith('org.mpris.MediaPlayer2') is False:
return False
name = bus_name.split('.')[3]
if self.block_mode is True:
return name not in self.filter_list
return name in self.filter_list
def refreshPlayerList(self):
player_bus_names = [ bus_name for bus_name in self._session_bus.list_names() if self.busNameIsAPlayer(bus_name) ]
for player_bus_name in player_bus_names:
self.addPlayer(player_bus_name)
if self.connected != True:
self.connected = True
self.printQueue()
def addPlayer(self, bus_name, owner = None):
player = Player(self._session_bus, bus_name, owner = owner, connect = self._connect)
player = Player(self._session_bus, bus_name, owner = owner, connect = self._connect, _print = self.print)
self.players[player.owner] = player
def removePlayer(self, owner):
if owner in self.players:
self.players[owner].disconnect()
del self.players[owner]
# If there are no more players, clear the output
if len(self.players) == 0:
_printFlush(ICON_NONE)
# Else, print the output of the next active player
else:
players = self.getSortedPlayerOwnerList()
if len(players) > 0:
self.players[players[0]].printStatus()
def changePlayerOwner(self, bus_name, old_owner, new_owner):
player = Player(self._session_bus, bus_name, owner = new_owner, connect = self._connect)
player = Player(self._session_bus, bus_name, owner = new_owner, connect = self._connect, _print = self.print)
self.players[new_owner] = player
del self.players[old_owner]
@ -91,12 +138,30 @@ class PlayerManager:
]
return self.players[playing_players[0]] if playing_players else None
def print(self, status, player):
self.player_states[player.bus_name] = status
if self.connected:
current_player = self.getCurrentPlayer()
if current_player != None:
_printFlush(self.player_states[current_player.bus_name])
else:
_printFlush(ICON_STOPPED)
else:
self.print_queue.append([status, player])
def printQueue(self):
for args in self.print_queue:
self.print(args[0], args[1])
self.print_queue.clear()
class Player:
def __init__(self, session_bus, bus_name, owner = None, connect = True):
def __init__(self, session_bus, bus_name, owner = None, connect = True, _print = None):
self._session_bus = session_bus
self.bus_name = bus_name
self._disconnecting = False
self.__print = _print
self.metadata = {
'artist' : '',
@ -104,6 +169,12 @@ class Player:
'title' : '',
'track' : 0
}
self._rate = 1.
self._positionAtLastUpdate = 0.
self._timeAtLastUpdate = time.time()
self._positionTimerRunning = False
self._metadata = None
self.status = 'stopped'
self.icon = ICON_NONE
@ -128,6 +199,7 @@ class Player:
self._playerRaise = self._media_interface.get_dbus_method('Raise', dbus_interface=None)
self._signals = {}
self.refreshPosition()
self.refreshStatus()
self.refreshMetadata()
@ -155,6 +227,7 @@ class Player:
introspect_xml = self._introspect(self.bus_name, '/')
if 'TrackMetadataChanged' in introspect_xml:
self._signals['track_metadata_changed'] = self._session_bus.add_signal_receiver(self.onMetadataChanged, 'TrackMetadataChanged', self.bus_name)
self._signals['seeked'] = self._player_interface.connect_to_signal('Seeked', self.onSeeked)
self._signals['properties_changed'] = self._properties_interface.connect_to_signal('PropertiesChanged', self.onPropertiesChanged)
def disconnect(self):
@ -169,6 +242,7 @@ class Player:
try:
self.status = str(self._getProperty('org.mpris.MediaPlayer2.Player', 'PlaybackStatus')).lower()
self.updateIcon()
self.checkPositionTimer()
except dbus.exceptions.DBusException:
self.disconnect()
@ -193,36 +267,45 @@ class Player:
ICON_PLAYING
)
def _print(self, status):
self.__print(status, self)
def _parseMetadata(self):
if self._metadata != None:
artist = _getProperty(self._metadata, 'xesam:artist', [''])
if len(artist):
self.metadata['artist'] = re.sub(SAFE_TAG_REGEX, """\1\1""", artist[0])
else:
self.metadata['artist'] = '';
self.metadata['album'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _getProperty(self._metadata, 'xesam:album', ''))
self.metadata['title'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _getProperty(self._metadata, 'xesam:title', ''))
self.metadata['track'] = _getProperty(self._metadata, 'xesam:trackNumber', '')
length = str(_getProperty(self._metadata, 'xesam:length', ''))
if not len(length):
length = str(_getProperty(self._metadata, 'mpris:length', ''))
if len(length):
self.metadata['length'] = int(length)
else:
self.metadata['length'] = 0
self.metadata['genre'] = _getProperty(self._metadata, 'xesam:genre', '')
self.metadata['disc'] = _getProperty(self._metadata, 'xesam:discNumber', '')
self.metadata['date'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _getProperty(self._metadata, 'xesam:contentCreated', ''))
self.metadata['year'] = re.sub(SAFE_TAG_REGEX, """\1\1""", self.metadata['date'][0:4])
cover = _getProperty(self._metadata, 'xesam:artUrl', '')
if not len(cover):
cover = _getProperty(self._metadata, 'mpris:artUrl', '')
if len(cover):
self.metadata['cover'] = re.sub(SAFE_TAG_REGEX, """\1\1""", cover)
else:
self.metadata['cover'] = ''
self.metadata['duration'] = _getDuration(self.metadata['length'])
# Obtain properties from _metadata
_artist = _getProperty(self._metadata, 'xesam:artist', [''])
_album = _getProperty(self._metadata, 'xesam:album', '')
_title = _getProperty(self._metadata, 'xesam:title', '')
_track = _getProperty(self._metadata, 'xesam:trackNumber', '')
_genre = _getProperty(self._metadata, 'xesam:genre', [''])
_disc = _getProperty(self._metadata, 'xesam:discNumber', '')
_length = _getProperty(self._metadata, 'xesam:length', 0) or _getProperty(self._metadata, 'mpris:length', 0)
_length_int = _length if type(_length) is int else int(float(_length))
_fmt_length = ( # Formats using h:mm:ss if length > 1 hour, else m:ss
f'{_length_int/1e6//60:.0f}:{_length_int/1e6%60:02.0f}'
if _length_int < 3600*1e6 else
f'{_length_int/1e6//3600:.0f}:{_length_int/1e6%3600//60:02.0f}:{_length_int/1e6%60:02.0f}'
)
_date = _getProperty(self._metadata, 'xesam:contentCreated', '')
_year = _date[0:4] if len(_date) else ''
_url = _getProperty(self._metadata, 'xesam:url', '')
_cover = _getProperty(self._metadata, 'xesam:artUrl', '') or _getProperty(self._metadata, 'mpris:artUrl', '')
_duration = _getDuration(_length_int)
# Update metadata
self.metadata['artist'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_artist))
self.metadata['album'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_album))
self.metadata['title'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_title))
self.metadata['track'] = _track
self.metadata['genre'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_genre))
self.metadata['disc'] = _disc
self.metadata['date'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _date)
self.metadata['year'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _year)
self.metadata['url'] = _url
self.metadata['filename'] = os.path.basename(_url)
self.metadata['length'] = _length_int
self.metadata['fmt-length'] = _fmt_length
self.metadata['cover'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_cover))
self.metadata['duration'] = _duration
def onMetadataChanged(self, track_id, metadata):
self.refreshMetadata()
@ -240,18 +323,62 @@ class Player:
status = str(properties[dbus.String('PlaybackStatus')]).lower()
if status != self.status:
self.status = status
self.checkPositionTimer()
self.updateIcon()
updated = True
if dbus.String('Rate') in properties and dbus.String('PlaybackStatus') not in properties:
self.refreshStatus()
if NEEDS_POSITION and dbus.String('Rate') in properties:
rate = properties[dbus.String('Rate')]
if rate != self._rate:
self._rate = rate
self.refreshPosition()
if updated:
self.refreshPosition()
self.printStatus()
def checkPositionTimer(self):
if NEEDS_POSITION and self.status == 'playing' and not self._positionTimerRunning:
self._positionTimerRunning = True
GLib.timeout_add_seconds(1, self._positionTimer)
def onSeeked(self, position):
self.refreshPosition()
self.printStatus()
def _positionTimer(self):
self.printStatus()
self._positionTimerRunning = self.status == 'playing'
return self._positionTimerRunning
def refreshPosition(self):
try:
time_us = self._getProperty('org.mpris.MediaPlayer2.Player', 'Position')
except dbus.exceptions.DBusException:
time_us = 0
self._timeAtLastUpdate = time.time()
self._positionAtLastUpdate = time_us / 1000000
def _getPosition(self):
if self.status == 'playing':
return self._positionAtLastUpdate + self._rate * (time.time() - self._timeAtLastUpdate)
else:
return self._positionAtLastUpdate
def _statusReplace(self, match, metadata):
tag = match.group('tag')
format = match.group('format')
formatlen = match.group('formatlen')
text = match.group('text')
tag_found = False
reversed_tag = False
if tag.startswith('-'):
tag = tag[1:]
reversed_tag = True
if format is None:
tag_is_format_match = re.match(FORMAT_TAG_REGEX, tag)
if tag_is_format_match:
@ -270,6 +397,9 @@ class Player:
if tag_found is False and tag in metadata and len(metadata[tag]):
tag_found = True
if reversed_tag:
tag_found = not tag_found
if tag_found:
return text
else:
@ -277,8 +407,9 @@ class Player:
def printStatus(self):
if self.status in [ 'playing', 'paused' ]:
if self.metadata['title']:
metadata = { **self.metadata, 'icon': self.icon, 'icon-reversed': self.icon_reversed }
if NEEDS_POSITION:
metadata['position'] = time.strftime("%M:%S", time.gmtime(self._getPosition()))
# replace metadata tags in text
text = re.sub(FORMAT_REGEX, lambda match: self._statusReplace(match, metadata), FORMAT_STRING)
# restore polybar tag formatting and replace any remaining metadata tags after that
@ -286,9 +417,9 @@ class Player:
text = re.sub(r'􏿿p􏿿(.*?)􏿿p􏿿(.*?)􏿿p􏿿(.*?)􏿿p􏿿', r'%{\1}\2%{\3}', text.format_map(CleanSafeDict(**metadata)))
except:
print("Invalid format string")
_printFlush(text)
return
_printFlush(ICON_STOPPED)
self._print(text)
else:
self._print(ICON_STOPPED)
def _dbusValueToPython(value):
@ -331,6 +462,14 @@ def _getDuration(t: int):
seconds = t / 1000000
return time.strftime("%M:%S", time.gmtime(seconds))
def _metadataGetFirstItem(_value):
if type(_value) is list:
# Returns the string representation of the first item on _value if it has at least one item.
# Returns an empty string if _value is empty.
return str(_value[0]) if len(_value) else ''
else:
# If _value isn't a list just return the string representation of _value.
return str(_value)
class CleanSafeDict(dict):
def __missing__(self, key):
@ -356,11 +495,15 @@ parser.add_argument('command', help="send the given command to the active player
choices=[ 'play', 'pause', 'play-pause', 'stop', 'previous', 'next', 'status', 'list', 'current', 'metadata', 'raise' ],
default=None,
nargs='?')
parser.add_argument('-b', '--blacklist', help="ignore a player by it's bus name. Can be be given multiple times (e.g. -b vlc -b audacious)",
parser.add_argument('-b', '--blacklist', help="ignore a player by it's bus name. Can be given multiple times (e.g. -b vlc -b audacious)",
action='append',
metavar="BUS_NAME",
default=[])
parser.add_argument('-f', '--format', default='{icon} {artist} - {title}')
parser.add_argument('-w', '--whitelist', help="permit a player by it's bus name like --blacklist. will block --blacklist if given",
action='append',
metavar="BUS_NAME",
default=[])
parser.add_argument('-f', '--format', default='{icon} {:artist:{artist} - :}{:title:{title}:}{:-title:{filename}:}')
parser.add_argument('--truncate-text', default='')
parser.add_argument('--icon-playing', default='')
parser.add_argument('--icon-paused', default='')
@ -369,16 +512,21 @@ parser.add_argument('--icon-none', default='')
args = parser.parse_args()
FORMAT_STRING = re.sub(r'%\{(.*?)\}(.*?)%\{(.*?)\}', r'􏿿p􏿿\1􏿿p􏿿\2􏿿p􏿿\3􏿿p􏿿', args.format)
NEEDS_POSITION = "{position}" in FORMAT_STRING
TRUNCATE_STRING = args.truncate_text
ICON_PLAYING = args.icon_playing
ICON_PAUSED = args.icon_paused
ICON_STOPPED = args.icon_stopped
ICON_NONE = args.icon_none
block_mode = len(args.whitelist) == 0
filter_list = args.blacklist if block_mode else args.whitelist
if args.command is None:
PlayerManager(blacklist = args.blacklist)
PlayerManager(filter_list = filter_list, block_mode = block_mode)
else:
player_manager = PlayerManager(blacklist = args.blacklist, connect = False)
player_manager = PlayerManager(filter_list = filter_list, block_mode = block_mode, connect = False)
current_player = player_manager.getCurrentPlayer()
if args.command == 'play' and current_player:
current_player.play()
@ -396,10 +544,10 @@ else:
current_player.printStatus()
elif args.command == 'list':
print("\n".join(sorted([
"{} : {}".format(player.bus_name.split('.')[-1], player.status)
"{} : {}".format(player.bus_name.split('.')[3], player.status)
for player in player_manager.players.values() ])))
elif args.command == 'current' and current_player:
print("{} : {}".format(current_player.bus_name.split('.')[-1], current_player.status))
print("{} : {}".format(current_player.bus_name.split('.')[3], current_player.status))
elif args.command == 'metadata' and current_player:
print(_dbusValueToPython(current_player._metadata))
elif args.command == 'raise' and current_player:

View File

@ -1,4 +1,4 @@
# Script: updates-arch-aur
# Script: updates-aurhelper
A script that shows if there are AUR updates for Arch Linux.
@ -7,14 +7,14 @@ A script that shows if there are AUR updates for Arch Linux.
The possibilities depend on your AUR helper. Not all helpers can report the pending updates.
At the moment `trizen` and `cower` are documented. Take a look at the script to see how it works.
At the moment `yay`, `paru`, `trizen`, `pikaur`, `rua` and `cower` are documented. Take a look at the script to see how it works.
## Module
```ini
[module/updates-arch-aur]
[module/updates-aurhelper]
type = custom/script
exec = ~/polybar-scripts/updates-arch-aur.sh
exec = ~/polybar-scripts/updates-aurhelper.sh
interval = 600
```

View File

@ -0,0 +1,16 @@
#!/bin/sh
if ! updates=$(yay -Qum 2> /dev/null | wc -l); then
# if ! updates=$(paru -Qum 2> /dev/null | wc -l); then
# if ! updates=$(cower -u 2> /dev/null | wc -l); then
# if ! updates=$(trizen -Su --aur --quiet | wc -l); then
# if ! updates=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates=$(rua upgrade --printonly 2> /dev/null | wc -l); then
updates=0
fi
if [ "$updates" -gt 0 ]; then
echo "$updates"
else
echo ""
fi

View File

@ -0,0 +1,18 @@
# Script: updates-pacman
A script that shows if there are updates for pacman-based distributions like Arch Linux or Manjaro.
## Dependencies
* `pacman-contrib`
## Module
```ini
[module/updates-pacman]
type = custom/script
exec = ~/polybar-scripts/updates-pacman.sh
interval = 600
```

View File

@ -47,7 +47,7 @@ c.input.insert_mode.leave_on_load = False
## This is here so configs done via the GUI are still loaded.
## Remove it to not load settings done via the GUI.
# config.load_autoconfig()
config.load_autoconfig()
## Aliases for commands. The keys of the given dictionary are the
## aliases, while the values are the commands they map to.

View File

@ -0,0 +1,6 @@
configuration {
combi-modi: "window,drun,ssh";
font: "Fura Code 12";
modi: "run,combi";
}
@theme "~/.config/rofi/themes/gruvbox/gruvbox-dark-hard.rasi"

View File

@ -0,0 +1,7 @@
#rofi -show run
#monitor="$(swaymsg -t get_outputs | jq '[.[].focused] | index(true)')"
#monitor=""$(swaymsg -t get_workspaces | jq -e "map(select(.focused == true).num)[0]-(.|length)" | tr -d "-")
# get the focused monitor - kanshi could mess up the order so we get the monitorname instead
monitor="$(swaymsg -t get_outputs | jq -c '.[] | select(.focused) | select(.id)' | jq -c '.name')"
# show rofi on the focused monitor
rofi -show run -modi "run,drun,ssh,window" -sidebar-mode -show-icons -monitor "$monitor"

View File

@ -0,0 +1,19 @@
# Config for rofi-wifi-menu
# position values:
# 1 2 3
# 8 0 4
# 7 6 5
POSITION=3
#y-offset
YOFF=17
#x-offset
XOFF=0
#fields to be displayed
FIELDS=SSID,SECURITY,BARS
#font
FONT="Fura Code 8"

View File

@ -0,0 +1,270 @@
/* ==========================================================================
Rofi color theme
Based on the Gruvbox color scheme for Vim by morhetz
https://github.com/morhetz/gruvbox
File: gruvbox-dark.rasi
Desc: Gruvbox dark color theme for Rofi
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/gruvbox-rofi
Modified: Mon Feb 12 2018 04:08:43 PST -0800
========================================================================== */
* {
/* Theme settings */
highlight: bold italic;
scrollbar: true;
transparent: #ffffff00;
/* Gruvbox dark colors */
dark0-hard: #1d2021;
dark0-hard-transparent: #1d2021cc;
dark0: #282828;
dark0-transparent: #282828cc;
dark0-soft: #32302f;
dark0-soft-transparent: #32302fcc;
dark1: #3c3836;
dark1-transparent: #3c3836cc;
dark2: #504945;
dark2-transparent: #504945cc;
dark3: #665c54;
dark3-transparent: #665c54cc;
dark4: #7c6f64;
dark4-transparent: #7c6f64cc;
gray-245: #928374;
gray-245-transparent: #928374cc;
gray-244: #928374;
gray-244-transparent: #928374cc;
light0-hard: #f9f5d7;
light0-hard-transparent: #f9f5d7cc;
light0: #fbf1c7;
light0-transparent: #fbf1c7cc;
light0-soft: #f2e5bc;
light0-soft-transparent: #f2e5bccc;
light1: #ebdbb2;
light1-transparent: #ebdbb2cc;
light2: #d5c4a1;
light2-transparent: #d5c4a1cc;
light3: #bdae93;
light3-transparent: #bdae93cc;
light4: #a89984;
light4-transparent: #a89984cc;
bright-red: #fb4934;
bright-red-transparent: #fb4934cc;
bright-green: #b8bb26;
bright-green-transparent: #b8bb26cc;
bright-yellow: #fabd2f;
bright-yellow-transparent: #fabd2fcc;
bright-blue: #83a598;
bright-blue-transparent: #83a598cc;
bright-purple: #d3869b;
bright-purple-transparent: #d3869bcc;
bright-aqua: #8ec07c;
bright-aqua-transparent: #8ec07ccc;
bright-orange: #fe8019;
bright-orange-transparent: #fe8019cc;
neutral-red: #cc241d;
neutral-red-transparent: #cc241dcc;
neutral-green: #98971a;
neutral-green-transparent: #98971acc;
neutral-yellow: #d79921;
neutral-yellow-transparent: #d79921cc;
neutral-blue: #4585cc;
neutral-blue-transparent: #458588cc;
neutral-purple: #b16286;
neutral-purple-transparent: #b16286cc;
neutral-aqua: #689d6a;
neutral-aqua-transparent: #689d6acc;
neutral-orange: #d65d0e;
neutral-orange-transparent: #d65d0ecc;
faded-red: #9d0006;
faded-red-transparent: #9d0006cc;
faded-green: #79740e;
faded-green-transparent: #79740ecc;
faded-yellow: #b57614;
faded-yellow-transparent: #b57614cc;
faded-blue: #076678;
faded-blue-transparent: #076678cc;
faded-purple: #8f3f71;
faded-purple-transparent: #8f3f71cc;
faded-aqua: #427b58;
faded-aqua-transparent: #427b58cc;
faded-orange: #af3a03;
faded-orange-transparent: #af3a03cc;
/* Theme colors */
/* background: @dark0; */
background: @dark0-transparent;
background-color: @background;
foreground: @light0-hard;
border-color: @gray-245;
separatorcolor: @border-color;
scrollbar-handle: @bright-orange;
/* normal-background: @background; */
normal-background: @transparent;
normal-foreground: @foreground;
alternate-normal-background: @transparent;
alternate-normal-foreground: @foreground;
selected-normal-background: @dark4-transparent;
selected-normal-foreground: @bright-green;
active-background: @neutral-yellow;
active-foreground: @background;
alternate-active-background: @active-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @bright-yellow;
selected-active-foreground: @active-foreground;
urgent-background: @faded-red;
urgent-foreground: @background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @gruvbox-dark-red-light;
selected-urgent-foreground: @urgent-foreground;
}
window {
background-color: @background;
border: 2;
border-radius: 10;
padding: 20;
}
mainbox {
border: 0;
padding: 0;
background-color: @transparent;
}
message {
border: 2px 0 0;
border-color: @separatorcolor;
padding: 1px;
background-color: #FF0000;
}
textbox {
highlight: @highlight;
text-color: @foreground;
background-color: #FF0000;
}
listview {
border: 2px solid 0 0;
padding: 2px 0 0;
border-color: @separatorcolor;
spacing: 2px;
scrollbar: @scrollbar;
background-color: @transparent;
}
element {
border: 0;
padding: 2px;
}
element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
scrollbar {
width: 4px;
border: 0;
handle-color: @scrollbar-handle;
handle-width: 8px;
padding: 0;
}
mode-switcher {
border: 2px 0 0;
border-color: @separatorcolor;
}
inputbar {
spacing: 0;
text-color: @normal-foreground;
background-color: @transparent;
padding: 4px;
children: [ prompt, textbox-prompt-sep, entry, case-indicator ];
}
case-indicator,
entry,
prompt,
button {
spacing: 0;
text-color: @normal-foreground;
background-color: @transparent;
}
button,
entry,
prompt,
textbox-prompt-sep {
padding: 3;
}
button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
textbox-prompt-sep {
expand: false;
str: ":";
text-color: @normal-foreground;
background-color: @transparent;
margin: 0 0.3em 0 0;
}

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 Brian Hardisty
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,76 @@
# gruvbox-rofi
> Gruvbox dark and light color themes for Rofi
[Rofi](https://github.com/DaveDavenport/rofi) color themes based on the
[Gruvbox color scheme](https://github.com/morhetz/gruvbox).
Includes six versions to choose from:
- **[Gruvbox Dark](#dark-gruvbox-darkrasi)**
- [Gruvbox Dark (soft contrast)](#dark-soft-contrast-gruvbox-dark-softrasi)
- [Gruvbox Dark (hard contrast)](#dark-hard-contrast-gruvbox-dark-hardrasi)
- **[Gruvbox Light](#light-gruvbox-lightrasi)**
- [Gruvbox Light (soft contrast)](#light-soft-contrast-gruvbox-light-softrasi)
- [Gruvbox Light (hard contrast)](#light-hard-contrast-gruvbox-light-hardrasi)
## Screenshots
### Dark ([`gruvbox-dark.rasi`](gruvbox-dark.rasi))
![gruvbox dark theme screenshot](screenshots/gruvbox-dark.png "gruvbox dark theme")
#### Dark (soft contrast) ([`gruvbox-dark-soft.rasi`](gruvbox-dark-soft.rasi))
![gruvbox dark theme (soft contrast) screenshot](screenshots/gruvbox-dark-soft.png "gruvbox dark theme (soft contrast)")
#### Dark (hard contrast) ([`gruvbox-dark-hard.rasi`](gruvbox-dark-hard.rasi))
![gruvbox dark theme (hard contrast) screenshot](screenshots/gruvbox-dark-hard.png "gruvbox dark theme (hard contrast)")
### Light ([`gruvbox-light.rasi`](gruvbox-light.rasi))
![gruvbox light theme screenshot](screenshots/gruvbox-light.png "gruvbox light theme")
#### Light (soft contrast) ([`gruvbox-light-soft.rasi`](gruvbox-light-soft.rasi))
![gruvbox light theme (soft contrast) screenshot](screenshots/gruvbox-light-soft.png "gruvbox light theme (soft contrast)")
#### Light (hard contrast) ([`gruvbox-light-hard.rasi`](gruvbox-light-hard.rasi))
![gruvbox light theme (hard contrast) screenshot](screenshots/gruvbox-light-hard.png "gruvbox light theme (hard contrast)")
## Installation
These themes are included with Rofi as of version
[1.3.0](https://github.com/DaveDavenport/rofi/releases/tag/1.3.0). Run
`rofi-theme-selector` to preview/apply them with Rofi's theme selector
script.
See [Manual Installation](#manual-installation) if you wish to install the
themes manually. This may be preferable if you plan on customizing them.
### Manual Installation
1. [Download](https://github.com/bardisty/gruvbox-rofi/archive/master.zip)
or clone the repository:
```shell
git clone https://github.com/bardisty/gruvbox-rofi ~/.config/rofi/themes/gruvbox
```
2. Edit your Rofi configuration file (`~/.config/rofi/config`):
```xdefaults
rofi.theme: ~/.config/rofi/themes/gruvbox/gruvbox-dark.rasi
```
## Links
- [Rofi](https://github.com/DaveDavenport/rofi) window switcher, run
launcher, ssh dialog, and dmenu replacement
- [Gruvbox](https://github.com/morhetz/gruvbox) color scheme for Vim
## License
[MIT](LICENSE)

View File

@ -0,0 +1 @@
ref: refs/heads/master

View File

@ -0,0 +1,11 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/bardisty/gruvbox-rofi
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

View File

@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -0,0 +1,15 @@
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:

View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}

View File

@ -0,0 +1,173 @@
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Open2;
# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 2) and last update token
# formatted as a string and outputs to stdout a new update token and
# all files that have been modified since the update token. Paths must
# be relative to the root of the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $last_update_token) = @ARGV;
# Uncomment for debugging
# print STDERR "$0 $version $last_update_token\n";
# Check the hook interface version
if ($version ne 2) {
die "Unsupported query-fsmonitor hook version '$version'.\n" .
"Falling back to scanning...\n";
}
my $git_work_tree = get_working_dir();
my $retry = 1;
my $json_pkg;
eval {
require JSON::XS;
$json_pkg = "JSON::XS";
1;
} or do {
require JSON::PP;
$json_pkg = "JSON::PP";
};
launch_watchman();
sub launch_watchman {
my $o = watchman_query();
if (is_work_tree_watched($o)) {
output_result($o->{clock}, @{$o->{files}});
}
}
sub output_result {
my ($clockid, @files) = @_;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# binmode $fh, ":utf8";
# print $fh "$clockid\n@files\n";
# close $fh;
binmode STDOUT, ":utf8";
print $clockid;
print "\0";
local $, = "\0";
print @files;
}
sub watchman_clock {
my $response = qx/watchman clock "$git_work_tree"/;
die "Failed to get clock id on '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
return $json_pkg->new->utf8->decode($response);
}
sub watchman_query {
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
or die "open2() failed: $!\n" .
"Falling back to scanning...\n";
# In the query expression below we're asking for names of files that
# changed since $last_update_token but not from the .git folder.
#
# To accomplish this, we're using the "since" generator to use the
# recency index to select candidate nodes and "fields" to limit the
# output to file names only. Then we're using the "expression" term to
# further constrain the results.
if (substr($last_update_token, 0, 1) eq "c") {
$last_update_token = "\"$last_update_token\"";
}
my $query = <<" END";
["query", "$git_work_tree", {
"since": $last_update_token,
"fields": ["name"],
"expression": ["not", ["dirname", ".git"]]
}]
END
# Uncomment for debugging the watchman query
# open (my $fh, ">", ".git/watchman-query.json");
# print $fh $query;
# close $fh;
print CHLD_IN $query;
close CHLD_IN;
my $response = do {local $/; <CHLD_OUT>};
# Uncomment for debugging the watch response
# open ($fh, ">", ".git/watchman-response.json");
# print $fh $response;
# close $fh;
die "Watchman: command returned no output.\n" .
"Falling back to scanning...\n" if $response eq "";
die "Watchman: command returned invalid output: $response\n" .
"Falling back to scanning...\n" unless $response =~ /^\{/;
return $json_pkg->new->utf8->decode($response);
}
sub is_work_tree_watched {
my ($output) = @_;
my $error = $output->{error};
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
$retry--;
my $response = qx/watchman watch "$git_work_tree"/;
die "Failed to make watchman watch '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
$output = $json_pkg->new->utf8->decode($response);
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# close $fh;
# Watchman will always return all files on the first query so
# return the fast "everything is dirty" flag to git and do the
# Watchman query just to get it over with now so we won't pay
# the cost in git to look up each individual file.
my $o = watchman_clock();
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
output_result($o->{clock}, ("/"));
$last_update_token = $o->{clock};
eval { launch_watchman() };
return 0;
}
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
return 1;
}
sub get_working_dir {
my $working_dir;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
$working_dir = Win32::GetCwd();
$working_dir =~ tr/\\/\//;
} else {
require Cwd;
$working_dir = Cwd::cwd();
}
return $working_dir;
}

View File

@ -0,0 +1,8 @@
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info

View File

@ -0,0 +1,14 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:

View File

@ -0,0 +1,49 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --

View File

@ -0,0 +1,13 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
:

View File

@ -0,0 +1,53 @@
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
if test "$local_oid" = "$zero"
then
# Handle delete
:
else
if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"
else
# Update to existing branch, examine new commits
range="$remote_oid..$local_oid"
fi
# Check for WIP commit
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
if test -n "$commit"
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0

View File

@ -0,0 +1,169 @@
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END

View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi

View File

@ -0,0 +1,42 @@
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi

View File

@ -0,0 +1,78 @@
#!/bin/sh
# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1
# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
echo >&2 "$*"
exit 1
}
# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.
# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.
if ! git update-index -q --ignore-submodules --refresh
then
die "Up-to-date check failed"
fi
if ! git diff-files --quiet --ignore-submodules --
then
die "Working directory has unstaged changes"
fi
# This is a rough translation of:
#
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
head=HEAD
else
head=$(git hash-object -t tree --stdin </dev/null)
fi
if ! git diff-index --quiet --cached --ignore-submodules $head --
then
die "Working directory has staged changes"
fi
if ! git read-tree -u -m "$commit"
then
die "Could not update working tree to new HEAD"
fi

View File

@ -0,0 +1,128 @@
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0

Binary file not shown.

View File

@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000 0b4cf703087e2150968826b7508cf119437eba7a Joachim Nielandt <joachim.nielandt@d-n.be> 1635231713 +0200 clone: from https://github.com/bardisty/gruvbox-rofi

View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000 0b4cf703087e2150968826b7508cf119437eba7a Joachim Nielandt <joachim.nielandt@d-n.be> 1635231713 +0200 clone: from https://github.com/bardisty/gruvbox-rofi

View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000 0b4cf703087e2150968826b7508cf119437eba7a Joachim Nielandt <joachim.nielandt@d-n.be> 1635231713 +0200 clone: from https://github.com/bardisty/gruvbox-rofi

View File

@ -0,0 +1,12 @@
# pack-refs with: peeled fully-peeled sorted
0b4cf703087e2150968826b7508cf119437eba7a refs/remotes/origin/master
06f49c979a4bf9634e4a9000fb1f7b486654091b refs/tags/0.1.0
^654ab9700aff378c306a2cc261f2aef82bf31bbe
dd357e8b985e6898a997cc1879b5f3f6d314600f refs/tags/0.2.0
^570a8dedbccb2a2d0f82a2336f8004237b8e6460
857e529c874667d5105f3fc561d7d24c281fc110 refs/tags/0.2.1
^d077a59e75764f7d943a4b5c09ab6c96daacd454
65539a03cc674d2195f3418fc4c2338c9cbf28d6 refs/tags/0.3.0
^849daa3cde19c73dfc6f4280aede0e48a7947d80
d98f6ab6aeb9639d5ebb48267850caab3b5f8f00 refs/tags/0.3.1
^c96c2359781bcd9c8a1f5a7efbede03892a76e46

View File

@ -0,0 +1 @@
0b4cf703087e2150968826b7508cf119437eba7a

View File

@ -0,0 +1 @@
ref: refs/remotes/origin/master

View File

@ -0,0 +1,127 @@
/* ==========================================================================
File: gruvbox-common.rasi
Desc: Shared rules between all gruvbox themes
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/gruvbox-rofi
Modified: Mon Feb 12 2018 06:06:47 PST -0800
========================================================================== */
window {
background-color: @background;
border: 2;
padding: 2;
}
mainbox {
border: 0;
padding: 0;
}
message {
border: 2px 0 0;
border-color: @separatorcolor;
padding: 1px;
}
textbox {
highlight: @highlight;
text-color: @foreground;
}
listview {
border: 2px solid 0 0;
padding: 2px 0 0;
border-color: @separatorcolor;
spacing: 2px;
scrollbar: @scrollbar;
}
element {
border: 0;
padding: 2px;
}
element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
scrollbar {
width: 4px;
border: 0;
handle-color: @scrollbar-handle;
handle-width: 8px;
padding: 0;
}
sidebar {
border: 2px 0 0;
border-color: @separatorcolor;
}
inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 2px;
children: [ prompt, textbox-prompt-sep, entry, case-indicator ];
}
case-indicator,
entry,
prompt,
button {
spacing: 0;
text-color: @normal-foreground;
}
button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
textbox-prompt-sep {
expand: false;
str: ":";
text-color: @normal-foreground;
margin: 0 0.3em 0 0;
}

View File

@ -0,0 +1,62 @@
/* ==========================================================================
Rofi color theme
Based on the Gruvbox color scheme for Vim by morhetz
https://github.com/morhetz/gruvbox
File: gruvbox-dark-hard.rasi
Desc: Gruvbox dark (hard contrast) color theme for Rofi
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/gruvbox-rofi
Modified: Mon Feb 12 2018 06:04:26 PST -0800
========================================================================== */
* {
/* Theme settings */
highlight: bold italic;
scrollbar: true;
/* Gruvbox dark colors */
gruvbox-dark-bg0-hard: #1d2021;
gruvbox-dark-bg0: #282828;
gruvbox-dark-bg2: #504945;
gruvbox-dark-fg0: #fbf1c7;
gruvbox-dark-fg1: #ebdbb2;
gruvbox-dark-red-dark: #cc241d;
gruvbox-dark-red-light: #fb4934;
gruvbox-dark-yellow-dark: #d79921;
gruvbox-dark-yellow-light: #fabd2f;
gruvbox-dark-gray: #a89984;
/* Theme colors */
background: @gruvbox-dark-bg0-hard;
background-color: @background;
foreground: @gruvbox-dark-fg1;
border-color: @gruvbox-dark-gray;
separatorcolor: @border-color;
scrollbar-handle: @border-color;
normal-background: @background;
normal-foreground: @foreground;
alternate-normal-background: @gruvbox-dark-bg0;
alternate-normal-foreground: @foreground;
selected-normal-background: @gruvbox-dark-bg2;
selected-normal-foreground: @gruvbox-dark-fg0;
active-background: @gruvbox-dark-yellow-dark;
active-foreground: @background;
alternate-active-background: @active-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @gruvbox-dark-yellow-light;
selected-active-foreground: @active-foreground;
urgent-background: @gruvbox-dark-red-dark;
urgent-foreground: @background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @gruvbox-dark-red-light;
selected-urgent-foreground: @urgent-foreground;
}
@import "gruvbox-common.rasi"

View File

@ -0,0 +1,62 @@
/* ==========================================================================
Rofi color theme
Based on the Gruvbox color scheme for Vim by morhetz
https://github.com/morhetz/gruvbox
File: gruvbox-dark-soft.rasi
Desc: Gruvbox dark (soft contrast) color theme for Rofi
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/gruvbox-rofi
Modified: Mon Feb 12 2018 06:04:37 PST -0800
========================================================================== */
* {
/* Theme settings */
highlight: bold italic;
scrollbar: true;
/* Gruvbox dark colors */
gruvbox-dark-bg0-soft: #32302f;
gruvbox-dark-bg1: #3c3836;
gruvbox-dark-bg3: #665c54;
gruvbox-dark-fg0: #fbf1c7;
gruvbox-dark-fg1: #ebdbb2;
gruvbox-dark-red-dark: #cc241d;
gruvbox-dark-red-light: #fb4934;
gruvbox-dark-yellow-dark: #d79921;
gruvbox-dark-yellow-light: #fabd2f;
gruvbox-dark-gray: #a89984;
/* Theme colors */
background: @gruvbox-dark-bg0-soft;
background-color: @background;
foreground: @gruvbox-dark-fg1;
border-color: @gruvbox-dark-gray;
separatorcolor: @border-color;
scrollbar-handle: @border-color;
normal-background: @background;
normal-foreground: @foreground;
alternate-normal-background: @gruvbox-dark-bg1;
alternate-normal-foreground: @foreground;
selected-normal-background: @gruvbox-dark-bg3;
selected-normal-foreground: @gruvbox-dark-fg0;
active-background: @gruvbox-dark-yellow-dark;
active-foreground: @background;
alternate-active-background: @active-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @gruvbox-dark-yellow-light;
selected-active-foreground: @active-foreground;
urgent-background: @gruvbox-dark-red-dark;
urgent-foreground: @background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @gruvbox-dark-red-light;
selected-urgent-foreground: @urgent-foreground;
}
@import "gruvbox-common.rasi"

View File

@ -0,0 +1,62 @@
/* ==========================================================================
Rofi color theme
Based on the Gruvbox color scheme for Vim by morhetz
https://github.com/morhetz/gruvbox
File: gruvbox-dark.rasi
Desc: Gruvbox dark color theme for Rofi
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/gruvbox-rofi
Modified: Mon Feb 12 2018 04:08:43 PST -0800
========================================================================== */
* {
/* Theme settings */
highlight: bold italic;
scrollbar: true;
/* Gruvbox dark colors */
gruvbox-dark-bg0: #282828;
gruvbox-dark-bg0-soft: #32302f;
gruvbox-dark-bg3: #665c54;
gruvbox-dark-fg0: #fbf1c7;
gruvbox-dark-fg1: #ebdbb2;
gruvbox-dark-red-dark: #cc241d;
gruvbox-dark-red-light: #fb4934;
gruvbox-dark-yellow-dark: #d79921;
gruvbox-dark-yellow-light: #fabd2f;
gruvbox-dark-gray: #a89984;
/* Theme colors */
background: @gruvbox-dark-bg0;
background-color: @background;
foreground: @gruvbox-dark-fg1;
border-color: @gruvbox-dark-gray;
separatorcolor: @border-color;
scrollbar-handle: @border-color;
normal-background: @background;
normal-foreground: @foreground;
alternate-normal-background: @gruvbox-dark-bg0-soft;
alternate-normal-foreground: @foreground;
selected-normal-background: @gruvbox-dark-bg3;
selected-normal-foreground: @gruvbox-dark-fg0;
active-background: @gruvbox-dark-yellow-dark;
active-foreground: @background;
alternate-active-background: @active-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @gruvbox-dark-yellow-light;
selected-active-foreground: @active-foreground;
urgent-background: @gruvbox-dark-red-dark;
urgent-foreground: @background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @gruvbox-dark-red-light;
selected-urgent-foreground: @urgent-foreground;
}
@import "gruvbox-common.rasi"

View File

@ -0,0 +1,62 @@
/* ==========================================================================
Rofi color theme
Based on the Gruvbox color scheme for Vim by morhetz
https://github.com/morhetz/gruvbox
File: gruvbox-light-hard.rasi
Desc: Gruvbox light (hard contrast) color theme for Rofi
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/gruvbox-rofi
Modified: Mon Feb 12 2018 06:04:48 PST -0800
========================================================================== */
* {
/* Theme settings */
highlight: bold italic;
scrollbar: true;
/* Gruvbox light colors */
gruvbox-light-bg0-hard: #f9f5d7;
gruvbox-light-bg0: #fbf1c7;
gruvbox-light-bg1: #ebdbb2;
gruvbox-light-fg0: #282828;
gruvbox-light-fg1: #3c3836;
gruvbox-light-red-dark: #9d0006;
gruvbox-light-red-light: #cc241d;
gruvbox-light-yellow-dark: #b57614;
gruvbox-light-yellow-light: #d79921;
gruvbox-light-gray: #7c6f64;
/* Theme colors */
background: @gruvbox-light-bg0-hard;
background-color: @background;
foreground: @gruvbox-light-fg1;
border-color: @gruvbox-light-gray;
separatorcolor: @border-color;
scrollbar-handle: @border-color;
normal-background: @background;
normal-foreground: @foreground;
alternate-normal-background: @gruvbox-light-bg0;
alternate-normal-foreground: @foreground;
selected-normal-background: @gruvbox-light-bg1;
selected-normal-foreground: @gruvbox-light-fg0;
active-background: @gruvbox-light-yellow-dark;
active-foreground: @background;
alternate-active-background: @active-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @gruvbox-light-yellow-light;
selected-active-foreground: @active-foreground;
urgent-background: @gruvbox-light-red-dark;
urgent-foreground: @background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @gruvbox-light-red-light;
selected-urgent-foreground: @urgent-foreground;
}
@import "gruvbox-common.rasi"

View File

@ -0,0 +1,62 @@
/* ==========================================================================
Rofi color theme
Based on the Gruvbox color scheme for Vim by morhetz
https://github.com/morhetz/gruvbox
File: gruvbox-light-soft.rasi
Desc: Gruvbox light (soft contrast) color theme for Rofi
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/gruvbox-rofi
Modified: Mon Feb 12 2018 06:05:38 PST -0800
========================================================================== */
* {
/* Theme settings */
highlight: bold italic;
scrollbar: true;
/* Gruvbox light colors */
gruvbox-light-bg0-soft: #f2e5bc;
gruvbox-light-bg1: #ebdbb2;
gruvbox-light-bg2: #d5c4a1;
gruvbox-light-fg0: #282828;
gruvbox-light-fg1: #3c3836;
gruvbox-light-red-dark: #9d0006;
gruvbox-light-red-light: #cc241d;
gruvbox-light-yellow-dark: #b57614;
gruvbox-light-yellow-light: #d79921;
gruvbox-light-gray: #7c6f64;
/* Theme colors */
background: @gruvbox-light-bg0-soft;
background-color: @background;
foreground: @gruvbox-light-fg1;
border-color: @gruvbox-light-gray;
separatorcolor: @border-color;
scrollbar-handle: @border-color;
normal-background: @background;
normal-foreground: @foreground;
alternate-normal-background: @gruvbox-light-bg1;
alternate-normal-foreground: @foreground;
selected-normal-background: @gruvbox-light-bg2;
selected-normal-foreground: @gruvbox-light-fg0;
active-background: @gruvbox-light-yellow-dark;
active-foreground: @background;
alternate-active-background: @active-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @gruvbox-light-yellow-light;
selected-active-foreground: @active-foreground;
urgent-background: @gruvbox-light-red-dark;
urgent-foreground: @background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @gruvbox-light-red-light;
selected-urgent-foreground: @urgent-foreground;
}
@import "gruvbox-common.rasi"

View File

@ -0,0 +1,62 @@
/* ==========================================================================
Rofi color theme
Based on the Gruvbox color scheme for Vim by morhetz
https://github.com/morhetz/gruvbox
File: gruvbox-light.rasi
Desc: Gruvbox light color theme for rofi
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/gruvbox-rofi
Modified: Mon Feb 12 2018 06:06:06 PST -0800
========================================================================== */
* {
/* Theme settings */
highlight: bold italic;
scrollbar: true;
/* Gruvbox light colors */
gruvbox-light-bg0: #fbf1c7;
gruvbox-light-bg0-soft: #f2e5bc;
gruvbox-light-bg2: #d5c4a1;
gruvbox-light-fg0: #282828;
gruvbox-light-fg1: #3c3836;
gruvbox-light-gray: #7c6f64;
gruvbox-light-red-dark: #9d0006;
gruvbox-light-red-light: #cc241d;
gruvbox-light-yellow-dark: #b57614;
gruvbox-light-yellow-light: #d79921;
/* Theme colors */
background: @gruvbox-light-bg0;
background-color: @background;
foreground: @gruvbox-light-fg1;
border-color: @gruvbox-light-gray;
separatorcolor: @border-color;
scrollbar-handle: @border-color;
normal-background: @background;
normal-foreground: @foreground;
alternate-normal-background: @gruvbox-light-bg0-soft;
alternate-normal-foreground: @foreground;
selected-normal-background: @gruvbox-light-bg2;
selected-normal-foreground: @gruvbox-light-fg0;
active-background: @gruvbox-light-yellow-dark;
active-foreground: @background;
alternate-active-background: @active-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @gruvbox-light-yellow-light;
selected-active-foreground: @active-foreground;
urgent-background: @gruvbox-light-red-dark;
urgent-foreground: @background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @gruvbox-light-red-light;
selected-urgent-foreground: @urgent-foreground;
}
@import "gruvbox-common.rasi"

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

200
dot_config/sway/config Normal file
View File

@ -0,0 +1,200 @@
# Read `man 5 sway` for a complete reference.
# where the sway config lives
set $swaydir $HOME/.config/sway
# load all variables ... 'set x'
include $swaydir/variables.conf
# load sway settings, depends on variables
include $swaydir/settings.conf
# Hide borders for single window
hide_edge_borders smart
# default_border normal # border + title
default_border pixel
# Don't autofocus with mouse pointer
focus_follows_mouse no
# Font
font pango:Hasklig Medium 9
# https://github.com/Alexays/Waybar/issues/1093#issuecomment-841846291
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
# make idea work - should be fine now
exec wmname LG3D
# wayland clipboard manager
exec {
wl-paste --watch cliphist store
}
# start kanshi for auto-output management
exec_always {
bash -c "pkill kanshi; kanshi"
# sway fixes for screensharing
# https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist
bash -c "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway; systemctl --user stop pipewire xdg-desktop-portal xdg-desktop-portal-wlr; exec systemctl --user start pipewire"
}
### Idle configuration
#
# Example configuration:
#
exec swayidle -w \
timeout 500 'swaylock -f -c 000000 --fade-in 5' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "1267:12590:ELAN0755:00_04F3:312E_Touchpad" {
dwt enabled
tap enabled
# adaptive would be acceleration
accel_profile flat
natural_scroll enabled
pointer_accel 0.5
middle_emulation enabled
}
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
# Disallow endless looping of focus: extreme right is extreme right, don't flip to extreme left whenever you want...
focus_wrapping no
# include the modes - to be mapped in keybinding.conf
include $swayconfig/modes.conf
# include all the keybindings
include $swayconfig/keybinding.conf
##########
# PROGRAMS
##########
assign [class="Thunderbird"] $ws2
######################
# MODES
######################
#mode "resize" {
# # left will shrink the containers width
# # right will grow the containers width
# # up will shrink the containers height
# # down will grow the containers height
# bindsym $left resize shrink width 10px
# bindsym $down resize grow height 10px
# bindsym $up resize shrink height 10px
# bindsym $right resize grow width 10px
# # Ditto, with arrow keys
# bindsym $left_alt resize shrink width 10px
# bindsym $down_alt resize grow height 10px
# bindsym $up_alt resize shrink height 10px
# bindsym Right resize grow width 10px
# # Return to default mode
# bindsym Return mode "default"
# bindsym Escape mode "default"
#}
# bindsym $mod+r mode "resize"
# lock / logout / sleep / hibernate / restart / poweroff
# TODO convert this to swaylock
#set $mode_system "System  l e s鈴 h rﰇ וּsﮤ"
#mode $mode_system {
# bindsym l exec --no-startup-id ~/.config/i3/i3exit.sh lock, mode "default"
# bindsym e exec --no-startup-id ~/.config/i3/i3exit.sh logout, mode "default"
# bindsym s exec --no-startup-id systemctl suspend, mode "default"
# bindsym h exec --no-startup-id ~/.config/i3/i3exit.sh hibernate, mode "default"
# bindsym r exec --no-startup-id ~/.config/i3/i3exit.sh reboot, mode "default"
# bindsym Shift+s exec --no-startup-id ~/.config/i3/i3exit.sh shutdown, mode "default"
# # back to normal: Enter or Escape
# bindsym Return mode "default"
# bindsym Escape mode "default"
#}
#bindsym $mod+Pause mode $mode_system
#bindsym $mod+F12 mode $mode_system
# toggle keyboard layouts with scroll lock
input "type:keyboard" {
xkb_layout us,us
xkb_variant intl,
xkb_options grp:sclk_toggle
}
$bindsym $mod+F9 mode "$mode_keyboard"
#############
# Status Bar
#############
# Waybar
bar swaybar_command waybar
###################
### LAUNCH AT START
###################
exec --no-startup-id gammastep
# overrule mako and start mako
exec --no-startup-id pkill dunst
exec --no-startup-id mako
#exec --no-startup-id kanshi
# start multi touch support
exec --no-startup-id libinput-gestures-setup start
# start greenclip, this somehow fails to start at launch (sometimes?)
#exec --no-startup-id greenclip daemon>/dev/null
# autostart background applications
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec {
# $xdg-dirs
# $swayidle
$mako
$swappy_notify
# $autostart_dex
# $flashfocus
$wlsunset
# $autotiling
# $foot_server
$help_menu
# $cliphist_store
# $cliphist_watch
$workspace_icons
# $mounting_daemon
}
exec_always {
# $kanshi
# $auto_xdg_keyboard
# $poweralert
# $watch_playerctl
# $calendar_daemon
# $update_rofi_theme
# $create_rofi_config
# $swayr_daemon
}
# theme settings
exec_always {
gsettings set org.gnome.desktop.interface gtk-theme "$gtk-theme"
gsettings set org.gnome.desktop.interface icon-theme "$icon-theme"
gsettings set org.gnome.desktop.interface cursor-theme "$cursor-theme"
gsettings set org.gnome.desktop.interface font-name "$gui-font"
gsettings set org.gnome.desktop.interface color-scheme "$gtk-color-scheme"
gsettings set org.gnome.desktop.input-sources show-all-sources true
gsettings set org.gnome.desktop.interface monospace-font-name "$term-font"
kvantummanager --set "$kvantum-theme"
}
####################
# SOURCE OTHER FILES
####################
# pretty important, loads specific fixes, e.g., https://www.reddit.com/r/swaywm/comments/n13tro/problem_with_dbus_auto_activation_in_archsway/
# managed directoryw
include /etc/sway/config.d/*

218
dot_config/sway/config.old Normal file
View File

@ -0,0 +1,218 @@
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term alacritty
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu dmenu_path | dmenu | xargs swaymsg exec --
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
}
include /etc/sway/config.d/*

View File

@ -0,0 +1,182 @@
### Key bindings
## Launch // Terminal ##
$bindsym $mod+Return exec $term_cwd
$bindsym $mod+Shift+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Launchers
bindsym $mod+d exec ~/.config/rofi/runrofi.sh
#bindsym $mod+Shift+d exec "albert show"
#this is the i3 manager
#bindsym $mod+C exec rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
bindsym $mod+C exec ~/.config/rofi/runcliphist.sh
#
# Screenshot
#bindsym --release Print exec grim -g "$(slurp)" "/home/joachim/pictures/screenshots/$(date +'%s_grim.png')"
bindsym --release Print exec ~/scripts/grim.screenshot.sh
bindsym $mod+Print exec grimshot save output
bindsym $mod+Shift+Print exec grimshot save active
#bindsym $mod+Print exec grimshot save area
#bindsym Mod4+Mod1+p exec grimshot save output
#bindsym Mod4+Ctrl+p exec grimshot save windowscripts/grim.screenshot.sh
# Custom 'help' screen
# bindsym $mod+F1 exec $term -e chezmoi edit ~/.dotfiles/README.md
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
##################
# MOVING AROUND
##################
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+$left_alt focus left
bindsym $mod+$down_alt focus down
bindsym $mod+$up_alt focus up
bindsym $mod+$right_alt focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+$left_alt move left
bindsym $mod+Shift+$down_alt move down
bindsym $mod+Shift+$up_alt move up
bindsym $mod+Shift+$right_alt move right
# move workspace to left and right monitors
bindsym $mod+Shift+bracketleft move workspace to output left
bindsym $mod+Shift+bracketright move workspace to output right
#############
# WORKSPACES
#############
# workspace names
set $ws1 number 1
set $ws2 number 2
set $ws3 number 3
set $ws4 number 4
set $ws5 number 5
set $ws6 number 6
set $ws7 number 7
set $ws8 number 8
set $ws9 number 9
set $ws10 number 10
# Special workspaces names
set $ws11 number 11
set $ws12 number 12
# Switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+comma workspace $ws11
bindsym $mod+period workspace $ws12
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1, exec $focus_ws $ws1
bindsym $mod+Shift+2 move container to workspace $ws2, exec $focus_ws $ws2
bindsym $mod+Shift+3 move container to workspace $ws3, exec $focus_ws $ws3
bindsym $mod+Shift+4 move container to workspace $ws4, exec $focus_ws $ws4
bindsym $mod+Shift+5 move container to workspace $ws5, exec $focus_ws $ws5
bindsym $mod+Shift+6 move container to workspace $ws6, exec $focus_ws $ws6
bindsym $mod+Shift+7 move container to workspace $ws7, exec $focus_ws $ws7
bindsym $mod+Shift+8 move container to workspace $ws8, exec $focus_ws $ws8
bindsym $mod+Shift+9 move container to workspace $ws9, exec $focus_ws $ws9
bindsym $mod+Shift+0 move container to workspace $ws10, exec $focus_ws $ws10
bindsym $mod+Shift+comma move container to workspace $ws11, exec $focus_ws $ws11
bindsym $mod+Shift+period move container to workspace $ws12, exec $focus_ws $ws12
###############
# Layout stuff
###############
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+m splith
bindsym $mod+n splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+i focus parent
# focus the child container
bindsym $mod+u focus child
# Dunst controls
# TODO moved these over to mako
bindsym $mod+Ctrl+space exec dunstctl close
bindsym $mod+Ctrl+Shift+space exec dunstctl close-all
#bindsym $mod+Ctrl+space exec dunstctl history-pop
#bindsym $mod+Ctrl+space exec makoctl dismiss
#############
# SCRATCHPAD
#############
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+BackSpace move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+BackSpace scratchpad show
## Launch // Toggle Help ##
$bindsym $mod+F1 exec $help
# allow to kill focused floating shell windows using Esc (manjaro)
$bindsym --release Escape [app_id="floating_shell" con_id=__focused__] kill
# manjaro copy
$bindsym --locked XF86MonBrightnessUp exec $brightness_up
$bindsym --locked $mod+Shift+b exec $brightness_up
$bindsym --locked XF86MonBrightnessDown exec $brightness_down
# --locked flags allow the buttons to be used whilst the screen is locked.
$bindsym --locked XF86AudioRaiseVolume exec $volume_up
$bindsym --locked XF86AudioLowerVolume exec $volume_down
$bindsym --locked XF86AudioMute exec $volume_mute
# modes
bindsym $mod+r mode $mode_resize
bindsym $mod+F12 mode $mode_shutdown
bindsym $mod+F11 mode $mode_audio
bindsym $mod+Ctrl+k mode $mode_xkbmap
bindsym $mod+F10 mode $mode_launch
## Action // Scale up  ##
bindsym $mod+equal exec $scale_up
## Action // Scale down  ##
bindsym $mod+minus exec $scale_down
## Launch // Toggle Help ##
$bindsym $mod+question exec $help

133
dot_config/sway/modes.conf Normal file
View File

@ -0,0 +1,133 @@
# generic mode colors
set $mode_color_foreground $light0
set $mode_color_action $bright_green
# RESIZE
set $mode_resize "<span foreground='$mode_color_foreground'></span> \
<span foreground='$mode_color_foreground'><b>Resize</b></span> <span foreground='$mode_color_action'>(<b>↑ ↓ ← →</b>)</span> \
<span foreground='$mode_color_foreground'><b>Increase Gaps</b></span> <span foreground='$mode_color_action'>(<b>+</b>)</span> \
<span foreground='$mode_color_foreground'><b>Decrease Gaps</b></span> <span foreground='$mode_color_action'>(<b>-</b>)</span>"
mode --pango_markup $mode_resize {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
$bindsym $left resize shrink width $resizestepsize
$bindsym $down resize grow height $resizestepsize
$bindsym $up resize shrink height $resizestepsize
$bindsym $right resize grow width $resizestepsize
$bindsym $left_alt resize shrink width $resizestepsize
$bindsym $down_alt resize grow height $resizestepsize
$bindsym $up_alt resize shrink height $resizestepsize
$bindsym $right_alt resize grow width $resizestepsize
$bindsym Shift+$left resize shrink width $resizestepsize
$bindsym Shift+$down resize grow height $resizestepsize
$bindsym Shift+$up resize shrink height $resizestepsize
$bindsym Shift+$right resize grow width $resizestepsize
$bindsym Shift+$left_alt resize shrink width $resizestepsize
$bindsym Shift+$down_alt resize grow height $resizestepsize
$bindsym Shift+$up_alt resize shrink height $resizestepsize
$bindsym Shift+$right_alt resize grow width $resizestepsize
## Resize // Window Gaps // + - ##
$bindsym minus gaps inner current minus 5px
$bindsym plus gaps inner current plus 5px
# Return to default mode
$bindsym Return mode "default"
$bindsym Escape mode "default"
}
# SHUTDOWN
set $mode_shutdown "\
<span foreground='$mode_color_foreground'></span> \
<span foreground='$mode_color_foreground'> \
<span foreground='$mode_color_action'>(<b>h</b>)</span>hibernate \
<span foreground='$mode_color_action'>(<b>l</b>)</span>lock \
<span foreground='$mode_color_action'>(<b>e</b>)</span>logout \
<span foreground='$mode_color_action'>(<b>r</b>)</span>reboot \
<span foreground='$mode_color_action'>(<b>u</b>)</span>suspend \
<span foreground='$mode_color_action'>(<b>s</b>)</span>shutdown \
</span>"
set $purge_cliphist [ $purge_cliphist_logout == 'true' ] && rm -f $HOME/.cache/cliphist/db || exit 0
mode --pango_markup $mode_shutdown {
# lock
$bindsym l mode "default", exec swaylock -i ~/pictures/wallpapers/ethiopia.jpg --clock --indicator --fade-in 0.2 --grace 2
# logout
$bindsym e exec $purge_cliphist; exec loginctl terminate-user $USER
# suspend
$bindsym u mode "default", exec systemctl suspend
# hibernate
$bindsym h mode "default", exec systemctl hibernate
# shutdown
$bindsym s exec $purge_cliphist; exec systemctl poweroff
# reboot
$bindsym r exec $purge_cliphist; exec systemctl reboot
# Return to default mode.
$bindsym Escape mode "default"
}
# AUDIO
# some nice symbols to try here: 0|    論b籠i錄 
set $mode_audio "Audio    - + 0 y"
mode $mode_audio {
# Increase / decrease volume for the running sink only
$bindsym k exec $volume_up
# Decrease
$bindsym j exec $volume_down
# Mute sound
$bindsym 0 exec $volume_mute
# Start mps-youtube
$bindsym y exec --no-startup-id urxvt -e mpsyt, mode "default"
# Toggle pause/play
$bindsym space exec playerctl play-pause
#bindsym XF86AudioPause exec playerctl pause
#bindsym XF86AudioNext exec playerctl next
#bindsym XF86AudioPrev exec playerctl previous
# back to normal: Enter or Escape
$bindsym Return mode "default"
$bindsym Escape mode "default"
}
#set $mode_keyboard "us-intl (a), us-altgr-intl (b)"
#mode $mode_keyboard {
# bindsym a exec swaymsg input type:keyboard xkb_variant intl
# bindsym b exec swaymsg input type:keyboard xkb_variant altgr-intl
# bindsym return mode "default"
# bindsym escape mode "default"
#}
#
# do a nice menu for keyboard layouts
# TODO convert to wayland, using dconf-editor perhaps?
set $mode_keys "keys"
mode $mode_keys {
bindsym Return mode "default"
bindsym Escape mode "default"
}
# do a nice menu for keyboard layouts
# TODO convert to wayland, using dconf-editor perhaps?
set $mode_xkbmap "Layout aus bus-intl cus-altgr dgb egb-intl fdvorak"
mode $mode_xkbmap {
bindsym a exec --no-startup-id setxkbmap us, mode "default"
bindsym b exec --no-startup-id setxkbmap us intl, mode "default"
bindsym c exec --no-startup-id setxkbmap us altgr-intl, mode "default"
bindsym d exec --no-startup-id setxkbmap gb, mode "default"
bindsym e exec --no-startup-id setxkbmap gb intl, mode "default"
bindsym f exec --no-startup-id setxkbmap dvorak, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# do a nice menu for custom exec launches
set $mode_launch " adefault start-up bnoise-fix cdual dhorizontal etearing"
mode $mode_launch {
# These are all the default programs launching at startup.
bindsym a exec thunderbird, exec signal-desktop, exec ferdi, exec obsidian mode "default", exec teams --no-sandbox, exec slack
# execute default horizontal layout of monitors
bindsym d exec autorandr horizontal, mode "default"
# this fixes tearing on nvidia
bindsym e exec nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}

View File

@ -0,0 +1,10 @@
#!/usr/bin/env sh
# wrapper script for foot
USER_CONFIG_PATH="${HOME}/.config/foot/foot.ini"
if [ -f "$USER_CONFIG_PATH" ]; then
USER_CONFIG=$USER_CONFIG_PATH
fi
foot -c "${USER_CONFIG:-"/usr/share/sway/templates/foot.ini"}" "$@" &

View File

@ -0,0 +1,4 @@
### Output configuration
# Wallpaper
output * bg $background fill
# You can get the names of your outputs by running: swaymsg -t get_outputs

View File

@ -0,0 +1,159 @@
# Add --to-code to bindsym, support for non-latin layouts
set $bindsym bindsym --to-code
# For user's convenience, the same for unbindsym
set $unbindsym unbindsym --to-code
# background
set $background $HOME/pictures/wallpapers/iceland.jpg
# directories
set $swayconfig $HOME/.config/sway
set $swayscripts $swayconfig/scripts
# resize behaviour
set $resizestepsize 30px
###
### Variables
# Logo key. Use Mod1 for Alt.
set $mod Mod4
set $mod1 Alt
# Gruvbox Colors
set $dark0_hard #1d2021
set $dark0_hard_t #1d2021e6
set $dark0 #282828
set $dark0_t #282828e6
set $dark0_soft #32302f
set $dark1 #3c3836
set $dark2 #504945
set $dark3 #665c54
set $dark4 #7c6f64
set $gray_245 #928374
set $gray_244 #928374
set $light0_hard #f9f5d7
set $light0 #fbf1c7
set $light0_soft #f2e5bc
set $light1 #ebdbb2
set $light2 #d5c4a1
set $light3 #bdae93
set $light4 #a89984
set $bright_red #fb4934
set $bright_green #b8bb26
set $bright_yellow #fabd2f
set $bright_blue #83a598
set $bright_purple #d3869b
set $bright_aqua #8ec07c
set $bright_orange #fe8019
set $neutral_red #cc241d
set $neutral_green #98971a
set $neutral_yellow #d79921
set $neutral_blue #458588
set $neutral_purple #b16286
set $neutral_aqua #689d6a
set $neutral_orange #d65d0e
set $faded_red #9d0006
set $faded_green #79740e
set $faded_yellow #b57614
set $faded_blue #076678
set $faded_purple #8f3f71
set $faded_aqua #427b58
set $faded_orange #af3a03
set $transparent #ffffff00
set $background-color $dark0_hard
set $text-color $light0_hard_
set $selection-color $bright_orange
set $accent-color $bright_green
# manjaro originals
set $gtk-theme Matcha-dark-sea
set $icon-theme Papirus-Dark-Maia
set $cursor-theme xcursor-breeze
set $gui-font Roboto 11
set $term-font Hasklug Nerd Font Mono 8
set $gtk-color-scheme prefer-dark
set $kvantum-theme Matcha-Dark
# Direction keys
set $left Left
set $down Down
set $up Up
set $right Right
# Alternative direction keys
set $left_alt h
set $down_alt j
set $up_alt k
set $right_alt l
# Your preferred terminal emulator
set $term $HOME/.config/sway/scripts/foot.sh
set $term_cwd $term -D "$(swaycwd 2>/dev/null || echo $HOME)"
set $term_float footclient -a floating_shell
# onscreen bar
set $onscreen_bar $HOME/.config/sway/scripts/wob.sh "$bright_green" "$dark0_hard"
# brightness control
set $brightness $HOME/.config/sway/scripts/brightness.sh
set $brightness_up $brightness up | $onscreen_bar
set $brightness_down $brightness down | $onscreen_bar
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
#
# this is the default search menu
# set $menu dmenu_path | dmenu | xargs swaymsg exec --
# Layout
# window color class border backgr. text indicator child_border
client.focused $bright_green $dark0_t $light0_hard $bright_orange $bright_green
client.focused_inactive $faded_green $dark0_t $light0_hard $dark0_hard $dark0_hard
client.unfocused $dark0_hard_t $dark0_t $light0_hard $dark0_hard $dark0_hard_t
client.urgent $bright_green $bright_orange $light0_hard $dark0_hard $bright_orange
client.placeholder $bright_green $dark0_t $light0_hard $dark0_hard $dark0_hard
client.background $dark0_hard
# audio control (manjaro)
set $sink_volume pactl get-sink-volume @DEFAULT_SINK@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
set $source_volume pactl get-source-volume @DEFAULT_SOURCE@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
set $volume_down $onscreen_bar $(pactl set-sink-volume @DEFAULT_SINK@ -5% && $sink_volume)
set $volume_up $onscreen_bar $(pactl set-sink-volume @DEFAULT_SINK@ +5% && $sink_volume)
set $volume_mute $onscreen_bar $(pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl get-sink-mute @DEFAULT_SINK@ | sed -En "/no/ s/.*/$($sink_volume)/p; /yes/ s/.*/0/p")
set $mic_mute $onscreen_bar $(pactl set-source-mute @DEFAULT_SOURCE@ toggle && pactl get-source-mute @DEFAULT_SOURCE@ | sed -En "/no/ s/.*/$($source_volume)/p; /yes/ s/.*/0/p")
# scaling
set $scale_up $swayscripts/scale.sh up
set $scale_down $swayscripts/scale.sh down
# autostarts
#set $autostart_dex '[ -x "$(command -v dex)" ] && gdbus wait --session org.kde.StatusNotifierWatcher && dex --autostart'
#set $flashfocus '[ -x "$(command -v flashfocus)" ] && flashfocus'
set $wlsunset '[ -x "$(command -v wlsunset)" ] && $swayscripts/scripts/sunset.sh "on"'
#set $autotiling '[ -x "$(command -v autotiling-rs)" ] && autotiling-rs'
#set $foot_server '[ -x "$(command -v foot)" ] && /usr/share/sway/scripts/foot.sh --server'
set $workspace_icons '[ -x "$(command -v sworkstyle)" ] && sworkstyle -d -l info -c $HOME/.config/sworkstyle/config.toml &> /tmp/sworkstyle.log'
#set $mounting_daemon '[ -x "$(command -v pcmanfm)" ] && pcmanfm -d'
## restart kanshi https://github.com/emersion/kanshi/issues/43#issuecomment-531679213
#set $kanshi '[ -x "$(command -v kanshi)" ] && pkill kanshi; exec kanshi'
#set $xdg-dirs '[ -x "$(command -v xdg-user-dirs-update)" ] && exec xdg-user-dirs-update'
## apply the keyboard layout from localectl if no keyboard layout has been set via config.d
#set $auto_xdg_keyboard 'grep -q xkb_layout ~/.config/sway/config.d/*.conf || /usr/share/sway/scripts/keyboard.sh'
#set $update_rofi_theme 'mkdir -p $HOME/.config/rofi/ && echo $rofi_theme > $HOME/.config/rofi/Manjaro.rasi'
#set $create_rofi_config '[ ! -f $HOME/.config/rofi/config.rasi ] && echo '@import \\"Manjaro\\"' > $HOME/.config/rofi/config.rasi'
# daemons
set $mako '$HOME/.config/sway/scripts/mako.sh --font "$term-font" --text-color "$text-color" --border-color "$accent-color" --background-color "$background-color" --border-size 3 --width 400 --height 200 --padding 20 --margin 20 --default-timeout 15000'
set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh'
#set $poweralert '[ -x "$(command -v poweralertd)" ] && pkill poweralertd; poweralertd -s -i "line power" &'
#set $swayr_daemon '[ -x "$(command -v swayrd)" ] && pkill swayrd; RUST_BACKTRACE=1 RUST_LOG=swayr=debug swayrd &> /tmp/swayrd.log'
#set $cliphist_watch '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch pkill -RTMIN+9 waybar'
#set $cliphist_store '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch cliphist store'
#set $calendar_daemon 'calcurse --daemon'
set $nm_applet '[ -x "$(command -v nm-applet)" ] && nm-applet'
#set $watch_playerctl '[ -x "$(command -v playerctl)" ] && pkill playerctl; playerctl -a metadata --format \'{{status}} {{title}}\' --follow | while read line; do pkill -RTMIN+5 waybar; done'
# used when auto focusing moved windows, for example
set $focus_ws [ $focus_after_move == 'true' ] && swaymsg workspace

View File

@ -0,0 +1,38 @@
# get an overview of all open windows etc
# swaymsg -t get_tree
fallback = ''
[matching]
'/(?i)Github.*Firefox/' = ''
'/node/' = ''
'/npm/' = ''
'/nvim ?\w*/' = ''
'/yarn/' = ''
'Alacritty' = ''
'Bitwarden' = ''
'Chia Blockchain' = ''
'Chromium' = ''
'Code' = ''
'Emacs' = ''
'GitHub Desktop' = ''
'Google-chrome' = ''
'Insomnia' = ''
'Microsoft-edge' = '󰇩'
'Nightly' = ''
'Postman' = ''
'Slack' = ''
'Spotify' = ''
'Steam' = ''
'Thunderbird' = ''
'balena-etcher' = ''
'code-oss' = ''
'discord' = ''
'firefox' = ''
'firefoxdeveloperedition' = ''
'foot' = '󰽒'
'jetbrains-idea-ce' = ''
'jetbrains-studio' = ''
'org.qbittorrent.qBittorrent' = ''
'thunderbird' = ''
'vlc' = ''

Some files were not shown because too many files have changed in this diff Show More