feat: this machine runs Wayland

This commit is contained in:
David JULIEN 2021-06-18 00:43:11 +02:00
parent 85d1ee1391
commit 0598d93528
26 changed files with 608 additions and 200 deletions

View File

@ -1,31 +0,0 @@
#!/bin/sh
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xprofile" ]; then
. "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xprofile"
else
. "$HOME/.xprofile"
fi
exec dwm

View File

@ -1,23 +0,0 @@
#!/usr/bin/env sh
# This file is sourced when launching a DM from startx/xinit
# session launch
xss-lock -- slock &
redshift &
dunst -follow mouse &> /dev/null & #temp fix
# MPD daemon start (if no other user instance exists)
[ ! -s ~/.config/mpd/pid ] && mpd
pulsemixer --set-volume 50
sbacklight set 3 &
setbg &
dwmblocks &
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources
xinput set-prop 'Synaptics TM3072-003' 'libinput Tapping Enabled' 1 &
xinput set-prop 'Synaptics TM3072-003' 'libinput Natural Scrolling Enabled' 1 &
xinput set-prop 'Synaptics TM3072-003' 'libinput Accel Speed' 0.4 &
setxkbmap 'fr(oss)'
remaps &
sxhkd &

View File

@ -1,47 +0,0 @@
!! Set a default font and font size as below:
*.font: Iosevka Fixed Slab:size=12
*.symbols: Symbols Nerd Font:size=11
/* name dark light */
/* black 0 8 */
/* red 1 9 */
/* green 2 10 */
/* yellow 3 11 */
/* blue 4 12 */
/* purple 5 13 */
/* cyan 6 14 */
/* white 7 15 */
/* theme */
*.color0: #1d2021
*.color1: #b73935
*.color2: #5d9179
*.color3: #f7a583
*.color4: #458588
*.color5: #b16286
*.color6: #7cafa3
*.color7: #d5c4a1
*.color8: #373737
*.color9: #ea6962
*.color10: #89b482
*.color11: #ffeca3
*.color12: #7daea3
*.color13: #d3869b
*.color14: #ace5d7
*.color15: #fbf1c7
*.background: #1d2021
*.selbackground: #373737
*.foreground: #fbf1c7
*.normforeground: #a89984
*.selforeground: #ebdbb2
*.cursorColor: #ebdbb2
/* st config */
st.font: Iosevka Fixed Slab:size=14
st.symbols: Symbols Nerd Font:size=14
st.termname: st-256color
st.borderpx: 5
/* dwm config */
dwm.borderpx: 2
dwm.gappx: 15

155
.config/foot/foot.ini Normal file
View File

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

167
.config/river/init Executable file
View File

