Update CFLAGS in rcrc

This commit is contained in:
Mid Favila 2022-02-18 09:17:47 -04:00
parent 7dc43bab54
commit 4a6936a2ed
5 changed files with 1 additions and 345 deletions

View File

@ -1,12 +0,0 @@
gtk-can-change-accels = 1
gtk-key-theme-name = "Emacs"
gtk-icon-theme-name = "old-gnome-set"
gtk-theme-name = "ColdMotif"
style "user-font"
{
font_name="Clear Sans Regular 10"
}
widget_class "*" style "user-font"
gtk-font-name = "Clear Sans Regular 10"

View File

@ -1,64 +0,0 @@
#!/bin/es
. ~/.esrc
fn load_configs{
for (x=`{ls ~/.config/xresources/*})
{xrdb -merge $x}
}
fn setup_daemons{
if {~ $HOSTNAME speculatores}
{
}
{
# Start the compositor.
picom -cCzfGD3 --shadow-exclude bounding_shaped --vsync --no-use-damage --backend $backend&
}
# Manage clicks on the root window.
# xclickroot -1 ~/.config/fxde/fxde-core/config/menu &
# Manage hotkeys.
sxhkd -c $FXDE_DIR/fxde-core/config/sxhkdrc &
# Start the screen locker on a timer.
xssstart slock &
}
fn start_ui{
# Welcome chime.
aplay $FXDE_DIR/fxde-assets/audio/Login.wav &
# Set cursor.
xsetroot -xcf $FXDE_DIR/fxde-assets/cursors/$CURSOR/cursors/left_ptr 12 &
# Set wallpaper.
xwallpaper --no-randr --stretch $FXDE_DIR/fxde-assets/wallpaper/$PAPE
# Start the status bar. Doesn't work in some WMs. EWMH maybe..?
#$FXDE_DIR/fxde-core/scripts/bar.es|lemonbar -b -F '#FFFFFF' -g265x16+0+0 -B '#00000000' -f 'xft:family=Iosevka:style=Mono:size=11:' |sh - &
# Start the system clock.
respawn xclock &
# Start the load monitor.
respawn xload &
# Spawn a tray.
stalonetray --window-type desktop --icon-gravity N -v -t --grow-gravity S -i 24 --geometry 1x1+0-17 &
}
################################################################################
## The actual config is below this. ##
################################################################################
# Where to look for assets.
FXDE_DIR=~/.config/fxde/
FVWM_DIR=~/.config/fxde/
# Paper to use.
PAPE=magic-tree.png
# What cursor?
CURSOR=Lambda
# What WM?
wm=emwm
for (phase=load_configs setup_daemons start_ui){$phase}
exec $wm

View File

@ -1,268 +0,0 @@
# enable bash-like extended expansion
set --brace-expand
# enable recursive pathname expansion
set --extended-glob
# prevent redirections from overwriting existing files
set --no-clobber
# don't implicitly expand non-existent variables to empty strings
set --no-unset
# if yash is built with command history enabled...
if command --identify --builtin-command history >/dev/null; then
# don't save commands starting with a space in history
set --hist-space
fi
# if yash is built with line-editing enabled...
if command --identify --builtin-command bindkey >/dev/null; then
# print job status update ASAP, but only while line-editing
set --notify-le
# some terminfo data are broken; meta flags have to be ignored for UTF-8
set --le-no-conv-meta
# enable command line prediction
set --le-predict
set --emacs
# some useful key bindings
bindkey --emacs '\^N' beginning-search-forward
bindkey --emacs '\^O' clear-candidates
bindkey --emacs '\^P' beginning-search-backward
bindkey --emacs '\N' complete-next-column
bindkey --emacs '\P' complete-prev-column
fi
# some useful shortcuts
alias r='fc -s'
# normally yash is more POSIX-compliant than /bin/sh :-)
sh() { yash --posix "$@"; }
yash() { command yash "$@"; }
# By re-defining 'yash' using the 'command' built-in, the 'jobs' built-in
# prints a command name that exposes the arguments like
# 'yash --posix -n foo.sh' rather than a command name that hides the
# arguments like 'yash --posix "${@}"'. This applies to the 'yash' command
# invoked via the 'sh' function.
# ensure job control works as expected
case $- in (*m*)
trap - TSTP TTIN TTOU
esac
# This should be set by $HOME/.config/shrc...
: ${PAGER:=less} ${EDITOR:=vi} ${FCEDIT:=$EDITOR}
: ${LOGNAME:=$(logname)} ${HOSTNAME:=$(uname -n)}
# variables needed for command history
HISTFILE=~/.config/yash/yash_history HISTSIZE=5000
# HISTRMDUP makes prediction less accurate
# HISTRMDUP=500
# emulate bash's $SHLVL
if [ "${_old_shlvl+set}" != set ]; then
_old_shlvl=${SHLVL-}
fi
SHLVL=$((_old_shlvl+1)) 2>/dev/null || SHLVL=1
export SHLVL
# initialize event handlers
COMMAND_NOT_FOUND_HANDLER=()
PROMPT_COMMAND=()
YASH_AFTER_CD=()
# define prompt. this should be done by $HOME/.config/shrc
_hc='\fg.' # green hostname for local
_uc=$_hc _hc= # same username color as hostname for non-root user
# The main prompt ($YASH_PS1) contains the username, hostname, working
# directory, last exit status (only if non-zero), and $SHLVL (only if
# non-one).
YASH_PS1=''$_hc'\fd.''d:${${${PWD:/~/\~}##*/}:-$PWD} e:${{?:/0/}:+\\fr.$?\\fd.} ${{SHLVL-0}:/1} do> '
YASH_PS1R='\fc.${_vcs_info}'
YASH_PS1S='\fo.'
YASH_PS2=$'> '
YASH_PS2S=$YASH_PS1S
YASH_PS4='\fm.+ '
YASH_PS4S='\fmo.'
unset _hc _uc
# No escape sequences allowed in the POSIXly-correct mode.
PS1='${LOGNAME}@${HOSTNAME%%.*} '$PS1
# find escape sequence to change terminal window title
case "$TERM" in
(xterm|xterm[+-]*|gnome|gnome[+-]*|putty|putty[+-]*|cygwin)
_tsl='\033];' _fsl='\a' ;;
(*)
_tsl=$( (tput tsl 0; echo) 2>/dev/null |
sed -e 's;\\;\\\\;g' -e 's;;\\033;g' -e 's;;\\a;g' -e 's;%;%%;g')
_fsl=$( (tput fsl ; echo) 2>/dev/null |
sed -e 's;\\;\\\\;g' -e 's;;\\033;g' -e 's;;\\a;g' -e 's;%;%%;g') ;;
esac
# if terminal window title can be changed...
if [ "$_tsl" ] && [ "$_fsl" ]; then
# set terminal window title on each prompt
_set_term_title()
if [ -t 2 ]; then
printf "$_tsl"'%s@%s:%s'"$_fsl" "${LOGNAME}" "${HOSTNAME%%.*}" \
"${${PWD:/$HOME/\~}/#$HOME\//\~\/}" >&2
fi
PROMPT_COMMAND=("$PROMPT_COMMAND" '_set_term_title')
cmd() {
if [ -t 2 ]; then printf "$_tsl""$0 %s""$_fsl" "$*" >&2; fi
command $0 "$@"
}
# reset window title when invoking long-running programs
ssh() {
if [ -t 2 ]; then printf "$_tsl"'ssh %s'"$_fsl" "$*" >&2; fi
command ssh "$@"
}
tine() {
printf "$_tsl""tine %s""$_fsl" "$*" >&2
command tine "$@"
}
kiss() {
printf "$_tsl""kiss %s""$_fsl" "$*" >&2
command kiss "$@"
}
fpm() {
printf "$_tsl""fpm %s""$_fsl" "$*" >&2
command fpm "$@"
}
fpv() {
printf "$_tsl""fpv %s""$_fsl" "$*" >&2
command fpv "$@"
}
links() {
printf "$_tsl""links""$_fsl" "$*" >&2
command links "$@"
}
man() {
printf "$_tsl""man %s""$_fsl" "$*" >&2
command man "$@"
}
ed() {
printf "$_tsl""ed %s""$_fsl" "$*" >&2
command ed "$@"
}
less() {
printf "$_tsl""less %s""$_fsl" "$*" >&2
command less "$@"
}
bc() {
printf "$_tsl""bc %s""$_fsl" "$*" >&2
command bc "$@"
}
axel() {
printf "$_tsl""axel %s""$_fsl" "$*" >&2
command axel "$@"
}
ssu() {
printf "$_tsl""ssu %s""$_fsl" "$*" >&2
command ssu "$@"
}
iview() {
printf "$_tsl""iview %s""$_fsl" "$*" >&2
command iview "$@"
}
fi
# define function that updates $_vcs_info and $_vcs_root
_update_vcs_info() {
typeset type branch
{
read --raw-mode type
read --raw-mode _vcs_root
read --raw-mode branch
} <(
exec 2>/dev/null
typeset COMMAND_NOT_FOUND_HANDLER=
while true; do
if [ -e .git ] || [ . -ef "${GIT_WORK_TREE-}" ]; then
printf 'git\n%s\n' "${GIT_WORK_TREE:-$PWD}"
git branch --no-color | sed -n '/^\*/s/^..//p'
exit
elif [ -d .hg ]; then
printf 'hg\n%s\n' "$PWD"
exec cat .hg/branch
elif [ -d .svn ]; then
printf 'svn\n'
_vcs_root=$(svn info --show-item=wc-root)
printf '%s\n' "$_vcs_root"
path=$(svn info --show-item=relative-url)
case $path in
(*/branches/*)
printf '%s\n' "${${path#*/branches/}%%/*}"
esac
exit
fi
if [ / -ef . ] || [ . -ef .. ]; then
exit
fi
cd -P ..
done
)
case "$type#$branch" in
(hg#default) _vcs_info='hg';;
(git#master) _vcs_info='git';;
(*# ) _vcs_info="$type";;
(* ) _vcs_info="$type@$branch";;
esac
}
# update $_vcs_info on each prompt
PROMPT_COMMAND=("$PROMPT_COMMAND" '_update_vcs_info')
# these aliases choose a version controlling program for the current directory
alias _vcs='${${_vcs_info:?not in a version-controlled directory}%%@*}'
alias ci='_vcs commit'
alias co='_vcs checkout'
alias di='_vcs diff'
alias log='_vcs log'
alias st='_vcs status'
alias up='_vcs update'
# when a directory name is entered as a command, treat as "cd"
_autocd()
if [ -d "$1" ]; then
HANDLED=true
cd -- "$@"
break -i
fi
COMMAND_NOT_FOUND_HANDLER=("$COMMAND_NOT_FOUND_HANDLER" '_autocd "$@"')
# treat command names starting with % as "fg"
_autofg()
if [ $# -eq 1 ]; then
case $1 in (%*)
HANDLED=true
fg "$1"
break -i
esac
fi
COMMAND_NOT_FOUND_HANDLER=("$COMMAND_NOT_FOUND_HANDLER" '_autofg "$@"')
# print file type when executing non-executable files
_file_type()
if [ -e "$1" ] && ! [ -d "$1" ]; then
file -- "$1"
fi
COMMAND_NOT_FOUND_HANDLER=("$COMMAND_NOT_FOUND_HANDLER" '_file_type "$@"')
. /etc/profile

View File

@ -26,7 +26,7 @@ KISS_DL='axel'
KISS_SU='sup'
# Configure our toolchain
CFLAGS='-pipe -w -D_GLIBCXX_ASSERTIONS -D_FORTIFY_SOURCE=2 -O2 -march=haswell -fno-asynchronous-unwind-tables -momit-leaf-frame-pointer -ftree-loop-vectorize -fstack-protector-strong --param ssp-buffer-size=4 -fstack-clash-protection -fPIE -fPIC -Wl,--hash-style=gnu -fno-plt -fomit-frame-pointer -fmodulo-sched -fno-expensive-optimizations -fira-loop-pressure -fno-sched-spec-load -fconserve-stack -fisolate-erroneous-paths-attribute -fdelete-null-pointer-checks -fisolate-erroneous-paths-dereference'
CFLAGS='-O2 -Wl,--hash-style=gnu -pipe -w -march=haswell -fno-plt -fomit-frame-pointer -fmodulo-sched -fno-expensive-optimizations -fconserve-stack -fisolate-erroneous-paths-attribute -fisolate-erroneous-paths-dereference -ftree-loop-vectorize -fstack-protector-strong --param ssp-buffer-size=4 -fstack-clash-protection -fPIE -fPIC -fno-asynchronous-unwind-tables -momit-leaf-frame-pointer -D_GLIBCXX_ASSERTIONS -D_FORTIFY_SOURCE=2'
CXXFLAGS=$CFLAGS
FFLAGS=$CFLAGS
LDFLAGS='-Wl,-O2,-sort-common,-as-needed,-z,relro,-z,now'