├── .config └── custard │ ├── schemes │ └── in-love-with-a-ghost │ │ ├── Xresources │ │ ├── bars │ │ ├── bottom.zsh │ │ ├── start.sh │ │ └── top.zsh │ │ ├── cava │ │ └── start.sh │ ├── start.sh │ └── sxhkdrc ├── .wm ├── schemes │ ├── floral │ │ ├── Xresources │ │ ├── bars │ │ │ ├── await.sh │ │ │ ├── bottom.sh │ │ │ └── top.sh │ │ ├── compton.conf │ │ ├── setup.sh │ │ └── wallpaper.png │ └── sakura │ │ ├── Xresources │ │ ├── bars │ │ ├── await.sh │ │ ├── bottom.sh │ │ └── top.sh │ │ ├── compton.conf │ │ ├── configs │ │ └── st.config.h │ │ ├── setup.sh │ │ ├── wallpaper.gif │ │ └── wallpaper.webm ├── start.sh └── sxhkdrc ├── .xinit ├── LICENSE ├── README.md └── screenshots ├── 03:21:35_full.png ├── floral.png ├── image.png └── wb3lk5yahqt41.png /.config/custard/schemes/in-love-with-a-ghost/Xresources: -------------------------------------------------------------------------------- 1 | !Xcursor.theme: DMZ-White 2 | URxvt*font: -ypn-envypn-Medium-R-Normal--13-130-75-75-C-90-ISO8859-1,-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1 3 | URxvt*boldFont: -ypn-envypn-Medium-R-Normal--13-130-75-75-C-90-ISO8859-1,-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1 4 | URxvt.scrollBar: false 5 | 6 | ! special 7 | *.foreground: #e69e87 8 | *.background: #252422 9 | !#101214 10 | *.cursorColor: #e69e87 11 | 12 | ! black 13 | *.color0: #1d1b1c 14 | *.color8: #575c67 15 | 16 | ! red 17 | *.color1: #ca6c45 18 | *.color9: #81230d 19 | 20 | ! green 21 | *.color2: #697a29 22 | *.color10: #6e6c37 23 | 24 | ! yellow 25 | *.color3: #dcad2e 26 | *.color11: #d4ad21 27 | 28 | ! blue 29 | *.color4: #ffffff 30 | *.color12: #ffffff 31 | 32 | ! magenta 33 | *.color5: #ffffff 34 | *.color13: #ffffff 35 | 36 | ! cyan 37 | *.color6: #6c7c89 38 | *.color14: #869eac 39 | 40 | ! white 41 | *.color7: #dee5e0 42 | *.color15: #f5f6ee 43 | 44 | URxvt*highlightColor: #e69e87 45 | URxvt*highlightTextColor: #252422 46 | 47 | URxvt.perl-lib: /home/sweets/.urxvt-util/ 48 | URxvt.perl-ext-common: default,unichr,-selection 49 | ! URxvt.perl-ext-common: default,clipboard,matcher,unichr,-selection 50 | URxvt.iso14755: False 51 | URxvt.iso14755_52: False 52 | URxvt.internalBorder: 32 53 | 54 | URxvt.keysym.Shift-Control-C: perl:clipboard:copy 55 | URxvt.keysym.Shift-Control-V: perl:clipboard:paste 56 | URxvt.clipboard.copycmd: xclip -selection clipboard -i 57 | URxvt.clipboard.pastecmd: xclip -selection clipboard -o 58 | 59 | ! Window manager configuration 60 | 61 | custard.rows: 8 62 | custard.columns: 6 63 | 64 | custard.border_type: Triple 65 | custard.border_size: 3 66 | 67 | custard.focused_color: #bc7252 68 | custard.unfocused_color: #80746f 69 | custard.background_color: #252422 70 | 71 | custard.margin: 32 72 | 73 | custard.margin_top: 32 74 | custard.margin_bottom: 32 75 | custard.margin_left: 0 76 | custard.margin_right: 0 77 | 78 | custard.workspaces: 5 79 | -------------------------------------------------------------------------------- /.config/custard/schemes/in-love-with-a-ghost/bars/bottom.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | geometry="1920x32+0+0" 4 | background_color="#252422" 5 | foreground_color="#80746f" 6 | font="-ypn-envypn-Medium-R-Normal--13-130-75-75-c-90-iso8859-1" 7 | #font="-lucy-tewi-Medium-R-Normal--11-90-75-75-p-58-iso10646-1" 8 | iconic_font="-Wuncon-Siji-Medium-R-Normal--10-100-75-75-c-80-iso10646-1" 9 | 10 | getsong() { 11 | 12 | completion_color="#bc7252" 13 | paused_color="$foreground_color" 14 | 15 | delimiter=" - " 16 | 17 | song_string=$(mpc current -f "[%title%$delimiter%artist%|%file%] ") 18 | song_status=$(mpc status | awk -F "[][]" 'NR==2{print $2}') 19 | 20 | percentage=$(mpc | grep -o "(.*%)") 21 | percentage=${percentage:1:-2} 22 | 23 | total_length=${#song_string} 24 | n_colored=$(( $(($percentage * $total_length)) / 100 )) 25 | 26 | output="" 27 | 28 | if [[ "$song_status" == "paused" ]] 29 | then 30 | 31 | output="%{F$paused_color}$song_string" 32 | 33 | else 34 | 35 | output="%{F$completion_color}" 36 | 37 | for (( index=0; index<$total_length; index++ )) 38 | do 39 | 40 | if [[ "$index" == "$n_colored" ]] 41 | then 42 | output="${output}%{F-}" 43 | fi 44 | 45 | output="${output}${song_string:$index:1}" 46 | 47 | done 48 | 49 | fi 50 | 51 | echo "$output%{F-}" 52 | 53 | } 54 | 55 | getwindows() { 56 | windows=$(lsw) 57 | namestr="" 58 | 59 | if [[ "$windows" != "" ]] 60 | then 61 | while IFS="\n" read arr 62 | do 63 | for i in $arr[@] 64 | do 65 | name=$(xprop -id $i | grep "WM_COMMAND" | awk '{print $4}') 66 | # Using xprop for the "name" (I realize WM_COMMAND isn't the name, but 67 | # for some reason windows names just disappear into thin air after a while) 68 | name="${name:1:-1}" 69 | if [[ "$i" == "$(pfw)" ]] 70 | then 71 | name="%{F#bc7252}$name%{F#80746f}" 72 | fi 73 | namestr="$namestr $name" 74 | done 75 | done <<< $windows 76 | fi 77 | echo $namestr 78 | 79 | } 80 | 81 | bar() { 82 | while [[ true ]] 83 | do 84 | printf "%s\n" " $(getwindows)%{r}$(getsong)" 85 | sleep 0.5 86 | done 87 | } 88 | 89 | bar | lemonbar -d -B "$background_color" -F "$foreground_color" -f "$iconic_font" -f "$font" -g "$geometry" -b | sh 90 | 91 | -------------------------------------------------------------------------------- /.config/custard/schemes/in-love-with-a-ghost/bars/start.sh: -------------------------------------------------------------------------------- 1 | 2 | sleep 2 # dammit urxvt! 3 | cd /users/sweets/.config/custard/schemes/in-love-with-a-ghost/bars 4 | 5 | zsh ./top.zsh & 6 | zsh ./bottom.zsh & 7 | -------------------------------------------------------------------------------- /.config/custard/schemes/in-love-with-a-ghost/bars/top.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | geometry="1920x32+0+0" 4 | background_color="#252422" 5 | foreground_color="#80746f" 6 | font="-ypn-envypn-Medium-R-Normal--13-130-75-75-c-90-iso8859-1" 7 | #font="-lucy-tewi-Medium-R-Normal--11-90-75-75-p-58-iso10646-1" 8 | iconic_font="-Wuncon-Siji-Medium-R-Normal--10-100-75-75-c-80-iso10646-1" 9 | 10 | getws() { 11 | wsa="" 12 | currentws=$(xprop -root | grep "_NET_CURRENT_DESKTOP(CARDINAL)" | awk '{print $3}') 13 | numws=$(xprop -root | grep "_NET_NUMBER_OF_DESKTOPS(CARDINAL)" | awk '{print $3}') 14 | 15 | i=0 16 | 17 | icon="" 18 | 19 | while [[ "$(($i < $numws))" == "1" ]] 20 | do 21 | if [[ "$i" == "$currentws" ]] 22 | then 23 | wsa="$wsa%{F#bc7252}$icon%{F#80746f}" 24 | else 25 | wsa="$wsa$icon" 26 | fi 27 | i=$(($i + 1)) 28 | done 29 | 30 | echo $wsa 31 | 32 | } 33 | 34 | wifi() { 35 | 36 | # First check if we're connected to anything 37 | 38 | icon="" 39 | SSID=$(iwconfig wlp2s0 | grep -o "ESSID:.*" | sed 's/ESSID://g') 40 | SSID="${SSID:0:-2}" 41 | 42 | if [[ "$SSID" != "off/any" ]] 43 | then 44 | 45 | SSID="${SSID:1:-1}" 46 | 47 | SIGNAL=$(nmcli -t -f signal,ssid dev wifi | grep "$SSID" | awk -F : '{print $1}') 48 | 49 | icon="%{F#bc7252}" 50 | 51 | if [[ "$(($SIGNAL > 75))" == "1" ]] 52 | then 53 | icon="$icon" 54 | elif [[ "$(($SIGNAL > 50))" == "1" ]] 55 | then 56 | icon="$icon" 57 | elif [[ "$(($SIGNAL > 25))" == "1" ]] 58 | then 59 | icon="$iconîˆ " 60 | else 61 | icon="$icon" 62 | fi 63 | 64 | icon="$icon%{F#80746f}" 65 | 66 | else 67 | fi 68 | 69 | echo $icon 70 | 71 | } 72 | 73 | volume() { 74 | 75 | icon="" 76 | 77 | vol=$(amixer get Master) 78 | 79 | frontleft=$(echo $vol | grep "Front Left:") 80 | frontright=$(echo $vol | grep "Front Right:") 81 | 82 | leftvol=$(echo $frontleft | awk '{print $5}') 83 | rightvol=$(echo $frontright | awk '{print $5}') 84 | 85 | leftstatus=$(echo $frontleft | awk '{print $6}') 86 | rightstatus=$(echo $frontright | awk '{print $6}') 87 | 88 | leftvol="${leftvol:1:-2}" 89 | rightvol="${rightvol:1:-2}" 90 | 91 | avg="" 92 | avg=$(( $(( $leftvol + $rightvol )) / 2 )) 93 | 94 | if [[ "$leftstatus" == "$rightstatus" && "$leftstatus" == "[on]" ]] 95 | then 96 | 97 | icon="%{F#bc7252}" 98 | 99 | if [[ "$(($avg > 67))" == "1" ]] 100 | then 101 | icon="$icon" 102 | elif [[ "$(($avg > 33))" == "1" ]] 103 | then 104 | icon="$icon" 105 | elif [[ "$(($avg > 0))" == "1" ]] 106 | then 107 | icon="$icon" 108 | else 109 | icon="$icon" 110 | fi 111 | 112 | icon="$icon%{F#80746f}" 113 | 114 | fi 115 | 116 | echo $icon 117 | 118 | } 119 | 120 | datetime() { 121 | 122 | echo "$(date +'%a %b %d, %H:%M') " 123 | 124 | } 125 | 126 | placeholder() { 127 | 128 | echo "%{A:urxvt:}%{A}" 129 | 130 | } 131 | 132 | bar() { 133 | while [[ true ]] 134 | do 135 | printf "%s\n" " $(getws)%{c}$(datetime)%{r}$(wifi) $(volume) " 136 | sleep 0.5 137 | done 138 | } 139 | 140 | bar | lemonbar -d -B "$background_color" -F "$foreground_color" -f "$iconic_font" -f "$font" -g "$geometry" | sh 141 | 142 | -------------------------------------------------------------------------------- /.config/custard/schemes/in-love-with-a-ghost/cava: -------------------------------------------------------------------------------- 1 | ## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting. 2 | 3 | 4 | [general] 5 | 6 | # Smoothing mode. Can be 'normal', 'scientific' or 'waves'. 7 | ; mode = normal 8 | 9 | # Accepts only non-negative values. 10 | framerate = 120 11 | 12 | # 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off 13 | # 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. 14 | autosens = 0 15 | overshoot = 0 16 | 17 | # Manual sensitivity in %. Autosens must be turned off for this to take effect. 18 | # 200 means double height. Accepts only non-negative values. 19 | sensitivity = 50 20 | 21 | # The number of bars (0-200). 0 sets it to auto (fill up console). 22 | # Bars' width and space between bars in number of characters. 23 | bars = 0 24 | bar_width = 1 25 | bar_spacing = 8 26 | 27 | 28 | # Lower and higher cutoff frequencies for lowest and highest bars 29 | # the bandwidth of the visualizer. 30 | # Note: there is a minimum total bandwidth of 43Mhz x number of bars. 31 | # Cava will automatically increase the higher cutoff if a too low band is specified. 32 | ; lower_cutoff_freq = 50 33 | ; higher_cutoff_freq = 10000 34 | 35 | 36 | 37 | [input] 38 | 39 | # Audio capturing method. Possible methods are: 'pulse', 'alsa' or 'fifo'. 40 | # Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with. 41 | # 42 | # All input methods uses the same config variable 'source' 43 | # to define where it should get the audio. 44 | # 45 | # For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink 46 | # (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them). 47 | # 48 | # For alsa 'source' will be the capture device. 49 | # For fifo 'source' will be the path to fifo-file. 50 | ; method = pulse 51 | ; source = auto 52 | 53 | ; method = alsa 54 | ; source = hw:Loopback,0 55 | 56 | method = fifo 57 | source = /tmp/mpd.fifo 58 | 59 | 60 | 61 | [output] 62 | 63 | # Ouput method. Can be 'ncurses', 'noncurses' or 'raw'. 64 | # 'noncurses' is for systems that does not suport ncurses. 65 | # 'raw' is a 16 bit data stream of the bar heights that can be used to send to other applications. 66 | # 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above. 67 | ; method = ncurses 68 | 69 | # Visual styles. Can be 'stereo' or 'mono'. 70 | # 'stereo' mirrors both channels with low frequencies in center. 71 | # 'mono' averages both channels and outputs left to right lowest to highest frequencies. 72 | style = stereo 73 | 74 | # Raw output target. A fifo will be created if target does not exist. 75 | ; raw_target = /dev/stdout 76 | 77 | # Raw data format. Can be 'binary' or 'ascii'. 78 | ; data_format = binary 79 | 80 | # Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530). 81 | ; bit_format = 16bit 82 | 83 | # Ascii max value. In 'ascii' mode range will run from 0 to value specified here 84 | ; ascii_max_range = 1000 85 | 86 | # Ascii delimiters. In ascii format each bar and frame is separated by a delimiters. 87 | # Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)). 88 | ; bar_delimiter = 59 89 | ; frame_delimiter = 10 90 | 91 | 92 | 93 | [color] 94 | 95 | # Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow. 96 | # Or defined by hex code '#xxxxxx' (hex code must be within ''). 97 | ; background = black 98 | foreground = '#252422' 99 | 100 | 101 | [smoothing] 102 | 103 | # Multiplier for the integral smoothing calculations. Takes values from 0-0.99. 104 | # Higher values means smoother, but less precise. Set to 0 to disable. 105 | ; integral = 99 106 | 107 | # Disables or enables the so-called "Monstercat smoothing". Set to 0 to disable. 108 | monstercat = 1 109 | 110 | # Set gravity multiplier for "drop off". Higher values means bars will drop faster. 111 | # Accepts only non-negative values. 0.5 means half gravity, 2 means double. Set to 0 to disable "drop off". 112 | gravity = 2 113 | 114 | 115 | # In bar height, bars that would have been lower that this will not be drawn. 116 | ; ignore = 0 117 | 118 | 119 | [eq] 120 | 121 | # This one is tricky. You can have as much keys as you want. 122 | # Remember to uncomment more then one key! More keys = more precision. 123 | # Look at readme.md on github for further explanations and examples. 124 | 125 | 1 = 1 126 | 2 = 1 127 | 3 = 1 128 | 4 = 1 129 | 5 = 1 130 | 6 = 1 131 | 7 = 1 132 | 8 = 1 133 | 9 = 1 134 | 10 = 1 135 | -------------------------------------------------------------------------------- /.config/custard/schemes/in-love-with-a-ghost/start.sh: -------------------------------------------------------------------------------- 1 | cd /users/sweets/.config/custard/schemes/in-love-with-a-ghost/ 2 | 3 | xset +fp /usr/share/fonts/envypn 4 | xset fp rehash 5 | 6 | xrdb -load ./Xresources 7 | hsetroot -solid '#f0f0f0' 8 | sh ./bars/start.sh & 9 | sleep 2 10 | urxvt -depth 32 -bg 'rgba:0000/0000/0000/0000' -geometry '274x78+0+36' -borderLess -override-redirect -internalBorder 0 -e cava -p ./cava & 11 | xsetroot -cursor_name left_ptr 12 | hsetroot -solid '#f0f0f0' -full ./wallpaper.jpg 13 | sleep 2 14 | compton --shadow-opacity 0 & 15 | -------------------------------------------------------------------------------- /.config/custard/start.sh: -------------------------------------------------------------------------------- 1 | 2 | scheme="$1" 3 | 4 | echo "" > /tmp/custard.log 5 | sh /users/sweets/.config/custard/schemes/$scheme/start.sh 6 | sxhkd -c /users/sweets/.config/custard/sxhkdrc & 7 | custard >> /tmp/custard.log 8 | -------------------------------------------------------------------------------- /.config/custard/sxhkdrc: -------------------------------------------------------------------------------- 1 | 2 | super + Return 3 | urxvt 4 | 5 | super + {Up,Down,Left,Right} 6 | echo "window move {up,down,left,right};" > /tmp/custard.fifo 7 | 8 | super + {KP_Down,KP_Right} 9 | echo "window grow {down,right};" > /tmp/custard.fifo 10 | 11 | super + {KP_Up,KP_Left} 12 | echo "window shrink {up,left};" > /tmp/custard.fifo 13 | 14 | super + {_,ctrl + ,alt +}{1-9,0} 15 | echo "workspace {focus,attach,detach} {1-9,10};" > /tmp/custard.fifo 16 | 17 | super + shift + {1-9,0} 18 | echo "window go to workspace {1-9,10};" > /tmp/custard.fifo 19 | 20 | Print 21 | nougat -fuc 22 | 23 | alt + Print 24 | nougat -uc 25 | 26 | super + plus 27 | echo "custard cycle focus forward;" > /tmp/custard.fifo 28 | 29 | super + minus 30 | echo "custard cycle focus backward;" > /tmp/custard.fifo 31 | 32 | super + w 33 | echo "window close;" > /tmp/custard.fifo 34 | 35 | Pause 36 | echo "custard stop;" > /tmp/custard.fifo 37 | 38 | F1 39 | amixer set Master toggle 40 | 41 | F2 42 | amixer set Master 5%- 43 | 44 | F3 45 | amixer set Master 5%+ 46 | 47 | F5 48 | mpc prev 49 | 50 | F6 51 | mpc toggle 52 | 53 | F7 54 | mpc next 55 | -------------------------------------------------------------------------------- /.wm/schemes/floral/Xresources: -------------------------------------------------------------------------------- 1 | custard.rows: 8 2 | custard.columns: 6 3 | 4 | custard.border_type: Triple 5 | custard.border_size: 3 6 | 7 | custard.focused_color: #656196 8 | custard.unfocused_color: #191719 9 | custard.background_color: #191719 10 | 11 | custard.margin: 32 12 | 13 | custard.margin_top: 32 14 | custard.margin_bottom: 32 15 | custard.margin_left: 0 16 | custard.margin_right: 0 17 | 18 | custard.workspaces: 5 19 | -------------------------------------------------------------------------------- /.wm/schemes/floral/bars/await.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | file="$1" 4 | cmd="${@:2}" 5 | 6 | exe_cmd(){ 7 | output=`sh -c "$@"` 8 | printf '%s\n' "$output" 9 | } 10 | 11 | awaitchange(){ 12 | 13 | original=`exe_cmd "$cmd"` 14 | newest="" 15 | 16 | waiting=true 17 | 18 | while [[ "$waiting" == "true" ]] 19 | do 20 | cat $file > /dev/null 21 | newest=`exe_cmd "$cmd"` 22 | 23 | if [[ "$newest" != "$original" ]] 24 | then 25 | waiting=false 26 | fi 27 | 28 | done 29 | 30 | printf '%s\n' "$newest" 31 | 32 | } 33 | 34 | run(){ 35 | mkfifo "$file" 36 | printf '%s\n' "`awaitchange "$cmd"`" 37 | rm "$file" 38 | } 39 | 40 | run 41 | -------------------------------------------------------------------------------- /.wm/schemes/floral/bars/bottom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | proc_dir="/tmp/lemonbar" 4 | 5 | background_color="#191719" 6 | foreground_color="#585258" 7 | highlight_color="#656196" 8 | 9 | font="-sweets-eclair-medium-r-normal--12-*-*-*-c-*-iso10646-1" 10 | iconic_font="-Wuncon-Siji-Medium-R-Normal--10-100-75-75-c-80-iso10646-1" 11 | 12 | geometry="1920x32+0+0" 13 | 14 | configuration="-d -b -B $background_color -F $foreground_color -f $iconic_font -f $font -g $geometry" 15 | 16 | ##### 17 | 18 | getsong() { 19 | 20 | last_value=`cat $proc_dir/mpd` 21 | 22 | completion_color=$highlight_color 23 | paused_color=$foreground_color 24 | 25 | delimiter=" - " 26 | 27 | song_string=`mpc current -f "[%artist%$delimiter%title%|%file%]"` 28 | song_status=`mpc status | awk -F "[][]" 'NR==2{print$2}'` 29 | 30 | percentage=`mpc | grep -o "(.*%)"` 31 | percentage=${percentage:1:-2} 32 | 33 | total_length=${#song_string} 34 | n_colored=$(( $(($percentage * $total_length)) / 100)) 35 | 36 | output="" 37 | 38 | if [[ "$song_status" == "paused" ]] 39 | then 40 | output="%{F$paused_color}$song_string" 41 | else 42 | output="%{F$completion_color}" 43 | 44 | for (( index=0; index<$total_length; index++ )) 45 | do 46 | 47 | if [[ "$index" == "$n_colored" ]] 48 | then 49 | output="$output%{F-}" 50 | fi 51 | 52 | output="$output${song_string:$index:1}" 53 | 54 | done 55 | fi 56 | 57 | output="%{A:mpc prev:}%{A}%{A:mpc toggle:} $output %{F$foreground_color}%{A}%{A:mpc next:}%{A} " 58 | 59 | if [[ "$last_value" != "$output" ]] 60 | then 61 | echo "$output" > $proc_dir/mpd 62 | fi 63 | } 64 | 65 | getwindow() { 66 | 67 | last_value=`cat $proc_dir/window` 68 | 69 | id=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}') 70 | output="" 71 | 72 | if [[ "$id" != "0x0" ]] 73 | then 74 | name=$(xprop -id $id | grep "_NET_WM_NAME" | awk '{$1=$2=""; print $0}') 75 | output="%{F$highlight_color}${name:3:-1}%{F$foreground_color}" 76 | fi 77 | 78 | if [[ "$last_value" != "$output" ]] 79 | then 80 | echo "$output" > $proc_dir/window 81 | fi 82 | } 83 | 84 | windowmpd(){ 85 | getsong 86 | getwindow 87 | sleep 0.5 88 | } 89 | 90 | bar_output(){ 91 | last_value=`cat $proc_dir/last_output_bottom` 92 | 93 | window=`cat $proc_dir/window` 94 | mpd=`cat $proc_dir/mpd` 95 | 96 | output=" $window%{r}$mpd " 97 | 98 | echo "$output" 99 | } 100 | 101 | initbar(){ 102 | mkfifo $proc_dir/vol_fifo 2> /dev/null 103 | touch $proc_dir/last_output_bottom 104 | touch $proc_dir/inet 105 | touch $proc_dir/vol 106 | touch $proc_dir/ws 107 | 108 | wrapper windowmpd & 109 | } 110 | 111 | ##### DO NOT EDIT ANYTHING BELOW THIS LINE 112 | 113 | wrapper(){ 114 | while [[ true ]] 115 | do 116 | echo "`$@`" > /dev/null 117 | echo 'update' > $proc_dir/fifo 118 | done 119 | } 120 | 121 | bar(){ 122 | 123 | mkdir -p $proc_dir 124 | mkfifo $proc_dir/fifo 2> /dev/null 125 | initbar 126 | 127 | while [[ true ]] 128 | do 129 | 130 | cat $proc_dir/fifo > /dev/null 131 | last_value=`cat $proc_dir/last_output_bottom` 132 | output=`bar_output` 133 | 134 | if [[ "$last_value" != "$output" ]] 135 | then 136 | printf '%s\n' "$output" 137 | echo "$output" > $proc_dir/last_output_bottom 138 | fi 139 | 140 | done 141 | 142 | } 143 | 144 | bar | lemonbar $configuration | sh 145 | 146 | -------------------------------------------------------------------------------- /.wm/schemes/floral/bars/top.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | proc_dir="/tmp/lemonbar" 4 | 5 | background_color="#191719" 6 | foreground_color="#585258" 7 | highlight_color="#656196" 8 | 9 | font="-sweets-eclair-medium-r-normal--12-*-*-*-c-*-iso10646-1" 10 | iconic_font="-Wuncon-Siji-Medium-R-Normal--10-100-75-75-c-80-iso10646-1" 11 | 12 | geometry="1920x32+0+0" 13 | 14 | configuration="-d -B $background_color -F $foreground_color -f $iconic_font -f $font -g $geometry" 15 | 16 | ##### 17 | 18 | getws(){ 19 | 20 | last_value=`cat $proc_dir/ws` 21 | 22 | output="" 23 | 24 | file="$proc_dir/ws_monitor" 25 | currentws=`sh /users/grace/.wm/schemes/floral/bars/await.sh $file "xprop -root | grep '_NET_CURRENT_DESKTOP(CARDINAL)'"` 26 | currentws=`echo "$currentws" | awk '{print $3}'` 27 | numws=$(xprop -root | grep "_NET_NUMBER_OF_DESKTOPS(CARDINAL)" | awk '{print $3}') 28 | 29 | echo "$currentws $numws" > /tmp/output 30 | 31 | index="0" 32 | 33 | icon="" 34 | 35 | while [[ "$(($index < $numws))" == "1" ]] 36 | do 37 | if [[ "$index" == "$currentws" ]] 38 | then 39 | output="$output%{F$highlight_color}$icon%{F$foreground_color}" 40 | else 41 | output="$output$icon" 42 | fi 43 | index=$(($index + 1)) 44 | done 45 | 46 | if [[ "$last_value" != "$output" ]] 47 | then 48 | echo "$output" > $proc_dir/ws 49 | fi 50 | 51 | } 52 | 53 | inet(){ 54 | 55 | last_value=`cat $proc_dir/inet` 56 | 57 | interface=$(ip route | head -n 1 | awk '{print $5}') 58 | 59 | if [[ "$interface" == 'enp3s0' ]] 60 | then 61 | 62 | icon="%{F$highlight_color}%{F$foreground_color}" 63 | 64 | else 65 | # Note: implement this 66 | echo '' > /dev/null 67 | 68 | fi 69 | 70 | if [[ "$last_value" != "$icon" ]] 71 | then 72 | echo "$icon" > $proc_dir/inet 73 | fi 74 | 75 | sleep 0.5 76 | 77 | } 78 | 79 | clock(){ 80 | echo "`date +'%a %b %d, %H:%M'`" > $proc_dir/clock 81 | sleep 60 82 | } 83 | 84 | quote(){ 85 | echo "%{F$highlight_color}You'll never find beauty if you don't first find change.%{F$foreground_color}" 86 | } 87 | 88 | volume(){ 89 | 90 | last_value=`cat $proc_dir/vol` 91 | 92 | file="$proc_dir/vol_monitor" 93 | vol=`sh /users/grace/.wm/schemes/floral/bars/await.sh $file "amixer get Master"` 94 | 95 | frontleft=$(echo -e "$vol" | grep "Front Left:") 96 | frontright=$(echo -e "$vol" | grep "Front Right:") 97 | 98 | leftvol=$(echo -e "$frontleft" | awk '{print $5}') 99 | rightvol=$(echo -e "$frontright" | awk '{print $5}') 100 | 101 | leftstatus=$(echo -e "$frontleft" | awk '{print $6}') 102 | rightstatus=$(echo -e "$frontright" | awk '{print $6}') 103 | 104 | leftvol="${leftvol:1:-2}" 105 | rightvol="${rightvol:1:-2}" 106 | 107 | avg="$(( $(( $leftvol + $rightvol )) / 2 ))" 108 | 109 | if [[ "$leftstatus" == "$rightstatus" && "$leftstatus" == "[on]" ]] 110 | then 111 | 112 | icon="%{F$highlight_color}" 113 | 114 | if [[ "$(($avg > 67))" == "1" ]] 115 | then 116 | icon="$icon" 117 | elif [[ "$(($avg > 33))" == "1" ]] 118 | then 119 | icon="$icon" 120 | elif [[ "$(($avg > 0))" == "1" ]] 121 | then 122 | icon="$icon" 123 | else 124 | icon="$icon" 125 | fi 126 | 127 | icon="$icon%{F$foreground_color}" 128 | 129 | else 130 | icon="" 131 | fi 132 | 133 | if [[ "$icon" != "$last_value" ]] 134 | then 135 | echo "$icon" > $proc_dir/vol 136 | fi 137 | 138 | } 139 | 140 | bar_output(){ 141 | 142 | con=`cat $proc_dir/inet` 143 | vol=`cat $proc_dir/vol` 144 | ws=`cat $proc_dir/ws` 145 | 146 | output=" $ws%{c}`quote`%{r}$con $vol " 147 | 148 | echo "$output" 149 | } 150 | 151 | initbar(){ 152 | mkfifo $proc_dir/vol_fifo 2> /dev/null 153 | touch $proc_dir/last_output_top 154 | touch $proc_dir/inet 155 | touch $proc_dir/vol 156 | touch $proc_dir/ws 157 | 158 | wrapper volume & 159 | wrapper inet & 160 | wrapper getws & 161 | } 162 | 163 | ##### DO NOT EDIT ANYTHING BELOW THIS LINE 164 | 165 | wrapper(){ 166 | while [[ true ]] 167 | do 168 | echo "`$@`" > /dev/null 169 | echo 'update' > $proc_dir/fifo 170 | done 171 | } 172 | 173 | bar(){ 174 | 175 | mkdir -p $proc_dir 176 | mkfifo $proc_dir/fifo 2> /dev/null 177 | initbar 178 | 179 | while [[ true ]] 180 | do 181 | 182 | cat $proc_dir/fifo > /dev/null 183 | 184 | last_value=`cat $proc_dir/last_output_top` 185 | output=`bar_output` 186 | 187 | if [[ "$last_value" != "$output" ]] 188 | then 189 | printf '%s\n' "$output" 190 | echo "$output" > $proc_dir/last_output_top 191 | fi 192 | 193 | done 194 | 195 | } 196 | 197 | bar | lemonbar $configuration | sh 198 | 199 | -------------------------------------------------------------------------------- /.wm/schemes/floral/compton.conf: -------------------------------------------------------------------------------- 1 | # Shadow 2 | shadow = true; 3 | shadow-opacity = 0.25; 4 | shadow-radius = 12; 5 | 6 | # Fading 7 | fading = true; 8 | fade-in-step = 0.05; 9 | fade-out-step = 0.05; 10 | 11 | # Optimizations 12 | backend = "glx"; 13 | 14 | sw-opti = true; 15 | #unredir-if-possible = true; 16 | #glx-no-stencil = true; 17 | #glx-no-rebind-pixemap = true; 18 | 19 | wintypes: 20 | { 21 | dock = { 22 | shadow = true; 23 | }; 24 | 25 | desktop = { 26 | shadow = false; 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /.wm/schemes/floral/setup.sh: -------------------------------------------------------------------------------- 1 | 2 | glava & 3 | sh /users/grace/.wm/schemes/floral/bars/top.sh & 4 | sh /users/grace/.wm/schemes/floral/bars/bottom.sh & 5 | feh --bg-scale /users/grace/.wm/schemes/floral/wallpaper.png 6 | compton --config /users/grace/.wm/schemes/floral/compton.conf & 7 | 8 | -------------------------------------------------------------------------------- /.wm/schemes/floral/wallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sweets/dotfiles/2addf341c704227c9f2c6182f422481c453b7998/.wm/schemes/floral/wallpaper.png -------------------------------------------------------------------------------- /.wm/schemes/sakura/Xresources: -------------------------------------------------------------------------------- 1 | 2 | custard.rows: 8 3 | custard.columns: 6 4 | 5 | custard.border_type: Triple 6 | custard.border_size: 3 7 | 8 | custard.focused_color: #9b3c52 9 | custard.unfocused_color: #191719 10 | custard.background_color: #191719 11 | 12 | custard.margin: 32 13 | 14 | custard.margin_top: 32 15 | custard.margin_bottom: 32 16 | custard.margin_left: 0 17 | custard.margin_right: 0 18 | 19 | custard.workspaces: 5 20 | -------------------------------------------------------------------------------- /.wm/schemes/sakura/bars/await.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | file="$1" 4 | cmd="${@:2}" 5 | 6 | exe_cmd(){ 7 | output=`sh -c "$@"` 8 | printf '%s\n' "$output" 9 | } 10 | 11 | awaitchange(){ 12 | 13 | original=`exe_cmd "$cmd"` 14 | newest="" 15 | 16 | waiting=true 17 | 18 | while [[ "$waiting" == "true" ]] 19 | do 20 | cat $file > /dev/null 21 | newest=`exe_cmd "$cmd"` 22 | 23 | if [[ "$newest" != "$original" ]] 24 | then 25 | waiting=false 26 | fi 27 | 28 | done 29 | 30 | printf '%s\n' "$newest" 31 | 32 | } 33 | 34 | run(){ 35 | mkfifo "$file" 36 | printf '%s\n' "`awaitchange "$cmd"`" 37 | rm "$file" 38 | } 39 | 40 | run 41 | -------------------------------------------------------------------------------- /.wm/schemes/sakura/bars/bottom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | proc_dir="/tmp/lemonbar" 4 | 5 | background_color="#191719" 6 | foreground_color="#585258" 7 | highlight_color="#de7a8c" 8 | 9 | font="-sweets-eclair-medium-r-normal--12-*-*-*-c-*-iso10646-1" 10 | iconic_font="-Wuncon-Siji-Medium-R-Normal--10-100-75-75-c-80-iso10646-1" 11 | 12 | geometry="1920x32+0+0" 13 | 14 | configuration="-d -b -B $background_color -F $foreground_color -f $iconic_font -f $font -g $geometry" 15 | 16 | ##### 17 | 18 | getsong() { 19 | 20 | last_value=`cat $proc_dir/mpd` 21 | 22 | completion_color=$highlight_color 23 | paused_color=$foreground_color 24 | 25 | delimiter=" - " 26 | 27 | song_string=`mpc current -f "[%artist%$delimiter%title%|%file%]"` 28 | song_status=`mpc status | awk -F "[][]" 'NR==2{print$2}'` 29 | 30 | percentage=`mpc | grep -o "(.*%)"` 31 | percentage=${percentage:1:-2} 32 | 33 | total_length=${#song_string} 34 | n_colored=$(( $(($percentage * $total_length)) / 100)) 35 | 36 | output="" 37 | 38 | if [[ "$song_status" == "paused" ]] 39 | then 40 | output="%{F$paused_color}$song_string" 41 | else 42 | output="%{F$completion_color}" 43 | 44 | for (( index=0; index<$total_length; index++ )) 45 | do 46 | 47 | if [[ "$index" == "$n_colored" ]] 48 | then 49 | output="$output%{F-}" 50 | fi 51 | 52 | output="$output${song_string:$index:1}" 53 | 54 | done 55 | fi 56 | 57 | output="%{A:mpc prev:}%{A}%{A:mpc toggle:} $output %{F$foreground_color}%{A}%{A:mpc next:}%{A}" 58 | 59 | if [[ "$last_value" != "$output" ]] 60 | then 61 | echo "$output" > $proc_dir/mpd 62 | fi 63 | } 64 | 65 | getwindow() { 66 | 67 | last_value=`cat $proc_dir/window` 68 | 69 | id=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}') 70 | output="" 71 | 72 | if [[ "$id" != "0x0" ]] 73 | then 74 | name=$(xprop -id $id | grep "_NET_WM_NAME" | awk '{$1=$2=""; print $0}') 75 | output="%{F$highlight_color}${name:3:-1}%{F$foreground_color}" 76 | fi 77 | 78 | if [[ "$last_value" != "$output" ]] 79 | then 80 | echo "$output" > $proc_dir/window 81 | fi 82 | } 83 | 84 | windowmpd(){ 85 | getsong 86 | getwindow 87 | sleep 0.5 88 | } 89 | 90 | bar_output(){ 91 | last_value=`cat $proc_dir/last_output_bottom` 92 | 93 | window=`cat $proc_dir/window` 94 | mpd=`cat $proc_dir/mpd` 95 | 96 | output=" $window%{r}$mpd " 97 | 98 | echo "$output" 99 | } 100 | 101 | initbar(){ 102 | mkfifo $proc_dir/vol_fifo 2> /dev/null 103 | touch $proc_dir/last_output_bottom 104 | touch $proc_dir/inet 105 | touch $proc_dir/vol 106 | touch $proc_dir/ws 107 | 108 | wrapper windowmpd & 109 | } 110 | 111 | ##### DO NOT EDIT ANYTHING BELOW THIS LINE 112 | 113 | wrapper(){ 114 | while [[ true ]] 115 | do 116 | echo "`$@`" > /dev/null 117 | echo 'update' > $proc_dir/fifo 118 | done 119 | } 120 | 121 | bar(){ 122 | 123 | mkdir -p $proc_dir 124 | mkfifo $proc_dir/fifo 2> /dev/null 125 | initbar 126 | 127 | while [[ true ]] 128 | do 129 | 130 | cat $proc_dir/fifo > /dev/null 131 | last_value=`cat $proc_dir/last_output_bottom` 132 | output=`bar_output` 133 | 134 | if [[ "$last_value" != "$output" ]] 135 | then 136 | printf '%s\n' "$output" 137 | echo "$output" > $proc_dir/last_output_bottom 138 | fi 139 | 140 | done 141 | 142 | } 143 | 144 | bar | lemonbar $configuration | sh 145 | 146 | -------------------------------------------------------------------------------- /.wm/schemes/sakura/bars/top.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | proc_dir="/tmp/lemonbar" 4 | 5 | background_color="#191719" 6 | foreground_color="#585258" 7 | highlight_color="#de7a8c" 8 | 9 | font="-sweets-eclair-medium-r-normal--12-*-*-*-c-*-iso10646-1" 10 | iconic_font="-Wuncon-Siji-Medium-R-Normal--10-100-75-75-c-80-iso10646-1" 11 | 12 | geometry="1920x32+0+0" 13 | 14 | configuration="-d -B $background_color -F $foreground_color -f $iconic_font -f $font -g $geometry" 15 | 16 | ##### 17 | 18 | getws(){ 19 | 20 | last_value=`cat $proc_dir/ws` 21 | 22 | output="" 23 | 24 | file="$proc_dir/ws_monitor" 25 | currentws=`sh /users/grace/.wm/schemes/sakura/bars/await.sh $file "xprop -root | grep '_NET_CURRENT_DESKTOP(CARDINAL)'"` 26 | currentws=`echo "$currentws" | awk '{print $3}'` 27 | numws=$(xprop -root | grep "_NET_NUMBER_OF_DESKTOPS(CARDINAL)" | awk '{print $3}') 28 | 29 | echo "$currentws $numws" > /tmp/output 30 | 31 | index="0" 32 | 33 | icon="" 34 | 35 | while [[ "$(($index < $numws))" == "1" ]] 36 | do 37 | if [[ "$index" == "$currentws" ]] 38 | then 39 | output="$output%{F$highlight_color}$icon%{F$foreground_color}" 40 | else 41 | output="$output$icon" 42 | fi 43 | index=$(($index + 1)) 44 | done 45 | 46 | if [[ "$last_value" != "$output" ]] 47 | then 48 | echo "$output" > $proc_dir/ws 49 | fi 50 | 51 | } 52 | 53 | inet(){ 54 | 55 | last_value=`cat $proc_dir/inet` 56 | 57 | interface=$(ip route | head -n 1 | awk '{print $5}') 58 | 59 | if [[ "$interface" == 'enp3s0' ]] 60 | then 61 | 62 | icon="%{F$highlight_color}%{F$foreground_color}" 63 | 64 | else 65 | # Note: implement this 66 | echo '' > /dev/null 67 | 68 | fi 69 | 70 | if [[ "$last_value" != "$icon" ]] 71 | then 72 | echo "$icon" > $proc_dir/inet 73 | fi 74 | 75 | sleep 0.5 76 | 77 | } 78 | 79 | clock(){ 80 | echo "`date +'%a %b %d, %H:%M'`" > $proc_dir/clock 81 | sleep 60 82 | } 83 | 84 | quote(){ 85 | echo "%{F$highlight_color}You'll never find beauty if you don't first find change.%{F$foreground_color}" 86 | } 87 | 88 | volume(){ 89 | 90 | last_value=`cat $proc_dir/vol` 91 | 92 | file="$proc_dir/vol_monitor" 93 | vol=`sh /users/grace/.wm/schemes/sakura/bars/await.sh $file "amixer get Master"` 94 | 95 | frontleft=$(echo -e "$vol" | grep "Front Left:") 96 | frontright=$(echo -e "$vol" | grep "Front Right:") 97 | 98 | leftvol=$(echo -e "$frontleft" | awk '{print $5}') 99 | rightvol=$(echo -e "$frontright" | awk '{print $5}') 100 | 101 | leftstatus=$(echo -e "$frontleft" | awk '{print $6}') 102 | rightstatus=$(echo -e "$frontright" | awk '{print $6}') 103 | 104 | leftvol="${leftvol:1:-2}" 105 | rightvol="${rightvol:1:-2}" 106 | 107 | avg="$(( $(( $leftvol + $rightvol )) / 2 ))" 108 | 109 | if [[ "$leftstatus" == "$rightstatus" && "$leftstatus" == "[on]" ]] 110 | then 111 | 112 | icon="%{F$highlight_color}" 113 | 114 | if [[ "$(($avg > 67))" == "1" ]] 115 | then 116 | icon="$icon" 117 | elif [[ "$(($avg > 33))" == "1" ]] 118 | then 119 | icon="$icon" 120 | elif [[ "$(($avg > 0))" == "1" ]] 121 | then 122 | icon="$icon" 123 | else 124 | icon="$icon" 125 | fi 126 | 127 | icon="$icon%{F$foreground_color}" 128 | 129 | else 130 | icon="" 131 | fi 132 | 133 | if [[ "$icon" != "$last_value" ]] 134 | then 135 | echo "$icon" > $proc_dir/vol 136 | fi 137 | 138 | } 139 | 140 | bar_output(){ 141 | 142 | con=`cat $proc_dir/inet` 143 | vol=`cat $proc_dir/vol` 144 | ws=`cat $proc_dir/ws` 145 | 146 | output=" $ws%{c}`quote`%{r}$con $vol " 147 | 148 | echo "$output" 149 | } 150 | 151 | initbar(){ 152 | mkfifo $proc_dir/vol_fifo 2> /dev/null 153 | touch $proc_dir/last_output_top 154 | touch $proc_dir/inet 155 | touch $proc_dir/vol 156 | touch $proc_dir/ws 157 | 158 | wrapper volume & 159 | wrapper inet & 160 | wrapper getws & 161 | } 162 | 163 | ##### DO NOT EDIT ANYTHING BELOW THIS LINE 164 | 165 | wrapper(){ 166 | while [[ true ]] 167 | do 168 | echo "`$@`" > /dev/null 169 | echo 'update' > $proc_dir/fifo 170 | done 171 | } 172 | 173 | bar(){ 174 | 175 | mkdir -p $proc_dir 176 | mkfifo $proc_dir/fifo 2> /dev/null 177 | initbar 178 | 179 | while [[ true ]] 180 | do 181 | 182 | cat $proc_dir/fifo > /dev/null 183 | 184 | last_value=`cat $proc_dir/last_output_top` 185 | output=`bar_output` 186 | 187 | if [[ "$last_value" != "$output" ]] 188 | then 189 | printf '%s\n' "$output" 190 | echo "$output" > $proc_dir/last_output_top 191 | fi 192 | 193 | done 194 | 195 | } 196 | 197 | bar | lemonbar $configuration | sh 198 | 199 | -------------------------------------------------------------------------------- /.wm/schemes/sakura/compton.conf: -------------------------------------------------------------------------------- 1 | # Shadow 2 | shadow = true; 3 | shadow-opacity = 0.25; 4 | shadow-radius = 12; 5 | 6 | # Fading 7 | fading = true; 8 | fade-in-step = 0.05; 9 | fade-out-step = 0.05; 10 | 11 | # Optimizations 12 | backend = "glx"; 13 | 14 | sw-opti = true; 15 | #unredir-if-possible = true; 16 | #glx-no-stencil = true; 17 | #glx-no-rebind-pixemap = true; 18 | 19 | shadow-exclude = [ 20 | "name *= 'slop'", 21 | "class_g *= 'slop'" 22 | ]; 23 | 24 | wintypes: 25 | { 26 | dock = { 27 | shadow = true; 28 | }; 29 | 30 | desktop = { 31 | shadow = false; 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /.wm/schemes/sakura/configs/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 | char font[] = "eclair:antialias=false:autohint=true"; 9 | 10 | int disablebold = 1; 11 | int disableitalic = 1; 12 | int disableroman = 1; 13 | 14 | int borderpx = 32; 15 | 16 | /* 17 | * What program is execed by st depends of these precedence rules: 18 | * 1: program passed with -e 19 | * 2: utmp option 20 | * 3: SHELL environment variable 21 | * 4: value of shell in /etc/passwd 22 | * 5: value of shell in config.h 23 | */ 24 | static char shell[] = "/bin/zsh"; 25 | static char *utmp = NULL; 26 | static char stty_args[] = "stty raw pass8 nl -echo -iexten -cstopb 38400"; 27 | 28 | /* identification sequence returned in DA and DECID */ 29 | static char vtiden[] = "\033[?6c"; 30 | 31 | /* Kerning / character bounding-box multipliers */ 32 | float cwscale = 1.0; 33 | float chscale = 1.0; 34 | 35 | /* 36 | * word delimiter string 37 | * 38 | * More advanced example: " `'\"()[]{}" 39 | */ 40 | static char worddelimiters[] = " "; 41 | 42 | /* selection timeouts (in milliseconds) */ 43 | unsigned int doubleclicktimeout = 300; 44 | unsigned int tripleclicktimeout = 600; 45 | 46 | /* alt screens */ 47 | int allowaltscreen = 1; 48 | 49 | /* frames per second st should at maximum draw to the screen */ 50 | unsigned int xfps = 120; 51 | unsigned int actionfps = 60; 52 | 53 | /* 54 | * blinking timeout (set to 0 to disable blinking) for the terminal blinking 55 | * attribute. 56 | */ 57 | unsigned int blinktimeout = 800; 58 | 59 | /* 60 | * thickness of underline and bar cursors 61 | */ 62 | unsigned int cursorthickness = 1; 63 | 64 | /* 65 | * bell volume. It must be a value between -100 and 100. Use 0 for disabling 66 | * it 67 | */ 68 | static int bellvolume = 0; 69 | 70 | /* default TERM value */ 71 | char termname[] = "st-256color"; 72 | 73 | /* 74 | * spaces per tab 75 | * 76 | * When you are changing this value, don't forget to adapt the »it« value in 77 | * the st.info and appropriately install the st.info in the environment where 78 | * you use this st version. 79 | * 80 | * it#$tabspaces, 81 | * 82 | * Secondly make sure your kernel is not expanding tabs. When running `stty 83 | * -a` »tab0« should appear. You can tell the terminal to not expand tabs by 84 | * running following command: 85 | * 86 | * stty tabs 87 | */ 88 | static unsigned int tabspaces = 8; 89 | 90 | /* Terminal colors (16 first used in escape sequence) */ 91 | const char *colorname[] = { 92 | /* 8 normal colors */ 93 | "#191719", 94 | "#966161", 95 | "#619668", 96 | "#968461", 97 | "#617f96", 98 | "#ad708f", 99 | "#618e96", 100 | "#585258", 101 | 102 | /* 8 bright colors */ 103 | "gray50", 104 | "#ca9797", 105 | "#99bda6", 106 | "#bdac99", 107 | "#99a3bd", 108 | "#ca97bf", 109 | "#99b9bd", 110 | "#857a85", 111 | 112 | [255] = 0, 113 | 114 | /* more colors can be added after 255 to use with DefaultXX */ 115 | "#000000", 116 | "#ffffff", 117 | }; 118 | 119 | 120 | /* 121 | * Default colors (colorname index) 122 | * foreground, background, cursor, reverse cursor 123 | */ 124 | unsigned int defaultfg = 7; 125 | unsigned int defaultbg = 0; 126 | unsigned int defaultcs = 5; 127 | unsigned int defaultrcs = 5; 128 | 129 | /* 130 | * Default shape of cursor 131 | * 2: Block ("█") 132 | * 4: Underline ("_") 133 | * 6: Bar ("|") 134 | * 7: Snowman ("☃") 135 | */ 136 | unsigned int cursorshape = 6; 137 | 138 | /* 139 | * Default columns and rows numbers 140 | */ 141 | 142 | unsigned int cols = 80; 143 | unsigned int rows = 24; 144 | 145 | /* 146 | * Default colour and shape of the mouse cursor 147 | */ 148 | unsigned int mouseshape = XC_xterm; 149 | unsigned int mousefg = 256; 150 | unsigned int mousebg = 257; 151 | 152 | /* 153 | * Color used to display font attributes when fontconfig selected a font which 154 | * doesn't match the ones requested. 155 | */ 156 | unsigned int defaultattr = 11; 157 | 158 | /* 159 | * Internal mouse shortcuts. 160 | * Beware that overloading Button1 will disable the selection. 161 | */ 162 | MouseShortcut mshortcuts[] = { 163 | /* button mask string */ 164 | /* { Button4, XK_ANY_MOD, "\031" }, 165 | { Button5, XK_ANY_MOD, "\005" }, 166 | { Button4, XK_NO_MOD, "\031" }, 167 | { Button5, XK_NO_MOD, "\005" },*/ 168 | }; 169 | 170 | MouseKey mkeys[] = { 171 | { Button4, XK_ANY_MOD, kscrollup, {.i = 1} }, 172 | { Button5, XK_ANY_MOD, kscrolldown, {.i = 1} }, 173 | }; 174 | 175 | /* Internal keyboard shortcuts. */ 176 | #define MODKEY Mod1Mask 177 | #define TERMMOD (ControlMask|ShiftMask) 178 | 179 | Shortcut shortcuts[] = { 180 | /* mask keysym function argument */ 181 | { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, 182 | { ControlMask, XK_Print, toggleprinter, {.i = 0} }, 183 | { ShiftMask, XK_Print, printscreen, {.i = 0} }, 184 | { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, 185 | { TERMMOD, XK_Prior, zoom, {.f = +1} }, 186 | { TERMMOD, XK_Next, zoom, {.f = -1} }, 187 | { TERMMOD, XK_Home, zoomreset, {.f = 0} }, 188 | { TERMMOD, XK_C, clipcopy, {.i = 0} }, 189 | { TERMMOD, XK_V, clippaste, {.i = 0} }, 190 | { TERMMOD, XK_Y, selpaste, {.i = 0} }, 191 | { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, 192 | { TERMMOD, XK_I, iso14755, {.i = 0} }, 193 | 194 | { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} }, 195 | { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} }, 196 | { ShiftMask, XK_Up, kscrollup, {.i = 1} }, 197 | { ShiftMask, XK_Down, kscrolldown, {.i = 1} }, 198 | 199 | { TERMMOD, XK_U, toggleunimode, {.i = 1} }, 200 | }; 201 | 202 | /* 203 | * Special keys (change & recompile st.info accordingly) 204 | * 205 | * Mask value: 206 | * * Use XK_ANY_MOD to match the key no matter modifiers state 207 | * * Use XK_NO_MOD to match the key alone (no modifiers) 208 | * appkey value: 209 | * * 0: no value 210 | * * > 0: keypad application mode enabled 211 | * * = 2: term.numlock = 1 212 | * * < 0: keypad application mode disabled 213 | * appcursor value: 214 | * * 0: no value 215 | * * > 0: cursor application mode enabled 216 | * * < 0: cursor application mode disabled 217 | * crlf value 218 | * * 0: no value 219 | * * > 0: crlf mode is enabled 220 | * * < 0: crlf mode is disabled 221 | * 222 | * Be careful with the order of the definitions because st searches in 223 | * this table sequentially, so any XK_ANY_MOD must be in the last 224 | * position for a key. 225 | */ 226 | 227 | /* 228 | * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) 229 | * to be mapped below, add them to this array. 230 | */ 231 | static KeySym mappedkeys[] = { -1 }; 232 | 233 | /* 234 | * State bits to ignore when matching key or button events. By default, 235 | * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. 236 | */ 237 | static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; 238 | 239 | /* 240 | * Override mouse-select while mask is active (when MODE_MOUSE is set). 241 | * Note that if you want to use ShiftMask with selmasks, set this to an other 242 | * modifier, set to 0 to not use it. 243 | */ 244 | uint forceselmod = ShiftMask; 245 | 246 | /* 247 | * This is the huge key array which defines all compatibility to the Linux 248 | * world. Please decide about changes wisely. 249 | */ 250 | static Key key[] = { 251 | /* keysym mask string appkey appcursor crlf */ 252 | { XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0}, 253 | { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, 254 | { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, 255 | { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, 256 | { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0}, 257 | { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, 258 | { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, 259 | { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0, 0}, 260 | { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, 261 | { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, 262 | { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0, 0}, 263 | { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, 264 | { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, 265 | { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0, 0}, 266 | { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, 267 | { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, 268 | { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, 269 | { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, 270 | { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0}, 271 | { XK_KP_End, ControlMask, "\033[J", -1, 0, 0}, 272 | { XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0}, 273 | { XK_KP_End, ShiftMask, "\033[K", -1, 0, 0}, 274 | { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0}, 275 | { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, 276 | { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, 277 | { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, 278 | { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, 279 | { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0, 0}, 280 | { XK_KP_Insert, ControlMask, "\033[L", -1, 0, 0}, 281 | { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, 282 | { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, 283 | { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, 284 | { XK_KP_Delete, ControlMask, "\033[M", -1, 0, 0}, 285 | { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, 286 | { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0, 0}, 287 | { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, 288 | { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, 289 | { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, 290 | { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0, 0}, 291 | { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0, 0}, 292 | { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0, 0}, 293 | { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0, -1}, 294 | { XK_KP_Enter, XK_ANY_MOD, "\r\n", -1, 0, +1}, 295 | { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0, 0}, 296 | { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0, 0}, 297 | { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0, 0}, 298 | { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0, 0}, 299 | { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0, 0}, 300 | { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0, 0}, 301 | { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0, 0}, 302 | { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0, 0}, 303 | { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0, 0}, 304 | { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0, 0}, 305 | { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0, 0}, 306 | { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0, 0}, 307 | { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0, 0}, 308 | { XK_Up, ShiftMask, "\033[1;2A", 0, 0, 0}, 309 | { XK_Up, Mod1Mask, "\033[1;3A", 0, 0, 0}, 310 | { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0, 0}, 311 | { XK_Up, ControlMask, "\033[1;5A", 0, 0, 0}, 312 | { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0, 0}, 313 | { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0, 0}, 314 | { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0, 0}, 315 | { XK_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, 316 | { XK_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, 317 | { XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0}, 318 | { XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0}, 319 | { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0, 0}, 320 | { XK_Down, ControlMask, "\033[1;5B", 0, 0, 0}, 321 | { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0, 0}, 322 | { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0, 0}, 323 | { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0, 0}, 324 | { XK_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, 325 | { XK_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, 326 | { XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0}, 327 | { XK_Left, Mod1Mask, "\033[1;3D", 0, 0, 0}, 328 | { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0, 0}, 329 | { XK_Left, ControlMask, "\033[1;5D", 0, 0, 0}, 330 | { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0, 0}, 331 | { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0, 0}, 332 | { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0, 0}, 333 | { XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, 334 | { XK_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, 335 | { XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0}, 336 | { XK_Right, Mod1Mask, "\033[1;3C", 0, 0, 0}, 337 | { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0, 0}, 338 | { XK_Right, ControlMask, "\033[1;5C", 0, 0, 0}, 339 | { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0, 0}, 340 | { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0, 0}, 341 | { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0, 0}, 342 | { XK_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, 343 | { XK_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, 344 | { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0, 0}, 345 | { XK_Return, Mod1Mask, "\033\r", 0, 0, -1}, 346 | { XK_Return, Mod1Mask, "\033\r\n", 0, 0, +1}, 347 | { XK_Return, XK_ANY_MOD, "\r", 0, 0, -1}, 348 | { XK_Return, XK_ANY_MOD, "\r\n", 0, 0, +1}, 349 | { XK_Insert, ShiftMask, "\033[4l", -1, 0, 0}, 350 | { XK_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, 351 | { XK_Insert, ControlMask, "\033[L", -1, 0, 0}, 352 | { XK_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, 353 | { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, 354 | { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, 355 | { XK_Delete, ControlMask, "\033[M", -1, 0, 0}, 356 | { XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, 357 | { XK_Delete, ShiftMask, "\033[2K", -1, 0, 0}, 358 | { XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, 359 | { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, 360 | { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, 361 | { XK_BackSpace, XK_NO_MOD, "\177", 0, 0, 0}, 362 | { XK_BackSpace, Mod1Mask, "\033\177", 0, 0, 0}, 363 | { XK_Home, ShiftMask, "\033[2J", 0, -1, 0}, 364 | { XK_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, 365 | { XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, 366 | { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, 367 | { XK_End, ControlMask, "\033[J", -1, 0, 0}, 368 | { XK_End, ControlMask, "\033[1;5F", +1, 0, 0}, 369 | { XK_End, ShiftMask, "\033[K", -1, 0, 0}, 370 | { XK_End, ShiftMask, "\033[1;2F", +1, 0, 0}, 371 | { XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, 372 | { XK_Prior, ControlMask, "\033[5;5~", 0, 0, 0}, 373 | { XK_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, 374 | { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, 375 | { XK_Next, ControlMask, "\033[6;5~", 0, 0, 0}, 376 | { XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, 377 | { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, 378 | { XK_F1, XK_NO_MOD, "\033OP" , 0, 0, 0}, 379 | { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0, 0}, 380 | { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0, 0}, 381 | { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0, 0}, 382 | { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0, 0}, 383 | { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0, 0}, 384 | { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0, 0}, 385 | { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0, 0}, 386 | { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0, 0}, 387 | { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0, 0}, 388 | { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0, 0}, 389 | { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0, 0}, 390 | { XK_F3, XK_NO_MOD, "\033OR" , 0, 0, 0}, 391 | { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0, 0}, 392 | { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0, 0}, 393 | { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0, 0}, 394 | { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0, 0}, 395 | { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0, 0}, 396 | { XK_F4, XK_NO_MOD, "\033OS" , 0, 0, 0}, 397 | { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0, 0}, 398 | { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0, 0}, 399 | { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0, 0}, 400 | { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0, 0}, 401 | { XK_F5, XK_NO_MOD, "\033[15~", 0, 0, 0}, 402 | { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0, 0}, 403 | { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0, 0}, 404 | { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0, 0}, 405 | { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0, 0}, 406 | { XK_F6, XK_NO_MOD, "\033[17~", 0, 0, 0}, 407 | { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0, 0}, 408 | { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0, 0}, 409 | { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0, 0}, 410 | { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0, 0}, 411 | { XK_F7, XK_NO_MOD, "\033[18~", 0, 0, 0}, 412 | { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0, 0}, 413 | { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0, 0}, 414 | { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0, 0}, 415 | { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0, 0}, 416 | { XK_F8, XK_NO_MOD, "\033[19~", 0, 0, 0}, 417 | { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0, 0}, 418 | { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0, 0}, 419 | { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0, 0}, 420 | { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0, 0}, 421 | { XK_F9, XK_NO_MOD, "\033[20~", 0, 0, 0}, 422 | { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0, 0}, 423 | { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0, 0}, 424 | { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0, 0}, 425 | { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0, 0}, 426 | { XK_F10, XK_NO_MOD, "\033[21~", 0, 0, 0}, 427 | { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0, 0}, 428 | { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0, 0}, 429 | { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0, 0}, 430 | { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0, 0}, 431 | { XK_F11, XK_NO_MOD, "\033[23~", 0, 0, 0}, 432 | { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0, 0}, 433 | { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0, 0}, 434 | { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0, 0}, 435 | { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0, 0}, 436 | { XK_F12, XK_NO_MOD, "\033[24~", 0, 0, 0}, 437 | { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0, 0}, 438 | { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0, 0}, 439 | { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0, 0}, 440 | { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0, 0}, 441 | { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0, 0}, 442 | { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0, 0}, 443 | { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0, 0}, 444 | { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0, 0}, 445 | { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0, 0}, 446 | { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0, 0}, 447 | { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0, 0}, 448 | { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0, 0}, 449 | { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0, 0}, 450 | { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0, 0}, 451 | { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0, 0}, 452 | { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0, 0}, 453 | { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0, 0}, 454 | { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0, 0}, 455 | { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0, 0}, 456 | { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0, 0}, 457 | { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0, 0}, 458 | { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0, 0}, 459 | { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0, 0}, 460 | { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0, 0}, 461 | { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0, 0}, 462 | { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0, 0}, 463 | { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0, 0}, 464 | }; 465 | 466 | /* 467 | * Selection types' masks. 468 | * Use the same masks as usual. 469 | * Button1Mask is always unset, to make masks match between ButtonPress. 470 | * ButtonRelease and MotionNotify. 471 | * If no match is found, regular selection is used. 472 | */ 473 | uint selmasks[] = { 474 | [SEL_RECTANGULAR] = Mod1Mask, 475 | }; 476 | 477 | /* 478 | * Printable characters in ASCII, used to estimate the advance width 479 | * of single wide characters. 480 | */ 481 | char ascii_printable[] = 482 | " !\"#$%&'()*+,-./0123456789:;<=>?" 483 | "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" 484 | "`abcdefghijklmnopqrstuvwxyz{|}~"; 485 | 486 | -------------------------------------------------------------------------------- /.wm/schemes/sakura/setup.sh: -------------------------------------------------------------------------------- 1 | 2 | #xwinwrap -g 1920x1080 -ni -s -nf -b -un -argb -sh rectangle -fdt -- mpv -wid WID --keepaspect=no --loop /users/grace/.wm/schemes/sakura/wallpaper.webm & 3 | 4 | xwinwrap -g 1920x1080 -ni -s -nf -b -un -argb -sh rectangle -fdt -- gifview -w WID -a /users/grace/.wm/schemes/sakura/wallpaper.gif & 5 | 6 | glava & 7 | sh /users/grace/.wm/schemes/sakura/bars/top.sh & 8 | sh /users/grace/.wm/schemes/sakura/bars/bottom.sh & 9 | compton --config /users/grace/.wm/schemes/sakura/compton.conf & 10 | 11 | -------------------------------------------------------------------------------- /.wm/schemes/sakura/wallpaper.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sweets/dotfiles/2addf341c704227c9f2c6182f422481c453b7998/.wm/schemes/sakura/wallpaper.gif -------------------------------------------------------------------------------- /.wm/schemes/sakura/wallpaper.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sweets/dotfiles/2addf341c704227c9f2c6182f422481c453b7998/.wm/schemes/sakura/wallpaper.webm -------------------------------------------------------------------------------- /.wm/start.sh: -------------------------------------------------------------------------------- 1 | 2 | wm_dir="/users/grace/.wm" 3 | 4 | scheme="$2" 5 | monitor="$1" 6 | 7 | if [[ "$monitor" == "vga" ]] 8 | then 9 | # 1920x1080 59.93 Hz (CVT 2.07M9-R) hsync: 66.59 kHz; pclk: 138.50 MHz 10 | xrandr --newmode "1920x1080" 138.50 1920 1968 1991 2080 1080 1083 1086 1111 +hsync -vsync 11 | xrandr --addmode VGA-0 "1920x1080" 12 | xrandr --output VGA-0 --mode "1920x1080" --primary --output LVDS --off 13 | echo "Using VGA." 14 | elif [[ "$monitor" == "lvds" ]] 15 | then 16 | echo "Using LVDS." 17 | fi 18 | 19 | if [[ ! -d "$wm_dir/schemes/$scheme" ]] 20 | then 21 | scheme="floral" 22 | fi 23 | 24 | scheme_dir="$wm_dir/schemes/$scheme" 25 | 26 | sxhkd -c "$wm_dir/sxhkdrc" >> /dev/null & 27 | 28 | xrdb -load "$scheme_dir/Xresources" 29 | 30 | xsetroot -cursor_name left_ptr 31 | 32 | xset +fp /users/grace/.local/share/fonts 33 | xset fp rehash 34 | 35 | sh "$scheme_dir/setup.sh" 36 | 37 | custard 2>> /tmp/custard.log 38 | 39 | -------------------------------------------------------------------------------- /.wm/sxhkdrc: -------------------------------------------------------------------------------- 1 | 2 | super + Return 3 | st 4 | 5 | super + {Up,Down,Left,Right} 6 | custardctl window -move {up,down,left,right} 7 | 8 | super + {KP_Down,KP_Right} 9 | custardctl window -expand {down,right} 10 | 11 | super + {KP_Up,KP_Left} 12 | custardctl window -contract {up,left} 13 | 14 | super + {_,ctrl + ,alt +}{1-9,0} 15 | (custardctl workspace -{focus,attach,detach} {1-9,10}; echo 'update' > /tmp/lemonbar/ws_monitor) 16 | 17 | super + shift + {1-9,0} 18 | custardctl window -relocate {1-9,10} 19 | 20 | Print 21 | /users/grace/.bin/nougat -fuc 22 | 23 | alt + Print 24 | /users/grace/.bin/nougat -uc 25 | 26 | super + button8 27 | custardctl -focus next 28 | 29 | super + button9 30 | custardctl -focus prev 31 | 32 | super + Next 33 | custardctl -focus next 34 | 35 | super + Prior 36 | custardctl -focus prev 37 | 38 | super + minus 39 | custardctl window -minimize 40 | 41 | super + plus 42 | custardctl window -maximize 43 | 44 | super + w 45 | custardctl window -close 46 | 47 | ctrl + alt + Delete 48 | custardctl -stop 49 | 50 | F1 51 | (amixer set Master toggle; echo 'update' > /tmp/lemonbar/vol_monitor) 52 | 53 | F2 54 | (amixer set Master 5%-; echo 'update' > /tmp/lemonbar/vol_monitor) 55 | 56 | F3 57 | (amixer set Master 5%+; echo 'update' > /tmp/lemonbar/vol_monitor) 58 | 59 | F5 60 | mpc prev 61 | 62 | F6 63 | mpc toggle 64 | 65 | F7 66 | mpc next 67 | -------------------------------------------------------------------------------- /.xinit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -d /etc/X11/xinit/xinitrc.d ] ; then 4 | for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do 5 | [ -x "$f" ] && . "$f" 6 | done 7 | unset f 8 | fi 9 | 10 | xrandr --newmode "1920x1080" 138.50 1920 1968 2000 2080 1080 1083 1088 1118 +hsync -vsync 11 | xrandr --addmode VGA-0 "1920x1080" 12 | xrandr --output VGA-0 --mode "1920x1080" --output LVDS --off 13 | 14 | sh ~/.config/custard/start.sh "in-love-with-a-ghost" 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 スーイツ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | ![custard](https://raw.githubusercontent.com/Sweets/dotfiles/master/screenshots/wb3lk5yahqt41.png) 4 | 5 | ![custard](https://raw.githubusercontent.com/Sweets/dotfiles/master/screenshots/floral.png) 6 | 7 | ![custard](https://raw.githubusercontent.com/Sweets/dotfiles/master/screenshots/image.png) 8 | -------------------------------------------------------------------------------- /screenshots/03:21:35_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sweets/dotfiles/2addf341c704227c9f2c6182f422481c453b7998/screenshots/03:21:35_full.png -------------------------------------------------------------------------------- /screenshots/floral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sweets/dotfiles/2addf341c704227c9f2c6182f422481c453b7998/screenshots/floral.png -------------------------------------------------------------------------------- /screenshots/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sweets/dotfiles/2addf341c704227c9f2c6182f422481c453b7998/screenshots/image.png -------------------------------------------------------------------------------- /screenshots/wb3lk5yahqt41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sweets/dotfiles/2addf341c704227c9f2c6182f422481c453b7998/screenshots/wb3lk5yahqt41.png --------------------------------------------------------------------------------