@ -0,0 +1,167 @@
#!/bin/sh
# This is the example configuration file for river.
#
# If you wish to edit this, you will probably want to copy it to
# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first.
#
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.
# Use the "logo" key as the primary modifier
mod="Mod4"
# Mod+Q to close the focused view
riverctl map normal $mod Q close
# Mod+Shift+Q to exit river
riverctl map normal $mod+Shift Q exit
# Mod+J and Mod+K to focus the next/previous view in the layout stack
riverctl map normal $mod J focus-view next
riverctl map normal $mod K focus-view previous
# Mod+Shift+J and Mod+Shift+K to swap the focused view with the next/previous
# view in the layout stack
riverctl map normal $mod+Shift J swap next
riverctl map normal $mod+Shift K swap previous
# Mod+Period and Mod+Comma to focus the next/previous output
riverctl map normal $mod Period focus-output next
riverctl map normal $mod Comma focus-output previous
# Mod+Shift+{Period,Comma} to send the focused view to the next/previous output
riverctl map normal $mod+Shift Period send-to-output next
riverctl map normal $mod+Shift Comma send-to-output previous
# Mod+Space to bump the focused view to the top of the layout stack
riverctl map normal $mod Space zoom
# Mod+H and Mod+L to decrease/increase the main_factor value of rivertile by 0.05
riverctl map normal $mod H mod-layout-value rivertile fixed main_factor -0.05
riverctl map normal $mod L mod-layout-value rivertile fixed main_factor +0.05
# Mod+Shift+H and Mod+Shift+L to increment/decrement the main_count value of rivertile.
riverctl map normal $mod+Shift H mod-layout-value rivertile int main_count +1
riverctl map normal $mod+Shift L mod-layout-value rivertile int main_count -1
# Mod+Alt+{H,J,K,L} to move views
riverctl map normal $mod+Mod1 H move left 100
riverctl map normal $mod+Mod1 J move down 100
riverctl map normal $mod+Mod1 K move up 100
riverctl map normal $mod+Mod1 L move right 100
# Mod+Alt+Control+{H,J,K,L} to snap views to screen edges
riverctl map normal $mod+Mod1+Control H snap left
riverctl map normal $mod+Mod1+Control J snap down
riverctl map normal $mod+Mod1+Control K snap up
riverctl map normal $mod+Mod1+Control L snap right
# Mod+Alt+Shif+{H,J,K,L} to resize views
riverctl map normal $mod+Mod1+Shift H resize horizontal -100
riverctl map normal $mod+Mod1+Shift J resize vertical 100
riverctl map normal $mod+Mod1+Shift K resize vertical -100
riverctl map normal $mod+Mod1+Shift L resize horizontal 100
# Mod + Left Mouse Button to move views
riverctl map-pointer normal $mod BTN_LEFT move-view
# Mod + Right Mouse Button to resize views
riverctl map-pointer normal $mod BTN_RIGHT resize-view
# Mod+[1-9] to focus tag [0-8]
riverctl map normal $mod ampersand set-focused-tags 1
riverctl map normal $mod eacute set-focused-tags 2
riverctl map normal $mod quotedbl set-focused-tags 4
riverctl map normal $mod apostrophe set-focused-tags 8
riverctl map normal $mod parenleft set-focused-tags 16
riverctl map normal $mod minus set-focused-tags 32
riverctl map normal $mod egrave set-focused-tags 64
riverctl map normal $mod underscore set-focused-tags 128
riverctl map normal $mod ccedilla set-focused-tags 257
# Mod+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal $mod+Shift ampersand set-view-tags 1
riverctl map normal $mod+Shift eacute set-view-tags 2
riverctl map normal $mod+Shift quotedbl set-view-tags 4
riverctl map normal $mod+Shift apostrophe set-view-tags 8
riverctl map normal $mod+Shift parenleft set-view-tags 16
riverctl map normal $mod+Shift minus set-view-tags 32
riverctl map normal $mod+Shift egrave set-view-tags 64
riverctl map normal $mod+Shift underscore set-view-tags 128
riverctl map normal $mod+Shift ccedilla set-view-tags 256
# Mod+Ctrl+[1-9] to toggle focus of tag [0-8]
riverctl map normal $mod+Ctrl ampersand toggle-focused-tags 1
riverctl map normal $mod+Ctrl eacute toggle-focused-tags 2
riverctl map normal $mod+Ctrl quotedbl toggle-focused-tags 4
riverctl map normal $mod+Ctrl apostrophe toggle-focused-tags 8
riverctl map normal $mod+Ctrl parenleft toggle-focused-tags 16
riverctl map normal $mod+Ctrl minus toggle-focused-tags 32
riverctl map normal $mod+Ctrl egrave toggle-focused-tags 64
riverctl map normal $mod+Ctrl underscore toggle-focused-tags 128
riverctl map normal $mod+Ctrl ccedilla toggle-focused-tags 256
# Mod+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view
riverctl map normal $mod+Shift+Ctrl ampersand toggle-view-tags 1
riverctl map normal $mod+Shift+Ctrl eacute toggle-view-tags 2
riverctl map normal $mod+Shift+Ctrl quotedbl toggle-view-tags 4
riverctl map normal $mod+Shift+Ctrl apostrophe toggle-view-tags 8
riverctl map normal $mod+Shift+Ctrl parenleft toggle-view-tags 16
riverctl map normal $mod+Shift+Ctrl minus toggle-view-tags 32
riverctl map normal $mod+Shift+Ctrl egrave toggle-view-tags 64
riverctl map normal $mod+Shift+Ctrl underscore toggle-view-tags 128
riverctl map normal $mod+Shift+Ctrl ccedilla toggle-view-tags 256
# Mod+Shift+Space to toggle float
riverctl map normal $mod+Shift Space toggle-float
# Mod+F to toggle fullscreen
riverctl map normal $mod F toggle-fullscreen
# Mod+{Up,Right,Down,Left} to change layout orientation
riverctl map normal $mod Up set-layout-value rivertile string main_location top
riverctl map normal $mod Right set-layout-value rivertile string main_location right
riverctl map normal $mod Down set-layout-value rivertile string main_location bottom
riverctl map normal $mod Left set-layout-value rivertile string main_location left
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
riverctl declare-mode passthrough
# Mod+F11 to enter passthrough mode
riverctl map normal $mod F11 enter-mode passthrough
# Mod+F11 to return to normal mode
riverctl map passthrough $mod F11 enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
do
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
riverctl map $mode None XF86AudioRaiseVolume spawn pulsemixer --change-volume +5
riverctl map $mode None XF86AudioLowerVolume spawn pulsemixer --change-volume -5
riverctl map $mode None XF86AudioMute spawn pulsemixer --toggle-mute
done
# Set repeat rate
riverctl set-repeat 50 300
# Set app-ids of views which should float
riverctl float-filter-add "float"
riverctl float-filter-add "popup"
# Set opacity and fade effect
# riverctl opacity 1.0 0.75 0.0 0.1 20
# Source keybindings
source $XDG_CONFIG_HOME/river/maps
# Launch necessary stuff
source $XDG_CONFIG_HOME/river/launch
# Set and exec into the default layout generator, rivertile.
# River will send the process group of the init executable SIGTERM on exit.
riverctl default-layout rivertile
exec rivertile

