mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
BREAKING rename all shell scripts to .sh and put them in ~/.local/bin
This commit is contained in:
parent
eb7128423a
commit
e94e0e2ba0
|
|
@ -82,7 +82,7 @@ Simplified version of `add-to-list'."
|
|||
"Return non-nil if gsettings (GNOME) has a dark theme.
|
||||
Return nil if the DESKTOP_SESSION is either bspwm or
|
||||
herbstluftwm, per the configuration of my dotfiles. Also check
|
||||
the `delight' shell script."
|
||||
the `delight.sh' shell script."
|
||||
(prot-emacs-with-desktop-session
|
||||
(string-match-p
|
||||
"dark"
|
||||
|
|
@ -92,7 +92,7 @@ the `delight' shell script."
|
|||
"Return non-nil if my custom setup has a dark theme.
|
||||
I place a file in ~/.config/prot-xtwm-active-theme which contains
|
||||
a single word describing my system-wide theme. This is part of
|
||||
my dotfiles. Check my `delight' shell script for more."
|
||||
my dotfiles. Check my `delight.sh' shell script for more."
|
||||
(when-let* ((file "~/.config/prot-xtwm-active-theme")
|
||||
((file-exists-p file)))
|
||||
(string-match-p
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ daemon, as I have encountered instabilities with it. Instead, I run a
|
|||
single instance of Emacs and then configure it to act as the server.
|
||||
This means that I can still connect to the running session via
|
||||
~emacsclient~, which is useful when I want to evaluate Elisp code from
|
||||
outside of Emacs (e.g. with my ~delight~ shell script that switches
|
||||
outside of Emacs (e.g. with my ~delight.sh~ shell script that switches
|
||||
the entire "environment" theme of my tiling window manager or desktop
|
||||
environment---see my dotfiles for the technicalities).
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ accordingly. This is done in the sections about themes:
|
|||
"Return non-nil if gsettings (GNOME) has a dark theme.
|
||||
Return nil if the DESKTOP_SESSION is either bspwm or
|
||||
herbstluftwm, per the configuration of my dotfiles. Also check
|
||||
the `delight' shell script."
|
||||
the `delight.sh' shell script."
|
||||
(prot-emacs-with-desktop-session
|
||||
(string-match-p
|
||||
"dark"
|
||||
|
|
@ -420,7 +420,7 @@ the `delight' shell script."
|
|||
"Return non-nil if my custom setup has a dark theme.
|
||||
I place a file in ~/.config/prot-xtwm-active-theme which contains
|
||||
a single word describing my system-wide theme. This is part of
|
||||
my dotfiles. Check my `delight' shell script for more."
|
||||
my dotfiles. Check my `delight.sh' shell script for more."
|
||||
(when-let* ((file "~/.config/prot-xtwm-active-theme")
|
||||
((file-exists-p file)))
|
||||
(string-match-p
|
||||
|
|
@ -3010,7 +3010,7 @@ it through a new ~emacsclient~ call. This is useful if we want to
|
|||
launch new frames that share resources with the existing running
|
||||
process. Though the ~emacsclient~ can be used to simply evaluate code
|
||||
outside of an Emacs frame (e.g. to load a new theme, as I do with my
|
||||
~delight~ shell script as part of my dotfiles).
|
||||
~delight.sh~ shell script as part of my dotfiles).
|
||||
|
||||
When we close the last frame, the server is terminated. Whereas the
|
||||
daemon remains active even if all Emacs frames are closed. For me, the
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ _xterm ()
|
|||
|
||||
# Another one of my scripts for live recolouring running terminal
|
||||
# emulators, by using escape sequences.
|
||||
repaint_terminals &
|
||||
repaint_terminals.sh &
|
||||
}
|
||||
|
||||
# TODO 2021-08-27: dunst
|
||||
|
|
@ -18,14 +18,8 @@ _checkexec ()
|
|||
|
||||
### General settings
|
||||
|
||||
# Include my scripts in the PATH.
|
||||
if [ -d "$HOME"/bin ]
|
||||
then
|
||||
PATH=$PATH:"$HOME"/bin
|
||||
fi
|
||||
|
||||
if [ -d "$HOME"/.local/bin ]
|
||||
then
|
||||
# Set PATH so it includes user's private executables.
|
||||
if [ -d "$HOME"/.local/bin ]; then
|
||||
PATH=$PATH:"$HOME"/.local/bin
|
||||
fi
|
||||
|
||||
|
|
@ -34,11 +28,6 @@ then
|
|||
PATH=$PATH:"$HOME"/Builds/bin
|
||||
fi
|
||||
|
||||
if [ -d /opt/bin ]
|
||||
then
|
||||
PATH=$PATH:/opt/bin
|
||||
fi
|
||||
|
||||
if [ -d "/var/lib/flatpak/exports/bin" ]
|
||||
then
|
||||
PATH=$PATH:"/var/lib/flatpak/exports/bin"
|
||||
|
|
|
|||
|
|
@ -62,14 +62,14 @@ _check bspwm_external_rules && \
|
|||
"$(command -v bspwm_external_rules)"
|
||||
|
||||
#### Colours
|
||||
_check bspwm_conf_colors && bspwm_conf_colors
|
||||
_check bspwm_conf_colors.sh && bspwm_conf_colors.sh
|
||||
|
||||
#### Autostart
|
||||
|
||||
# Common settings used by my BSPWM and Herbstluftwm setups
|
||||
# (collectively referred to as "Xorg Tiling Window Managers"). I
|
||||
# configure those window managers to be similar.
|
||||
_check xtwm_common && xtwm_common
|
||||
_check xtwm_common.sh && xtwm_common.sh
|
||||
|
||||
# Add padding equal to the panel height to fix an issue where there is
|
||||
# an overlap between panel and windows.
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ _hc attr theme.title_align left
|
|||
_hc attr theme.title_when multiple_tabs # only with the max layout
|
||||
|
||||
#### Colours
|
||||
_check herbstluftwm_conf_colors && herbstluftwm_conf_colors
|
||||
_check herbstluftwm_conf_colors.sh && herbstluftwm_conf_colors.sh
|
||||
|
||||
#### Rules
|
||||
# TODO 2021-11-08: I have kept the defaults here. Needs review.
|
||||
|
|
@ -126,4 +126,4 @@ _hc rule index=e
|
|||
# Common settings used by my BSPWM and Herbstluftwm setups
|
||||
# (collectively referred to as "Xorg Tiling Window Managers"). I
|
||||
# configure those window managers to be similar.
|
||||
_check xtwm_common && xtwm_common
|
||||
_check xtwm_common.sh && xtwm_common.sh
|
||||
|
|
|
|||
|
|
@ -43,4 +43,4 @@ include i3-theme
|
|||
# include i3WM, BSPWM, and Herbstluftwm. I configure them to be
|
||||
# similar. This means, among others, that I define key bindings using
|
||||
# SXHKD instead of the native configuration method (where applicable).
|
||||
exec command -v xtwm_common > /dev/null && xtwm_common
|
||||
exec command -v xtwm_common.sh > /dev/null && xtwm_common.sh
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
# Xorg tiling window manager focus mode (my script)
|
||||
mod4 + e ; f
|
||||
xtwm_focus_mode
|
||||
xtwm_focus_mode.sh
|
||||
|
||||
# Reload sxhkd
|
||||
mod4 + e ; s
|
||||
|
|
@ -24,7 +24,7 @@ mod4 + e ; s
|
|||
|
||||
# Reload polybar (NOTE: check the panel names in its config)
|
||||
mod4 + e ; p
|
||||
pkill -x polybar && polybar "$DESKTOP_SESSION" &
|
||||
pkill -x polybar && polybar -rq "$DESKTOP_SESSION" &
|
||||
|
||||
# Reload the Xresources file
|
||||
mod4 + e ; x
|
||||
|
|
@ -32,30 +32,30 @@ mod4 + e ; x
|
|||
|
||||
# "Theme" mnemonic
|
||||
mod4 + e ; t
|
||||
delight
|
||||
delight.sh
|
||||
|
||||
# Also use the F5 as it is what I have in Emacs to switch themes. It
|
||||
# makes sense for Super+F5 to do the same for the environment.
|
||||
mod4 + F5
|
||||
delight
|
||||
delight.sh
|
||||
|
||||
mod4 + e ; d ; {q,Q,c,h}
|
||||
dunstctl {close,close-all,context,history-pop}
|
||||
|
||||
# 'dunst_toggle_notify' is a shell script of mine. Check my dotfiles.
|
||||
# 'dunst_toggle_notify.sh' is a shell script of mine. Check my dotfiles.
|
||||
# It pauses notifications.
|
||||
mod4 + e ; d ; p
|
||||
dunst_toggle_notify
|
||||
dunst_toggle_notify.sh
|
||||
|
||||
# Invoke the session management menu (log out, lock, reboot, shutdown).
|
||||
mod4 + e ; Delete
|
||||
poweroptionsmenu
|
||||
poweroptionsmenu.sh
|
||||
|
||||
ctrl + alt + Delete
|
||||
poweroptionsmenu
|
||||
poweroptionsmenu.sh
|
||||
|
||||
mod4 + Delete
|
||||
poweroptionsmenu
|
||||
poweroptionsmenu.sh
|
||||
|
||||
#### Main programs
|
||||
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ mod4 + {Left,Down,Up,Right}
|
|||
#
|
||||
# bspwm_smart_move is part of my dotfiles (link in the description).
|
||||
mod4 + shift + {h,j,k,l}
|
||||
bspwm_smart_move {west,south,north,east}
|
||||
bspwm_smart_move.sh {west,south,north,east}
|
||||
|
||||
mod4 + shift + {Left,Down,Up,Right}
|
||||
bspwm_smart_move {west,south,north,east}
|
||||
bspwm_smart_move.sh {west,south,north,east}
|
||||
|
||||
# Dynamic desktop behaviour: this invokes a script of mine that
|
||||
# implements dynamic desktops (see dotfiles). If the given desktop
|
||||
|
|
@ -80,7 +80,7 @@ mod4 + shift + {Left,Down,Up,Right}
|
|||
# which replaces the "send" commands noted above with their
|
||||
# "send+follow" equivalents.
|
||||
mod4 + {_,shift + ,ctrl + shift +,ctrl +}{0-9}
|
||||
;bspwm_dynamic_desktops {--df,--ns,--nm,--da} {0-9}
|
||||
;bspwm_dynamic_desktops.sh {--df,--ns,--nm,--da} {0-9}
|
||||
|
||||
# mod4 + {_,shift + }{1-9}
|
||||
# bspc {desktop -f,node -d} {1-9}
|
||||
|
|
@ -183,11 +183,11 @@ mod4 + {_,shift + }r
|
|||
# increasing or decreasing past either of those limits, we move to the
|
||||
# other end: 0 5 ... 30 0 5.
|
||||
mod4 + bracket{left,right}
|
||||
bspwm_adjust_gaps {-,+}5
|
||||
bspwm_adjust_gaps.sh {-,+}5
|
||||
|
||||
# Like the above, but for border width.
|
||||
mod4 + shift + bracket{left,right}
|
||||
bspwm_adjust_borders {-,+}5
|
||||
bspwm_adjust_borders.sh {-,+}5
|
||||
|
||||
#### Advanced operations (receptacles and scripted actions)
|
||||
|
||||
|
|
@ -209,34 +209,34 @@ mod4 + n ; r ; r
|
|||
# Insert the marked window (or focused if no marks) in the first
|
||||
# matching receptacle (or preselection if no receptacles).
|
||||
mod4 + n ; r ; i
|
||||
bspwm_smart_presel
|
||||
bspwm_smart_presel.sh
|
||||
|
||||
# Kill/remove the first matching receptacle from the current desktop.
|
||||
# With shift, kill them all at once.
|
||||
mod4 + n ; r ; {_, shift + }k
|
||||
{ \
|
||||
bspc node 'any.leaf.!window.local' -k, \
|
||||
bspwm_multifaceted_operation --kill-all-receptacles \
|
||||
bspwm_multifaceted_operation.sh --kill-all-receptacles \
|
||||
}
|
||||
|
||||
# Summon all marked windows across all desktops to the current desktop.
|
||||
mod4 + w ; m
|
||||
bspwm_multifaceted_operation --summon-all-marked
|
||||
bspwm_multifaceted_operation.sh --summon-all-marked
|
||||
|
||||
# Bring the windows of the given desktop to the current one. With
|
||||
# shift, send the current window to the given one.
|
||||
mod4 + w ; mod4 + {_, shift + }{0-9}
|
||||
bspwm_multifaceted_operation {--bring-desktop-here,--send-desktop-there} {0-9}
|
||||
bspwm_multifaceted_operation.sh {--bring-desktop-here,--send-desktop-there} {0-9}
|
||||
|
||||
# Close {or kill} all windows in the present desktop except the focused
|
||||
# or any marked ones.
|
||||
mod4 + w ; mod4 + {_,shift + }q
|
||||
bspwm_multifaceted_operation --{close,kill}-all-local-non-focused
|
||||
bspwm_multifaceted_operation.sh --{close,kill}-all-local-non-focused
|
||||
|
||||
# Assign the locked flag to all windows in the current desktop. With
|
||||
# shift, remove the locked flag from all.
|
||||
mod4 + w ; {_, shift + }l
|
||||
bspwm_multifaceted_operation {--lock-all-local,--unlock-all-local}
|
||||
bspwm_multifaceted_operation.sh {--lock-all-local,--unlock-all-local}
|
||||
|
||||
|
||||
#### Continuous input mode
|
||||
|
|
@ -252,7 +252,7 @@ mod4 + w ; {_, shift + }l
|
|||
|
||||
# Resize node in the given direction.
|
||||
mod4 + c : {h,j,k,l}
|
||||
bspwm_resize {west,south,north,east} 50
|
||||
bspwm_resize.sh {west,south,north,east} 50
|
||||
|
||||
# Mode for dynamic gaps.
|
||||
mod4 + c : bracket{left,right}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ mod4 + {_,shift +} Tab
|
|||
# or decreasing past either of those limits, we move to the other end:
|
||||
# 0 5 ... 30 0 5.
|
||||
mod4 + bracket{left,right}
|
||||
herbstluftwm_adjust_gaps {-,+}5
|
||||
herbstluftwm_adjust_gaps.sh {-,+}5
|
||||
|
||||
# Like the above, but for border width.
|
||||
mod4 + shift + bracket{left,right}
|
||||
herbstluftwm_adjust_borders {-,+}5
|
||||
herbstluftwm_adjust_borders.sh {-,+}5
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ invoke my custom shell scripts.
|
|||
| Key | Description |
|
||||
|-----------------------------------+---------------------------------------------------------------------------|
|
||||
| Super + F5 | Reload the environemnt's theme (toggle between light and dark) |
|
||||
| Ctrl + Alt + Delete | Bring up the "poweroptionsmenu" script to log out, restart, shutdown |
|
||||
| Ctrl + Alt + Delete | Bring up the "poweroptionsmenu.sh" script to log out, restart, shutdown |
|
||||
| Super + Delete | Same as above |
|
||||
| Super + d | Show a menu for desktop applications |
|
||||
| Super + b | Show a menu with open windows (the "b" is a mnemonic for "buffers") |
|
||||
|
|
@ -60,7 +60,7 @@ These apply to the "entire environment" and thus have the prefix
|
|||
| Super + e ; p | Reload the system panel, which is called "polybar" |
|
||||
| Super + e ; x | Reload the XResources files, which affects XTerm |
|
||||
| Super + e ; t | Reload the environemnt's theme (toggle between light and dark) |
|
||||
| Super + e ; Delete | Bring up the "poweroptionsmenu" script to log out, restart, shutdown |
|
||||
| Super + e ; Delete | Bring up the "poweroptionsmenu.sh" script to log out, restart, shutdown |
|
||||
|
||||
## HerbstluftWM
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ border_width="$(_get_value border_width)"
|
|||
# part of the nodes.
|
||||
effective_padding=$(("$bottom_padding" + "$window_gap"))
|
||||
|
||||
# This is used by the 'delight' script.
|
||||
# This is used by the 'delight.sh' script.
|
||||
focus_mode_status="$HOME"/.config/prot-xtwm-focus-mode
|
||||
|
||||
if [ "$effective_padding" -ge "$panel_height" ]
|
||||
|
|
@ -33,7 +33,7 @@ smart_window_surroundings="$(_get_value smart_window_surroundings)"
|
|||
smart_frame_surroundings="$(_get_value smart_frame_surroundings)"
|
||||
frame_border_width="$(_get_value frame_border_width)"
|
||||
|
||||
# This is used by the 'delight' script.
|
||||
# This is used by the 'delight.sh' script.
|
||||
focus_mode_status="$HOME"/.config/prot-xtwm-focus-mode
|
||||
|
||||
_hc ()
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
! Part of my dotfiles: <https://github.com/protesilaos/dotfiles>.
|
||||
!
|
||||
! IMPORTANT do not edit manually!!! All themes are changed by a single
|
||||
! script: delight.
|
||||
! script: delight.sh.
|
||||
#include "modus_operandi.Xcolors"
|
||||
|
|
|
|||
|
|
@ -36,11 +36,6 @@ if [ -n "$BASH_VERSION" ]; then
|
|||
fi
|
||||
|
||||
# Set PATH so it includes user's private executables.
|
||||
if [ -d "$HOME"/bin ]; then
|
||||
PATH=$PATH:"$HOME"/bin
|
||||
fi
|
||||
|
||||
# This is another possible location for user-specific binaries.
|
||||
if [ -d "$HOME"/.local/bin ]; then
|
||||
PATH=$PATH:"$HOME"/.local/bin
|
||||
fi
|
||||
|
|
@ -50,11 +45,6 @@ then
|
|||
PATH=$PATH:"$HOME"/Builds/bin
|
||||
fi
|
||||
|
||||
if [ -d /opt/bin ]
|
||||
then
|
||||
PATH=$PATH:/opt/bin
|
||||
fi
|
||||
|
||||
##########################
|
||||
# Environment essentials #
|
||||
##########################
|
||||
|
|
|
|||
Loading…
Reference in a new issue