├── LICENSE
├── README.md
├── Xresources
├── bin
├── brdr
├── eww
├── fetch
├── how-bloated-i-am
├── nfetch
└── xcolor-pick
├── cfgs
├── README.md
├── bspwm
│ └── bspwmrc
├── dunst
│ └── dunstrc
├── eww
│ ├── README.md
│ ├── assets
│ │ └── pfp.png
│ ├── eww.scss
│ ├── eww.yuck
│ ├── scripts
│ │ ├── echoSongArt
│ │ ├── getBattery
│ │ ├── getBrightness
│ │ ├── getNetwork
│ │ ├── getSongArt
│ │ ├── getSongTitle
│ │ ├── getVolume
│ │ ├── profile-pop
│ │ ├── rofi
│ │ ├── volume.sh
│ │ └── ws
│ └── src
│ │ ├── thebar.yuck
│ │ ├── theprofilewidget.yuck
│ │ └── thevolume.yuck
├── fish
│ ├── README.md
│ ├── config.fish
│ └── fish_variables
├── neofetch
│ └── config.conf
├── rofi
│ └── config.rasi
├── st
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── arg.h
│ ├── boxdraw.c
│ ├── boxdraw.o
│ ├── boxdraw_data.h
│ ├── config.def.h
│ ├── config.h
│ ├── config.mk
│ ├── hb.c
│ ├── hb.h
│ ├── hb.o
│ ├── normalMode.c
│ ├── normalMode.h
│ ├── picom.conf
│ ├── shell.nix
│ ├── st-copyout
│ ├── st.1
│ ├── st.c
│ ├── st.desktop
│ ├── st.h
│ ├── st.info
│ ├── st.o
│ ├── utils.h
│ ├── win.h
│ ├── world
│ ├── x.c
│ └── x.o
└── sxhkd
│ ├── README.md
│ └── sxhkdrc
└── wallpapers
├── 7MYT0Mo.png
├── unknown.png
├── wall2.jpg
├── wallhaven-391eey.png
├── wallhaven-49ydl1.jpg
├── wallhaven-73zg19.png
├── wallhaven-83do1o.jpg
├── wallhaven-nr2vg7.png
├── wallhaven-zxy2qo.jpg
├── wallpaper.jpg
└── yxzrIJv.png
/README.md:
--------------------------------------------------------------------------------
1 | # Dotfiles My ~/.config
2 |
3 | 
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | ### Repo Info
12 |
13 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | ## Info 🍬
30 |
31 | - 💻 **OS:** [_Arch linux_ ~~(btw)~~](https://archlinux.org)
32 | - 🧑🎨 **WM:** [_Bspwm_](https://github.com/baskerville/bspwm)
33 | - 🍫 **STATUS BAR** [_Eww_](https://github.com/elkowar/eww)
34 | - 🪟 **COMPOSITOR:** [_Picom_](https://github.com/yshui/picom)
35 | - 🍉 **TERMINAL:** [_St_](https://st.suckless.org/)
36 | - ⚗️ **SHELL:** [_Fish_](https://fishshell.com/)
37 | - 🎱 **APP LAUNCHER:** [_Rofi_](https://github.com/davatorium/rofi)
38 |
39 |
40 |
41 |
42 |
43 |
44 | ## Setup 🔧
45 | 1. Install Dependencies
46 |
47 | ⚠️ **This instructions just work for Arch Linux and others Arch Based Distributions**
48 |
49 | > Install git (for clone the repository)
50 | ```sh
51 | sudo pacman -S git --noconfirm
52 | ```
53 |
54 | > Install Aur Helper (paru)
55 | ```sh
56 | git clone https://aur.archlinux.org/paru-bin.git
57 | cd paru-bin
58 | makepkg -si --noconfirm
59 | ```
60 |
61 | > Install necessary dependencies
62 | ```sh
63 | paru -S picom rofi acpi acpi_call flameshot jq \
64 | playerctl light gpick brightnessctl bspwm gcc base base-devel sxhkd \
65 | starship fish neofetch pamixer exa wmutils-git alsa-utils pkgconf dunst \
66 | nerd-fonts-complete --noconfirm --needed
67 | ```
68 |
69 | 2. Install config
70 | > **Clone repositorie**
71 | ```sh
72 | git clone https://github.com/Bleyom/dotfiles
73 | ```
74 |
75 | > **cd into directory**
76 | ```
77 | cd dotfiles
78 | ```
79 | > **Make executable some files**
80 | ```
81 | chmod +x ./bin/*
82 | chmod +x ./cfgs/bspwm/bspwmrc
83 | chmod +x ./cfgs/eww/scripts/*
84 | ```
85 | > **Build Terminal** (_st_)
86 | ```sh
87 | cd ./cfgs/st
88 | sudo make install
89 | ```
90 | > **Copy the config**
91 | ```sh
92 | cd ./../..
93 | mkdir -p ~/.local/bin/
94 | cp ./bin/* ~/.local/bin
95 | cp -r ./cfgs/* ~/.config
96 | cp -r ./Xresources ~/.Xresources
97 | ```
98 | 🎉 🎉 🎉 🎉
99 |
100 |
101 |
102 |
103 |
104 |
105 | ## 🚙 Gallery
106 |
107 |
108 |
109 |
110 | Full rice
111 |
112 |
113 |
114 |
115 | VSCode
116 |
117 |
118 |
119 |
120 | Neofetch Showcase
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | ## 🥇 Special Thanks & Credits
130 |
131 | - [Leo](https://github.com/justleoo) Orginal Bar
132 | - [AlphaTechnolog](https://github.com/AlphaTechnolog) A lot of help (st config, eww bar widgets help & ok theme Xresources creator)🧑🚀
133 | - [makima_hater_69](https://github.com/mluna711) Nvim config 🚲
134 | - [Le moot](https://github.com/Vermoot) Eww Volume Notification/Widget
135 | - [Saimoomedits](https://github.com/saimoomedits) Ok Theme
136 | - [~~Akali~~ Artik](https://github.com/AkaliRep) Feedback
137 | - s4dbrd (s4dbrd#7744) Feedback
138 | - [Fredare](https://github.com/fredrare) Feedback
139 | - J3bx (allan#4343) Feedback
140 | - [bunself](https://github.com/bunself) It's bunslef idk 🤝
141 | - hyun (yunmin#7843) Feedback
142 | - [zJairo](https://github.com/zjairo) Feedback
143 | - [Inugami](https://github.com/axelnfs) Feedback
144 | - [Fluffy Bean](https://github.com/Fluffy-Bean) Feedback
145 | - [ItzCuteAkemi](https://github.com/ItzCuteAkemi) Feedback
146 | - [N3ko](https://github.com/N3k0Ch4n) Feedback
147 | - Dawnt (Dawnt#0359) Feedback
148 | - iktdts (iktdts#0007) Feedback
149 | - Wilver (Wilver#7456) Feedback
150 | - wenanoshe (wenanoshe#5241) Feedback
151 | - andres715_.ts (andres715_.ts#5722) Feedback
152 | - (#1832) Feedback
153 | - ₵apo (₵apo#7399) Feedback
154 | - ulyssess (ulyssess#2962) Feedback
155 | - MauriIglesias (MauriIglesias#9597) Feedback
156 | - thadeuks (thadeuks#5628) Feedback
157 | - Teo (Teo#9251) Feedback
158 | - El echisero (El echisero#1109) Feedback
159 | - ItsPedro (ItsPedro#9909) Feedback
160 | - Dievid (Dievid#0408) Feedback
161 | - frannn (frannn#0264) Feedback
162 | - 1⁴ (1⁴#8467) Feedback
163 | - Wisdum. (Wisdum.#9656) Feedback
164 | - Walter TV (Walter TV#3978) Feedback
165 | - wick (wick#2021) Feedback
166 | - Angela (Angela 🍇#7425) Feedback
167 | - Narrator awake (Narrator awake💬#7514) Feedback
168 | - Carluardo (CarlosAG#3412) Feedback
169 | - Alkaphrah (Alkaphrah#0272) Feedback
170 | - Jadom (Jadom#8711) Feedback
171 | - ThM (ThM#4001) Feedback
172 | - Dansito (Dansito#9042) Feedback
173 | - WhosStranger (stranger#4725) Feedback
174 | - 0bfxgh0st (0bfxgh0st#7013) Feedback
175 | - dlltsuki (dlltsuki#4387) Feedback
176 | - 7dxip (7dxip#6666) Feedback
177 | - ByLeonel ([ByLeonel#6893](https://github.com/ByDog3r)) Feedback
178 | - JamsMendez (JamsMendez#1523) Feedback
179 | - MATERIAOSCURA (MATERIAOSCURA#1799) Feedback
180 | - Usan (Usan#8033) I don't remember what he did but he has done something
181 |
182 |
183 | 
184 |
--------------------------------------------------------------------------------
/Xresources:
--------------------------------------------------------------------------------
1 | Xft.antialias: 1
2 | Xft.hinting: 1
3 | Xft.autohint: 0
4 | Xft.hintstyle: hintslight
5 | Xft.rgba: rgb
6 | Xft.lcdfilter: lcddefault
7 |
8 | ! window padding
9 | st.borderpx: 25
10 |
11 | !-- values between 0.1 - 1.0 --!
12 |
13 | st.alpha: 1.0
14 | st.font: Caskaydia Cove Nerd Font:size=12
15 |
16 | !-- ok palette --!
17 | #define ok_darker_bg #06080b
18 | #define ok_bg #0b0d10
19 | #define ok_contrast_bg #101215
20 | #define ok_lighter_bg #1a1c1f
21 | #define ok_fg #d2daf4
22 | #define ok_cursor #d7dff9
23 |
24 | #define ok_black #3c474d
25 | #define ok_light_black #868d80
26 | #define ok_red #df5b61
27 | #define ok_green #87c7a1
28 | #define ok_yellow #de8f78
29 | #define ok_darker_blue #5d87bf
30 | #define ok_contrast_blue #628cc4
31 | #define ok_blue #6791c9
32 | #define ok_magenta #bc83e3
33 | #define ok_cyan #70b9cc
34 | #define ok_white #868d80
35 |
36 | *.foreground: ok_fg
37 | *.background: ok_bg
38 | *.cursorColor: ok_cursor
39 | *fading: 35
40 |
41 | *.color0: ok_black
42 | *.color1: ok_red
43 | *.color2: ok_green
44 | *.color3: ok_yellow
45 | *.color4: ok_blue
46 | *.color5: ok_magenta
47 | *.color6: ok_cyan
48 | *.color7: ok_white
49 |
50 | *.color8: ok_light_black
51 | *.color9: ok_red
52 | *.color10: ok_green
53 | *.color11: ok_yellow
54 | *.color12: ok_blue
55 | *.color13: ok_magenta
56 | *.color14: ok_cyan
57 | *.color15: ok_white
58 |
--------------------------------------------------------------------------------
/bin/brdr:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Enable double borders
3 | # Dependencies: chwb2 from wmutils/opt
4 | #
5 | # Yes, this is stolen from gk.
6 |
7 | outer='0x0B0F10' # outer
8 | inner1='0x151a1c' # focused
9 | inner2='0x101415' # normal
10 |
11 | trap 'bspc config border_width 0; kill -9 -$$' INT TERM
12 |
13 | targets() {
14 | case $1 in
15 | focused) bspc query -N -n .local.focused.\!fullscreen;;
16 | normal) bspc query -N -n .local.\!focused.\!fullscreen
17 | esac | grep -iv "$v"
18 | }
19 |
20 | bspc config border_width 18
21 |
22 | draw() { chwb2 -I "$inner" -O "$outer" -i "4" -o "9" $* |:; }
23 |
24 | initial draw, and then subscribe to events
25 | { echo; bspc subscribe node_geometry node_focus; } |
26 | while read -r _; do
27 | [ "$v" ] || v='abcdefg'
28 | inner=$inner1 draw "$(targets focused)"
29 | inner=$inner2 draw "$(targets normal)"
30 | done
31 |
--------------------------------------------------------------------------------
/bin/eww:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/bin/eww
--------------------------------------------------------------------------------
/bin/fetch:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Author: https://github.com/AlphaTechnolog
3 |
4 | clear
5 |
6 | user="${USER}"
7 | shell="$(basename ${SHELL})"
8 | distro=$(. /etc/os-release ; echo "$ID")
9 | wm="$(xprop -id $(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t | grep "WM_NAME" | cut -f2 -d \")"
10 | kernel="$(uname -r | cut -d '-' -f1)"
11 | ram="$(free -t | awk 'NR == 2 {printf("%.2f%"), $3/$2*100}')"
12 |
13 | white='\033[37m'
14 | cyan='\033[36m'
15 | blue='\033[34m'
16 | green='\033[32m'
17 | purple='\033[35m'
18 | bold='\033[1m'
19 | end='\033[0m'
20 |
21 | len () {
22 | echo $@ | wc -c
23 | }
24 |
25 | repeat_by_len () {
26 | local str=$1
27 | local char=$2
28 | local len=$(len $str)
29 | local i=1
30 |
31 | while [[ $i -lt $len ]]; do
32 | printf "$char"
33 | i=$(expr $i + 1)
34 | done
35 | }
36 |
37 | printf '%b' "
38 | ${bold}${blue} ██ ${end}${bold}${blue}${user}${cyan}@${purple}$(cat /etc/hostname)${end}
39 | ${bold}${blue} ████ ${end}${green}$(repeat_by_len "${user}@$(cat /etc/hostname)" "─")
40 | ${bold}${blue} ▀████ ${end}
41 | ${bold}${blue} ██▄ ████ ${end}${bold}${purple} ${blue}os ${green} ${magenta}${cyan}${distro}${end}
42 | ${bold}${blue} ██████████ ${end}${bold}${purple} ${blue}sh ${green} ${magenta}${cyan}${shell}${end}
43 | ${bold}${blue} ████▀ ▀████ ${end}${bold}${purple} ${blue}wm ${green} ${magenta}${cyan}${wm}${end}
44 | ${bold}${blue} ████▀ ▀████ ${end}${bold}${purple} ${blue}kr ${green} ${magenta}${cyan}${kernel}${end}
45 | ${bold}${blue}▀▀▀ ▀▀▀ ${end}${bold}${purple} ${blue}ram ${green} ${magenta}${cyan}${ram}${end}
46 |
47 | "
48 |
--------------------------------------------------------------------------------
/bin/how-bloated-i-am:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | bloat=$(pacman -Q | wc -l)
3 |
4 | if [[ $bloat -le 1000 ]];then
5 | echo "Fine, there is not so much bloat!"
6 | echo "$bloat" "<== Bloat Counter"
7 | else
8 | echo "..."
9 | echo "$bloat" "<== Bloat Counter"
10 | echo "sudo rm -rf /* --no-preserve-root"
11 | fi
12 |
--------------------------------------------------------------------------------
/bin/nfetch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/bin/nfetch
--------------------------------------------------------------------------------
/bin/xcolor-pick:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # ██╗ ██╗ ██████╗ ██████╗ ██╗ ██████╗ ██████╗
4 | # ╚██╗██╔╝██╔════╝██╔═══██╗██║ ██╔═══██╗██╔══██╗
5 | # ╚███╔╝ ██║ ██║ ██║██║ ██║ ██║██████╔╝
6 | # ██╔██╗ ██║ ██║ ██║██║ ██║ ██║██╔══██╗
7 | # ██╔╝ ██╗╚██████╗╚██████╔╝███████╗╚██████╔╝██║ ██║
8 | # ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝
9 | # color picker for X.
10 | # Simple Script To Pick Color Quickly Using Gpick.
11 | # Created By: https://github.com/rxyhn
12 |
13 | TEMP_DIR=/tmp/xcolor
14 | MSG=${XDG_CACHE_HOME:-$HOME/.cache}/xcolor.msg
15 |
16 | EXPIRE_TIME=5000
17 |
18 | main() {
19 |
20 | HEX_COLOR=$(gpick -pso --no-newline)
21 | mkdir -p $TEMP_DIR
22 | HEX="${HEX_COLOR#\#}"
23 | FNAME="$TEMP_DIR/$HEX.png"
24 | convert -size 100x100 xc:"$HEX_COLOR" "$FNAME"
25 | COLOR_CODE="$HEX_COLOR"
26 |
27 | printf %s "$COLOR_CODE" | xclip -sel c
28 | notify-send -a XColor "$COLOR_CODE" --icon="$FNAME" --expire-time="$EXPIRE_TIME"
29 | }
30 |
31 | main
32 |
--------------------------------------------------------------------------------
/cfgs/README.md:
--------------------------------------------------------------------------------
1 | # Dir's Structure
2 |
3 | 
4 |
--------------------------------------------------------------------------------
/cfgs/bspwm/bspwmrc:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | pgrep -x sxhkd > /dev/null || sxhkd &
4 |
5 | # Workspaces
6 | bspc monitor -d 1 2 3 4 5 6
7 |
8 | # Border
9 | bspc config border_width 10
10 |
11 | # Gaps
12 | bspc config window_gap 12
13 | bspc config split_ratio 0.5
14 | bspc config borderless_monocle true
15 | bspc config gapless_monocle true
16 | bspc config focus_follows_pointer true
17 |
18 | # Border Colors
19 | bspc config focused_border_color "#1b1f20"
20 | bspc config presel_feedback_color "#d8b4bd"
21 | bspc config left_padding 60
22 |
23 |
24 | # Close left bar when fullscreen
25 | bspc subscribe node_state | while read -r _ _ _ _ state flag; do
26 | if [ "$state" != "fullscreen" ]; then
27 | continue
28 | fi
29 | if [ "$flag" == on ]; then
30 | bspc config left_padding 0
31 | eww -c ~/.config/eww close bar
32 | else
33 | bspc config left_padding 65
34 | eww -c ~/.config/eww open bar
35 | fi
36 | done &
37 |
38 |
39 | # Auto start stuff
40 | xrdb merge ~/.Xresources
41 | ~/.local/bin/brdr &
42 | xsetroot -cursor_name left_ptr &
43 | eww open bar &
44 | picom &
45 | xfce4-power-manager &
46 | setxkbmap es &
47 | nitrogen --restore &
48 |
--------------------------------------------------------------------------------
/cfgs/dunst/dunstrc:
--------------------------------------------------------------------------------
1 | [global]
2 | font = Iosevka Nerd Font 9
3 |
4 | # Allow a small subset of html markup:
5 | # bold
6 | # italic
7 | # strikethrough
8 | # underline
9 | #
10 | # for a complete reference see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html
11 | # If markup is not allowed, those tags will be stripped out of the message.
12 | allow_markup = yes
13 |
14 | # The format of the message. Possible variables are:
15 | # %a appname
16 | # %s summary
17 | # %b body
18 | # %i iconname (including its path)
19 | # %I iconname (without its path)
20 | # %p progress value if set ([ 0%] to [100%]) or nothing
21 | # Markup is allowed
22 | format = "%s\n%b"
23 |
24 | # Sort messages by urgency
25 | sort = yes
26 |
27 | # Show how many messages are currently hidden (because of geometry)
28 | indicate_hidden = yes
29 |
30 | # Alignment of message text.
31 | # Possible values are "left", "center" and "right"
32 | alignment = center
33 |
34 | # The frequency with wich text that is longer than the notification
35 | # window allows bounces back and forth.
36 | # This option conflicts with 'word_wrap'.
37 | # Set to 0 to disable
38 | bounce_freq = 0
39 |
40 | # Show age of message if message is older than show_age_threshold seconds.
41 | # set to -1 to disable
42 | show_age_threshold = -1
43 |
44 | # Split notifications into multiple lines if they don't fit into geometry
45 | word_wrap = yes
46 |
47 | # Ignore newlines '\n' in notifications
48 | ignore_newline = no
49 |
50 | # The geometry of the window
51 | # geometry [{width}]x{height}][+/-{x}+/-{y}]
52 | # The geometry of the message window.
53 | # The height is measured in number of notifications everything else in pixels. If the width
54 | # is omitted but the height is given ("-geometry x2"), the message window
55 | # expands over the whole screen (dmenu-like). If width is 0,
56 | # the window expands to the longest message displayed.
57 | # A positive x is measured from the left, a negative from the
58 | # right side of the screen. Y is measured from the top and down respectevly.
59 | # The width can be negative. In this case the actual width is the
60 | # screen width minus the width defined in within the geometry option.
61 | geometry = "275x5-15+15"
62 |
63 | # Frame
64 | frame_width = 3
65 | frame_color = "#131718"
66 | outer_frame_width = 7
67 | outer_frame_color = "#0b0d10"
68 |
69 | # The transparency of the window. range: [0; 100]
70 | # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..)
71 | transparency = 0
72 |
73 | # Don't remove messages, if the user is idle (no mouse or keyboard input)
74 | # for longer than idle_threshold seconds.
75 | # Set to 0 to disable.
76 | idle_threshold = 0
77 |
78 | # Which monitor should the notifications be displayed on.
79 | monitor = 0
80 |
81 | # Display notification on focused monitor. Possible modes are:
82 | # mouse: follow mouse pointer
83 | # keyboard: follow window with keyboard focus
84 | # none: don't follow anything
85 | #
86 | # "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property.
87 | # This should be the case for almost all modern windowmanagers.
88 | #
89 | # If this option is set to mouse or keyboard, the monitor option will be
90 | # ignored
91 | follow = none
92 |
93 | # Display indicators for URLs (U) and actions (A).
94 | show_indicators = no
95 |
96 | # Should a notification popped up from history be sticky or
97 | # timeout as if it would normally do.
98 | sticky_history = yes
99 |
100 | # The height of a single line. If the height is smaller than the font height,
101 | # it will get raised to the font height.
102 | # This adds empty space above and under the text.
103 | line_height = 8
104 |
105 | # Draw a line of 'separatpr_height' pixel height between two notifications.
106 | # Set to 0 to disable
107 | separator_height = 3
108 |
109 | # Padding between text and separator
110 | padding = 8
111 |
112 | # Horizontal padding
113 | horizontal_padding = 8
114 |
115 | # Define a color for the separator.
116 | # possible values are:
117 | # * auto: dunst tries to find a color fitting to the background
118 | # * foreground: use the same color as the foreground
119 | # * frame: use the same color as the frame.
120 | # * anything else will be interpreted as a X color
121 | separator_color = frame
122 |
123 | # Print a notification on startup
124 | # This is mainly for error detection, since dbus (re-)starts dunst
125 | # automatically after a crash.
126 | startup_notification = false
127 |
128 | # Browser for opening urls in context menu
129 | browser = /usr/bin/firefox
130 |
131 | # Align icons left/right/off
132 | icon_position = left
133 |
134 | # Scale larger icons down to this size, set to 0 to disable
135 | max_icon_size = 64
136 |
137 | # Define the corner radius of the notification window
138 | # in pixel size. If the radius is 0, you have no rounded
139 | # corners.
140 | # The radius will be automatically lowered if it exceeds half of the
141 | # notification height to avoid clipping text and/or icons.
142 | corner_radius = 0
143 |
144 | [shortcuts]
145 | close = ctrl+space
146 | close_all = ctrl+shift+space
147 | history = ctrl+grave
148 | context = ctrl+shift+period
149 |
150 | [urgency_low]
151 | background = "#0b0d10"
152 | foreground = "#d2daf4"
153 | timeout = 5
154 |
155 | [urgency_normal]
156 | background = "#0b0d10"
157 | foreground = "#d2daf4"
158 | timeout = 7
159 |
160 | [urgency_critical]
161 | background = "#0b0d10"
162 | foreground = "#d2daf4"
163 | timeout = 10
164 |
--------------------------------------------------------------------------------
/cfgs/eww/README.md:
--------------------------------------------------------------------------------
1 | # Eww
2 |
3 | 1. How to define a widget
4 | 
5 |
6 | ## How to define a variable and how use it
7 |
8 | 1. How to define it
9 | 
10 | 2. How to call it
11 | ### example.yuck
12 | 
13 | ### example.sh
14 | 
15 | ### Result
16 | 
17 |
18 | ## How to change colors
19 | 
20 |
21 | ### Thanks For Read ^^
22 | 
23 |
--------------------------------------------------------------------------------
/cfgs/eww/assets/pfp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/cfgs/eww/assets/pfp.png
--------------------------------------------------------------------------------
/cfgs/eww/eww.scss:
--------------------------------------------------------------------------------
1 | // Variables
2 | $bg: #0b0d10;
3 | $bgSecondary: #0b0d10;
4 | $bgSecondaryAlt: #0b0d10;
5 | $fg: #d2daf4;
6 | $blue: #84a0c6;
7 | $blue-desaturated: rgb(117, 140, 176);
8 | $background: #0b0d10;
9 | $red: #c44949;
10 | $green: #66A182;
11 | $white: #d2daf4; /* Foreground */
12 | $dark-gray: #636c7e;
13 |
14 | * {
15 | all: unset;
16 | font-family: feather;
17 | font-family: VictorMono Nerd Font;
18 | border-radius: 7px;
19 | }
20 | window {
21 | color: $fg;
22 | font-family: "VictorMono Nerd Font";
23 | }
24 |
25 | .bar_class {
26 | background-color: $background;
27 | border-radius: 16px;
28 | }
29 |
30 | .works {
31 | font-size: 18px;
32 | font-weight: normal;
33 | margin: 0px 0px 0px 5px;
34 | background-color: $background;
35 | }
36 |
37 | .works:hover {
38 | color: $blue;
39 | }
40 | .0 , .01, .02, .03, .04, .05, .06,
41 | .011, .022, .033, .044, .055, .066{
42 | margin: 0px 10px 0px 0px;
43 | }
44 |
45 | /* Unoccupied */
46 | .0 {
47 | color: #b5cdbd;
48 | }
49 |
50 | .0:hover {
51 | color: $blue;
52 | }
53 |
54 | /* Occupied */
55 | .01, .02, .03, .04, .05, .06 {
56 | color: $blue;
57 | }
58 |
59 |
60 | /* Focused */
61 | .011, .022, .033, .044, .055, .066 {
62 | color: $red;
63 | }
64 |
65 | .bar_class {
66 | background-color: $background;
67 | border-radius: 16px;
68 | }
69 |
70 | .time-hour {
71 | font-size: 18px;
72 | color: $green;
73 | }
74 |
75 | .time-minute {
76 | font-size: 18px;
77 | color: $green;
78 | }
79 |
80 | .launcher-class {
81 | margin-left: 4px;
82 | font-size: 1.5em;
83 | color: #c44949;
84 | min-height: 39px;
85 | min-width: 15px;
86 | margin-right: 5px;
87 | border-radius: 50%;
88 | background-image: url("./assets/pfp.png");
89 | background-size: 100%;
90 | margin-top: 10px;
91 | }
92 |
93 | .outer-window, .outer-wind, .outer-window-big, .outer-window-music {
94 | background-color: $background;
95 | border-radius: 10%;
96 | border-top-left-radius: 0px;
97 | border-top-right-radius: 0px;
98 | }
99 |
100 | .profile {
101 | border: 0px solid $red;
102 | .pfp {
103 | background-image: url("./assets/pfp.png");
104 | background-size: 100%;
105 | border-radius: 50%;
106 |
107 | margin: 20px 40px 20px 40px;
108 | }
109 |
110 | .text {
111 | border: 0px;
112 | margin: 20px -20px;
113 | margin-left: -65px;
114 |
115 | .welcome, .username {
116 | font-size: 18px;
117 | font-style: italic;
118 | }
119 |
120 | .username {
121 | border: 0px;
122 | font-size: 18px;
123 | color: $blue-desaturated;
124 | }
125 | }
126 | }
127 |
128 |
129 | .launch-btn{
130 | color: $blue;
131 | font-size: 16px;
132 | margin-left: 5px;
133 | margin-bottom: 15px;
134 | }
135 |
136 | .launch-btn:hover{
137 | color: $blue-desaturated
138 | }
139 |
140 | .open-btn{
141 | color: $red;
142 | padding-bottom: 10px;
143 | padding-bottom: 5px;
144 | font-size: 20px;
145 | }
146 |
147 | .line {
148 | background-color: $white;
149 | border-radius: 50px;
150 | }
151 |
152 |
153 | .musicbox {
154 | .art {
155 | margin: 3px;
156 | border-radius: 100%;
157 | background-size: cover;
158 | background-repeat: no-repeat;
159 | background-position: center;
160 | min-width: 15px;
161 | min-height: 45px;
162 | }
163 | }
164 |
165 | .separator {
166 | background-color: $background;
167 | color: $white;
168 | }
169 |
170 | .stats {
171 | margin: 30px;
172 | }
173 |
174 | .ram-usage{
175 | padding-top: 1.5px;
176 | font-size: 24px;
177 | border-left: 3px $blue solid;
178 | border-radius: 7px;
179 | }
180 |
181 | .ram-usage-text{
182 | font-size: 18px;
183 | }
184 |
185 | .ram-icon{
186 | padding: 10px;
187 | color: $blue;
188 | }
189 |
190 | .ram-progress{
191 | color: $green;
192 | font-size: 20px;
193 | margin-left: 20px;
194 | margin-right: 20px;
195 | margin: 5px;
196 | }
197 |
198 |
199 |
200 | /* Original Author: Vermoot */
201 | /* Original dotfiles: https://github.com/Vermoot/dotfiles/ */
202 |
203 | .volume-spacer, .menu-spacer {
204 | transition: all 200ms cubic-bezier(.1,-0.00,.0,1.49);
205 | }
206 |
207 | .volume-widget {
208 | background-color: $bg;
209 | // background-color: red;
210 | border: 2px solid $blue;
211 | border-radius: 12px;
212 | padding: 0px 10px 0px;
213 | min-height: 32px;
214 | }
215 |
216 | .volume-icon {
217 | font-size: 28px;
218 | margin: 0 6px 0;
219 | }
220 |
221 | .volume-icon-muted {
222 | color: $red;
223 | }
224 |
225 | .volume-slider {
226 | background-color: $white;
227 | // padding: 1px;
228 | border-radius: 4px;
229 | margin: 16px 0px 16px;
230 | contents {
231 | trough {
232 | // padding-top: 3px;
233 | border-radius:5px;
234 | slider {
235 | background: transparent;
236 | }
237 | highlight {
238 | background: $red;
239 | padding: 3px;
240 | border-radius:4px;
241 | }
242 | }
243 | }
244 | }
245 |
246 | .volume-slider-muted {
247 | background-color: $bg;
248 | contents {
249 | trough {
250 | highlight {
251 | background: $bg;
252 | }
253 | }
254 | }
255 | }
256 |
257 | .bright-box {
258 | margin: 10px 7px;
259 | .content {
260 | font-size: 11px;
261 | background-color: #0e1013;
262 | border-radius: 8px;
263 | padding-top: 10px;
264 | padding-bottom: 10px;
265 | padding-left: 0px;
266 | padding-right: 5px;
267 |
268 | &.bright {
269 | color: $red;
270 | border-left: solid $red 2px;
271 | }
272 | }
273 | }
274 |
275 | .network-mngr-box {
276 | margin: 10px 7px;
277 | .content {
278 | font-size: 11px;
279 | background-color: #0e1013;
280 | border-radius: 8px;
281 | padding-top: 10px;
282 | padding-bottom: 10px;
283 | padding-left: 0px;
284 | padding-right: 5px;
285 |
286 | &.disconnected {
287 | color: $red;
288 | border-left: solid $red 2px;
289 | }
290 |
291 | &.connected {
292 | color: $green;
293 | border-left: solid $green 2px;
294 | }
295 | }
296 | }
297 |
298 | .volume-box {
299 | margin: 10 7px;
300 | .content {
301 | font-size: 11px;
302 | background-color: #0e1013;
303 | border-radius: 8px;
304 | padding-top: 10px;
305 | padding-bottom: 10px;
306 | padding-left: 0px;
307 | padding-right: 5px;
308 | color: $blue;
309 | border-left: solid $blue 2px;
310 | }
311 | }
312 |
313 | .battery-box {
314 | margin: 1 7px;
315 | .content {
316 | font-size: 11px;
317 | background-color: #0e1013;
318 | border-radius: 8px;
319 | padding-top: 10px;
320 | padding-bottom: 10px;
321 | padding-left: 0px;
322 | padding-right: 5px;
323 | color: $dark-gray;
324 | border-left: solid $dark-gray 2px;
325 | }
326 | }
327 |
--------------------------------------------------------------------------------
/cfgs/eww/eww.yuck:
--------------------------------------------------------------------------------
1 | (include "./src/thebar.yuck")
--------------------------------------------------------------------------------
/cfgs/eww/scripts/echoSongArt:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | echo "$HOME/.cache/eww/spotify/temp.png"
3 |
--------------------------------------------------------------------------------
/cfgs/eww/scripts/getBattery:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Get actual battery status using acpi
4 |
5 | status=$(acpi -b | awk '{ print $3 }' | sed 's/\,//g')
6 | percentage=$(acpi -b | awk '{ print $4 }' | sed 's/\,//g')
7 |
8 | echo $status $percentage
--------------------------------------------------------------------------------
/cfgs/eww/scripts/getBrightness:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Get actual brightness using light
4 |
5 | brightness=$(light | sed 's:\.[^|]*::g' | awk '{ print $1 "%"}')
6 |
7 | echo $brightness
--------------------------------------------------------------------------------
/cfgs/eww/scripts/getNetwork:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | symbol() {
4 | [ $(cat /sys/class/net/w*/operstate) = down ] && echo 睊 && exit
5 | echo
6 | }
7 |
8 | name() {
9 | iwgetid -r
10 | }
11 |
12 | [ "$1" = "icon" ] && symbol
13 |
14 | if [[ $1 == "name" || $1 == "class" ]]; then
15 | wifiname=$(name)
16 | if [[ $wifiname == "" ]]; then
17 | if [[ $1 == "name" ]]; then
18 | echo "Disconnected"
19 | elif [[ $1 == "class" ]]; then
20 | echo "disconnected"
21 | fi
22 | else
23 | if [[ $1 == "name" ]]; then
24 | echo "Connected to $wifiname"
25 | elif [[ $1 == "class" ]]; then
26 | echo "connected"
27 | fi
28 | fi
29 | fi
30 |
--------------------------------------------------------------------------------
/cfgs/eww/scripts/getSongArt:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | tmp_dir="$HOME/.cache/eww/spotify"
3 | tmp_cover_path=$tmp_dir/cover.png
4 | tmp_temp_path=$tmp_dir/temp.png
5 |
6 | if [ ! -d $tmp_dir ]; then
7 | mkdir -p $tmp_dir
8 | fi
9 |
10 | artlink="$(playerctl -p spotify metadata mpris:artUrl | sed -e 's/open.spotify.com/i.scdn.co/g')"
11 |
12 | if [ $(playerctl -p spotify metadata mpris:artUrl) ]; then
13 | curl -s "$artlink" --output $tmp_temp_path
14 | else
15 | cp $HOME/.config/eww/assets/fallback.png $tmp_temp_path
16 | fi
17 |
18 | # an epic effekt
19 | # convert $tmp_temp_path -alpha set -channel A -evaluate multiply 0.3 $tmp_cover_path
20 | # convert $tmp_temp_path -gravity center +repage -alpha set -channel A \
21 | # -sparse-color Barycentric '%[fx:w*2/32],0 opaque %[fx:w+0.5],0 transparent' \
22 | # -evaluate multiply 0.5 \
23 | # $tmp_cover_path
24 |
--------------------------------------------------------------------------------
/cfgs/eww/scripts/getSongTitle:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | title=$(playerctl -p spotify metadata --format '{{ title }}')
3 | count=$(echo -n "$title" | wc -c)
4 |
5 | get () {
6 | if [ -z "$title" ]; then
7 | echo "Not Playing";
8 | else
9 | if [ "$count" -le 24 ]; then
10 | echo $title
11 | else
12 | if [[ "$title" =~ ^[一-龠]+|[ぁ-ゔ]+|[ァ-ヴー]+ ]]; then
13 | playerctl metadata --format '{{ title }}'
14 | else
15 | playerctl metadata --format '{{ title }}'
16 | fi
17 | fi
18 | fi
19 | }
20 |
21 | if [[ $1 == "full" ]]; then
22 | get
23 | else
24 | toshow=$(get)
25 | maxlen=18
26 |
27 | sufix=""
28 |
29 | if test $(echo $toshow | wc -c) -ge $maxlen ; then
30 | sufix=" ..."
31 | fi
32 |
33 | echo "${toshow:0:$maxlen}$sufix"
34 | fi
35 |
--------------------------------------------------------------------------------
/cfgs/eww/scripts/getVolume:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # @requires: amixer
4 |
5 | percentage () {
6 | local val=$(echo $1 | tr '%' ' ' | awk '{print $1}')
7 | local icon1=$2
8 | local icon2=$3
9 | local icon3=$4
10 | local icon4=$5
11 | if [ "$val" -le 15 ]; then
12 | echo $icon1
13 | elif [ "$val" -le 30 ]; then
14 | echo $icon2
15 | elif [ "$val" -le 60 ]; then
16 | echo $icon3
17 | else
18 | echo $icon4
19 | fi
20 | }
21 |
22 | is_muted () {
23 | pacmd list-sinks | awk '/muted/ { print $2 }'
24 | }
25 |
26 | get_percentage () {
27 | local muted=$(is_muted)
28 | if [[ $muted == 'yes' ]]; then
29 | echo "muted"
30 | else
31 | amixer get Master |grep % |awk '{print $5}'|sed -e 's/\[//' -e 's/\]//' | head -n 1
32 | fi
33 | }
34 |
35 | get_icon () {
36 | local vol=$(get_percentage)
37 | if [[ $vol == "muted" ]]; then
38 | echo "婢"
39 | else
40 | echo $(percentage "$vol" "" "" "墳" "")
41 | fi
42 | }
43 |
44 | get_class () {
45 | local vol=$(get_percentage)
46 | if [[ $vol == "muted" ]]; then
47 | echo "red"
48 | else
49 | echo $(percentage "$vol" "red" "magenta" "yellow" "blue")
50 | fi
51 | }
52 |
53 | if [[ $1 == "icon" ]]; then
54 | get_icon
55 | fi
56 |
57 | if [[ $1 == "class" ]]; then
58 | get_class
59 | fi
60 |
61 | if [[ $1 == "percentage" ]]; then
62 | get_percentage
63 | fi
64 |
--------------------------------------------------------------------------------
/cfgs/eww/scripts/profile-pop:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | eww open-many --toggle outer-window profile
--------------------------------------------------------------------------------
/cfgs/eww/scripts/rofi:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | rofi -show drun
3 |
--------------------------------------------------------------------------------
/cfgs/eww/scripts/volume.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | killed=false
4 |
5 | if [ "$1" == "up" ]; then
6 | pamixer -i 20
7 | elif [ "$1" == "down" ]; then
8 | pamixer -d 20
9 | fi
10 |
11 | if ! $killed; then
12 | eww update volume-hidden=true
13 | eww open volume
14 | fi
15 |
16 | eww update volume-level=$(pamixer --get-volume)
17 | eww update volume-muted=$(pamixer --get-mute)
18 | eww update volume-hidden=false
19 |
20 | sleep 4
21 | eww close volume
22 |
--------------------------------------------------------------------------------
/cfgs/eww/scripts/ws:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | workspaces() {
3 |
4 | ws1="1"
5 | ws2="2"
6 | ws3="3"
7 | ws4="4"
8 | ws5="5"
9 | ws6="6"
10 |
11 | # Unoccupied
12 | un="0"
13 |
14 | # check if Occupied
15 | o1=$(bspc query -D -d .occupied --names | grep "$ws1" )
16 | o2=$(bspc query -D -d .occupied --names | grep "$ws2" )
17 | o3=$(bspc query -D -d .occupied --names | grep "$ws3" )
18 | o4=$(bspc query -D -d .occupied --names | grep "$ws4" )
19 | o5=$(bspc query -D -d .occupied --names | grep "$ws5" )
20 | o6=$(bspc query -D -d .occupied --names | grep "$ws6" )
21 |
22 | # check if Focused
23 | f1=$(bspc query -D -d focused --names | grep "$ws1" )
24 | f2=$(bspc query -D -d focused --names | grep "$ws2" )
25 | f3=$(bspc query -D -d focused --names | grep "$ws3" )
26 | f4=$(bspc query -D -d focused --names | grep "$ws4" )
27 | f5=$(bspc query -D -d focused --names | grep "$ws5" )
28 | f6=$(bspc query -D -d focused --names | grep "$ws6" )
29 |
30 | ic_1="一"
31 | ic_2="二"
32 | ic_3="三"
33 | ic_4="四"
34 | ic_5="五"
35 | ic_6="六"
36 | if [ $f1 ]; then
37 | ic_1="一"
38 | elif [ $f2 ]; then
39 | ic_2="二"
40 | elif [ $f3 ]; then
41 | ic_3="三"
42 | elif [ $f4 ]; then
43 | ic_4="四"
44 | elif [ $f5 ]; then
45 | ic_5="五"
46 | elif [ $f6 ]; then
47 | ic_6="六"
48 | fi
49 |
50 | echo "(box :class \"works\" :orientation \"v\" :spacing 3 :space-evenly \"false\" (button :onclick \"bspc desktop -f $ws1\" :class \"$un$o1$f1\" \"$ic_1\") (button :onclick \"bspc desktop -f $ws2\" :class \"$un$o2$f2\" \"$ic_2\") (button :onclick \"bspc desktop -f $ws3\" :class \"$un$o3$f3\" \"$ic_3\") (button :onclick \"bspc desktop -f $ws4\" :class \"$un$o4$f4\" \"$ic_4\") (button :onclick \"bspc desktop -f $ws5\" :class \"$un$o5$f5\" \"$ic_5\") (button :onclick \"bspc desktop -f $ws6\" :class \"$un$o6$f6\" \"$ic_6\"))"
51 |
52 | }
53 | workspaces
54 | bspc subscribe desktop node_transfer | while read -r _ ; do
55 | workspaces
56 | done
57 |
--------------------------------------------------------------------------------
/cfgs/eww/src/thebar.yuck:
--------------------------------------------------------------------------------
1 | ;; File Inclusion
2 | (include "./src/theprofilewidget.yuck")
3 | (include "./src/thevolume.yuck")
4 |
5 | ;; Workspaces Script
6 | (deflisten workspaces "scripts/ws")
7 |
8 | ;; Music Art
9 | (defpoll art :interval "2s" "scripts/echoSongArt")
10 | (defpoll song_art :interval "2s" "scripts/getSongArt")
11 |
12 | ;; Song title
13 | (defpoll full_song_title :interval "5s" "scripts/getSongTitle full")
14 |
15 | ;; Network
16 | (defpoll network_icon :interval "1s" "./scripts/getNetwork icon")
17 | (defpoll network_name :interval "1s" "./scripts/getNetwork name")
18 | (defpoll network_class :interval "1s" "./scripts/getNetwork class")
19 |
20 | ;; Volume
21 | (defpoll volume_class :interval "1s" "scripts/getVolume class")
22 | (defpoll volume :interval "1s" "scripts/getVolume percentage")
23 | (defpoll volume_icon :interval "1s" "scripts/getVolume icon")
24 |
25 | ;; Bright
26 | (defpoll actual_bright :interval "1s" "scripts/getBrightness")
27 |
28 | ;; Battery
29 | (defpoll battery_status :interval "1s" "scripts/getBattery")
30 |
31 | ;;;;;;;;;;;;;;;;;;;
32 | ;; Widgets 😎😎😎😎😎😎😎😎😎
33 |
34 | ;; WerkSpaces 😎😎😎😎
35 | (defwidget workspaces []
36 | (literal :content workspaces)
37 | )
38 |
39 | ;; Battery
40 | (defwidget battery []
41 | (box :class "battery-box"
42 | :orientation "v"
43 | :space-evenly "false"
44 | :valign "start"
45 | :tooltip "${battery_status}"
46 | (button :class "content battery"
47 | ""
48 | )
49 | )
50 | )
51 |
52 | ;; Bright
53 | (defwidget bright []
54 | (box :class "bright-box"
55 | :orientation "v"
56 | :space-evenly "false"
57 | :valign "start"
58 | :tooltip "Brightness ${actual_bright}"
59 | (button :class "content bright"
60 |
61 | ""
62 | )
63 | )
64 | )
65 |
66 | ;; Network
67 | (defwidget network []
68 | (box :class "network-mngr-box"
69 | :orientation "v"
70 | :space-evenly "false"
71 | :valign "start"
72 | :tooltip "${network_name} (Press to open nmtui)"
73 | (button :class "content ${network_class}"
74 | :onclick "st -c network nmtui &"
75 | network_icon)
76 | )
77 | )
78 |
79 | (defwidget volume []
80 | (box :class "volume-box"
81 | :orientation "v"
82 | :space-evenly "false"
83 | :valign "start"
84 | :tooltip "Volume ${volume}"
85 | (button :class "content ${volume_class}"
86 | :onclick "pavucontrol &"
87 | volume_icon)
88 | )
89 | )
90 |
91 | ;; Mesic
92 | (defwidget musicbox []
93 | (box :orientation "v"
94 | :valign "start"
95 | :space-evenly "false"
96 | :class "musicbox"
97 | :tooltip "${full_song_title}"
98 | song_art
99 | (box :class "art" :path art :style "background-image: url('${art}')")
100 | )
101 | )
102 |
103 | ;; Separator 😎😎😎😎😎
104 | (defwidget separator []
105 | (box :orientation "h"
106 | (label :class "separator" :text "———")
107 | )
108 | )
109 |
110 | ;; Lencher 😎😎😎😎
111 | (defwidget launcher []
112 | (box :orientation "v"
113 | :space-evenly "false"
114 | :spacing -15
115 | (button :class "launcher-class"
116 | :tooltip "Launch AppLauncher"
117 | :onclick "scripts/rofi"
118 | )
119 | )
120 | )
121 |
122 | ;; Time 🕓🕓🕓🕓
123 | (defwidget time []
124 | (box :orientation "v"
125 | :class "time"
126 | :valign "end"
127 | :halign "center"
128 | (button :class "time-hour" hour)
129 | (button :class "time-minute" min)
130 | )
131 | )
132 |
133 | (defpoll hour :interval "1s" "date '+%H'")
134 | (defpoll min :interval "1s" "date '+%M'")
135 |
136 | ; PewerMenu 😎😎😎😎
137 |
138 | (defwidget powermenu []
139 | (eventbox :onhover "$HOME/.local/bin/eww update powermenu=true" :onhoverlost "$HOME/.local/bin/eww update powermenu=false"
140 | (box :orientation "v" :space-evenly "false" :vexpand "false" :class "powermenu"
141 | (revealer :transition "slideup"
142 | :reveal powermenu
143 | :duration "600ms"
144 | (box :orientation "v" :space-evenly "false"
145 | (button :class "launch-btn" :tooltip "Launch the profile widget" :onclick "scripts/profile-pop" " ")))
146 | (button :class "open-btn" :tooltip "EwE" "")
147 | )
148 | )
149 | )
150 | (defvar powermenu false)
151 |
152 | ;;;;;;;;;;;;;;;;;;;
153 |
154 | ;;;;;;;;;;;;;;;;;;;
155 |
156 | (defwidget top []
157 | (box :orientation "v"
158 | :space-evenly true
159 | :valign "start"
160 | (launcher)
161 | (bright)
162 | (network)
163 | (volume)
164 | )
165 | )
166 |
167 |
168 | (defwidget center []
169 | (box :orientation "h"
170 | :space-evenly false
171 | :halign "center"
172 | :class "right_modules"
173 | :valign "center"
174 |
175 | (workspaces)
176 | )
177 | )
178 |
179 | (defwidget bottom []
180 | (box :orientation "v"
181 | :space-evenly false
182 | :valign "end"
183 | :spacing 5
184 | (battery)
185 | (musicbox)
186 | (time)
187 | (separator)
188 | (powermenu)
189 | )
190 | )
191 |
192 | ;;;;;;;;;;;;;;;;;;;
193 |
194 | (defwidget bar_owo []
195 | (box :class "bar_class"
196 | :orientation "v"
197 | :hexpand "false"
198 | :vexpand "false"
199 | (top)
200 | (center)
201 | (bottom)
202 | )
203 | )
204 |
205 |
206 | ;; the bar itself
207 | (defwindow bar :geometry
208 | (geometry :x "5px"
209 | :y "0px"
210 | :width "50px"
211 | :height "99%"
212 | :anchor "left center"
213 | )
214 | :stacking "fg"
215 | :windowtype "dock"
216 | (bar_owo)
217 | )
218 |
219 | (defwindow line
220 | :geometry
221 | (geometry :x "1%"
222 | :y "33%"
223 | :width "310px"
224 | :height "2px")
225 | (line)
226 | )
227 |
--------------------------------------------------------------------------------
/cfgs/eww/src/theprofilewidget.yuck:
--------------------------------------------------------------------------------
1 | (defpoll hostname :interval "120s" "cat /etc/hostname")
2 | (defpoll user :interval "120s" "whoami")
3 |
4 | (defwidget outer-window []
5 | (box))
6 | (defwidget profile []
7 | (box :orientation "h"
8 | :space-evenly "true"
9 |
10 | (box :class "pfp")
11 | (box :class "text" :orientation "v"
12 | :space-evenly "true"
13 |
14 | (box :class "welcome" "Hello!")
15 | (box :class "username" "${user} in ${hostname}")
16 | )
17 | )
18 | )
19 |
20 | (defwindow outer-window
21 | :geometry (geometry :x "73px"
22 | :y "13px"
23 | :width "300px"
24 | :height "162px")
25 | (outer-window))
26 | (defwindow profile
27 | :geometry (geometry :x "4%"
28 | :y "40px"
29 | :width "320px"
30 | :height "120px")
31 | (profile))
32 |
--------------------------------------------------------------------------------
/cfgs/eww/src/thevolume.yuck:
--------------------------------------------------------------------------------
1 | ;; Original Author: Vermoot
2 | ;; Original dotfiles: https://github.com/Vermoot/dotfiles/
3 |
4 | (defvar volume-hidden false)
5 | (defvar volume-level 50)
6 | (defvar volume-muted false)
7 | (defwindow volume
8 | :monitor 0
9 | :geometry (geometry :y "100px" :x "0px" :width "250px" :height "200px" :anchor "center bottom")
10 | :windowtype "dock"
11 | :wm-ignore true
12 | :stacking "fg"
13 | (box :class "volume-window"
14 | :orientation "v"
15 | :space-evenly "false"
16 | (box :class "volume-spacer" :style {volume-hidden ? "padding-top: 1px;" : "padding-top: 30px;"})
17 | (box :class "volume-widget"
18 | :orientation "h"
19 | :space-evenly false
20 | :spacing 10
21 | (label :text {volume-muted ? "" :
22 | volume-level == 0 ? "" :
23 | volume-level < 32 ? "" :
24 | volume-level < 65 ? "" :
25 | ""}
26 |
27 | :class 'volume-icon ${volume-muted ? "volume-icon-muted" : ""}'
28 | )
29 | (scale :class 'volume-slider ${volume-muted ? "volume-slider-muted" : ""}'
30 | :hexpand "true"
31 | :min 0
32 | :max 100
33 | :height 10
34 | :marks true
35 | :value volume-level
36 | :onchange "pamixer --set-volume {}"))))
37 |
--------------------------------------------------------------------------------
/cfgs/fish/README.md:
--------------------------------------------------------------------------------
1 | # Fish
2 |
3 | 1. How to add a alias
4 | 
5 | ### Result
6 | [Imgur](https://imgur.com/UzdFLS2)
7 |
--------------------------------------------------------------------------------
/cfgs/fish/config.fish:
--------------------------------------------------------------------------------
1 | status -i || exit
2 |
3 | set fish_greeting ""
4 |
5 | alias ls='exa --icons'
6 | alias gc='git clone'
7 | alias tree='exa --icons --tree'
8 | alias cat='bat --theme base16 --paging=never --style=plain'
9 |
10 | export PATH="$PATH:$HOME/.spicetify:$HOME/.local/bin:$HOME/.yarn/bin"
11 |
12 | # color
13 | set fish_color_normal brwhite
14 | set fish_color_command brgreen
15 | set fish_color_param brwhite
16 | set fish_color_error brred
17 | set fish_color_quote bryellow
18 |
19 | # vi-mode
20 | set fish_cursor_default block
21 | set fish_cursor_insert line
22 | set fish_cursor_replace_one underscore
23 | set fish_cursor_visual block
24 |
25 | # comment to disable vi mode
26 | fish_vi_key_bindings
27 |
28 | starship init fish | source
29 |
30 | fetch
31 |
--------------------------------------------------------------------------------
/cfgs/fish/fish_variables:
--------------------------------------------------------------------------------
1 | # This file contains fish universal variable definitions.
2 | # VERSION: 3.0
3 | SETUVAR __fish_initialized:3400
4 | SETUVAR _fisher_jorgebucaran_2F_fisher_files:/home/gabriel/\x2econfig/fish/functions/fisher\x2efish\x1e/home/gabriel/\x2econfig/fish/completions/fisher\x2efish
5 | SETUVAR _fisher_jorgebucaran_2F_nvm_2E_fish_files:/home/gabriel/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e/home/gabriel/\x2econfig/fish/functions/_nvm_list\x2efish\x1e/home/gabriel/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e/home/gabriel/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e/home/gabriel/\x2econfig/fish/functions/nvm\x2efish\x1e/home/gabriel/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e/home/gabriel/\x2econfig/fish/completions/nvm\x2efish
6 | SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/nvm\x2efish
7 | SETUVAR fish_color_autosuggestion:555\x1ebrblack
8 | SETUVAR fish_color_cancel:\x2dr
9 | SETUVAR fish_color_command:brgreen
10 | SETUVAR fish_color_comment:990000
11 | SETUVAR fish_color_cwd:green
12 | SETUVAR fish_color_cwd_root:red
13 | SETUVAR fish_color_end:009900
14 | SETUVAR fish_color_error:brred
15 | SETUVAR fish_color_escape:00a6b2
16 | SETUVAR fish_color_history_current:\x2d\x2dbold
17 | SETUVAR fish_color_host:normal
18 | SETUVAR fish_color_host_remote:yellow
19 | SETUVAR fish_color_normal:brwhite
20 | SETUVAR fish_color_operator:00a6b2
21 | SETUVAR fish_color_param:brwhite
22 | SETUVAR fish_color_quote:bryellow
23 | SETUVAR fish_color_redirection:00afff
24 | SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
25 | SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
26 | SETUVAR fish_color_status:red
27 | SETUVAR fish_color_user:brgreen
28 | SETUVAR fish_color_valid_path:\x2d\x2dunderline
29 | SETUVAR fish_key_bindings:fish_vi_key_bindings
30 | SETUVAR fish_pager_color_completion:\x1d
31 | SETUVAR fish_pager_color_description:B3A06D\x1eyellow
32 | SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
33 | SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
34 | SETUVAR fish_pager_color_selected_background:\x2dr
35 | SETUVAR nvm_data:/home/gabriel/\x2elocal/share/nvm
36 | SETUVAR nvm_default_version:v14\x2e19\x2e1
37 | SETUVAR nvm_mirror:https\x3a//nodejs\x2eorg/dist
38 |
--------------------------------------------------------------------------------
/cfgs/neofetch/config.conf:
--------------------------------------------------------------------------------
1 | # See this wiki page for more info:
2 | # https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
3 | print_info() {
4 | info title
5 | info underline
6 |
7 | info "OS" distro
8 | info "Host" model
9 | info "Kernel" kernel
10 | info "Uptime" uptime
11 | info "Packages" packages
12 | info "Shell" shell
13 | info "Resolution" resolution
14 | info "DE" de
15 | info "WM" wm
16 | info "WM Theme" wm_theme
17 | info "Theme" theme
18 | info "Icons" icons
19 | info "Terminal" term
20 | info "Terminal Font" term_font
21 | info "CPU" cpu
22 | info "GPU" gpu
23 | info "Memory" memory
24 |
25 | # info "GPU Driver" gpu_driver # Linux/macOS only
26 | # info "CPU Usage" cpu_usage
27 | # info "Disk" disk
28 | # info "Battery" battery
29 | # info "Font" font
30 | # info "Song" song
31 | # [[ "$player" ]] && prin "Music Player" "$player"
32 | # info "Local IP" local_ip
33 | # info "Public IP" public_ip
34 | # info "Users" users
35 | # info "Locale" locale # This only works on glibc systems.
36 |
37 | info cols
38 | }
39 |
40 | # Title
41 |
42 |
43 | # Hide/Show Fully qualified domain name.
44 | #
45 | # Default: 'off'
46 | # Values: 'on', 'off'
47 | # Flag: --title_fqdn
48 | title_fqdn="off"
49 |
50 |
51 | # Kernel
52 |
53 |
54 | # Shorten the output of the kernel function.
55 | #
56 | # Default: 'on'
57 | # Values: 'on', 'off'
58 | # Flag: --kernel_shorthand
59 | # Supports: Everything except *BSDs (except PacBSD and PC-BSD)
60 | #
61 | # Example:
62 | # on: '4.8.9-1-ARCH'
63 | # off: 'Linux 4.8.9-1-ARCH'
64 | kernel_shorthand="on"
65 |
66 |
67 | # Distro
68 |
69 |
70 | # Shorten the output of the distro function
71 | #
72 | # Default: 'off'
73 | # Values: 'on', 'tiny', 'off'
74 | # Flag: --distro_shorthand
75 | # Supports: Everything except Windows and Haiku
76 | distro_shorthand="off"
77 |
78 | # Show/Hide OS Architecture.
79 | # Show 'x86_64', 'x86' and etc in 'Distro:' output.
80 | #
81 | # Default: 'on'
82 | # Values: 'on', 'off'
83 | # Flag: --os_arch
84 | #
85 | # Example:
86 | # on: 'Arch Linux x86_64'
87 | # off: 'Arch Linux'
88 | os_arch="on"
89 |
90 |
91 | # Uptime
92 |
93 |
94 | # Shorten the output of the uptime function
95 | #
96 | # Default: 'on'
97 | # Values: 'on', 'tiny', 'off'
98 | # Flag: --uptime_shorthand
99 | #
100 | # Example:
101 | # on: '2 days, 10 hours, 3 mins'
102 | # tiny: '2d 10h 3m'
103 | # off: '2 days, 10 hours, 3 minutes'
104 | uptime_shorthand="on"
105 |
106 |
107 | # Memory
108 |
109 |
110 | # Show memory pecentage in output.
111 | #
112 | # Default: 'off'
113 | # Values: 'on', 'off'
114 | # Flag: --memory_percent
115 | #
116 | # Example:
117 | # on: '1801MiB / 7881MiB (22%)'
118 | # off: '1801MiB / 7881MiB'
119 | memory_percent="off"
120 |
121 | # Change memory output unit.
122 | #
123 | # Default: 'mib'
124 | # Values: 'kib', 'mib', 'gib'
125 | # Flag: --memory_unit
126 | #
127 | # Example:
128 | # kib '1020928KiB / 7117824KiB'
129 | # mib '1042MiB / 6951MiB'
130 | # gib: ' 0.98GiB / 6.79GiB'
131 | memory_unit="mib"
132 |
133 |
134 | # Packages
135 |
136 |
137 | # Show/Hide Package Manager names.
138 | #
139 | # Default: 'tiny'
140 | # Values: 'on', 'tiny' 'off'
141 | # Flag: --package_managers
142 | #
143 | # Example:
144 | # on: '998 (pacman), 8 (flatpak), 4 (snap)'
145 | # tiny: '908 (pacman, flatpak, snap)'
146 | # off: '908'
147 | package_managers="on"
148 |
149 |
150 | # Shell
151 |
152 |
153 | # Show the path to $SHELL
154 | #
155 | # Default: 'off'
156 | # Values: 'on', 'off'
157 | # Flag: --shell_path
158 | #
159 | # Example:
160 | # on: '/bin/bash'
161 | # off: 'bash'
162 | shell_path="off"
163 |
164 | # Show $SHELL version
165 | #
166 | # Default: 'on'
167 | # Values: 'on', 'off'
168 | # Flag: --shell_version
169 | #
170 | # Example:
171 | # on: 'bash 4.4.5'
172 | # off: 'bash'
173 | shell_version="on"
174 |
175 |
176 | # CPU
177 |
178 |
179 | # CPU speed type
180 | #
181 | # Default: 'bios_limit'
182 | # Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
183 | # Flag: --speed_type
184 | # Supports: Linux with 'cpufreq'
185 | # NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
186 | speed_type="bios_limit"
187 |
188 | # CPU speed shorthand
189 | #
190 | # Default: 'off'
191 | # Values: 'on', 'off'.
192 | # Flag: --speed_shorthand
193 | # NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
194 | #
195 | # Example:
196 | # on: 'i7-6500U (4) @ 3.1GHz'
197 | # off: 'i7-6500U (4) @ 3.100GHz'
198 | speed_shorthand="off"
199 |
200 | # Enable/Disable CPU brand in output.
201 | #
202 | # Default: 'on'
203 | # Values: 'on', 'off'
204 | # Flag: --cpu_brand
205 | #
206 | # Example:
207 | # on: 'Intel i7-6500U'
208 | # off: 'i7-6500U (4)'
209 | cpu_brand="on"
210 |
211 | # CPU Speed
212 | # Hide/Show CPU speed.
213 | #
214 | # Default: 'on'
215 | # Values: 'on', 'off'
216 | # Flag: --cpu_speed
217 | #
218 | # Example:
219 | # on: 'Intel i7-6500U (4) @ 3.1GHz'
220 | # off: 'Intel i7-6500U (4)'
221 | cpu_speed="on"
222 |
223 | # CPU Cores
224 | # Display CPU cores in output
225 | #
226 | # Default: 'logical'
227 | # Values: 'logical', 'physical', 'off'
228 | # Flag: --cpu_cores
229 | # Support: 'physical' doesn't work on BSD.
230 | #
231 | # Example:
232 | # logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
233 | # physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
234 | # off: 'Intel i7-6500U @ 3.1GHz'
235 | cpu_cores="logical"
236 |
237 | # CPU Temperature
238 | # Hide/Show CPU temperature.
239 | # Note the temperature is added to the regular CPU function.
240 | #
241 | # Default: 'off'
242 | # Values: 'C', 'F', 'off'
243 | # Flag: --cpu_temp
244 | # Supports: Linux, BSD
245 | # NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
246 | # coretemp kernel module. This only supports newer Intel processors.
247 | #
248 | # Example:
249 | # C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
250 | # F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
251 | # off: 'Intel i7-6500U (4) @ 3.1GHz'
252 | cpu_temp="off"
253 |
254 |
255 | # GPU
256 |
257 |
258 | # Enable/Disable GPU Brand
259 | #
260 | # Default: 'on'
261 | # Values: 'on', 'off'
262 | # Flag: --gpu_brand
263 | #
264 | # Example:
265 | # on: 'AMD HD 7950'
266 | # off: 'HD 7950'
267 | gpu_brand="on"
268 |
269 | # Which GPU to display
270 | #
271 | # Default: 'all'
272 | # Values: 'all', 'dedicated', 'integrated'
273 | # Flag: --gpu_type
274 | # Supports: Linux
275 | #
276 | # Example:
277 | # all:
278 | # GPU1: AMD HD 7950
279 | # GPU2: Intel Integrated Graphics
280 | #
281 | # dedicated:
282 | # GPU1: AMD HD 7950
283 | #
284 | # integrated:
285 | # GPU1: Intel Integrated Graphics
286 | gpu_type="all"
287 |
288 |
289 | # Resolution
290 |
291 |
292 | # Display refresh rate next to each monitor
293 | # Default: 'off'
294 | # Values: 'on', 'off'
295 | # Flag: --refresh_rate
296 | # Supports: Doesn't work on Windows.
297 | #
298 | # Example:
299 | # on: '1920x1080 @ 60Hz'
300 | # off: '1920x1080'
301 | refresh_rate="off"
302 |
303 |
304 | # Gtk Theme / Icons / Font
305 |
306 |
307 | # Shorten output of GTK Theme / Icons / Font
308 | #
309 | # Default: 'off'
310 | # Values: 'on', 'off'
311 | # Flag: --gtk_shorthand
312 | #
313 | # Example:
314 | # on: 'Numix, Adwaita'
315 | # off: 'Numix [GTK2], Adwaita [GTK3]'
316 | gtk_shorthand="off"
317 |
318 |
319 | # Enable/Disable gtk2 Theme / Icons / Font
320 | #
321 | # Default: 'on'
322 | # Values: 'on', 'off'
323 | # Flag: --gtk2
324 | #
325 | # Example:
326 | # on: 'Numix [GTK2], Adwaita [GTK3]'
327 | # off: 'Adwaita [GTK3]'
328 | gtk2="on"
329 |
330 | # Enable/Disable gtk3 Theme / Icons / Font
331 | #
332 | # Default: 'on'
333 | # Values: 'on', 'off'
334 | # Flag: --gtk3
335 | #
336 | # Example:
337 | # on: 'Numix [GTK2], Adwaita [GTK3]'
338 | # off: 'Numix [GTK2]'
339 | gtk3="on"
340 |
341 |
342 | # IP Address
343 |
344 |
345 | # Website to ping for the public IP
346 | #
347 | # Default: 'http://ident.me'
348 | # Values: 'url'
349 | # Flag: --ip_host
350 | public_ip_host="http://ident.me"
351 |
352 | # Public IP timeout.
353 | #
354 | # Default: '2'
355 | # Values: 'int'
356 | # Flag: --ip_timeout
357 | public_ip_timeout=2
358 |
359 |
360 | # Desktop Environment
361 |
362 |
363 | # Show Desktop Environment version
364 | #
365 | # Default: 'on'
366 | # Values: 'on', 'off'
367 | # Flag: --de_version
368 | de_version="on"
369 |
370 |
371 | # Disk
372 |
373 |
374 | # Which disks to display.
375 | # The values can be any /dev/sdXX, mount point or directory.
376 | # NOTE: By default we only show the disk info for '/'.
377 | #
378 | # Default: '/'
379 | # Values: '/', '/dev/sdXX', '/path/to/drive'.
380 | # Flag: --disk_show
381 | #
382 | # Example:
383 | # disk_show=('/' '/dev/sdb1'):
384 | # 'Disk (/): 74G / 118G (66%)'
385 | # 'Disk (/mnt/Videos): 823G / 893G (93%)'
386 | #
387 | # disk_show=('/'):
388 | # 'Disk (/): 74G / 118G (66%)'
389 | #
390 | disk_show=('/')
391 |
392 | # Disk subtitle.
393 | # What to append to the Disk subtitle.
394 | #
395 | # Default: 'mount'
396 | # Values: 'mount', 'name', 'dir', 'none'
397 | # Flag: --disk_subtitle
398 | #
399 | # Example:
400 | # name: 'Disk (/dev/sda1): 74G / 118G (66%)'
401 | # 'Disk (/dev/sdb2): 74G / 118G (66%)'
402 | #
403 | # mount: 'Disk (/): 74G / 118G (66%)'
404 | # 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
405 | # 'Disk (/mnt/Videos): 74G / 118G (66%)'
406 | #
407 | # dir: 'Disk (/): 74G / 118G (66%)'
408 | # 'Disk (Local Disk): 74G / 118G (66%)'
409 | # 'Disk (Videos): 74G / 118G (66%)'
410 | #
411 | # none: 'Disk: 74G / 118G (66%)'
412 | # 'Disk: 74G / 118G (66%)'
413 | # 'Disk: 74G / 118G (66%)'
414 | disk_subtitle="mount"
415 |
416 | # Disk percent.
417 | # Show/Hide disk percent.
418 | #
419 | # Default: 'on'
420 | # Values: 'on', 'off'
421 | # Flag: --disk_percent
422 | #
423 | # Example:
424 | # on: 'Disk (/): 74G / 118G (66%)'
425 | # off: 'Disk (/): 74G / 118G'
426 | disk_percent="on"
427 |
428 |
429 | # Song
430 |
431 |
432 | # Manually specify a music player.
433 | #
434 | # Default: 'auto'
435 | # Values: 'auto', 'player-name'
436 | # Flag: --music_player
437 | #
438 | # Available values for 'player-name':
439 | #
440 | # amarok
441 | # audacious
442 | # banshee
443 | # bluemindo
444 | # clementine
445 | # cmus
446 | # deadbeef
447 | # deepin-music
448 | # dragon
449 | # elisa
450 | # exaile
451 | # gnome-music
452 | # gmusicbrowser
453 | # gogglesmm
454 | # guayadeque
455 | # io.elementary.music
456 | # iTunes
457 | # juk
458 | # lollypop
459 | # mocp
460 | # mopidy
461 | # mpd
462 | # muine
463 | # netease-cloud-music
464 | # olivia
465 | # playerctl
466 | # pogo
467 | # pragha
468 | # qmmp
469 | # quodlibet
470 | # rhythmbox
471 | # sayonara
472 | # smplayer
473 | # spotify
474 | # strawberry
475 | # tauonmb
476 | # tomahawk
477 | # vlc
478 | # xmms2d
479 | # xnoise
480 | # yarock
481 | music_player="auto"
482 |
483 | # Format to display song information.
484 | #
485 | # Default: '%artist% - %album% - %title%'
486 | # Values: '%artist%', '%album%', '%title%'
487 | # Flag: --song_format
488 | #
489 | # Example:
490 | # default: 'Song: Jet - Get Born - Sgt Major'
491 | song_format="%artist% - %album% - %title%"
492 |
493 | # Print the Artist, Album and Title on separate lines
494 | #
495 | # Default: 'off'
496 | # Values: 'on', 'off'
497 | # Flag: --song_shorthand
498 | #
499 | # Example:
500 | # on: 'Artist: The Fratellis'
501 | # 'Album: Costello Music'
502 | # 'Song: Chelsea Dagger'
503 | #
504 | # off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
505 | song_shorthand="off"
506 |
507 | # 'mpc' arguments (specify a host, password etc).
508 | #
509 | # Default: ''
510 | # Example: mpc_args=(-h HOST -P PASSWORD)
511 | mpc_args=()
512 |
513 |
514 | # Text Colors
515 |
516 |
517 | # Text Colors
518 | #
519 | # Default: 'distro'
520 | # Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
521 | # Flag: --colors
522 | #
523 | # Each number represents a different part of the text in
524 | # this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
525 | #
526 | # Example:
527 | # colors=(distro) - Text is colored based on Distro colors.
528 | # colors=(4 6 1 8 8 6) - Text is colored in the order above.
529 | colors=(distro)
530 |
531 |
532 | # Text Options
533 |
534 |
535 | # Toggle bold text
536 | #
537 | # Default: 'on'
538 | # Values: 'on', 'off'
539 | # Flag: --bold
540 | bold="on"
541 |
542 | # Enable/Disable Underline
543 | #
544 | # Default: 'on'
545 | # Values: 'on', 'off'
546 | # Flag: --underline
547 | underline_enabled="on"
548 |
549 | # Underline character
550 | #
551 | # Default: '-'
552 | # Values: 'string'
553 | # Flag: --underline_char
554 | underline_char="-"
555 |
556 |
557 | # Info Separator
558 | # Replace the default separator with the specified string.
559 | #
560 | # Default: ':'
561 | # Flag: --separator
562 | #
563 | # Example:
564 | # separator="->": 'Shell-> bash'
565 | # separator=" =": 'WM = dwm'
566 | separator=":"
567 |
568 |
569 | # Color Blocks
570 |
571 |
572 | # Color block range
573 | # The range of colors to print.
574 | #
575 | # Default: '0', '15'
576 | # Values: 'num'
577 | # Flag: --block_range
578 | #
579 | # Example:
580 | #
581 | # Display colors 0-7 in the blocks. (8 colors)
582 | # neofetch --block_range 0 7
583 | #
584 | # Display colors 0-15 in the blocks. (16 colors)
585 | # neofetch --block_range 0 15
586 | block_range=(0 15)
587 |
588 | # Toggle color blocks
589 | #
590 | # Default: 'on'
591 | # Values: 'on', 'off'
592 | # Flag: --color_blocks
593 | color_blocks="on"
594 |
595 | # Color block width in spaces
596 | #
597 | # Default: '3'
598 | # Values: 'num'
599 | # Flag: --block_width
600 | block_width=3
601 |
602 | # Color block height in lines
603 | #
604 | # Default: '1'
605 | # Values: 'num'
606 | # Flag: --block_height
607 | block_height=1
608 |
609 | # Color Alignment
610 | #
611 | # Default: 'auto'
612 | # Values: 'auto', 'num'
613 | # Flag: --col_offset
614 | #
615 | # Number specifies how far from the left side of the terminal (in spaces) to
616 | # begin printing the columns, in case you want to e.g. center them under your
617 | # text.
618 | # Example:
619 | # col_offset="auto" - Default behavior of neofetch
620 | # col_offset=7 - Leave 7 spaces then print the colors
621 | col_offset="auto"
622 |
623 | # Progress Bars
624 |
625 |
626 | # Bar characters
627 | #
628 | # Default: '-', '='
629 | # Values: 'string', 'string'
630 | # Flag: --bar_char
631 | #
632 | # Example:
633 | # neofetch --bar_char 'elapsed' 'total'
634 | # neofetch --bar_char '-' '='
635 | bar_char_elapsed="-"
636 | bar_char_total="="
637 |
638 | # Toggle Bar border
639 | #
640 | # Default: 'on'
641 | # Values: 'on', 'off'
642 | # Flag: --bar_border
643 | bar_border="on"
644 |
645 | # Progress bar length in spaces
646 | # Number of chars long to make the progress bars.
647 | #
648 | # Default: '15'
649 | # Values: 'num'
650 | # Flag: --bar_length
651 | bar_length=15
652 |
653 | # Progress bar colors
654 | # When set to distro, uses your distro's logo colors.
655 | #
656 | # Default: 'distro', 'distro'
657 | # Values: 'distro', 'num'
658 | # Flag: --bar_colors
659 | #
660 | # Example:
661 | # neofetch --bar_colors 3 4
662 | # neofetch --bar_colors distro 5
663 | bar_color_elapsed="distro"
664 | bar_color_total="distro"
665 |
666 |
667 | # Info display
668 | # Display a bar with the info.
669 | #
670 | # Default: 'off'
671 | # Values: 'bar', 'infobar', 'barinfo', 'off'
672 | # Flags: --cpu_display
673 | # --memory_display
674 | # --battery_display
675 | # --disk_display
676 | #
677 | # Example:
678 | # bar: '[---=======]'
679 | # infobar: 'info [---=======]'
680 | # barinfo: '[---=======] info'
681 | # off: 'info'
682 | cpu_display="off"
683 | memory_display="off"
684 | battery_display="off"
685 | disk_display="off"
686 |
687 |
688 | # Backend Settings
689 |
690 |
691 | # Image backend.
692 | #
693 | # Default: 'ascii'
694 | # Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
695 | # 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
696 | # Flag: --backend
697 | image_backend="ascii"
698 |
699 | # Image Source
700 | #
701 | # Which image or ascii file to display.
702 | #
703 | # Default: 'auto'
704 | # Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
705 | # 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
706 | # Flag: --source
707 | #
708 | # NOTE: 'auto' will pick the best image source for whatever image backend is used.
709 | # In ascii mode, distro ascii art will be used and in an image mode, your
710 | # wallpaper will be used.
711 | image_source="auto"
712 |
713 |
714 | # Ascii Options
715 |
716 |
717 | # Ascii distro
718 | # Which distro's ascii art to display.
719 | #
720 | # Default: 'auto'
721 | # Values: 'auto', 'distro_name'
722 | # Flag: --ascii_distro
723 | # NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
724 | # "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
725 | # ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
726 | # Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
727 | # BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
728 | # Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
729 | # Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
730 | # DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
731 | # EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
732 | # FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
733 | # gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
734 | # Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
735 | # Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
736 | # LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
737 | # Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
738 | # Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
739 | # NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
740 | # OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
741 | # Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
742 | # popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
743 | # Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
744 | # Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
745 | # Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
746 | # SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
747 | # openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
748 | # Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
749 | # Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
750 | # and IRIX have ascii logos
751 | # NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
752 | # Use '{distro name}_old' to use the old logos.
753 | # NOTE: Ubuntu has flavor variants.
754 | # Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
755 | # Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
756 | # NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
757 | # CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
758 | # Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
759 | # Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
760 | # Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
761 | # postmarketOS, and Void have a smaller logo variant.
762 | # Use '{distro name}_small' to use the small variants.
763 | ascii_distro="auto"
764 |
765 | # Ascii Colors
766 | #
767 | # Default: 'distro'
768 | # Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
769 | # Flag: --ascii_colors
770 | #
771 | # Example:
772 | # ascii_colors=(distro) - Ascii is colored based on Distro colors.
773 | # ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
774 | ascii_colors=(distro)
775 |
776 | # Bold ascii logo
777 | # Whether or not to bold the ascii logo.
778 | #
779 | # Default: 'on'
780 | # Values: 'on', 'off'
781 | # Flag: --ascii_bold
782 | ascii_bold="on"
783 |
784 |
785 | # Image Options
786 |
787 |
788 | # Image loop
789 | # Setting this to on will make neofetch redraw the image constantly until
790 | # Ctrl+C is pressed. This fixes display issues in some terminal emulators.
791 | #
792 | # Default: 'off'
793 | # Values: 'on', 'off'
794 | # Flag: --loop
795 | image_loop="off"
796 |
797 | # Thumbnail directory
798 | #
799 | # Default: '~/.cache/thumbnails/neofetch'
800 | # Values: 'dir'
801 | thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
802 |
803 | # Crop mode
804 | #
805 | # Default: 'normal'
806 | # Values: 'normal', 'fit', 'fill'
807 | # Flag: --crop_mode
808 | #
809 | # See this wiki page to learn about the fit and fill options.
810 | # https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
811 | crop_mode="normal"
812 |
813 | # Crop offset
814 | # Note: Only affects 'normal' crop mode.
815 | #
816 | # Default: 'center'
817 | # Values: 'northwest', 'north', 'northeast', 'west', 'center'
818 | # 'east', 'southwest', 'south', 'southeast'
819 | # Flag: --crop_offset
820 | crop_offset="center"
821 |
822 | # Image size
823 | # The image is half the terminal width by default.
824 | #
825 | # Default: 'auto'
826 | # Values: 'auto', '00px', '00%', 'none'
827 | # Flags: --image_size
828 | # --size
829 | image_size="auto"
830 |
831 | # Gap between image and text
832 | #
833 | # Default: '3'
834 | # Values: 'num', '-num'
835 | # Flag: --gap
836 | gap=3
837 |
838 | # Image offsets
839 | # Only works with the w3m backend.
840 | #
841 | # Default: '0'
842 | # Values: 'px'
843 | # Flags: --xoffset
844 | # --yoffset
845 | yoffset=0
846 | xoffset=0
847 |
848 | # Image background color
849 | # Only works with the w3m backend.
850 | #
851 | # Default: ''
852 | # Values: 'color', 'blue'
853 | # Flag: --bg_color
854 | background_color=
855 |
856 |
857 | # Misc Options
858 |
859 | # Stdout mode
860 | # Turn off all colors and disables image backend (ASCII/Image).
861 | # Useful for piping into another command.
862 | # Default: 'off'
863 | # Values: 'on', 'off'
864 | stdout="off"
865 |
--------------------------------------------------------------------------------
/cfgs/rofi/config.rasi:
--------------------------------------------------------------------------------
1 | configuration {
2 | modi: "drun";
3 | font: "VictorMono Nerd Font 10";
4 | show-icons: true;
5 | icon-theme: "Reversal-dark";
6 | display-drun: "";
7 | drun-display-format: "{name}";
8 | sidebar-mode: false;
9 | }
10 |
11 | @theme "/dev/null"
12 |
13 | * {
14 | bg: #0b0d10;
15 | fg: #c5c8c9;
16 | accent: #BC83E3;
17 | button: #1c1c1c;
18 |
19 | background-color: @bg;
20 | text-color: @fg;
21 | }
22 |
23 | window {
24 | border-radius: 7px;
25 | width: 50%;
26 | padding: 32px;
27 | }
28 |
29 | prompt {
30 | background-color: @button;
31 | enabled: true;
32 | padding: 0.5% 32px 0% -0.5%;
33 | font: "Rubik 10";
34 | }
35 |
36 | entry {
37 | placeholder: "Search";
38 | background-color: @button;
39 | placeholder-color: @fg;
40 | expand: true;
41 | padding: 0.15% 0% 0% 0%;
42 | }
43 |
44 | inputbar {
45 | children: [ prompt, entry ];
46 | background-color: @button;
47 | expand: false;
48 | border-radius: 6px;
49 | margin: 0%;
50 | padding: 10px;
51 | }
52 |
53 | listview {
54 | columns: 4;
55 | lines: 3;
56 | cycle: false;
57 | dynamic: true;
58 | layout: vertical;
59 | }
60 |
61 | mainbox {
62 | children: [ inputbar, listview ];
63 | spacing: 2%;
64 | padding: 2% 1% 2% 1%;
65 | }
66 |
67 | element {
68 | orientation: vertical;
69 | padding: 2% 0% 2% 0%;
70 | }
71 |
72 | element-icon {
73 | size: 48px;
74 | horizontal-align: 0.5;
75 | }
76 |
77 | element-text {
78 | expand: true;
79 | horizontal-align: 0.5;
80 | vertical-align: 0.5;
81 | margin: 0.5% 0.5% -0.5% 0.5%;
82 | }
83 |
84 | element-text, element-icon {
85 | background-color: inherit;
86 | text-color: inherit;
87 | }
88 |
89 | element selected {
90 | background-color: @button;
91 | border-radius: 6px;
92 | }
93 |
--------------------------------------------------------------------------------
/cfgs/st/LICENSE:
--------------------------------------------------------------------------------
1 | MIT/X Consortium License
2 |
3 | © 2014-2018 Hiltjo Posthuma
4 | © 2018 Devin J. Pohly
5 | © 2014-2017 Quentin Rameau
6 | © 2009-2012 Aurélien APTEL
7 | © 2008-2017 Anselm R Garbe
8 | © 2012-2017 Roberto E. Vargas Caballero
9 | © 2012-2016 Christoph Lohmann <20h at r-36 dot net>
10 | © 2013 Eon S. Jeon
11 | © 2013 Alexander Sedov
12 | © 2013 Mark Edgar
13 | © 2013-2014 Eric Pruitt
14 | © 2013 Michael Forney
15 | © 2013-2014 Markus Teich
16 | © 2014-2015 Laslo Hunhold
17 |
18 | Permission is hereby granted, free of charge, to any person obtaining a
19 | copy of this software and associated documentation files (the "Software"),
20 | to deal in the Software without restriction, including without limitation
21 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
22 | and/or sell copies of the Software, and to permit persons to whom the
23 | Software is furnished to do so, subject to the following conditions:
24 |
25 | The above copyright notice and this permission notice shall be included in
26 | all copies or substantial portions of the Software.
27 |
28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
33 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
34 | DEALINGS IN THE SOFTWARE.
35 |
--------------------------------------------------------------------------------
/cfgs/st/Makefile:
--------------------------------------------------------------------------------
1 | # st - simple terminal
2 | # See LICENSE file for copyright and license details.
3 | .POSIX:
4 |
5 | include config.mk
6 |
7 | SRC = st.c x.c boxdraw.c hb.c
8 | OBJ = $(SRC:.c=.o)
9 |
10 | all: options st
11 |
12 | options:
13 | @echo st build options:
14 | @echo "CFLAGS = $(STCFLAGS)"
15 | @echo "LDFLAGS = $(STLDFLAGS)"
16 | @echo "CC = $(CC)"
17 |
18 | config.h:
19 | cp config.def.h config.h
20 |
21 | .c.o:
22 | $(CC) $(STCFLAGS) -c $<
23 |
24 | st.o: config.h st.h win.h
25 | x.o: arg.h config.h st.h win.h hb.h
26 | hb.o: st.h
27 | boxdraw.o: config.h st.h boxdraw_data.h
28 |
29 | $(OBJ): config.h config.mk
30 |
31 | st: $(OBJ)
32 | $(CC) -o $@ $(OBJ) $(STLDFLAGS)
33 |
34 | clean:
35 | rm -f st $(OBJ) st-$(VERSION).tar.gz *.o *.orig *.rej
36 |
37 | dist: clean
38 | mkdir -p st-$(VERSION)
39 | cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\
40 | config.def.h st.info st.1 arg.h st.h win.h $(SRC)\
41 | st-$(VERSION)
42 | tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
43 | rm -rf st-$(VERSION)
44 |
45 | install: st
46 | mkdir -p $(DESTDIR)$(PREFIX)/bin
47 | cp -f st $(DESTDIR)$(PREFIX)/bin
48 | cp -f st-copyout $(DESTDIR)$(PREFIX)/bin
49 | cp -f st-urlhandler $(DESTDIR)$(PREFIX)/bin
50 | chmod 755 $(DESTDIR)$(PREFIX)/bin/st
51 | chmod 755 $(DESTDIR)$(PREFIX)/bin/st-copyout
52 | chmod 755 $(DESTDIR)$(PREFIX)/bin/st-urlhandler
53 | mkdir -p $(DESTDIR)$(MANPREFIX)/man1
54 | sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
55 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
56 | tic -sx st.info
57 | @echo Please see the README file regarding the terminfo entry of st.
58 | mkdir -p $(DESTDIR)$(PREFIX)/share/applications
59 | cp -f st.desktop $(DESTDIR)$(PREFIX)/share/applications
60 |
61 | uninstall:
62 | rm -f $(DESTDIR)$(PREFIX)/bin/st
63 | rm -f $(DESTDIR)$(PREFIX)/bin/st-copyout
64 | rm -f $(DESTDIR)$(PREFIX)/bin/st-urlhandler
65 | rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
66 | rm -f $(DESTDIR)$(PREFIX)/share/applications/st.desktop
67 |
68 | .PHONY: all options clean dist install uninstall
69 |
--------------------------------------------------------------------------------
/cfgs/st/README.md:
--------------------------------------------------------------------------------
1 | # St (Suckless Terminal)
2 |
3 | ## Xresources live-reload demo
4 |
5 |
6 |
7 | ## Dependencies
8 |
9 | ```
10 | # Void
11 | xbps-install libXft-devel libX11-devel harfbuzz-devel libXext-devel libXrender-devel libXinerama-devel
12 |
13 | # Debian (and ubuntu probably)
14 | apt install build-essential libxft-dev libharfbuzz-dev
15 |
16 | (most of these are already installed on Arch based distros)
17 |
18 | # Install font-symbola and libXft-bgra
19 | ```
20 |
21 | ## Install
22 |
23 | ```
24 | git clone https://github.com/siduck/st.git
25 | cd st
26 | sudo make install
27 | xrdb merge pathToXresourcesFile
28 | ```
29 |
30 | (note : put the xrdb merge command in your wm's autostart or similar)
31 |
32 | ## Fonts
33 |
34 | - Install JetbrainsMono Mono Nerd Font or any nerd font from [here](https://www.nerdfonts.com/font-downloads)
35 |
36 | ## Patches:
37 |
38 | - Ligatures
39 | - sixel (check sixel branch)
40 | - scrollback
41 | - Clipboard
42 | - Alpha(Transparency)
43 | - Boxdraw
44 | - patch_column ( doesnt cut text while resizing)
45 | - font2
46 | - right click paste
47 | - st desktop entry
48 | - newterm
49 | - anygeometry
50 | - xresources
51 | - sync patch ( Better draw timing to reduce flicker/tearing and improve animation smoothness )
52 | - live reload ( change colors/fonts on the fly )
53 | and more...
54 |
55 |
56 | ## Xresources live-reload
57 |
58 | ```
59 | # make an alias for this command
60 |
61 | alias rel="xrdb merge pathToXresourcesFile && kill -USR1 $(pidof st)"
62 | ```
63 |
64 | ## Ram usage comparison with other terminals and speed test
65 |
66 |
67 |
68 |
69 | ( note : This benchmark was done on my low end machine which has a pentium cpu so the speed results might vary )
70 |
71 | ## Default Keybindings
72 |
73 |
74 | ctrl + shift + c Copy
75 | ctrl + shift + v Paste
76 | right click on the terminal ( will paste the copied thing )
77 |
78 | (Zoom)
79 | alt + comma Zoom in
80 | alt + . Zoom out
81 | alt + g Reset Zoom
82 |
83 | (Transparency)
84 | alt + s Increase Transparency
85 | alt + a Decrease Transparency
86 | alt + m Reset Transparency
87 |
88 | alt + k scroll down
89 | alt + j scroll up
90 |
91 | mod + shift + enter open a new terminal with same cwd ( current working directory )
92 |
93 |
94 | you can change all of these in config.h
95 |
96 |
97 | ## Themes/Fonts used
98 |
99 | - ls-icons: https://github.com/Yash-Handa/logo-ls
100 | - Xresources: onedark ( just xrdb merge xresourcesfile , do this everytime you make any change to xresources file ) from this repo itself.
101 | - Font: JetbrainsMono Nerd Font + material design icon fonts
102 |
103 | ## Screenshots:
104 |
105 |
106 |
107 |
108 |
109 |
110 | # Credits
111 |
112 | - [live-reload](https://github.com/nimaipatel/st)
113 | - [patch_column](https://github.com/nimaipatel/st/blob/all/patches/7672445bab01cb4e861651dc540566ac22e25812.diff)
114 |
115 | ## Other St builds
116 |
117 | 1. Sixel St (sixel branch , with sixel graphics support)
118 | 2. St with vim-browse (vim-browse branch , navigate within like vim)
119 | 3. Awesomewm users might face a weird gaps issue (#23) so they need to use the anysize branch.
120 |
121 | - Use a different st build ( clone its branch)
122 |
123 | `example: git clone https://github.com/siduck/st --branch sixel`
124 |
--------------------------------------------------------------------------------
/cfgs/st/arg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copy me if you can.
3 | * by 20h
4 | */
5 |
6 | #ifndef ARG_H__
7 | #define ARG_H__
8 |
9 | extern char *argv0;
10 |
11 | /* use main(int argc, char *argv[]) */
12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
13 | argv[0] && argv[0][0] == '-'\
14 | && argv[0][1];\
15 | argc--, argv++) {\
16 | char argc_;\
17 | char **argv_;\
18 | int brk_;\
19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\
20 | argv++;\
21 | argc--;\
22 | break;\
23 | }\
24 | int i_;\
25 | for (i_ = 1, brk_ = 0, argv_ = argv;\
26 | argv[0][i_] && !brk_;\
27 | i_++) {\
28 | if (argv_ != argv)\
29 | break;\
30 | argc_ = argv[0][i_];\
31 | switch (argc_)
32 |
33 | #define ARGEND }\
34 | }
35 |
36 | #define ARGC() argc_
37 |
38 | #define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
39 | ((x), abort(), (char *)0) :\
40 | (brk_ = 1, (argv[0][i_+1] != '\0')?\
41 | (&argv[0][i_+1]) :\
42 | (argc--, argv++, argv[0])))
43 |
44 | #define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
45 | (char *)0 :\
46 | (brk_ = 1, (argv[0][i_+1] != '\0')?\
47 | (&argv[0][i_+1]) :\
48 | (argc--, argv++, argv[0])))
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/cfgs/st/boxdraw.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Avi Halachmi (:avih) avihpit@yahoo.com https://github.com/avih
3 | * MIT/X Consortium License
4 | */
5 |
6 | #include
7 | #include "st.h"
8 | #include "boxdraw_data.h"
9 |
10 | /* Rounded non-negative integers division of n / d */
11 | #define DIV(n, d) (((n) + (d) / 2) / (d))
12 |
13 | static Display *xdpy;
14 | static Colormap xcmap;
15 | static XftDraw *xd;
16 | static Visual *xvis;
17 |
18 | static void drawbox(int, int, int, int, XftColor *, XftColor *, ushort);
19 | static void drawboxlines(int, int, int, int, XftColor *, ushort);
20 |
21 | /* public API */
22 |
23 | void
24 | boxdraw_xinit(Display *dpy, Colormap cmap, XftDraw *draw, Visual *vis)
25 | {
26 | xdpy = dpy; xcmap = cmap; xd = draw, xvis = vis;
27 | }
28 |
29 | int
30 | isboxdraw(Rune u)
31 | {
32 | Rune block = u & ~0xff;
33 | return (boxdraw && block == 0x2500 && boxdata[(uint8_t)u]) ||
34 | (boxdraw_braille && block == 0x2800);
35 | }
36 |
37 | /* the "index" is actually the entire shape data encoded as ushort */
38 | ushort
39 | boxdrawindex(const Glyph *g)
40 | {
41 | if (boxdraw_braille && (g->u & ~0xff) == 0x2800)
42 | return BRL | (uint8_t)g->u;
43 | if (boxdraw_bold && (g->mode & ATTR_BOLD))
44 | return BDB | boxdata[(uint8_t)g->u];
45 | return boxdata[(uint8_t)g->u];
46 | }
47 |
48 | void
49 | drawboxes(int x, int y, int cw, int ch, XftColor *fg, XftColor *bg,
50 | const XftGlyphFontSpec *specs, int len)
51 | {
52 | for ( ; len-- > 0; x += cw, specs++)
53 | drawbox(x, y, cw, ch, fg, bg, (ushort)specs->glyph);
54 | }
55 |
56 | /* implementation */
57 |
58 | void
59 | drawbox(int x, int y, int w, int h, XftColor *fg, XftColor *bg, ushort bd)
60 | {
61 | ushort cat = bd & ~(BDB | 0xff); /* mask out bold and data */
62 | if (bd & (BDL | BDA)) {
63 | /* lines (light/double/heavy/arcs) */
64 | drawboxlines(x, y, w, h, fg, bd);
65 |
66 | } else if (cat == BBD) {
67 | /* lower (8-X)/8 block */
68 | int d = DIV((uint8_t)bd * h, 8);
69 | XftDrawRect(xd, fg, x, y + d, w, h - d);
70 |
71 | } else if (cat == BBU) {
72 | /* upper X/8 block */
73 | XftDrawRect(xd, fg, x, y, w, DIV((uint8_t)bd * h, 8));
74 |
75 | } else if (cat == BBL) {
76 | /* left X/8 block */
77 | XftDrawRect(xd, fg, x, y, DIV((uint8_t)bd * w, 8), h);
78 |
79 | } else if (cat == BBR) {
80 | /* right (8-X)/8 block */
81 | int d = DIV((uint8_t)bd * w, 8);
82 | XftDrawRect(xd, fg, x + d, y, w - d, h);
83 |
84 | } else if (cat == BBQ) {
85 | /* Quadrants */
86 | int w2 = DIV(w, 2), h2 = DIV(h, 2);
87 | if (bd & TL)
88 | XftDrawRect(xd, fg, x, y, w2, h2);
89 | if (bd & TR)
90 | XftDrawRect(xd, fg, x + w2, y, w - w2, h2);
91 | if (bd & BL)
92 | XftDrawRect(xd, fg, x, y + h2, w2, h - h2);
93 | if (bd & BR)
94 | XftDrawRect(xd, fg, x + w2, y + h2, w - w2, h - h2);
95 |
96 | } else if (bd & BBS) {
97 | /* Shades - data is 1/2/3 for 25%/50%/75% alpha, respectively */
98 | int d = (uint8_t)bd;
99 | XftColor xfc;
100 | XRenderColor xrc = { .alpha = 0xffff };
101 |
102 | xrc.red = DIV(fg->color.red * d + bg->color.red * (4 - d), 4);
103 | xrc.green = DIV(fg->color.green * d + bg->color.green * (4 - d), 4);
104 | xrc.blue = DIV(fg->color.blue * d + bg->color.blue * (4 - d), 4);
105 |
106 | XftColorAllocValue(xdpy, xvis, xcmap, &xrc, &xfc);
107 | XftDrawRect(xd, &xfc, x, y, w, h);
108 | XftColorFree(xdpy, xvis, xcmap, &xfc);
109 |
110 | } else if (cat == BRL) {
111 | /* braille, each data bit corresponds to one dot at 2x4 grid */
112 | int w1 = DIV(w, 2);
113 | int h1 = DIV(h, 4), h2 = DIV(h, 2), h3 = DIV(3 * h, 4);
114 |
115 | if (bd & 1) XftDrawRect(xd, fg, x, y, w1, h1);
116 | if (bd & 2) XftDrawRect(xd, fg, x, y + h1, w1, h2 - h1);
117 | if (bd & 4) XftDrawRect(xd, fg, x, y + h2, w1, h3 - h2);
118 | if (bd & 8) XftDrawRect(xd, fg, x + w1, y, w - w1, h1);
119 | if (bd & 16) XftDrawRect(xd, fg, x + w1, y + h1, w - w1, h2 - h1);
120 | if (bd & 32) XftDrawRect(xd, fg, x + w1, y + h2, w - w1, h3 - h2);
121 | if (bd & 64) XftDrawRect(xd, fg, x, y + h3, w1, h - h3);
122 | if (bd & 128) XftDrawRect(xd, fg, x + w1, y + h3, w - w1, h - h3);
123 |
124 | }
125 | }
126 |
127 | void
128 | drawboxlines(int x, int y, int w, int h, XftColor *fg, ushort bd)
129 | {
130 | /* s: stem thickness. width/8 roughly matches underscore thickness. */
131 | /* We draw bold as 1.5 * normal-stem and at least 1px thicker. */
132 | /* doubles draw at least 3px, even when w or h < 3. bold needs 6px. */
133 | int mwh = MIN(w, h);
134 | int base_s = MAX(1, DIV(mwh, 8));
135 | int bold = (bd & BDB) && mwh >= 6; /* possibly ignore boldness */
136 | int s = bold ? MAX(base_s + 1, DIV(3 * base_s, 2)) : base_s;
137 | int w2 = DIV(w - s, 2), h2 = DIV(h - s, 2);
138 | /* the s-by-s square (x + w2, y + h2, s, s) is the center texel. */
139 | /* The base length (per direction till edge) includes this square. */
140 |
141 | int light = bd & (LL | LU | LR | LD);
142 | int double_ = bd & (DL | DU | DR | DD);
143 |
144 | if (light) {
145 | /* d: additional (negative) length to not-draw the center */
146 | /* texel - at arcs and avoid drawing inside (some) doubles */
147 | int arc = bd & BDA;
148 | int multi_light = light & (light - 1);
149 | int multi_double = double_ & (double_ - 1);
150 | /* light crosses double only at DH+LV, DV+LH (ref. shapes) */
151 | int d = arc || (multi_double && !multi_light) ? -s : 0;
152 |
153 | if (bd & LL)
154 | XftDrawRect(xd, fg, x, y + h2, w2 + s + d, s);
155 | if (bd & LU)
156 | XftDrawRect(xd, fg, x + w2, y, s, h2 + s + d);
157 | if (bd & LR)
158 | XftDrawRect(xd, fg, x + w2 - d, y + h2, w - w2 + d, s);
159 | if (bd & LD)
160 | XftDrawRect(xd, fg, x + w2, y + h2 - d, s, h - h2 + d);
161 | }
162 |
163 | /* double lines - also align with light to form heavy when combined */
164 | if (double_) {
165 | /*
166 | * going clockwise, for each double-ray: p is additional length
167 | * to the single-ray nearer to the previous direction, and n to
168 | * the next. p and n adjust from the base length to lengths
169 | * which consider other doubles - shorter to avoid intersections
170 | * (p, n), or longer to draw the far-corner texel (n).
171 | */
172 | int dl = bd & DL, du = bd & DU, dr = bd & DR, dd = bd & DD;
173 | if (dl) {
174 | int p = dd ? -s : 0, n = du ? -s : dd ? s : 0;
175 | XftDrawRect(xd, fg, x, y + h2 + s, w2 + s + p, s);
176 | XftDrawRect(xd, fg, x, y + h2 - s, w2 + s + n, s);
177 | }
178 | if (du) {
179 | int p = dl ? -s : 0, n = dr ? -s : dl ? s : 0;
180 | XftDrawRect(xd, fg, x + w2 - s, y, s, h2 + s + p);
181 | XftDrawRect(xd, fg, x + w2 + s, y, s, h2 + s + n);
182 | }
183 | if (dr) {
184 | int p = du ? -s : 0, n = dd ? -s : du ? s : 0;
185 | XftDrawRect(xd, fg, x + w2 - p, y + h2 - s, w - w2 + p, s);
186 | XftDrawRect(xd, fg, x + w2 - n, y + h2 + s, w - w2 + n, s);
187 | }
188 | if (dd) {
189 | int p = dr ? -s : 0, n = dl ? -s : dr ? s : 0;
190 | XftDrawRect(xd, fg, x + w2 + s, y + h2 - p, s, h - h2 + p);
191 | XftDrawRect(xd, fg, x + w2 - s, y + h2 - n, s, h - h2 + n);
192 | }
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/cfgs/st/boxdraw.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/cfgs/st/boxdraw.o
--------------------------------------------------------------------------------
/cfgs/st/boxdraw_data.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Avi Halachmi (:avih) avihpit@yahoo.com https://github.com/avih
3 | * MIT/X Consortium License
4 | */
5 |
6 | /*
7 | * U+25XX codepoints data
8 | *
9 | * References:
10 | * http://www.unicode.org/charts/PDF/U2500.pdf
11 | * http://www.unicode.org/charts/PDF/U2580.pdf
12 | *
13 | * Test page:
14 | * https://github.com/GNOME/vte/blob/master/doc/boxes.txt
15 | */
16 |
17 | /* Each shape is encoded as 16-bits. Higher bits are category, lower are data */
18 | /* Categories (mutually exclusive except BDB): */
19 | /* For convenience, BDL/BDA/BBS/BDB are 1 bit each, the rest are enums */
20 | #define BDL (1<<8) /* Box Draw Lines (light/double/heavy) */
21 | #define BDA (1<<9) /* Box Draw Arc (light) */
22 |
23 | #define BBD (1<<10) /* Box Block Down (lower) X/8 */
24 | #define BBL (2<<10) /* Box Block Left X/8 */
25 | #define BBU (3<<10) /* Box Block Upper X/8 */
26 | #define BBR (4<<10) /* Box Block Right X/8 */
27 | #define BBQ (5<<10) /* Box Block Quadrants */
28 | #define BRL (6<<10) /* Box Braille (data is lower byte of U28XX) */
29 |
30 | #define BBS (1<<14) /* Box Block Shades */
31 | #define BDB (1<<15) /* Box Draw is Bold */
32 |
33 | /* (BDL/BDA) Light/Double/Heavy x Left/Up/Right/Down/Horizontal/Vertical */
34 | /* Heavy is light+double (literally drawing light+double align to form heavy) */
35 | #define LL (1<<0)
36 | #define LU (1<<1)
37 | #define LR (1<<2)
38 | #define LD (1<<3)
39 | #define LH (LL+LR)
40 | #define LV (LU+LD)
41 |
42 | #define DL (1<<4)
43 | #define DU (1<<5)
44 | #define DR (1<<6)
45 | #define DD (1<<7)
46 | #define DH (DL+DR)
47 | #define DV (DU+DD)
48 |
49 | #define HL (LL+DL)
50 | #define HU (LU+DU)
51 | #define HR (LR+DR)
52 | #define HD (LD+DD)
53 | #define HH (HL+HR)
54 | #define HV (HU+HD)
55 |
56 | /* (BBQ) Quadrants Top/Bottom x Left/Right */
57 | #define TL (1<<0)
58 | #define TR (1<<1)
59 | #define BL (1<<2)
60 | #define BR (1<<3)
61 |
62 | /* Data for U+2500 - U+259F except dashes/diagonals */
63 | static const unsigned short boxdata[256] = {
64 | /* light lines */
65 | [0x00] = BDL + LH, /* light horizontal */
66 | [0x02] = BDL + LV, /* light vertical */
67 | [0x0c] = BDL + LD + LR, /* light down and right */
68 | [0x10] = BDL + LD + LL, /* light down and left */
69 | [0x14] = BDL + LU + LR, /* light up and right */
70 | [0x18] = BDL + LU + LL, /* light up and left */
71 | [0x1c] = BDL + LV + LR, /* light vertical and right */
72 | [0x24] = BDL + LV + LL, /* light vertical and left */
73 | [0x2c] = BDL + LH + LD, /* light horizontal and down */
74 | [0x34] = BDL + LH + LU, /* light horizontal and up */
75 | [0x3c] = BDL + LV + LH, /* light vertical and horizontal */
76 | [0x74] = BDL + LL, /* light left */
77 | [0x75] = BDL + LU, /* light up */
78 | [0x76] = BDL + LR, /* light right */
79 | [0x77] = BDL + LD, /* light down */
80 |
81 | /* heavy [+light] lines */
82 | [0x01] = BDL + HH,
83 | [0x03] = BDL + HV,
84 | [0x0d] = BDL + HR + LD,
85 | [0x0e] = BDL + HD + LR,
86 | [0x0f] = BDL + HD + HR,
87 | [0x11] = BDL + HL + LD,
88 | [0x12] = BDL + HD + LL,
89 | [0x13] = BDL + HD + HL,
90 | [0x15] = BDL + HR + LU,
91 | [0x16] = BDL + HU + LR,
92 | [0x17] = BDL + HU + HR,
93 | [0x19] = BDL + HL + LU,
94 | [0x1a] = BDL + HU + LL,
95 | [0x1b] = BDL + HU + HL,
96 | [0x1d] = BDL + HR + LV,
97 | [0x1e] = BDL + HU + LD + LR,
98 | [0x1f] = BDL + HD + LR + LU,
99 | [0x20] = BDL + HV + LR,
100 | [0x21] = BDL + HU + HR + LD,
101 | [0x22] = BDL + HD + HR + LU,
102 | [0x23] = BDL + HV + HR,
103 | [0x25] = BDL + HL + LV,
104 | [0x26] = BDL + HU + LD + LL,
105 | [0x27] = BDL + HD + LU + LL,
106 | [0x28] = BDL + HV + LL,
107 | [0x29] = BDL + HU + HL + LD,
108 | [0x2a] = BDL + HD + HL + LU,
109 | [0x2b] = BDL + HV + HL,
110 | [0x2d] = BDL + HL + LD + LR,
111 | [0x2e] = BDL + HR + LL + LD,
112 | [0x2f] = BDL + HH + LD,
113 | [0x30] = BDL + HD + LH,
114 | [0x31] = BDL + HD + HL + LR,
115 | [0x32] = BDL + HR + HD + LL,
116 | [0x33] = BDL + HH + HD,
117 | [0x35] = BDL + HL + LU + LR,
118 | [0x36] = BDL + HR + LU + LL,
119 | [0x37] = BDL + HH + LU,
120 | [0x38] = BDL + HU + LH,
121 | [0x39] = BDL + HU + HL + LR,
122 | [0x3a] = BDL + HU + HR + LL,
123 | [0x3b] = BDL + HH + HU,
124 | [0x3d] = BDL + HL + LV + LR,
125 | [0x3e] = BDL + HR + LV + LL,
126 | [0x3f] = BDL + HH + LV,
127 | [0x40] = BDL + HU + LH + LD,
128 | [0x41] = BDL + HD + LH + LU,
129 | [0x42] = BDL + HV + LH,
130 | [0x43] = BDL + HU + HL + LD + LR,
131 | [0x44] = BDL + HU + HR + LD + LL,
132 | [0x45] = BDL + HD + HL + LU + LR,
133 | [0x46] = BDL + HD + HR + LU + LL,
134 | [0x47] = BDL + HH + HU + LD,
135 | [0x48] = BDL + HH + HD + LU,
136 | [0x49] = BDL + HV + HL + LR,
137 | [0x4a] = BDL + HV + HR + LL,
138 | [0x4b] = BDL + HV + HH,
139 | [0x78] = BDL + HL,
140 | [0x79] = BDL + HU,
141 | [0x7a] = BDL + HR,
142 | [0x7b] = BDL + HD,
143 | [0x7c] = BDL + HR + LL,
144 | [0x7d] = BDL + HD + LU,
145 | [0x7e] = BDL + HL + LR,
146 | [0x7f] = BDL + HU + LD,
147 |
148 | /* double [+light] lines */
149 | [0x50] = BDL + DH,
150 | [0x51] = BDL + DV,
151 | [0x52] = BDL + DR + LD,
152 | [0x53] = BDL + DD + LR,
153 | [0x54] = BDL + DR + DD,
154 | [0x55] = BDL + DL + LD,
155 | [0x56] = BDL + DD + LL,
156 | [0x57] = BDL + DL + DD,
157 | [0x58] = BDL + DR + LU,
158 | [0x59] = BDL + DU + LR,
159 | [0x5a] = BDL + DU + DR,
160 | [0x5b] = BDL + DL + LU,
161 | [0x5c] = BDL + DU + LL,
162 | [0x5d] = BDL + DL + DU,
163 | [0x5e] = BDL + DR + LV,
164 | [0x5f] = BDL + DV + LR,
165 | [0x60] = BDL + DV + DR,
166 | [0x61] = BDL + DL + LV,
167 | [0x62] = BDL + DV + LL,
168 | [0x63] = BDL + DV + DL,
169 | [0x64] = BDL + DH + LD,
170 | [0x65] = BDL + DD + LH,
171 | [0x66] = BDL + DD + DH,
172 | [0x67] = BDL + DH + LU,
173 | [0x68] = BDL + DU + LH,
174 | [0x69] = BDL + DH + DU,
175 | [0x6a] = BDL + DH + LV,
176 | [0x6b] = BDL + DV + LH,
177 | [0x6c] = BDL + DH + DV,
178 |
179 | /* (light) arcs */
180 | [0x6d] = BDA + LD + LR,
181 | [0x6e] = BDA + LD + LL,
182 | [0x6f] = BDA + LU + LL,
183 | [0x70] = BDA + LU + LR,
184 |
185 | /* Lower (Down) X/8 block (data is 8 - X) */
186 | [0x81] = BBD + 7, [0x82] = BBD + 6, [0x83] = BBD + 5, [0x84] = BBD + 4,
187 | [0x85] = BBD + 3, [0x86] = BBD + 2, [0x87] = BBD + 1, [0x88] = BBD + 0,
188 |
189 | /* Left X/8 block (data is X) */
190 | [0x89] = BBL + 7, [0x8a] = BBL + 6, [0x8b] = BBL + 5, [0x8c] = BBL + 4,
191 | [0x8d] = BBL + 3, [0x8e] = BBL + 2, [0x8f] = BBL + 1,
192 |
193 | /* upper 1/2 (4/8), 1/8 block (X), right 1/2, 1/8 block (8-X) */
194 | [0x80] = BBU + 4, [0x94] = BBU + 1,
195 | [0x90] = BBR + 4, [0x95] = BBR + 7,
196 |
197 | /* Quadrants */
198 | [0x96] = BBQ + BL,
199 | [0x97] = BBQ + BR,
200 | [0x98] = BBQ + TL,
201 | [0x99] = BBQ + TL + BL + BR,
202 | [0x9a] = BBQ + TL + BR,
203 | [0x9b] = BBQ + TL + TR + BL,
204 | [0x9c] = BBQ + TL + TR + BR,
205 | [0x9d] = BBQ + TR,
206 | [0x9e] = BBQ + BL + TR,
207 | [0x9f] = BBQ + BL + TR + BR,
208 |
209 | /* Shades, data is an alpha value in 25% units (1/4, 1/2, 3/4) */
210 | [0x91] = BBS + 1, [0x92] = BBS + 2, [0x93] = BBS + 3,
211 |
212 | /* U+2504 - U+250B, U+254C - U+254F: unsupported (dashes) */
213 | /* U+2571 - U+2573: unsupported (diagonals) */
214 | };
215 |
--------------------------------------------------------------------------------
/cfgs/st/config.def.h:
--------------------------------------------------------------------------------
1 | /* See LICENSE file for copyright and license details. */
2 |
3 | /*
4 | * appearance
5 | *
6 | * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
7 | */
8 | static char *font = "Iosevka Nerd Font :pixelsize=16:antialias=true:autohint=true";
9 | static char *font2[] = { "Iosevka Nerd Font :pixelsize=16:antialias=true:autohint=true" };
10 | static int borderpx = 15;
11 |
12 | /*
13 | * What program is execed by st depends of these precedence rules:
14 | * 1: program passed with -e
15 | * 2: utmp option
16 | * 3: SHELL environment variable
17 | * 4: value of shell in /etc/passwd
18 | * 5: value of shell in config.h
19 | */
20 | static char *shell = "/bin/sh";
21 | char *utmp = NULL;
22 | char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
23 |
24 | /* identification sequence returned in DA and DECID */
25 | char *vtiden = "\033[?6c";
26 |
27 | /* Kerning / character bounding-box multipliers */
28 | static float cwscale = 1.0;
29 | static float chscale = 1.0;
30 |
31 | /*
32 | * word delimiter string
33 | *
34 | * More advanced example: L" `'\"()[]{}"
35 | */
36 | wchar_t *worddelimiters = L" ";
37 |
38 | /* selection timeouts (in milliseconds) */
39 | static unsigned int doubleclicktimeout = 300;
40 | static unsigned int tripleclicktimeout = 600;
41 |
42 | /* alt screens */
43 | int allowaltscreen = 1;
44 |
45 | /*
46 | * draw latency range in ms - from new content/keypress/etc until drawing.
47 | * within this range, st draws when content stops arriving (idle). mostly it's
48 | * near minlatency, but it waits longer for slow updates to avoid partial draw.
49 | * low minlatency will tear/flicker more, as it can "detect" idle too early.
50 | */
51 | static double minlatency = 8;
52 | static double maxlatency = 33;
53 |
54 | /*
55 | * Synchronized-Update timeout in ms
56 | * https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec
57 | */
58 | static uint su_timeout = 200;
59 |
60 | /*
61 | * blinking timeout (set to 0 to disable blinking) for the terminal blinking
62 | * attribute.
63 | */
64 | static unsigned int blinktimeout = 800;
65 |
66 | /*
67 | * interval (in milliseconds) between each successive call to ximspot. This
68 | * improves terminal performance while not reducing functionality to those
69 | * whom need XIM support.
70 | */
71 | int ximspot_update_interval = 1000;
72 |
73 | /*
74 | * thickness of underline and bar cursors
75 | */
76 | static unsigned int cursorthickness = 2;
77 |
78 | /*
79 | * 1: render most of the lines/blocks characters without using the font for
80 | * perfect alignment between cells (U2500 - U259F except dashes/diagonals).
81 | * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored.
82 | * 0: disable (render all U25XX glyphs normally from the font).
83 | */
84 | const int boxdraw = 1;
85 | const int boxdraw_bold = 1;
86 |
87 | /* braille (U28XX): 1: render as adjacent "pixels", 0: use font */
88 | const int boxdraw_braille = 1;
89 |
90 | /*
91 | * bell volume. It must be a value between -100 and 100. Use 0 for disabling
92 | * it
93 | */
94 | static int bellvolume = 0;
95 |
96 | /* default TERM value */
97 | char *termname = "st-256color";
98 |
99 | /*
100 | * spaces per tab
101 | *
102 | * When you are changing this value, don't forget to adapt the »it« value in
103 | * the st.info and appropriately install the st.info in the environment where
104 | * you use this st version.
105 | *
106 | * it#$tabspaces,
107 | *
108 | * Secondly make sure your kernel is not expanding tabs. When running `stty
109 | * -a` »tab0« should appear. You can tell the terminal to not expand tabs by
110 | * running following command:
111 | *
112 | * stty tabs
113 | */
114 | unsigned int tabspaces = 8;
115 |
116 | /* bg opacity */
117 | float alpha = 1.0;
118 |
119 | /* Terminal colors (16 first used in escape sequence) */
120 | static const char *colorname[] = {
121 | "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
122 | "#cc241d",
123 | "#98971a",
124 | "#d79921",
125 | "#458588",
126 | "#b16286",
127 | "#689d6a",
128 | "#a89984",
129 | "#928374",
130 | "#fb4934",
131 | "#b8bb26",
132 | "#fabd2f",
133 | "#83a598",
134 | "#d3869b",
135 | "#8ec07c",
136 | "#ebdbb2",
137 | [255] = 0,
138 | /* more colors can be added after 255 to use with DefaultXX */
139 | "#add8e6", /* 256 -> cursor */
140 | "#555555", /* 257 -> rev cursor*/
141 | "#282828", /* 258 -> bg */
142 | "#ffffff", /* 259 -> fg */
143 | };
144 |
145 |
146 | /*
147 | * Default colors (colorname index)
148 | * foreground, background, cursor, reverse cursor
149 | */
150 | unsigned int defaultfg = 259;
151 | unsigned int defaultbg = 258;
152 | unsigned int defaultcs = 256;
153 | unsigned int defaultrcs = 257;
154 |
155 | /*
156 | * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81
157 | * Default style of cursor
158 | * 0: Blinking block
159 | * 1: Blinking block (default)
160 | * 2: Steady block ("█")
161 | * 3: Blinking underline
162 | * 4: Steady underline ("_")
163 | * 5: Blinking bar
164 | * 6: Steady bar ("|")
165 | * 7: Blinking st cursor
166 | * 8: Steady st cursor
167 | */
168 | static unsigned int cursorshape = 1;
169 |
170 | /*
171 | * Default columns and rows numbers
172 | */
173 |
174 | static unsigned int cols = 80;
175 | static unsigned int rows = 24;
176 |
177 | /*
178 | * Default colour and shape of the mouse cursor
179 | */
180 | static unsigned int mouseshape = XC_xterm;
181 | static unsigned int mousefg = 7;
182 | static unsigned int mousebg = 0;
183 |
184 | /*
185 | * Color used to display font attributes when fontconfig selected a font which
186 | * doesn't match the ones requested.
187 | */
188 | static unsigned int defaultattr = 11;
189 |
190 | /*
191 | * Xresources preferences to load at startup
192 | */
193 | ResourcePref resources[] = {
194 | { "font", STRING, &font },
195 | { "fontalt0", STRING, &font2[0] },
196 | { "color0", STRING, &colorname[0] },
197 | { "color1", STRING, &colorname[1] },
198 | { "color2", STRING, &colorname[2] },
199 | { "color3", STRING, &colorname[3] },
200 | { "color4", STRING, &colorname[4] },
201 | { "color5", STRING, &colorname[5] },
202 | { "color6", STRING, &colorname[6] },
203 | { "color7", STRING, &colorname[7] },
204 | { "color8", STRING, &colorname[8] },
205 | { "color9", STRING, &colorname[9] },
206 | { "color10", STRING, &colorname[10] },
207 | { "color11", STRING, &colorname[11] },
208 | { "color12", STRING, &colorname[12] },
209 | { "color13", STRING, &colorname[13] },
210 | { "color14", STRING, &colorname[14] },
211 | { "color15", STRING, &colorname[15] },
212 | { "background", STRING, &colorname[258] },
213 | { "foreground", STRING, &colorname[259] },
214 | { "cursorColor", STRING, &colorname[256] },
215 | { "termname", STRING, &termname },
216 | { "shell", STRING, &shell },
217 | { "blinktimeout", INTEGER, &blinktimeout },
218 | { "bellvolume", INTEGER, &bellvolume },
219 | { "tabspaces", INTEGER, &tabspaces },
220 | { "borderpx", INTEGER, &borderpx },
221 | { "cwscale", FLOAT, &cwscale },
222 | { "chscale", FLOAT, &chscale },
223 | { "alpha", FLOAT, &alpha },
224 | { "ximspot_update_interval", INTEGER, &ximspot_update_interval },
225 | };
226 |
227 | /*
228 | * Internal mouse shortcuts.
229 | * Beware that overloading Button1 will disable the selection.
230 | */
231 | const unsigned int mousescrollincrement = 3;
232 | static MouseShortcut mshortcuts[] = {
233 | /* button mask string */
234 | { Button4, XK_NO_MOD, "\031" },
235 | { Button5, XK_NO_MOD, "\005" },
236 | };
237 |
238 | /* Internal keyboard shortcuts. */
239 | #define MODKEY Mod1Mask
240 | #define TERMMOD (Mod4Mask|ShiftMask)
241 |
242 | MouseKey mkeys[] = {
243 | /* button mask function argument */
244 | { Button4, XK_NO_MOD, kscrollup, {.i = mousescrollincrement} },
245 | { Button5, XK_NO_MOD, kscrolldown, {.i = mousescrollincrement} },
246 | { Button4, Mod4Mask, zoom, {.f = +1} },
247 | { Button5, Mod4Mask, zoom, {.f = -1} },
248 | };
249 |
250 | static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler", "externalpipe", NULL };
251 |
252 | static char *copyurlcmd[] = { "/bin/sh", "-c",
253 | "tmp=$(sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https|gopher|gemini|ftp|ftps|git)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./@$&%?$#=_-~]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' ); IFS=; [ ! -z $tmp ] && echo $tmp | dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard",
254 | "externalpipe", NULL };
255 |
256 | static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
257 |
258 | static Shortcut shortcuts[] = {
259 | /* mask keysym function argument */
260 | { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
261 | { ControlMask, XK_Print, toggleprinter, {.i = 0} },
262 | { ShiftMask, XK_Print, printscreen, {.i = 0} },
263 | { XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
264 | { MODKEY, XK_comma, zoom, {.f = +1} },
265 | { MODKEY, XK_period, zoom, {.f = -1} },
266 | { MODKEY, XK_g, zoomreset, {.f = 0} },
267 | { ControlMask | ShiftMask, XK_C, clipcopy, {.i = 0} },
268 | { ShiftMask, XK_Insert, clippaste, {.i = 0} },
269 | { ControlMask | ShiftMask, XK_V, clippaste, {.i = 0} },
270 | { XK_ANY_MOD, Button2, selpaste, {.i = 0} },
271 | { MODKEY, XK_Num_Lock, numlock, {.i = 0} },
272 | { ControlMask | ShiftMask, XK_U, iso14755, {.i = 0} },
273 | { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
274 | { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
275 | { MODKEY, XK_Page_Up, kscrollup, {.i = -1} },
276 | { MODKEY, XK_Page_Down, kscrolldown, {.i = -1} },
277 | { MODKEY, XK_k, kscrollup, {.i = 1} },
278 | { MODKEY, XK_j, kscrolldown, {.i = 1} },
279 | { MODKEY, XK_Up, kscrollup, {.i = 1} },
280 | { MODKEY, XK_Down, kscrolldown, {.i = 1} },
281 | { MODKEY, XK_u, kscrollup, {.i = -1} },
282 | { MODKEY, XK_d, kscrolldown, {.i = -1} },
283 | { MODKEY, XK_s, changealpha, {.f = -0.05} },
284 | { MODKEY, XK_a, changealpha, {.f = +0.05} },
285 | { MODKEY, XK_m, changealpha, {.f = +2.00} },
286 | { TERMMOD, XK_Up, zoom, {.f = +1} },
287 | { TERMMOD, XK_Down, zoom, {.f = -1} },
288 | { TERMMOD, XK_K, zoom, {.f = +1} },
289 | { TERMMOD, XK_J, zoom, {.f = -1} },
290 | { TERMMOD, XK_U, zoom, {.f = +2} },
291 | { TERMMOD, XK_D, zoom, {.f = -2} },
292 | { MODKEY, XK_l, externalpipe, {.v = openurlcmd } },
293 | { MODKEY, XK_y, externalpipe, {.v = copyurlcmd } },
294 | { MODKEY, XK_o, externalpipe, {.v = copyoutput } },
295 | { TERMMOD, XK_Return, newterm, {.i = 0} },
296 |
297 | };
298 |
299 | /*
300 | * Special keys (change & recompile st.info accordingly)
301 | *
302 | * Mask value:
303 | * * Use XK_ANY_MOD to match the key no matter modifiers state
304 | * * Use XK_NO_MOD to match the key alone (no modifiers)
305 | * appkey value:
306 | * * 0: no value
307 | * * > 0: keypad application mode enabled
308 | * * = 2: term.numlock = 1
309 | * * < 0: keypad application mode disabled
310 | * appcursor value:
311 | * * 0: no value
312 | * * > 0: cursor application mode enabled
313 | * * < 0: cursor application mode disabled
314 | * crlf value
315 | * * 0: no value
316 | * * > 0: crlf mode is enabled
317 | * * < 0: crlf mode is disabled
318 | *
319 | * Be careful with the order of the definitions because st searches in
320 | * this table sequentially, so any XK_ANY_MOD must be in the last
321 | * position for a key.
322 | */
323 |
324 | /*
325 | * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
326 | * to be mapped below, add them to this array.
327 | */
328 | static KeySym mappedkeys[] = { -1 };
329 |
330 | /*
331 | * State bits to ignore when matching key or button events. By default,
332 | * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
333 | */
334 | static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
335 |
336 | /*
337 | * Override mouse-select while mask is active (when MODE_MOUSE is set).
338 | * Note that if you want to use ShiftMask with selmasks, set this to an other
339 | * modifier, set to 0 to not use it.
340 | */
341 | static uint forceselmod = ShiftMask;
342 |
343 | /*
344 | * This is the huge key array which defines all compatibility to the Linux
345 | * world. Please decide about changes wisely.
346 | */
347 | static Key key[] = {
348 | /* keysym mask string appkey appcursor */
349 | { XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
350 | { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
351 | { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
352 | { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
353 | { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
354 | { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
355 | { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
356 | { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
357 | { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
358 | { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
359 | { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
360 | { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
361 | { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
362 | { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
363 | { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
364 | { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
365 | { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
366 | { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
367 | { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
368 | { XK_KP_End, ControlMask, "\033[J", -1, 0},
369 | { XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
370 | { XK_KP_End, ShiftMask, "\033[K", -1, 0},
371 | { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
372 | { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
373 | { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
374 | { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
375 | { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
376 | { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
377 | { XK_KP_Insert, ControlMask, "\033[L", -1, 0},
378 | { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
379 | { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
380 | { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
381 | { XK_KP_Delete, ControlMask, "\033[M", -1, 0},
382 | { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
383 | { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
384 | { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
385 | { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
386 | { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
387 | { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
388 | { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
389 | { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
390 | { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
391 | { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
392 | { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
393 | { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
394 | { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
395 | { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
396 | { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
397 | { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
398 | { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
399 | { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
400 | { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
401 | { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
402 | { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
403 | { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
404 | { XK_Up, ShiftMask, "\033[1;2A", 0, 0},
405 | { XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
406 | { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
407 | { XK_Up, ControlMask, "\033[1;5A", 0, 0},
408 | { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
409 | { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
410 | { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
411 | { XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
412 | { XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
413 | { XK_Down, ShiftMask, "\033[1;2B", 0, 0},
414 | { XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
415 | { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
416 | { XK_Down, ControlMask, "\033[1;5B", 0, 0},
417 | { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
418 | { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
419 | { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
420 | { XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
421 | { XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
422 | { XK_Left, ShiftMask, "\033[1;2D", 0, 0},
423 | { XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
424 | { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
425 | { XK_Left, ControlMask, "\033[1;5D", 0, 0},
426 | { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
427 | { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
428 | { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
429 | { XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
430 | { XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
431 | { XK_Right, ShiftMask, "\033[1;2C", 0, 0},
432 | { XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
433 | { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
434 | { XK_Right, ControlMask, "\033[1;5C", 0, 0},
435 | { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
436 | { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
437 | { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
438 | { XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
439 | { XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
440 | { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
441 | { XK_Return, Mod1Mask, "\033\r", 0, 0},
442 | { XK_Return, XK_ANY_MOD, "\r", 0, 0},
443 | { XK_Insert, ShiftMask, "\033[4l", -1, 0},
444 | { XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
445 | { XK_Insert, ControlMask, "\033[L", -1, 0},
446 | { XK_Insert, ControlMask, "\033[2;5~", +1, 0},
447 | { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
448 | { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
449 | { XK_Delete, ControlMask, "\033[M", -1, 0},
450 | { XK_Delete, ControlMask, "\033[3;5~", +1, 0},
451 | { XK_Delete, ShiftMask, "\033[2K", -1, 0},
452 | { XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
453 | { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
454 | { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
455 | { XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
456 | { XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
457 | { XK_Home, ShiftMask, "\033[2J", 0, -1},
458 | { XK_Home, ShiftMask, "\033[1;2H", 0, +1},
459 | { XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
460 | { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
461 | { XK_End, ControlMask, "\033[J", -1, 0},
462 | { XK_End, ControlMask, "\033[1;5F", +1, 0},
463 | { XK_End, ShiftMask, "\033[K", -1, 0},
464 | { XK_End, ShiftMask, "\033[1;2F", +1, 0},
465 | { XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
466 | { XK_Prior, ControlMask, "\033[5;5~", 0, 0},
467 | { XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
468 | { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
469 | { XK_Next, ControlMask, "\033[6;5~", 0, 0},
470 | { XK_Next, ShiftMask, "\033[6;2~", 0, 0},
471 | { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
472 | { XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
473 | { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
474 | { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
475 | { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
476 | { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
477 | { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
478 | { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
479 | { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
480 | { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
481 | { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
482 | { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
483 | { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
484 | { XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
485 | { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
486 | { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
487 | { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
488 | { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
489 | { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
490 | { XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
491 | { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
492 | { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
493 | { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
494 | { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
495 | { XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
496 | { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
497 | { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
498 | { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
499 | { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
500 | { XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
501 | { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
502 | { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
503 | { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
504 | { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
505 | { XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
506 | { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
507 | { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
508 | { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
509 | { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
510 | { XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
511 | { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
512 | { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
513 | { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
514 | { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
515 | { XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
516 | { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
517 | { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
518 | { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
519 | { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
520 | { XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
521 | { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
522 | { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
523 | { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
524 | { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
525 | { XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
526 | { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
527 | { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
528 | { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
529 | { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
530 | { XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
531 | { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
532 | { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
533 | { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
534 | { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
535 | { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
536 | { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
537 | { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
538 | { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
539 | { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
540 | { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
541 | { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
542 | { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
543 | { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
544 | { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
545 | { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
546 | { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
547 | { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
548 | { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
549 | { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
550 | { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
551 | { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
552 | { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
553 | { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
554 | { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
555 | { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
556 | { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
557 | { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
558 | };
559 |
560 | /*
561 | * Selection types' masks.
562 | * Use the same masks as usual.
563 | * Button1Mask is always unset, to make masks match between ButtonPress.
564 | * ButtonRelease and MotionNotify.
565 | * If no match is found, regular selection is used.
566 | */
567 | static uint selmasks[] = {
568 | [SEL_RECTANGULAR] = Mod1Mask,
569 | };
570 |
571 | /*
572 | * Printable characters in ASCII, used to estimate the advance width
573 | * of single wide characters.
574 | */
575 | static char ascii_printable[] =
576 | " !\"#$%&'()*+,-./0123456789:;<=>?"
577 | "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
578 | "`abcdefghijklmnopqrstuvwxyz{|}~";
579 |
--------------------------------------------------------------------------------
/cfgs/st/config.h:
--------------------------------------------------------------------------------
1 | /* See LICENSE file for copyright and license details. */
2 |
3 | /*
4 | * appearance
5 | *
6 | * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
7 | */
8 | static char *font = "Iosevka Nerd Font :pixelsize=16:antialias=true:autohint=true";
9 | static char *font2[] = { "Iosevka Nerd Font :pixelsize=16:antialias=true:autohint=true" };
10 | static int borderpx = 15;
11 |
12 | /*
13 | * What program is execed by st depends of these precedence rules:
14 | * 1: program passed with -e
15 | * 2: utmp option
16 | * 3: SHELL environment variable
17 | * 4: value of shell in /etc/passwd
18 | * 5: value of shell in config.h
19 | */
20 | static char *shell = "/bin/sh";
21 | char *utmp = NULL;
22 | char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
23 |
24 | /* identification sequence returned in DA and DECID */
25 | char *vtiden = "\033[?6c";
26 |
27 | /* Kerning / character bounding-box multipliers */
28 | static float cwscale = 1.0;
29 | static float chscale = 1.0;
30 |
31 | /*
32 | * word delimiter string
33 | *
34 | * More advanced example: L" `'\"()[]{}"
35 | */
36 | wchar_t *worddelimiters = L" ";
37 |
38 | /* selection timeouts (in milliseconds) */
39 | static unsigned int doubleclicktimeout = 300;
40 | static unsigned int tripleclicktimeout = 600;
41 |
42 | /* alt screens */
43 | int allowaltscreen = 1;
44 |
45 | /*
46 | * draw latency range in ms - from new content/keypress/etc until drawing.
47 | * within this range, st draws when content stops arriving (idle). mostly it's
48 | * near minlatency, but it waits longer for slow updates to avoid partial draw.
49 | * low minlatency will tear/flicker more, as it can "detect" idle too early.
50 | */
51 | static double minlatency = 8;
52 | static double maxlatency = 33;
53 |
54 | /*
55 | * Synchronized-Update timeout in ms
56 | * https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec
57 | */
58 | static uint su_timeout = 200;
59 |
60 | /*
61 | * blinking timeout (set to 0 to disable blinking) for the terminal blinking
62 | * attribute.
63 | */
64 | static unsigned int blinktimeout = 800;
65 |
66 | /*
67 | * interval (in milliseconds) between each successive call to ximspot. This
68 | * improves terminal performance while not reducing functionality to those
69 | * whom need XIM support.
70 | */
71 | int ximspot_update_interval = 1000;
72 |
73 | /*
74 | * thickness of underline and bar cursors
75 | */
76 | static unsigned int cursorthickness = 2;
77 |
78 | /*
79 | * 1: render most of the lines/blocks characters without using the font for
80 | * perfect alignment between cells (U2500 - U259F except dashes/diagonals).
81 | * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored.
82 | * 0: disable (render all U25XX glyphs normally from the font).
83 | */
84 | const int boxdraw = 1;
85 | const int boxdraw_bold = 1;
86 |
87 | /* braille (U28XX): 1: render as adjacent "pixels", 0: use font */
88 | const int boxdraw_braille = 1;
89 |
90 | /*
91 | * bell volume. It must be a value between -100 and 100. Use 0 for disabling
92 | * it
93 | */
94 | static int bellvolume = 0;
95 |
96 | /* default TERM value */
97 | char *termname = "st-256color";
98 |
99 | /*
100 | * spaces per tab
101 | *
102 | * When you are changing this value, don't forget to adapt the »it« value in
103 | * the st.info and appropriately install the st.info in the environment where
104 | * you use this st version.
105 | *
106 | * it#$tabspaces,
107 | *
108 | * Secondly make sure your kernel is not expanding tabs. When running `stty
109 | * -a` »tab0« should appear. You can tell the terminal to not expand tabs by
110 | * running following command:
111 | *
112 | * stty tabs
113 | */
114 | unsigned int tabspaces = 8;
115 |
116 | /* bg opacity */
117 | float alpha = 1.0;
118 |
119 | /* Terminal colors (16 first used in escape sequence) */
120 | static const char *colorname[] = {
121 | "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
122 | "#cc241d",
123 | "#98971a",
124 | "#d79921",
125 | "#458588",
126 | "#b16286",
127 | "#689d6a",
128 | "#a89984",
129 | "#928374",
130 | "#fb4934",
131 | "#b8bb26",
132 | "#fabd2f",
133 | "#83a598",
134 | "#d3869b",
135 | "#8ec07c",
136 | "#ebdbb2",
137 | [255] = 0,
138 | /* more colors can be added after 255 to use with DefaultXX */
139 | "#add8e6", /* 256 -> cursor */
140 | "#555555", /* 257 -> rev cursor*/
141 | "#282828", /* 258 -> bg */
142 | "#ffffff", /* 259 -> fg */
143 | };
144 |
145 |
146 | /*
147 | * Default colors (colorname index)
148 | * foreground, background, cursor, reverse cursor
149 | */
150 | unsigned int defaultfg = 259;
151 | unsigned int defaultbg = 258;
152 | unsigned int defaultcs = 256;
153 | unsigned int defaultrcs = 257;
154 |
155 | /*
156 | * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81
157 | * Default style of cursor
158 | * 0: Blinking block
159 | * 1: Blinking block (default)
160 | * 2: Steady block ("█")
161 | * 3: Blinking underline
162 | * 4: Steady underline ("_")
163 | * 5: Blinking bar
164 | * 6: Steady bar ("|")
165 | * 7: Blinking st cursor
166 | * 8: Steady st cursor
167 | */
168 | static unsigned int cursorshape = 1;
169 |
170 | /*
171 | * Default columns and rows numbers
172 | */
173 |
174 | static unsigned int cols = 80;
175 | static unsigned int rows = 24;
176 |
177 | /*
178 | * Default colour and shape of the mouse cursor
179 | */
180 | static unsigned int mouseshape = XC_xterm;
181 | static unsigned int mousefg = 7;
182 | static unsigned int mousebg = 0;
183 |
184 | /*
185 | * Color used to display font attributes when fontconfig selected a font which
186 | * doesn't match the ones requested.
187 | */
188 | static unsigned int defaultattr = 11;
189 |
190 | /*
191 | * Xresources preferences to load at startup
192 | */
193 | ResourcePref resources[] = {
194 | { "font", STRING, &font },
195 | { "fontalt0", STRING, &font2[0] },
196 | { "color0", STRING, &colorname[0] },
197 | { "color1", STRING, &colorname[1] },
198 | { "color2", STRING, &colorname[2] },
199 | { "color3", STRING, &colorname[3] },
200 | { "color4", STRING, &colorname[4] },
201 | { "color5", STRING, &colorname[5] },
202 | { "color6", STRING, &colorname[6] },
203 | { "color7", STRING, &colorname[7] },
204 | { "color8", STRING, &colorname[8] },
205 | { "color9", STRING, &colorname[9] },
206 | { "color10", STRING, &colorname[10] },
207 | { "color11", STRING, &colorname[11] },
208 | { "color12", STRING, &colorname[12] },
209 | { "color13", STRING, &colorname[13] },
210 | { "color14", STRING, &colorname[14] },
211 | { "color15", STRING, &colorname[15] },
212 | { "background", STRING, &colorname[258] },
213 | { "foreground", STRING, &colorname[259] },
214 | { "cursorColor", STRING, &colorname[256] },
215 | { "termname", STRING, &termname },
216 | { "shell", STRING, &shell },
217 | { "blinktimeout", INTEGER, &blinktimeout },
218 | { "bellvolume", INTEGER, &bellvolume },
219 | { "tabspaces", INTEGER, &tabspaces },
220 | { "borderpx", INTEGER, &borderpx },
221 | { "cwscale", FLOAT, &cwscale },
222 | { "chscale", FLOAT, &chscale },
223 | { "alpha", FLOAT, &alpha },
224 | { "ximspot_update_interval", INTEGER, &ximspot_update_interval },
225 | };
226 |
227 | /*
228 | * Internal mouse shortcuts.
229 | * Beware that overloading Button1 will disable the selection.
230 | */
231 | const unsigned int mousescrollincrement = 3;
232 | static MouseShortcut mshortcuts[] = {
233 | /* button mask string */
234 | { Button4, XK_NO_MOD, "\031" },
235 | { Button5, XK_NO_MOD, "\005" },
236 | };
237 |
238 | /* Internal keyboard shortcuts. */
239 | #define MODKEY Mod1Mask
240 | #define TERMMOD (Mod4Mask|ShiftMask)
241 |
242 | MouseKey mkeys[] = {
243 | /* button mask function argument */
244 | { Button4, XK_NO_MOD, kscrollup, {.i = mousescrollincrement} },
245 | { Button5, XK_NO_MOD, kscrolldown, {.i = mousescrollincrement} },
246 | { Button4, Mod4Mask, zoom, {.f = +1} },
247 | { Button5, Mod4Mask, zoom, {.f = -1} },
248 | };
249 |
250 | static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler", "externalpipe", NULL };
251 |
252 | static char *copyurlcmd[] = { "/bin/sh", "-c",
253 | "tmp=$(sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https|gopher|gemini|ftp|ftps|git)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./@$&%?$#=_-~]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' ); IFS=; [ ! -z $tmp ] && echo $tmp | dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard",
254 | "externalpipe", NULL };
255 |
256 | static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
257 |
258 | static Shortcut shortcuts[] = {
259 | /* mask keysym function argument */
260 | { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
261 | { ControlMask, XK_Print, toggleprinter, {.i = 0} },
262 | { ShiftMask, XK_Print, printscreen, {.i = 0} },
263 | { XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
264 | { MODKEY, XK_comma, zoom, {.f = +1} },
265 | { MODKEY, XK_period, zoom, {.f = -1} },
266 | { MODKEY, XK_g, zoomreset, {.f = 0} },
267 | { ControlMask | ShiftMask, XK_C, clipcopy, {.i = 0} },
268 | { ShiftMask, XK_Insert, clippaste, {.i = 0} },
269 | { ControlMask | ShiftMask, XK_V, clippaste, {.i = 0} },
270 | { XK_ANY_MOD, Button2, selpaste, {.i = 0} },
271 | { MODKEY, XK_Num_Lock, numlock, {.i = 0} },
272 | { ControlMask | ShiftMask, XK_U, iso14755, {.i = 0} },
273 | { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
274 | { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
275 | { MODKEY, XK_Page_Up, kscrollup, {.i = -1} },
276 | { MODKEY, XK_Page_Down, kscrolldown, {.i = -1} },
277 | { MODKEY, XK_k, kscrollup, {.i = 1} },
278 | { MODKEY, XK_j, kscrolldown, {.i = 1} },
279 | { MODKEY, XK_Up, kscrollup, {.i = 1} },
280 | { MODKEY, XK_Down, kscrolldown, {.i = 1} },
281 | { MODKEY, XK_u, kscrollup, {.i = -1} },
282 | { MODKEY, XK_d, kscrolldown, {.i = -1} },
283 | { MODKEY, XK_s, changealpha, {.f = -0.05} },
284 | { MODKEY, XK_a, changealpha, {.f = +0.05} },
285 | { MODKEY, XK_m, changealpha, {.f = +2.00} },
286 | { TERMMOD, XK_Up, zoom, {.f = +1} },
287 | { TERMMOD, XK_Down, zoom, {.f = -1} },
288 | { TERMMOD, XK_K, zoom, {.f = +1} },
289 | { TERMMOD, XK_J, zoom, {.f = -1} },
290 | { TERMMOD, XK_U, zoom, {.f = +2} },
291 | { TERMMOD, XK_D, zoom, {.f = -2} },
292 | { MODKEY, XK_l, externalpipe, {.v = openurlcmd } },
293 | { MODKEY, XK_y, externalpipe, {.v = copyurlcmd } },
294 | { MODKEY, XK_o, externalpipe, {.v = copyoutput } },
295 | { TERMMOD, XK_Return, newterm, {.i = 0} },
296 |
297 | };
298 |
299 | /*
300 | * Special keys (change & recompile st.info accordingly)
301 | *
302 | * Mask value:
303 | * * Use XK_ANY_MOD to match the key no matter modifiers state
304 | * * Use XK_NO_MOD to match the key alone (no modifiers)
305 | * appkey value:
306 | * * 0: no value
307 | * * > 0: keypad application mode enabled
308 | * * = 2: term.numlock = 1
309 | * * < 0: keypad application mode disabled
310 | * appcursor value:
311 | * * 0: no value
312 | * * > 0: cursor application mode enabled
313 | * * < 0: cursor application mode disabled
314 | * crlf value
315 | * * 0: no value
316 | * * > 0: crlf mode is enabled
317 | * * < 0: crlf mode is disabled
318 | *
319 | * Be careful with the order of the definitions because st searches in
320 | * this table sequentially, so any XK_ANY_MOD must be in the last
321 | * position for a key.
322 | */
323 |
324 | /*
325 | * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
326 | * to be mapped below, add them to this array.
327 | */
328 | static KeySym mappedkeys[] = { -1 };
329 |
330 | /*
331 | * State bits to ignore when matching key or button events. By default,
332 | * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
333 | */
334 | static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
335 |
336 | /*
337 | * Override mouse-select while mask is active (when MODE_MOUSE is set).
338 | * Note that if you want to use ShiftMask with selmasks, set this to an other
339 | * modifier, set to 0 to not use it.
340 | */
341 | static uint forceselmod = ShiftMask;
342 |
343 | /*
344 | * This is the huge key array which defines all compatibility to the Linux
345 | * world. Please decide about changes wisely.
346 | */
347 | static Key key[] = {
348 | /* keysym mask string appkey appcursor */
349 | { XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
350 | { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
351 | { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
352 | { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
353 | { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
354 | { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
355 | { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
356 | { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
357 | { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
358 | { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
359 | { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
360 | { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
361 | { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
362 | { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
363 | { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
364 | { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
365 | { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
366 | { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
367 | { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
368 | { XK_KP_End, ControlMask, "\033[J", -1, 0},
369 | { XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
370 | { XK_KP_End, ShiftMask, "\033[K", -1, 0},
371 | { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
372 | { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
373 | { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
374 | { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
375 | { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
376 | { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
377 | { XK_KP_Insert, ControlMask, "\033[L", -1, 0},
378 | { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
379 | { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
380 | { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
381 | { XK_KP_Delete, ControlMask, "\033[M", -1, 0},
382 | { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
383 | { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
384 | { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
385 | { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
386 | { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
387 | { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
388 | { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
389 | { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
390 | { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
391 | { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
392 | { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
393 | { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
394 | { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
395 | { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
396 | { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
397 | { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
398 | { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
399 | { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
400 | { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
401 | { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
402 | { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
403 | { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
404 | { XK_Up, ShiftMask, "\033[1;2A", 0, 0},
405 | { XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
406 | { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
407 | { XK_Up, ControlMask, "\033[1;5A", 0, 0},
408 | { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
409 | { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
410 | { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
411 | { XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
412 | { XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
413 | { XK_Down, ShiftMask, "\033[1;2B", 0, 0},
414 | { XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
415 | { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
416 | { XK_Down, ControlMask, "\033[1;5B", 0, 0},
417 | { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
418 | { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
419 | { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
420 | { XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
421 | { XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
422 | { XK_Left, ShiftMask, "\033[1;2D", 0, 0},
423 | { XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
424 | { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
425 | { XK_Left, ControlMask, "\033[1;5D", 0, 0},
426 | { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
427 | { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
428 | { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
429 | { XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
430 | { XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
431 | { XK_Right, ShiftMask, "\033[1;2C", 0, 0},
432 | { XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
433 | { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
434 | { XK_Right, ControlMask, "\033[1;5C", 0, 0},
435 | { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
436 | { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
437 | { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
438 | { XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
439 | { XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
440 | { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
441 | { XK_Return, Mod1Mask, "\033\r", 0, 0},
442 | { XK_Return, XK_ANY_MOD, "\r", 0, 0},
443 | { XK_Insert, ShiftMask, "\033[4l", -1, 0},
444 | { XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
445 | { XK_Insert, ControlMask, "\033[L", -1, 0},
446 | { XK_Insert, ControlMask, "\033[2;5~", +1, 0},
447 | { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
448 | { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
449 | { XK_Delete, ControlMask, "\033[M", -1, 0},
450 | { XK_Delete, ControlMask, "\033[3;5~", +1, 0},
451 | { XK_Delete, ShiftMask, "\033[2K", -1, 0},
452 | { XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
453 | { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
454 | { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
455 | { XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
456 | { XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
457 | { XK_Home, ShiftMask, "\033[2J", 0, -1},
458 | { XK_Home, ShiftMask, "\033[1;2H", 0, +1},
459 | { XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
460 | { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
461 | { XK_End, ControlMask, "\033[J", -1, 0},
462 | { XK_End, ControlMask, "\033[1;5F", +1, 0},
463 | { XK_End, ShiftMask, "\033[K", -1, 0},
464 | { XK_End, ShiftMask, "\033[1;2F", +1, 0},
465 | { XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
466 | { XK_Prior, ControlMask, "\033[5;5~", 0, 0},
467 | { XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
468 | { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
469 | { XK_Next, ControlMask, "\033[6;5~", 0, 0},
470 | { XK_Next, ShiftMask, "\033[6;2~", 0, 0},
471 | { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
472 | { XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
473 | { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
474 | { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
475 | { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
476 | { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
477 | { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
478 | { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
479 | { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
480 | { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
481 | { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
482 | { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
483 | { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
484 | { XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
485 | { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
486 | { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
487 | { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
488 | { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
489 | { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
490 | { XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
491 | { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
492 | { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
493 | { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
494 | { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
495 | { XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
496 | { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
497 | { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
498 | { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
499 | { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
500 | { XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
501 | { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
502 | { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
503 | { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
504 | { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
505 | { XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
506 | { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
507 | { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
508 | { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
509 | { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
510 | { XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
511 | { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
512 | { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
513 | { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
514 | { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
515 | { XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
516 | { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
517 | { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
518 | { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
519 | { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
520 | { XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
521 | { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
522 | { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
523 | { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
524 | { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
525 | { XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
526 | { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
527 | { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
528 | { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
529 | { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
530 | { XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
531 | { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
532 | { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
533 | { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
534 | { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
535 | { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
536 | { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
537 | { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
538 | { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
539 | { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
540 | { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
541 | { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
542 | { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
543 | { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
544 | { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
545 | { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
546 | { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
547 | { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
548 | { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
549 | { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
550 | { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
551 | { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
552 | { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
553 | { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
554 | { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
555 | { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
556 | { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
557 | { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
558 | };
559 |
560 | /*
561 | * Selection types' masks.
562 | * Use the same masks as usual.
563 | * Button1Mask is always unset, to make masks match between ButtonPress.
564 | * ButtonRelease and MotionNotify.
565 | * If no match is found, regular selection is used.
566 | */
567 | static uint selmasks[] = {
568 | [SEL_RECTANGULAR] = Mod1Mask,
569 | };
570 |
571 | /*
572 | * Printable characters in ASCII, used to estimate the advance width
573 | * of single wide characters.
574 | */
575 | static char ascii_printable[] =
576 | " !\"#$%&'()*+,-./0123456789:;<=>?"
577 | "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
578 | "`abcdefghijklmnopqrstuvwxyz{|}~";
579 |
--------------------------------------------------------------------------------
/cfgs/st/config.mk:
--------------------------------------------------------------------------------
1 | # st version
2 | VERSION = 0.8.4
3 |
4 | # Customize below to fit your system
5 |
6 | # paths
7 | PREFIX = /usr/local
8 | MANPREFIX = $(PREFIX)/share/man
9 |
10 | X11INC = /usr/X11R6/include
11 | X11LIB = /usr/X11R6/lib
12 |
13 | PKG_CONFIG = pkg-config
14 |
15 | # includes and libs
16 | INCS = -I$(X11INC) \
17 | `$(PKG_CONFIG) --cflags fontconfig` \
18 | `$(PKG_CONFIG) --cflags freetype2` \
19 | `$(PKG_CONFIG) --cflags harfbuzz`
20 | LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
21 | `$(PKG_CONFIG) --libs fontconfig` \
22 | `$(PKG_CONFIG) --libs freetype2` \
23 | `$(PKG_CONFIG) --libs harfbuzz`
24 |
25 | # flags
26 | STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
27 | STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
28 | STLDFLAGS = $(LIBS) $(LDFLAGS)
29 |
30 | # OpenBSD:
31 | #CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
32 | #LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \
33 | # `$(PKG_CONFIG) --libs fontconfig` \
34 | # `$(PKG_CONFIG) --libs freetype2`
35 |
36 | # compiler and linker
37 | # CC = c99
38 |
--------------------------------------------------------------------------------
/cfgs/st/hb.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include "st.h"
9 |
10 | void hbtransformsegment(XftFont *xfont, const Glyph *string, hb_codepoint_t *codepoints, int start, int length);
11 | hb_font_t *hbfindfont(XftFont *match);
12 |
13 | typedef struct {
14 | XftFont *match;
15 | hb_font_t *font;
16 | } HbFontMatch;
17 |
18 | static int hbfontslen = 0;
19 | static HbFontMatch *hbfontcache = NULL;
20 |
21 | void
22 | hbunloadfonts()
23 | {
24 | for (int i = 0; i < hbfontslen; i++) {
25 | hb_font_destroy(hbfontcache[i].font);
26 | XftUnlockFace(hbfontcache[i].match);
27 | }
28 |
29 | if (hbfontcache != NULL) {
30 | free(hbfontcache);
31 | hbfontcache = NULL;
32 | }
33 | hbfontslen = 0;
34 | }
35 |
36 | hb_font_t *
37 | hbfindfont(XftFont *match)
38 | {
39 | for (int i = 0; i < hbfontslen; i++) {
40 | if (hbfontcache[i].match == match)
41 | return hbfontcache[i].font;
42 | }
43 |
44 | /* Font not found in cache, caching it now. */
45 | hbfontcache = realloc(hbfontcache, sizeof(HbFontMatch) * (hbfontslen + 1));
46 | FT_Face face = XftLockFace(match);
47 | hb_font_t *font = hb_ft_font_create(face, NULL);
48 | if (font == NULL)
49 | die("Failed to load Harfbuzz font.");
50 |
51 | hbfontcache[hbfontslen].match = match;
52 | hbfontcache[hbfontslen].font = font;
53 | hbfontslen += 1;
54 |
55 | return font;
56 | }
57 |
58 | void
59 | hbtransform(XftGlyphFontSpec *specs, const Glyph *glyphs, size_t len, int x, int y)
60 | {
61 | int start = 0, length = 1, gstart = 0;
62 | hb_codepoint_t *codepoints = calloc(len, sizeof(hb_codepoint_t));
63 |
64 | for (int idx = 1, specidx = 1; idx < len; idx++) {
65 | if (glyphs[idx].mode & ATTR_WDUMMY) {
66 | length += 1;
67 | continue;
68 | }
69 |
70 | if (specs[specidx].font != specs[start].font || ATTRCMP(glyphs[gstart], glyphs[idx]) || selected(x + idx, y) != selected(x + gstart, y)) {
71 | hbtransformsegment(specs[start].font, glyphs, codepoints, gstart, length);
72 |
73 | /* Reset the sequence. */
74 | length = 1;
75 | start = specidx;
76 | gstart = idx;
77 | } else {
78 | length += 1;
79 | }
80 |
81 | specidx++;
82 | }
83 |
84 | /* EOL. */
85 | hbtransformsegment(specs[start].font, glyphs, codepoints, gstart, length);
86 |
87 | /* Apply the transformation to glyph specs. */
88 | for (int i = 0, specidx = 0; i < len; i++) {
89 | if (glyphs[i].mode & ATTR_WDUMMY)
90 | continue;
91 | if (glyphs[i].mode & ATTR_BOXDRAW) {
92 | specidx++;
93 | continue;
94 | }
95 |
96 | if (codepoints[i] != specs[specidx].glyph)
97 | ((Glyph *)glyphs)[i].mode |= ATTR_LIGA;
98 |
99 | specs[specidx++].glyph = codepoints[i];
100 | }
101 |
102 | free(codepoints);
103 | }
104 |
105 | void
106 | hbtransformsegment(XftFont *xfont, const Glyph *string, hb_codepoint_t *codepoints, int start, int length)
107 | {
108 | hb_font_t *font = hbfindfont(xfont);
109 | if (font == NULL)
110 | return;
111 |
112 | Rune rune;
113 | ushort mode = USHRT_MAX;
114 | hb_buffer_t *buffer = hb_buffer_create();
115 | hb_buffer_set_direction(buffer, HB_DIRECTION_LTR);
116 |
117 | /* Fill buffer with codepoints. */
118 | for (int i = start; i < (start+length); i++) {
119 | rune = string[i].u;
120 | mode = string[i].mode;
121 | if (mode & ATTR_WDUMMY)
122 | rune = 0x0020;
123 | hb_buffer_add_codepoints(buffer, &rune, 1, 0, 1);
124 | }
125 |
126 | /* Shape the segment. */
127 | hb_shape(font, buffer, NULL, 0);
128 |
129 | /* Get new glyph info. */
130 | hb_glyph_info_t *info = hb_buffer_get_glyph_infos(buffer, NULL);
131 |
132 | /* Write new codepoints. */
133 | for (int i = 0; i < length; i++) {
134 | hb_codepoint_t gid = info[i].codepoint;
135 | codepoints[start+i] = gid;
136 | }
137 |
138 | /* Cleanup. */
139 | hb_buffer_destroy(buffer);
140 | }
141 |
--------------------------------------------------------------------------------
/cfgs/st/hb.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | void hbunloadfonts();
6 | void hbtransform(XftGlyphFontSpec *, const Glyph *, size_t, int, int);
7 |
8 |
--------------------------------------------------------------------------------
/cfgs/st/hb.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/cfgs/st/hb.o
--------------------------------------------------------------------------------
/cfgs/st/normalMode.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "normalMode.h"
5 | #include "utils.h"
6 |
7 | extern Glyph const styleSearch, style[];
8 | extern char const wDelS[], wDelL[], *nmKeys[];
9 | extern unsigned int bg[], fg, currentBg, highlightBg, highlightFg, amountNmKeys;
10 |
11 | typedef struct { int p[3]; } Pos;
12 |
13 | typedef enum {visual='v', visualLine='V', yank = 'y'} Op;
14 | typedef enum {infix_none=0, infix_i='i', infix_a='a'} Infix;
15 | typedef enum {fw='/', bw='?'} Search;
16 | struct NormalModeState {
17 | struct OperationState { Op op; Infix infix; } cmd;
18 | struct MotionState { uint32_t c; int active; Pos searchPos; Search search; } m;
19 | } defaultNormalMode, state;
20 |
21 | DynamicArray searchStr=UTF8_ARRAY, cCmd=UTF8_ARRAY, lCmd=UTF8_ARRAY;
22 | Glyph styleCmd;
23 | char posBuffer[10], braces[6][3] = { {"()"}, {"<>"}, {"{}"}, {"[]"}, {"\"\""}, {"''"}};
24 | int exited=1, overlay=1;
25 | static inline Rune cChar() { return term.line[term.c.y][term.c.x].u; }
26 | static inline int pos(int p, int h) {return IS_SET(MODE_ALTSCREEN)?p:rangeY(p+h*histOff-insertOff);}
27 | static inline int contains(Rune l, char const * values, size_t const memSize) {
28 | for (uint32_t i = 0; i < memSize; ++i) if (l == values[i]) return 1;
29 | return 0;
30 | }
31 | static inline void decodeTo(char const *cs, size_t len, DynamicArray *arr) {
32 | char *var = expand(arr);
33 | if (!var) empty(arr); else utf8decode(cs, (Rune*)(var), len);
34 | }
35 | static inline void applyPos(Pos p) {
36 | term.c.x = p.p[0], term.c.y = p.p[1];
37 | if (!IS_SET(MODE_ALTSCREEN) && histOp) term.line = &buf[histOff = p.p[2]];
38 | }
39 | /// Find string in history buffer, and provide string-match-lookup for highlighting matches
40 | static int highlighted(int x, int y) {
41 | int const s=term.row*term.col, i=y*term.col+x, sz=size(&searchStr);
42 | return sz && i0)==cChar())?wIdx+1:0;
63 | if (wi && !wIdx) historyMove(-(int)(s*wi), 0, 0);
64 | }
65 | if (wIdx == strSz && wIdx) historyMove(-(int)(s*strSz), 0, 0);
66 | else applyPos(p);
67 | markSearchMatches(all);
68 | return wIdx == strSz;
69 | }
70 | /// Execute series of normal-mode commands from char array / decoded from dynamic array
71 | ExitState pressKeys(char const* s, size_t e) {
72 | ExitState x=success;
73 | for (size_t i=0; iu = *((Rune*)(st->content + (size(st)+x-xEnd)*st->elSize));
86 | }
87 | /// Expand "infix" expression: for instance (w =>) l b | | v e | | y
88 | static ExitState expandExpression(char l) { // ({ =>) l ? { \n | l | v / } \n | h | y
89 | int a=state.cmd.infix==infix_a, yank=state.cmd.op=='y', lc=tolower(l), found=1;
90 | state.cmd.infix = infix_none;
91 | if(!yank && state.cmd.op!=visual && state.cmd.op!=visualLine) return failed;
92 | char mot[11] = {'l', 0, 'b', 0, 0, 'v', 0, 'e', 0, 0, (char)(yank ? 'y' : 0)};
93 | if (lc == 'w') mot[2] = (char) ('b' - lc + l), mot[7] = (char) ((a ? 'w' : 'e') - lc + l), mot[9]=(char)(a?'h':0);
94 | else {
95 | mot[1]='?', mot[3]=mot[8]='\n', mot[6]='/', mot[4]=(char)(a?0:'l'), mot[9]=(char)(a?0:'h');
96 | for (int i=found=0; !found && i < 6; ++i)
97 | if ((found=contains(l,braces[i],2))) mot[2]=braces[i][0], mot[7]=braces[i][1];
98 | }
99 | if (!found) return failed;
100 | assign(&lCmd, &cCmd);
101 | empty(&cCmd);
102 | state.cmd = defaultNormalMode.cmd;
103 | return pressKeys(mot, 11);
104 | }
105 |
106 | ExitState executeMotion(char const cs, KeySym const *const ks) {
107 | state.m.c = state.m.c < 1u ? 1u : state.m.c;
108 | if (ks && *ks == XK_d) historyMove(0, 0, term.row / 2);
109 | else if (ks && *ks == XK_u) historyMove(0, 0, -term.row / 2);
110 | else if (ks && *ks == XK_f) historyMove(0, 0, term.row-1+(term.c.y=0));
111 | else if (ks && *ks == XK_b) historyMove(0, 0, -(term.c.y=term.row-1));
112 | else if (ks && *ks == XK_h) overlay = !overlay;
113 | else if (cs == 'K') historyMove(0, 0, -(int)state.m.c);
114 | else if (cs == 'J') historyMove(0, 0, (int)state.m.c);
115 | else if (cs == 'k') historyMove(0, -(int)state.m.c, 0);
116 | else if (cs == 'j') historyMove(0, (int)state.m.c, 0);
117 | else if (cs == 'h') historyMove(-(int)state.m.c, 0, 0);
118 | else if (cs == 'l') historyMove( (int)state.m.c, 0, 0);
119 | else if (cs == 'H') term.c.y = 0;
120 | else if (cs == 'M') term.c.y = term.bot / 2;
121 | else if (cs == 'L') term.c.y = term.bot;
122 | else if (cs == 's' || cs == 'S') altToggle = cs == 's' ? !altToggle : 1;
123 | else if (cs == 'G' || cs == 'g') {
124 | if (cs == 'G') term.c = c[0] = c[IS_SET(MODE_ALTSCREEN)+1];
125 | if (!IS_SET(MODE_ALTSCREEN)) term.line = &buf[histOff=insertOff];
126 | } else if (cs == '0') term.c.x = 0;
127 | else if (cs == '$') term.c.x = term.col-1;
128 | else if (cs == 't') sel.type = sel.type==SEL_REGULAR ? SEL_RECTANGULAR : SEL_REGULAR;
129 | else if (cs == 'n' || cs == 'N') {
130 | int const d = ((cs=='N')!=(state.m.search==bw))?-1:1;
131 | for (uint32_t i = state.m.c; i && findString(d, 0); --i);
132 | } else if (contains(cs, "wWeEbB", 6)) {
133 | int const low=cs<=90, off=tolower(cs)!='w', sgn=(tolower(cs)=='b')?-1:1;
134 | size_t const l=strlen(wDelL), s=strlen(wDelS), maxIt=rows()*term.col;
135 | for (int it=0, on=0; state.m.c > 0 && it < maxIt; ++it) {
136 | // If an offset is to be performed in beginning or not in beginning, move in history.
137 | if ((off || it) && historyMove(sgn, 0, 0)) break;
138 | // Determine if the category of the current letter changed since last iteration.
139 | int n = 1<<(contains(cChar(),wDelS,s) ?(2-low) :!contains(cChar(),wDelL,l)),
140 | found = (on|=n)^n && ((off ?on^n :n)!=1);
141 | // If a reverse offset is to be performed and this is the last letter:
142 | if (found && off) historyMove(-sgn, 0, 0);
143 | // Terminate iteration: reset #it and old n value #on and decrease operation count:
144 | if (found) it=-1, on=0, --state.m.c;
145 | }
146 | } else return failed;
147 | state.m.c = 0;
148 | return state.cmd.op == yank ? exitMotion : success;
149 | }
150 |
151 | ExitState kPressHist(char const *cs, size_t len, int ctrl, KeySym const *kSym) {
152 | historyOpToggle(1, 1);
153 | int const prevYOff=IS_SET(MODE_ALTSCREEN)?0:histOff, search=state.m.search&&state.m.active,
154 | prevAltToggle=altToggle, prevOverlay=overlay;
155 | int const noOp=!state.cmd.op&&!state.cmd.infix, num=len==1&&BETWEEN(cs[0],48,57),
156 | esc=kSym&&*kSym==XK_Escape, ret=(kSym&&*kSym==XK_Return)||(len==1&&cs[0]=='\n'),
157 | quantifier=num&&(cs[0]!='0'||state.m.c), ins=!search &&noOp &&len &&cs[0]=='i';
158 | exited = 0;
159 | ExitState result = success;
160 | if (esc || ret || ins) { result = exitMotion, len = 0;
161 | } else if (kSym && *kSym == XK_BackSpace) {
162 | if ((search || state.m.c) && size(&cCmd)) pop(&cCmd);
163 | if (search) {
164 | if (size(&searchStr)) pop(&searchStr);
165 | else result = exitMotion;
166 | if (!size(&searchStr)) tfulldirt();
167 | applyPos(state.m.searchPos);
168 | findString(state.m.search==fw ? 1 : -1, 1);
169 | } else if (state.m.c) state.m.c /= 10;
170 | len = 0;
171 | } else if (search) {
172 | if (len >= 1) decodeTo(cs, len, &searchStr);
173 | applyPos(state.m.searchPos);
174 | findString(state.m.search==fw ? 1 : -1, 1);
175 | } else if (len == 0) { result = failed;
176 | } else if (quantifier) { state.m.c = min(SHRT_MAX, (int)state.m.c*10+cs[0]-48);
177 | } else if (state.cmd.infix && state.cmd.op && (result = expandExpression(cs[0]), len=0)) {
178 | } else if (cs[0] == 'd') { state = defaultNormalMode; result = exitMotion; state.m.active = 1;
179 | } else if (cs[0] == '.') {
180 | if (size(&cCmd)) assign(&lCmd, &cCmd);
181 | empty(&cCmd);
182 | executeCommand((uint32_t*) lCmd.content, size(&lCmd));
183 | empty(&cCmd);
184 | len = 0;
185 | } else if (cs[0] == 'r') { tfulldirt();
186 | } else if (cs[0] == 'c') {
187 | empty(&lCmd);
188 | empty(&cCmd);
189 | empty(&searchStr);
190 | tfulldirt();
191 | len = 0;
192 | } else if (cs[0] == fw || cs[0] == bw) {
193 | empty(&searchStr);
194 | state.m.search = (Search) cs[0];
195 | state.m.searchPos = (Pos){.p={term.c.x, term.c.y, prevYOff}};
196 | state.m.active = 1;
197 | } else if (cs[0]==infix_i || cs[0]==infix_a) { state.cmd.infix=(Infix) cs[0];
198 | } else if (cs[0] == 'y') {
199 | if (state.cmd.op) {
200 | result = (state.cmd.op == yank || state.cmd.op == visualLine) ? exitOp : exitMotion;
201 | if (state.cmd.op == yank) selstart(0, term.c.y, 0);
202 | } else selstart(term.c.x, term.c.y, 0);
203 | state.cmd.op = yank;
204 | } else if (cs[0] == visual || cs[0] == visualLine) {
205 | if (state.cmd.op != (Op) cs[0]) {
206 | state.cmd = defaultNormalMode.cmd;
207 | state.cmd.op = (Op) cs[0];
208 | selstart(cs[0] == visualLine ?0 :term.c.x, term.c.y, 0);
209 | } else result = exitOp;
210 | } else if (!(result =executeMotion((char) (len?cs[0]:0), ctrl?kSym:NULL))) {
211 | result=failed;
212 | for (size_t i = 0; !ctrl && i < amountNmKeys; ++i)
213 | if (cs[0]==nmKeys[i][0] &&
214 | failed!=(result=pressKeys(&nmKeys[i][1], strlen(nmKeys[i])-1))) goto end;
215 | } // Operation/Motion finished if valid: update cmd string, extend selection, update search
216 | if (result != failed) {
217 | if (len == 1 && !ctrl) decodeTo(cs, len, &cCmd);
218 | if ((state.cmd.op == visualLine) || ((state.cmd.op == yank) && (result == exitOp))) {
219 | int const off = term.c.y + (IS_SET(MODE_ALTSCREEN) ? 0 : histOff) < sel.ob.y; //< Selection start below end.
220 | sel.ob.x = off ? term.col - 1 : 0;
221 | selextend(off ? 0 : term.col-1, term.c.y, sel.type, 0);
222 | } else if (sel.oe.x != -1) {
223 | selextend(term.c.x, term.c.y, sel.type, 0);
224 | }
225 | } // Set repaint for motion or status bar
226 | if (!IS_SET(MODE_ALTSCREEN) && prevYOff != histOff) tfulldirt();
227 | // Terminate Motion / operation if thus indicated
228 | if (result == exitMotion) {
229 | if (!state.m.active) result = (exited=noOp) ? finish : exitOp;
230 | state.m.active = (int) (state.m.c = 0u);
231 | }
232 | if (result == exitOp || result == finish) {
233 | if (state.cmd.op == yank) {
234 | xsetsel(getsel());
235 | xclipcopy();
236 | }
237 | state = defaultNormalMode;
238 | selclear();
239 | if (!esc) assign(&lCmd, &cCmd);
240 | empty(&cCmd);
241 | } // Update the content displayed in the history overlay
242 | styleCmd = style[state.cmd.op==yank ? 1 : (state.cmd.op==visual ? 2 :
243 | (state.cmd.op==visualLine ? 3 :0))];
244 | int const posLin = !IS_SET(MODE_ALTSCREEN) ? rangeY(insertOff-histOff):0, h=rows()-term.row;
245 | if (!posLin || posLin==h || !h) strcpy(posBuffer, posLin ? " [BOT] " : " [TOP] ");
246 | else sprintf(posBuffer, " % 3d%c ", min(100, max(0, (int)(.5 + posLin * 100. / h))),'%');
247 | if ((overlay || overlay!=prevOverlay) && term.col>9 && term.row>4) {
248 | if (!term.dirty[term.row-1]) xdrawline(term.line[term.row-1], term.col*2/3, term.row-1, term.col-1);
249 | if (!term.dirty[term.row-2]) xdrawline(term.line[term.row-2], term.col*2/3, term.row-2, term.col-1);
250 | }
251 | if (result==finish) altToggle = 0;
252 | if (altToggle != prevAltToggle) tswapscreen();
253 | end:
254 | historyOpToggle(-1, 1);
255 | return result;
256 | }
257 |
258 | void historyOverlay(int x, int y, Glyph* g) {
259 | if (!histMode) return;
260 | TCursor const *cHist = histOp ? &term.c : &c[0];
261 | if(overlay && term.col > 9 && term.row > 4 && (x > (2*term.col/3)) && (y >= (term.row-2))) {
262 | *g = (y == term.row - 2) ? styleSearch : styleCmd;
263 | if (y == term.row-2) getChar(&searchStr, g, term.row-2, term.col-2, term.col/3, x);
264 | else if (x > term.col - 7) g->u = (Rune)(posBuffer[x - term.col + 7]);
265 | else getChar(size(&cCmd) ?&cCmd :&lCmd, g, term.row-1, term.col-7, term.col/3-6, x);
266 | } else if (highlighted(x, y)) g->bg = highlightBg, g->fg = highlightFg;
267 | else if ((x==cHist->x) ^ (y==cHist->y)) g->bg = currentBg;
268 | else if (x==cHist->x) g->mode^=ATTR_REVERSE;
269 | }
270 | void historyPreDraw() {
271 | static Pos op = {.p={0, 0, 0}};
272 | historyOpToggle(1, 0);
273 | // Draw the cursor cross if changed
274 | if (term.c.y >= term.row || op.p[1] >= term.row) tfulldirt();
275 | else if (exited || (op.p[1] != term.c.y)) term.dirty[term.c.y] = term.dirty[op.p[1]] = 1;
276 | for (int i=0; (exited || term.c.x != op.p[0]) && i {} }:
2 |
3 | pkgs.mkShell {
4 | nativeBuildInputs = with pkgs; [ pkgconfig xorg.libX11 xorg.libXft fontconfig harfbuzz ];
5 | }
6 |
--------------------------------------------------------------------------------
/cfgs/st/st-copyout:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Using external pipe with st, give a dmenu prompt of recent commands,
3 | # allowing the user to copy the output of one.
4 | # xclip required for this script.
5 | # By Jaywalker and Luke
6 | tmpfile=$(mktemp /tmp/st-cmd-output.XXXXXX)
7 | trap 'rm "$tmpfile"' 0 1 15
8 | sed -n "w $tmpfile"
9 | sed -i 's/\x0//g' "$tmpfile"
10 | ps1="$(grep "\S" "$tmpfile" | tail -n 1 | sed 's/^\s*//' | cut -d' ' -f1)"
11 | chosen="$(grep -F "$ps1" "$tmpfile" | sed '$ d' | tac | dmenu -p "Copy which command's output?" -i -l 10 | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
12 | eps1="$(echo "$ps1" | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
13 | awk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" "$tmpfile" | xclip -selection clipboard
14 |
--------------------------------------------------------------------------------
/cfgs/st/st.1:
--------------------------------------------------------------------------------
1 | .TH ST 1 st\-VERSION
2 | .SH NAME
3 | st \- simple terminal (Luke Smith (https://lukesmith.xyz)'s build)
4 | .SH SYNOPSIS
5 | .B st
6 | .RB [ \-aiv ]
7 | .RB [ \-c
8 | .IR class ]
9 | .RB [ \-f
10 | .IR font ]
11 | .RB [ \-g
12 | .IR geometry ]
13 | .RB [ \-n
14 | .IR name ]
15 | .RB [ \-o
16 | .IR iofile ]
17 | .RB [ \-T
18 | .IR title ]
19 | .RB [ \-t
20 | .IR title ]
21 | .RB [ \-l
22 | .IR line ]
23 | .RB [ \-w
24 | .IR windowid ]
25 | .RB [[ \-e ]
26 | .IR command
27 | .RI [ arguments ...]]
28 | .PP
29 | .B st
30 | .RB [ \-aiv ]
31 | .RB [ \-c
32 | .IR class ]
33 | .RB [ \-f
34 | .IR font ]
35 | .RB [ \-g
36 | .IR geometry ]
37 | .RB [ \-n
38 | .IR name ]
39 | .RB [ \-o
40 | .IR iofile ]
41 | .RB [ \-T
42 | .IR title ]
43 | .RB [ \-t
44 | .IR title ]
45 | .RB [ \-w
46 | .IR windowid ]
47 | .RB \-l
48 | .IR line
49 | .RI [ stty_args ...]
50 | .SH DESCRIPTION
51 | .B st
52 | is a simple terminal emulator.
53 | .SH OPTIONS
54 | .TP
55 | .B \-a
56 | disable alternate screens in terminal
57 | .TP
58 | .BI \-c " class"
59 | defines the window class (default $TERM).
60 | .TP
61 | .BI \-f " font"
62 | defines the
63 | .I font
64 | to use when st is run.
65 | .TP
66 | .BI \-g " geometry"
67 | defines the X11 geometry string.
68 | The form is [=][{xX}][{+-}{+-}]. See
69 | .BR XParseGeometry (3)
70 | for further details.
71 | .TP
72 | .B \-i
73 | will fixate the position given with the -g option.
74 | .TP
75 | .BI \-n " name"
76 | defines the window instance name (default $TERM).
77 | .TP
78 | .BI \-o " iofile"
79 | writes all the I/O to
80 | .I iofile.
81 | This feature is useful when recording st sessions. A value of "-" means
82 | standard output.
83 | .TP
84 | .BI \-T " title"
85 | defines the window title (default 'st').
86 | .TP
87 | .BI \-t " title"
88 | defines the window title (default 'st').
89 | .TP
90 | .BI \-w " windowid"
91 | embeds st within the window identified by
92 | .I windowid
93 | .TP
94 | .BI \-l " line"
95 | use a tty
96 | .I line
97 | instead of a pseudo terminal.
98 | .I line
99 | should be a (pseudo-)serial device (e.g. /dev/ttyS0 on Linux for serial port
100 | 0).
101 | When this flag is given
102 | remaining arguments are used as flags for
103 | .BR stty(1).
104 | By default st initializes the serial line to 8 bits, no parity, 1 stop bit
105 | and a 38400 baud rate. The speed is set by appending it as last argument
106 | (e.g. 'st -l /dev/ttyS0 115200'). Arguments before the last one are
107 | .BR stty(1)
108 | flags. If you want to set odd parity on 115200 baud use for example 'st -l
109 | /dev/ttyS0 parenb parodd 115200'. Set the number of bits by using for
110 | example 'st -l /dev/ttyS0 cs7 115200'. See
111 | .BR stty(1)
112 | for more arguments and cases.
113 | .TP
114 | .B \-v
115 | prints version information to stderr, then exits.
116 | .TP
117 | .BI \-e " command " [ " arguments " "... ]"
118 | st executes
119 | .I command
120 | instead of the shell. If this is used it
121 | .B must be the last option
122 | on the command line, as in xterm / rxvt.
123 | This option is only intended for compatibility,
124 | and all the remaining arguments are used as a command
125 | even without it.
126 | .SH SHORTCUTS
127 | .TP
128 | .B Alt-j/k or Alt-Up/Down or Alt-Mouse Wheel
129 | Scroll up/down one line at a time.
130 | .TP
131 | .B Alt-u/d or Alt-Page Up/Page Down
132 | Scroll up/down one screen at a time.
133 | .TP
134 | .B Alt-Shift-k/j or Alt-Shift-Page Up/Page Down or Alt-Shift-Mouse Wheel
135 | Increase or decrease font size.
136 | .TP
137 | .B Alt-Home
138 | Reset to default font size.
139 | .TP
140 | .B Shift-Insert or Alt-v
141 | Paste from clipboard.
142 | .TP
143 | .B Alt-c
144 | Copy to clipboard.
145 | .TP
146 | .B Alt-p
147 | Paste/input primary selection.
148 | .TP
149 | .B Alt-l
150 | Show dmenu menu of all URLs on screen and choose one to open.
151 | .TP
152 | .B Alt-y
153 | Show dmenu menu of all URLs on screen and choose one to copy.
154 | .TP
155 | .B Alt-o
156 | Show dmenu menu of all recently run commands and copy the output of the chosen command to the clipboard.
157 | .I xclip
158 | required.
159 | .TP
160 | .B Alt-a/s
161 | Increase or decrease opacity/alpha value (make window more or less transparent).
162 | .TP
163 | .B Break
164 | Send a break in the serial line.
165 | Break key is obtained in PC keyboards
166 | pressing at the same time control and pause.
167 | .TP
168 | .B Ctrl-Print Screen
169 | Toggle if st should print to the
170 | .I iofile.
171 | .TP
172 | .B Shift-Print Screen
173 | Print the full screen to the
174 | .I iofile.
175 | .TP
176 | .B Print Screen
177 | Print the selection to the
178 | .I iofile.
179 | .TP
180 | .B Alt-Ctrl
181 | Launch dmenu to enter a unicode codepoint and send the corresponding glyph
182 | to st.
183 | .SH CUSTOMIZATION
184 | .B st
185 | can be customized by creating a custom config.h and (re)compiling the source
186 | code. This keeps it fast, secure and simple.
187 | .SH AUTHORS
188 | See the LICENSE file for the authors.
189 | .SH LICENSE
190 | See the LICENSE file for the terms of redistribution.
191 | .SH SEE ALSO
192 | .BR tabbed (1),
193 | .BR utmp (1),
194 | .BR stty (1)
195 | .SH BUGS
196 | See the TODO file in the distribution.
197 |
198 |
--------------------------------------------------------------------------------
/cfgs/st/st.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Type=Application
3 | Name=st
4 | Comment=simple-terminal emulator for X
5 | Icon=utilities-terminal
6 | Exec=st
7 | Categories=System;TerminalEmulator
8 |
--------------------------------------------------------------------------------
/cfgs/st/st.h:
--------------------------------------------------------------------------------
1 | /* See LICENSE for license details. */
2 |
3 | #include
4 | #include
5 |
6 | /* macros */
7 | #define MIN(a, b) ((a) < (b) ? (a) : (b))
8 | #define MAX(a, b) ((a) < (b) ? (b) : (a))
9 | #define LEN(a) (sizeof(a) / sizeof(a)[0])
10 | #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b))
11 | #define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d))
12 | #define DEFAULT(a, b) (a) = (a) ? (a) : (b)
13 | #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
14 | #define ATTRCMP(a, b) (((a).mode & (~ATTR_WRAP) & (~ATTR_LIGA)) != ((b).mode & (~ATTR_WRAP) & (~ATTR_LIGA)) || \
15 | (a).fg != (b).fg || \
16 | (a).bg != (b).bg)
17 | #define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \
18 | (t1.tv_nsec-t2.tv_nsec)/1E6)
19 | #define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit)))
20 |
21 | #define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b))
22 | #define IS_TRUECOL(x) (1 << 24 & (x))
23 |
24 | enum glyph_attribute {
25 | ATTR_NULL = 0,
26 | ATTR_BOLD = 1 << 0,
27 | ATTR_FAINT = 1 << 1,
28 | ATTR_ITALIC = 1 << 2,
29 | ATTR_UNDERLINE = 1 << 3,
30 | ATTR_BLINK = 1 << 4,
31 | ATTR_REVERSE = 1 << 5,
32 | ATTR_INVISIBLE = 1 << 6,
33 | ATTR_STRUCK = 1 << 7,
34 | ATTR_WRAP = 1 << 8,
35 | ATTR_WIDE = 1 << 9,
36 | ATTR_WDUMMY = 1 << 10,
37 | ATTR_BOXDRAW = 1 << 11,
38 | ATTR_LIGA = 1 << 12,
39 | ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT,
40 | };
41 |
42 | enum drawing_mode {
43 | DRAW_NONE = 0,
44 | DRAW_BG = 1 << 0,
45 | DRAW_FG = 1 << 1,
46 | };
47 |
48 | enum selection_mode {
49 | SEL_IDLE = 0,
50 | SEL_EMPTY = 1,
51 | SEL_READY = 2
52 | };
53 |
54 | enum selection_type {
55 | SEL_REGULAR = 1,
56 | SEL_RECTANGULAR = 2
57 | };
58 |
59 | enum selection_snap {
60 | SNAP_WORD = 1,
61 | SNAP_LINE = 2
62 | };
63 |
64 | typedef unsigned char uchar;
65 | typedef unsigned int uint;
66 | typedef unsigned long ulong;
67 | typedef unsigned short ushort;
68 |
69 | typedef uint_least32_t Rune;
70 |
71 | #define Glyph Glyph_
72 | typedef struct {
73 | Rune u; /* character code */
74 | ushort mode; /* attribute flags */
75 | uint32_t fg; /* foreground */
76 | uint32_t bg; /* background */
77 | } Glyph;
78 |
79 | typedef Glyph *Line;
80 |
81 | typedef union {
82 | int i;
83 | uint ui;
84 | float f;
85 | const void *v;
86 | } Arg;
87 |
88 | typedef struct {
89 | uint b;
90 | uint mask;
91 | void (*func)(const Arg *);
92 | const Arg arg;
93 | } MouseKey;
94 |
95 | void die(const char *, ...);
96 | void redraw(void);
97 | void draw(void);
98 |
99 | void externalpipe(const Arg *);
100 | void iso14755(const Arg *);
101 | void kscrolldown(const Arg *);
102 | void kscrollup(const Arg *);
103 | void newterm(const Arg *);
104 | void printscreen(const Arg *);
105 | void printsel(const Arg *);
106 | void sendbreak(const Arg *);
107 | void toggleprinter(const Arg *);
108 |
109 | int tattrset(int);
110 | int tisaltscr(void);
111 | void tnew(int, int);
112 | void tresize(int, int);
113 | void tsetdirtattr(int);
114 | void ttyhangup(void);
115 | int ttynew(char *, char *, char *, char **);
116 | size_t ttyread(void);
117 | void ttyresize(int, int);
118 | void ttywrite(const char *, size_t, int);
119 |
120 | void resettitle(void);
121 |
122 | void selclear(void);
123 | void selinit(void);
124 | void selstart(int, int, int);
125 | void selextend(int, int, int, int);
126 | int selected(int, int);
127 | char *getsel(void);
128 |
129 | size_t utf8encode(Rune, char *);
130 |
131 | void *xmalloc(size_t);
132 | void *xrealloc(void *, size_t);
133 | char *xstrdup(char *);
134 |
135 | int isboxdraw(Rune);
136 | ushort boxdrawindex(const Glyph *);
137 | #ifdef XFT_VERSION
138 | /* only exposed to x.c, otherwise we'll need Xft.h for the types */
139 | void boxdraw_xinit(Display *, Colormap, XftDraw *, Visual *);
140 | void drawboxes(int, int, int, int, XftColor *, XftColor *, const XftGlyphFontSpec *, int);
141 | #endif
142 |
143 | /* config.h globals */
144 | extern char *utmp;
145 | extern char *stty_args;
146 | extern char *vtiden;
147 | extern wchar_t *worddelimiters;
148 | extern int allowaltscreen;
149 | extern char *termname;
150 | extern unsigned int tabspaces;
151 | extern unsigned int defaultfg;
152 | extern unsigned int defaultbg;
153 | extern unsigned int defaultcs;
154 | extern const int boxdraw, boxdraw_bold, boxdraw_braille;
155 | extern float alpha;
156 | extern MouseKey mkeys[];
157 | extern int ximspot_update_interval;
158 |
--------------------------------------------------------------------------------
/cfgs/st/st.info:
--------------------------------------------------------------------------------
1 | st| simpleterm,
2 | acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
3 | am,
4 | bce,
5 | bel=^G,
6 | blink=\E[5m,
7 | bold=\E[1m,
8 | cbt=\E[Z,
9 | cvvis=\E[?25h,
10 | civis=\E[?25l,
11 | clear=\E[H\E[2J,
12 | cnorm=\E[?12l\E[?25h,
13 | colors#8,
14 | cols#80,
15 | cr=^M,
16 | csr=\E[%i%p1%d;%p2%dr,
17 | cub=\E[%p1%dD,
18 | cub1=^H,
19 | cud1=^J,
20 | cud=\E[%p1%dB,
21 | cuf1=\E[C,
22 | cuf=\E[%p1%dC,
23 | cup=\E[%i%p1%d;%p2%dH,
24 | cuu1=\E[A,
25 | cuu=\E[%p1%dA,
26 | dch=\E[%p1%dP,
27 | dch1=\E[P,
28 | dim=\E[2m,
29 | dl=\E[%p1%dM,
30 | dl1=\E[M,
31 | ech=\E[%p1%dX,
32 | ed=\E[J,
33 | el=\E[K,
34 | el1=\E[1K,
35 | enacs=\E)0,
36 | flash=\E[?5h$<80/>\E[?5l,
37 | fsl=^G,
38 | home=\E[H,
39 | hpa=\E[%i%p1%dG,
40 | hs,
41 | ht=^I,
42 | hts=\EH,
43 | ich=\E[%p1%d@,
44 | il1=\E[L,
45 | il=\E[%p1%dL,
46 | ind=^J,
47 | indn=\E[%p1%dS,
48 | invis=\E[8m,
49 | is2=\E[4l\E>\E[?1034l,
50 | it#8,
51 | kel=\E[1;2F,
52 | ked=\E[1;5F,
53 | ka1=\E[1~,
54 | ka3=\E[5~,
55 | kc1=\E[4~,
56 | kc3=\E[6~,
57 | kbs=\177,
58 | kcbt=\E[Z,
59 | kb2=\EOu,
60 | kcub1=\EOD,
61 | kcud1=\EOB,
62 | kcuf1=\EOC,
63 | kcuu1=\EOA,
64 | kDC=\E[3;2~,
65 | kent=\EOM,
66 | kEND=\E[1;2F,
67 | kIC=\E[2;2~,
68 | kNXT=\E[6;2~,
69 | kPRV=\E[5;2~,
70 | kHOM=\E[1;2H,
71 | kLFT=\E[1;2D,
72 | kRIT=\E[1;2C,
73 | kind=\E[1;2B,
74 | kri=\E[1;2A,
75 | kclr=\E[3;5~,
76 | kdl1=\E[3;2~,
77 | kdch1=\E[3~,
78 | kich1=\E[2~,
79 | kend=\E[4~,
80 | kf1=\EOP,
81 | kf2=\EOQ,
82 | kf3=\EOR,
83 | kf4=\EOS,
84 | kf5=\E[15~,
85 | kf6=\E[17~,
86 | kf7=\E[18~,
87 | kf8=\E[19~,
88 | kf9=\E[20~,
89 | kf10=\E[21~,
90 | kf11=\E[23~,
91 | kf12=\E[24~,
92 | kf13=\E[1;2P,
93 | kf14=\E[1;2Q,
94 | kf15=\E[1;2R,
95 | kf16=\E[1;2S,
96 | kf17=\E[15;2~,
97 | kf18=\E[17;2~,
98 | kf19=\E[18;2~,
99 | kf20=\E[19;2~,
100 | kf21=\E[20;2~,
101 | kf22=\E[21;2~,
102 | kf23=\E[23;2~,
103 | kf24=\E[24;2~,
104 | kf25=\E[1;5P,
105 | kf26=\E[1;5Q,
106 | kf27=\E[1;5R,
107 | kf28=\E[1;5S,
108 | kf29=\E[15;5~,
109 | kf30=\E[17;5~,
110 | kf31=\E[18;5~,
111 | kf32=\E[19;5~,
112 | kf33=\E[20;5~,
113 | kf34=\E[21;5~,
114 | kf35=\E[23;5~,
115 | kf36=\E[24;5~,
116 | kf37=\E[1;6P,
117 | kf38=\E[1;6Q,
118 | kf39=\E[1;6R,
119 | kf40=\E[1;6S,
120 | kf41=\E[15;6~,
121 | kf42=\E[17;6~,
122 | kf43=\E[18;6~,
123 | kf44=\E[19;6~,
124 | kf45=\E[20;6~,
125 | kf46=\E[21;6~,
126 | kf47=\E[23;6~,
127 | kf48=\E[24;6~,
128 | kf49=\E[1;3P,
129 | kf50=\E[1;3Q,
130 | kf51=\E[1;3R,
131 | kf52=\E[1;3S,
132 | kf53=\E[15;3~,
133 | kf54=\E[17;3~,
134 | kf55=\E[18;3~,
135 | kf56=\E[19;3~,
136 | kf57=\E[20;3~,
137 | kf58=\E[21;3~,
138 | kf59=\E[23;3~,
139 | kf60=\E[24;3~,
140 | kf61=\E[1;4P,
141 | kf62=\E[1;4Q,
142 | kf63=\E[1;4R,
143 | khome=\E[1~,
144 | kil1=\E[2;5~,
145 | krmir=\E[2;2~,
146 | knp=\E[6~,
147 | kmous=\E[M,
148 | kpp=\E[5~,
149 | lines#24,
150 | mir,
151 | msgr,
152 | npc,
153 | op=\E[39;49m,
154 | pairs#64,
155 | mc0=\E[i,
156 | mc4=\E[4i,
157 | mc5=\E[5i,
158 | rc=\E8,
159 | rev=\E[7m,
160 | ri=\EM,
161 | ritm=\E[23m,
162 | rmacs=\E(B,
163 | rmcup=\E[?1049l,
164 | rmir=\E[4l,
165 | rmkx=\E[?1l\E>,
166 | rmso=\E[27m,
167 | rmul=\E[24m,
168 | rs1=\Ec,
169 | rs2=\E[4l\E>\E[?1034l,
170 | sc=\E7,
171 | setab=\E[4%p1%dm,
172 | setaf=\E[3%p1%dm,
173 | setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
174 | setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
175 | sgr0=\E[0m,
176 | sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
177 | sitm=\E[3m,
178 | smacs=\E(0,
179 | smcup=\E[?1049h,
180 | smir=\E[4h,
181 | smkx=\E[?1h\E=,
182 | smso=\E[7m,
183 | smul=\E[4m,
184 | tbc=\E[3g,
185 | tsl=\E]0;,
186 | xenl,
187 | vpa=\E[%i%p1%dd,
188 | # XTerm extensions
189 | rmxx=\E[29m,
190 | smxx=\E[9m,
191 | # tmux extensions, see TERMINFO EXTENSIONS in tmux(1)
192 | Tc,
193 | Ms=\E]52;%p1%s;%p2%s\007,
194 | Se=\E[2 q,
195 | Ss=\E[%p1%d q,
196 |
197 | st-256color| simpleterm with 256 colors,
198 | use=st,
199 | ccc,
200 | colors#256,
201 | oc=\E]104\007,
202 | pairs#32767,
203 | # Nicked from xterm-256color
204 | initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
205 | setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
206 | setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
207 |
208 | st-meta| simpleterm with meta key,
209 | use=st,
210 | km,
211 | rmm=\E[?1034l,
212 | smm=\E[?1034h,
213 | rs2=\E[4l\E>\E[?1034h,
214 | is2=\E[4l\E>\E[?1034h,
215 |
216 | st-meta-256color| simpleterm with meta key and 256 colors,
217 | use=st-256color,
218 | km,
219 | rmm=\E[?1034l,
220 | smm=\E[?1034h,
221 | rs2=\E[4l\E>\E[?1034h,
222 | is2=\E[4l\E>\E[?1034h,
223 |
--------------------------------------------------------------------------------
/cfgs/st/st.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/cfgs/st/st.o
--------------------------------------------------------------------------------
/cfgs/st/utils.h:
--------------------------------------------------------------------------------
1 | /// Dynamic memory-chunk, with (1) datatype size, (2/3) initialized / allocated chunk, (4) content
2 | typedef struct { uint8_t const elSize; uint32_t init, alloc; char* content; } DynamicArray;
3 | #define UTF8_ARRAY {4, 0, 0, NULL}
4 |
5 | static inline int p_alloc(DynamicArray *s, uint32_t amount) {
6 | uint32_t const diff=s->init+s->elSize*amount-s->alloc, nas=s->alloc+max(diff,15)*s->elSize;
7 | if (s->alloc < s->init + s->elSize * amount) {
8 | char* tmp = realloc(s->content, nas);
9 | if (!tmp) return 0;
10 | s->alloc = nas, s->content = tmp;
11 | }
12 | return 1;
13 | }
14 | static inline char *view(DynamicArray * s, uint32_t i) { return s->content + i*s->elSize; }
15 | static inline char *end(DynamicArray *s, uint32_t i) { return s->content +s->init-(i+1)*s->elSize; }
16 | static inline uint32_t getU32(DynamicArray* s, uint32_t i, int b) { return *((uint32_t*) (b ?view(s,i) :end(s,i))); }
17 | static char *expand(DynamicArray *s) { if (!p_alloc(s, 1)) return NULL; s->init += s->elSize; return end(s, 0); }
18 | static inline void pop(DynamicArray* s) { s->init -= s->elSize; }
19 | static inline void empty(DynamicArray* s) { s->init = 0; }
20 | static inline int size(DynamicArray const * s) { return s->init / s->elSize; }
21 | static inline void assign(DynamicArray* s, DynamicArray const *o) {
22 | if (p_alloc(s, size(o))) memcpy(s->content, o->content, (s->init=o->init));
23 | }
24 |
--------------------------------------------------------------------------------
/cfgs/st/win.h:
--------------------------------------------------------------------------------
1 | /* See LICENSE for license details. */
2 |
3 | enum win_mode {
4 | MODE_VISIBLE = 1 << 0,
5 | MODE_FOCUSED = 1 << 1,
6 | MODE_APPKEYPAD = 1 << 2,
7 | MODE_MOUSEBTN = 1 << 3,
8 | MODE_MOUSEMOTION = 1 << 4,
9 | MODE_REVERSE = 1 << 5,
10 | MODE_KBDLOCK = 1 << 6,
11 | MODE_HIDE = 1 << 7,
12 | MODE_APPCURSOR = 1 << 8,
13 | MODE_MOUSESGR = 1 << 9,
14 | MODE_8BIT = 1 << 10,
15 | MODE_BLINK = 1 << 11,
16 | MODE_FBLINK = 1 << 12,
17 | MODE_FOCUS = 1 << 13,
18 | MODE_MOUSEX10 = 1 << 14,
19 | MODE_MOUSEMANY = 1 << 15,
20 | MODE_BRCKTPASTE = 1 << 16,
21 | MODE_NUMLOCK = 1 << 17,
22 | MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\
23 | |MODE_MOUSEMANY,
24 | };
25 |
26 | void xbell(void);
27 | void xclipcopy(void);
28 | void xdrawcursor(int, int, Glyph, int, int, Glyph, Line, int);
29 | void xdrawline(Line, int, int, int);
30 | void xfinishdraw(void);
31 | void xloadcols(void);
32 | int xsetcolorname(int, const char *);
33 | void xsettitle(char *);
34 | int xsetcursor(int);
35 | void xsetmode(int, unsigned int);
36 | void xsetpointermotion(int);
37 | void xsetsel(char *);
38 | int xstartdraw(void);
39 | void xximspot(int, int);
40 | void xclearwin(void);
41 |
--------------------------------------------------------------------------------
/cfgs/st/world:
--------------------------------------------------------------------------------
1 | hello
2 |
--------------------------------------------------------------------------------
/cfgs/st/x.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/cfgs/st/x.o
--------------------------------------------------------------------------------
/cfgs/sxhkd/README.md:
--------------------------------------------------------------------------------
1 | # Sxhkdrc Config File 🌶️
2 |
3 | 
4 |
--------------------------------------------------------------------------------
/cfgs/sxhkd/sxhkdrc:
--------------------------------------------------------------------------------
1 | ##---------- Terminal ----------##
2 |
3 | # Terminal
4 | super + Return
5 | st
6 |
7 | ##------------ Apps Shortcuts -----------##
8 |
9 | # Launch Apps
10 | super + shift + d
11 | discord
12 |
13 | super + shift + f
14 | google-chrome-unstable
15 |
16 | super + shift + s
17 | env LD_PRELOAD=/usr/lib/spotify-adblock.so spotify %U
18 |
19 | super + shift + c
20 | flameshot gui
21 |
22 | super + space
23 | rofi -show drun
24 |
25 | ##---------- Bspwm ----------##
26 |
27 | # Brightness
28 | XF86MonBrightness{Up,Down}
29 | brightnessctl set 10{+,-}%
30 | # Volume
31 | XF86Audio{Raise,Lower}Volume
32 | sh ~/.config/eww/scripts/volume.sh {up,down}
33 | XF86AudioMute
34 | pamixer -t && sh ~/.config/eww/scripts/volume.sh
35 |
36 | # Reload Keybindings
37 | super + Escape
38 | pkill -USR1 -x sxhkd
39 |
40 | # Quit/Restart bspwm
41 | ctrl + alt + {q,r}
42 | bspc {quit,wm -r}
43 |
44 | # Close App
45 | super + c
46 | bspc node -c
47 |
48 | # kill
49 | super + shift + q
50 | xkill
51 |
52 | # Fullscreen or Monocle
53 | super + f
54 | bspc desktop -l next
55 |
56 | # Split horizontal, vertical or cancel
57 | super + {h,v,q}
58 | bspc node -p {east,south,cancel}
59 |
60 | # Preselect the ratio
61 | super + ctrl + {1-9}
62 | bspc node -o 0.{1-9}
63 |
64 | # Toggle beetwen floating & tiled
65 | super + shift + space
66 | bspc node -t {floating,tiled}
67 |
68 | # Pseudo Tiled & tiled mode
69 | super + {p,t}
70 | bspc node -t {pseudo_tiled,tiled}
71 |
72 | # Set the node flags
73 | super + ctrl + {m,x,y,z}
74 | bspc node -g {marked,locked,sticky,private}
75 |
76 | # Send the window to another edge of the screen
77 | super + {_,shift + }{Left,Down,Up,Right}
78 | bspc node -{f,s} {west,south,north,east}
79 |
80 | # Change focus to next window, including floating window
81 | alt + {_,shift + }Tab
82 | bspc node -f {next.local,prev.local}
83 |
84 | # Switch workspace
85 | ctrl + alt + {Left,Right}
86 | bspc desktop -f {prev.local,next.local}
87 |
88 | # Switch to last opened workspace
89 | super + {Tab,grave}
90 | bspc {node,desktop} -f last
91 |
92 | # Send focused window to another workspace
93 | super + {_,shift + }{1-8}
94 | bspc {desktop -f,node -d} '^{1-8}'
95 |
96 | # Expanding windows
97 | super + control + {Left,Right,Up,Down}
98 | bspc node -z {left -20 0,right 20 0,top 0 -20,bottom 0 20}
99 |
100 | ## Shrinking windows
101 | super + alt + {Left,Right,Up,Down}
102 | bspc node -z {left 20 0,right -20 0,top 0 20,bottom 0 -20}
103 |
104 | ## Move floating windows
105 | alt + shift + {Left,Down,Up,Right}
106 | bspc node -v {-20 0,0 20,0 -20,20 0}
107 |
108 | # Hide/Unhide Window
109 | super + shift + i
110 | winmask
111 |
112 | ##---------- EOF ----------##
113 |
--------------------------------------------------------------------------------
/wallpapers/7MYT0Mo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/7MYT0Mo.png
--------------------------------------------------------------------------------
/wallpapers/unknown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/unknown.png
--------------------------------------------------------------------------------
/wallpapers/wall2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/wall2.jpg
--------------------------------------------------------------------------------
/wallpapers/wallhaven-391eey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/wallhaven-391eey.png
--------------------------------------------------------------------------------
/wallpapers/wallhaven-49ydl1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/wallhaven-49ydl1.jpg
--------------------------------------------------------------------------------
/wallpapers/wallhaven-73zg19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/wallhaven-73zg19.png
--------------------------------------------------------------------------------
/wallpapers/wallhaven-83do1o.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/wallhaven-83do1o.jpg
--------------------------------------------------------------------------------
/wallpapers/wallhaven-nr2vg7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/wallhaven-nr2vg7.png
--------------------------------------------------------------------------------
/wallpapers/wallhaven-zxy2qo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/wallhaven-zxy2qo.jpg
--------------------------------------------------------------------------------
/wallpapers/wallpaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/wallpaper.jpg
--------------------------------------------------------------------------------
/wallpapers/yxzrIJv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bleyom/dotfiles/57be13151ee4d3d534f5c288243fe8cdf06bc63b/wallpapers/yxzrIJv.png
--------------------------------------------------------------------------------