13
.config/river/launch Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env sh
# This file is sourced when launching a DM from startx/xinit
# session launch
redshift &
# MPD daemon start (if no other user instance exists)
[ ! -s ~/.config/mpd/pid ] && mpd &
pulsemixer --set-volume 50 &
setbg &
waybar &
gammastep &
dunst -follow mouse &> /dev/null & #temp fix

28
.config/river/maps Normal file
View File

@ -0,0 +1,28 @@
# river spawn keybindings
# Mod+Return to start the terminal
riverctl map normal $mod Return spawn $TERMINAL
# Mod+D to start the launcher
riverctl map normal $mod D spawn $LAUNCHER -p "run:"
# Mod+Shift+W to start the browser
riverctl map normal $mod+Shift W spawn $BROWSER
# Mod+Shift+M to start ncmpcpp
riverctl map normal $mod+Shift M spawn $TERMINAL --app-id="float" ncmpcpp
# Mod+Shift+K to play/pause music
riverctl map normal $mod+Shift K spawn player toggle
# Mod+Shift+J to stop music
riverctl map normal $mod+Shift J spawn player stop
# Mod+Shift+L to play next tune
riverctl map normal $mod+Shift L spawn player next
# Mod+Shift+H to play previous tune
riverctl map normal $mod+Shift H spawn play prev
# Mod+Shift+N to start neomutt
riverctl map normal $mod+Shift N spawn $TERMINAL --app-id="float" neomutt

13
.config/river/spawn Normal file
View File

@ -0,0 +1,13 @@
# river spawn keybindings
# Mod+Return to start the browser
riverctl map normal $mod Return spawn $TERMINAL
# Mod+Shift+W to start the browser
riverctl map normal $mod+Shift W spawn $BROWSER
# Mod+Shift+M to start ncmpcpp
riverctl map normal $mod+Shift N spawn $TERMINAL ncmpcpp
# Mod+Shift+N to start neomutt
riverctl map normal $mod+Shift N spawn $TERMINAL neomutt

View File

@ -1,66 +0,0 @@
# Swy7ch' sxhkd bindings binding
# System stuff
super + F1
pulsemixer --toggle-mute; audio-notify
super + {F2, F3}
pulsemixer --change-volume {-5, +5}; audio-notify
super + {F5, F6}
sbacklight {dec,inc}
super + u
dmenumount
super + shift + u
dmenuumount
super + s
dmenuprompt "suspend?" "systemctl suspend"
super + shift + s
dmenuprompt "shutdown?" "shutdown -h now"
super + shift + r
dmenuprompt "reboot?" "reboot"
super + shift + d
displayselect
super + F9
kbacklight
super + shift + o
dmenuopen
# Others
super + Return
$TERMINAL
super + shift + Return
$TERMINAL -g 128x32 -c "floating"
super + d
dmenu_run -p "run:"
super + shift + {w,z}
$BROWSER
super + shift + p
$BROWSER --private-window
super + shift + {h,j,k,l}
player {prev,stop,toggle,next}
super + shift + m
$TERMINAL -g 128x32 -c "ncmpcpp" -e ncmpcpp
super + shift + n
$TERMINAL -g 128x32 -c "neomutt" -e neomutt
super + shift + t
$TERMINAL -g 128x32 -c "transmission" -e tremc
super + shift + b
script="$(printf "bibinput\nbibshow" | dmenu -i -p "which script?")" && $script

70
.config/waybar/config Normal file
View File

@ -0,0 +1,70 @@
{
"modules-left": [
"river/tags"
],
"modules-center": [
"mpd",
],
"mpd": {
"tooltip": false,
"format": "{stateIcon} {artist} | {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",
"format-disconnected": "",
"format-stopped": "",
"state-icons": {
"playing": "",
"paused": ""
}
},
"modules-right": [
"pulseaudio",
"custom/separator",
"network",
"custom/separator",
"cpu",
"custom/separator",
"temperature",
"custom/separator",
"clock",
],
"custom/separator": {
"format": " | ",
"tooltip" : false
},
"pulseaudio": {
"format": "{icon} {volume:3}%",
"format-muted": "婢 {volume}%",
"format-icons": {
"default": ["奄", "奔", "墳"]
},
},
"network": {
"format-wifi": "直 {signalStrength:3}%",
"format-ethernet": " {ipaddr}/{cidr}",
"format-linked": " (No IP)",
"format-disconnected": "睊 ---",
"format-alt": "{ifname}: {ipaddr}/{cidr}",
"tooltip": false
},
"cpu": {
"format": "{usage:3}%",
"states": {
"warning": 50,
"critical": 90
},
"interval": 1,
"tooltip": false
},
"temperature": {
"format": "{temperatureC:3}°C",
"format-critical": "{temperatureC:3}°C",
"interval": 1,
"hwmon-path": "/sys/class/hwmon/hwmon1/temp1_input",
"critical-threshold": 75,
"tooltip": false
},
"clock": {
"format": "{:%b. %d-%m %T}",
"interval": 1,
"tooltip": false
},
}

11
.config/waybar/pacman.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/sh
num_updates=$(checkupdates | wc -l)
if [ $num_updates -gt 1 ]; then
echo "{\"text\": \"$num_updates updates\", \"class\": \"warning\"}"
elif [ $num_updates -eq 1 ]; then
echo "{\"text\": \"$num_updates update\", \"class\": \"warning\"}"
else
echo "{\"text\": \"up to date\"}"
fi

100
.config/waybar/style.css Normal file
View File

@ -0,0 +1,100 @@
/**
* solarized dark colorscheme:
*
* base03 #002b36
* base02 #073642
* base01 #586e75
* base00 #657b83
* base0 #839496
* base1 #93a1a1
* base2 #eee8d5
* base3 #fdf6e3
* yellow #b58900
* orange #cb4b16
* red #dc322f
* magenta #d33682
* violet #6c71c4
* blue #268bd2
* cyan #2aa198
* green #859900
*/
* {
border-radius: 0;
font-family: Iosevka Fixed Slab;
min-height: 0;
}
window#waybar {
background-color: rgba(29,32,33,1);
border: 1px solid #89b482;
}
#custom-separator {
color: #696969;
}
#tags {
margin-left: 5px;
padding: 1px;
}
#tags button {
margin: 1px;
padding: 1px;
color: #424242;
}
#tags button:hover {
box-shadow: inherit;
text-shadow: inherit;
background: none; /*base02*/
border: none;
}
#tags button.occupied {
color: #fbf1c7;
}
#tags button.focused,
#tags button.focused.occupied {
color: #f7a583;
font-weight: bold;
}
#clock,
#cpu,
#network,
#pulseaudio,
#temperature {
margin-right: 5px;
padding: 1px;
}
#clock,
#cpu,
#mpd,
#network,
#pulseaudio,
#temperature {
color: #fbf1c7;
}
#mpd.paused {
color: #f7a583;
}
#pulseaudio.muted {
color: #f7a583;
}
#cpu.warning,
#memory.warning {
border: 2px solid #f7a583;
}
#cpu.critical,
#memory.critical,
#temperature.critical {
border: 2px solid #b73935;
}

View File

@ -0,0 +1,12 @@
# pacman hook to trigger an update of the custom pacman waybar module
[Trigger]
Operation = Upgrade
Type = File
Target = *
[Action]
Description = waybar: refresh pacman module
When = PostTransaction
Exec = /usr/bin/pkill -SIGRTMIN+1 waybar
Depends = waybar

View File

@ -1,7 +1,4 @@
#!/bin/zsh
export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc
# startx at session login
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx "$XINITRC"
# start wayland at session login on tty1
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x river >/dev/null && exec river

View File

@ -21,10 +21,15 @@ export TEXMFHOME="$XDG_DATA_HOME/texmf"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
## default programs
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
export GPG_ASKPASS="/usr/bin/pinentry-curses"
export SUDO_EDITOR="nvim"
export TERMINAL="foot"
export LAUNCHER="bemenu-run"
export EDITOR="nvim"
export TERMINAL="st"
export READER="zathura"
export BROWSER="firefox"
## use Wayland
export MOZ_ENABLE_WAYLAND=1
## programs config
export BEMENU_OPTS="-i --fn 'Iosevka Fixed Slab bold 14' --tb #f7a583 --tf #373737 --hf #f7a583"

15
.gitmodules vendored
View File

@ -1,21 +1,6 @@
[submodule ".local/src/polyjuice"]
path = .local/src/polyjuice
url = git@github.com:swy7ch/polyjuice.git
[submodule ".local/src/dwm"]
path = .local/src/dwm
url = git@github.com:swy7ch/dwm.git
[submodule ".local/src/dwmblocks"]
path = .local/src/dwmblocks
url = git@github.com:swy7ch/dwmblocks.git
[submodule ".local/src/st"]
path = .local/src/st
url = git@github.com:swy7ch/st.git
[submodule ".local/src/dmenu"]
path = .local/src/dmenu
url = git@github.com:swy7ch/dmenu
[submodule ".local/src/slock"]
path = .local/src/slock
url = git@github.com:swy7ch/slock.git
[submodule ".local/share/nvim/lsp/sumneko_lua"]
path = .local/share/nvim/lsp/sumneko_lua
url = git@github.com:sumneko/lua-language-server.git

22
.local/bin/bemenuprompt Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env sh
######################################################################
# @author : swytch (adapted from Luke Smith - lukesmith.xyz)
# @file : dmenuprompt
# @license : GPLv3
# @created : Wednesday May 20, 2020 18:10:13 CEST
#
# @description : dmenu prompt ($1) to perform a command ($2)
######################################################################
col_darkred="#9d0006"
col_orange="#f7a583"
col_white="#ebDBB2"
col_gray="#d5c4a1"
col_black="#373737"
prompt="$1"
cmd="$2"
[ "$(printf "yes\nno" | bemenu -p "$prompt")" = "yes" ] && $cmd

View File

@ -19,7 +19,7 @@ kernel="$(uname -sr)"
uptime="$(uptime -p | sed 's/up //')"
packages="$(pacman -Q | wc -l)"
shell="$(basename "$SHELL")"
wm="$(tail -n 1 "$XDG_CONFIG_HOME/X11/xinitrc" | cut -d ' ' -f 2)"
wm="$(tail -n 1 "$XDG_CONFIG_HOME/zsh/.zlogin" | rev | cut -d " " -f 1 | rev)"
# parse the '/proc/meminfo' file splitting on ':' and 'k'.
# the format of the file is 'key: 000kB' and an additional

View File

@ -13,8 +13,8 @@
# if $1 is a png file, set it as a wallpaper
# if $1 is a directory, choose a randomized image in it, set it as wallpaper
[ -f "$1" ] && cp $1 "$XDG_CONFIG_HOME/wall.png" && dunstify -u "low" "Wallpaper changed"
[ -f "$1" ] && cp $1 "$XDG_CONFIG_HOME/wall.jpg" && dunstify -u "low" "Wallpaper changed"
[ -d "$1" ] && cp "$(find "$1"/*.png -type f | shuf -n 1)" "$XDG_CONFIG_HOME/wall.png" && dunstify -u "low" "Random wallpaper chosen"
[ -d "$1" ] && cp "$(find "$1"/*.png -type f | shuf -n 1)" "$XDG_CONFIG_HOME/wall.jpg" && dunstify -u "low" "Random wallpaper chosen"
xwallpaper --zoom "$XDG_CONFIG_HOME/wall.png"
swaybg -i "$XDG_CONFIG_HOME/wall.jpg"

@ -1 +0,0 @@
Subproject commit e64ab6522752e3ac48357fb6e3a9b37e6e03f575

@ -1 +0,0 @@
Subproject commit 0e2075b0ec4282cb81dec8055332b5f71ede9e6c

@ -1 +0,0 @@
Subproject commit b78f4dc620d0ab9eb6e70eace07263b2c1f9a66c

@ -1 +0,0 @@
Subproject commit 7c322470fd2b9e3af4ea5620a163dbe9a1c37350

@ -1 +0,0 @@
Subproject commit 465b6c89b7ea9cd53fe3417d62f50dd1922df5dc

View File

@ -1 +0,0 @@
.config/X11/xprofile

View File

@ -7,6 +7,9 @@ export XDG_DATA_HOME="$HOME/.local/share"
export ZDOTDIR="$HOME/.config/zsh"
# XKB
export XKB_DEFAULT_LAYOUT="fr(oss)"
## paths
export PATH="$(find $HOME/.local/bin -type d | tr '\n' ':' | sed 's/:$//'):$PATH"