Stormux now offers i3 window manager instead of ratpoison.
This commit is contained in:
parent
f7212849cb
commit
d5b753eac5
175
.includes/gui.sh
175
.includes/gui.sh
@ -4,7 +4,7 @@
|
|||||||
packages="$1"
|
packages="$1"
|
||||||
packages="${packages//lxqt/lxqt lxterminal oxygen-icons ratpoison network-manager-applet}"
|
packages="${packages//lxqt/lxqt lxterminal oxygen-icons ratpoison network-manager-applet}"
|
||||||
packages="${packages//mate/mate mate-extra network-manager-applet}"
|
packages="${packages//mate/mate mate-extra network-manager-applet}"
|
||||||
packages="${packages//ratpoison/ratpoison dex lxterminal yad}"
|
packages="${packages//i3/clipster grun jq i3-wm libnotify lxterminal notification-daemon pamixer playerctl python-i3ipc sgtk-menu sox transfersh yad}"
|
||||||
|
|
||||||
# Make sure system is up to date
|
# Make sure system is up to date
|
||||||
yay -Syu --noconfirm
|
yay -Syu --noconfirm
|
||||||
@ -16,8 +16,7 @@ case "${1}" in
|
|||||||
*) session="$1";;
|
*) session="$1";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
install_package ${packages} firefox libcanberra nodm-dgw orca sound-theme-smooth speech-dispatcher xclip xf86-video-dummy-with-vt xorg
|
install_package ${packages} firefox nodm-dgw orca speech-dispatcher xclip xf86-video-dummy-with-vt xorg
|
||||||
sudo systemctl enable canberra-system-bootup.service
|
|
||||||
|
|
||||||
# Configure nodm
|
# Configure nodm
|
||||||
sudo sed -i "s/{user}/$USER/g" /etc/nodm.conf
|
sudo sed -i "s/{user}/$USER/g" /etc/nodm.conf
|
||||||
@ -53,171 +52,15 @@ EOF
|
|||||||
echo "exec ${session}" >> ~/.xinitrc
|
echo "exec ${session}" >> ~/.xinitrc
|
||||||
chmod 755 ~/.xinitrc
|
chmod 755 ~/.xinitrc
|
||||||
|
|
||||||
if [[ "$1" == "ratpoison" ]]; then
|
if [[ "$1" == "i3" ]]; then
|
||||||
install_package ratpoison
|
gitDir="$(mktemp -d)"
|
||||||
|
echo "Loading I38, please wait..."
|
||||||
|
git clone -q https://git.stormux.org/storm/*38 "$gitDir"
|
||||||
|
cd "$gitDir"
|
||||||
|
./i38.sh -x
|
||||||
|
./i38
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -e ~/.ratpoisonrc ]]; then
|
|
||||||
cat << "EOF" > ~/.ratpoisonrc
|
|
||||||
# Generated by strychnine (setup.sh) http://gitlab.com/stormdragon2976/strychnine
|
|
||||||
|
|
||||||
# Miscellaneous
|
|
||||||
startup_message off
|
|
||||||
set winname title
|
|
||||||
set bgcolor #000000
|
|
||||||
set fgcolor #FFFFFF
|
|
||||||
set font -*-terminus-medium-r-normal-*-24-*-*-*-*-*-*-*
|
|
||||||
set waitcursor 1
|
|
||||||
banish
|
|
||||||
|
|
||||||
# Unbind section
|
|
||||||
unbind C-A
|
|
||||||
unbind A
|
|
||||||
unbind C-a
|
|
||||||
unbind a
|
|
||||||
unbind c
|
|
||||||
unbind C-c
|
|
||||||
unbind C-f
|
|
||||||
unbind F
|
|
||||||
unbind r
|
|
||||||
unbind C-r
|
|
||||||
unbind S
|
|
||||||
unbind C-S
|
|
||||||
unbind s
|
|
||||||
unbind C-s
|
|
||||||
unbind C-t
|
|
||||||
unbind C-v
|
|
||||||
unbind v
|
|
||||||
unbind C-w
|
|
||||||
unbind C-Down
|
|
||||||
unbind Down
|
|
||||||
unbind C-exclam
|
|
||||||
unbind exclam
|
|
||||||
unbind C-Left
|
|
||||||
unbind Left
|
|
||||||
unbind question
|
|
||||||
unbind C-Right
|
|
||||||
unbind Right
|
|
||||||
unbind C-Up
|
|
||||||
unbind Up
|
|
||||||
unbind C-apostrophe
|
|
||||||
unbind apostrophe
|
|
||||||
unbind colon
|
|
||||||
unbind t
|
|
||||||
|
|
||||||
# Key binding section
|
|
||||||
escape M-Escape
|
|
||||||
# Alt+f2 executes the run dialog
|
|
||||||
definekey top M-F2 run_dialog
|
|
||||||
# Alt+tab switches through open windows
|
|
||||||
definekey top M-Tab next
|
|
||||||
definekey top M-ISO_Left_Tab prev
|
|
||||||
definekey top M-F4 close_window
|
|
||||||
definekey top XF86AudioPrev music_player_previous_track
|
|
||||||
definekey top XF86AudioMute music_player_pause
|
|
||||||
definekey top XF86AudioPlay music_player_play
|
|
||||||
definekey top XF86AudioStop music_player_stop
|
|
||||||
definekey top XF86AudioNext music_player_next_track
|
|
||||||
definekey top XF86AudioLowerVolume music_player_decrease_volume
|
|
||||||
definekey top XF86AudioRaiseVolume music_player_increase_volume
|
|
||||||
bind exclam run_dialog
|
|
||||||
bind question ratpoison_keybindings
|
|
||||||
bind w exec /usr/bin/firefox
|
|
||||||
bind e exec /usr/bin/leafpad
|
|
||||||
bind m exec /usr/bin/mumble
|
|
||||||
bind p exec /usr/bin/pidgin
|
|
||||||
bind c exec /usr/bin/lxterminal
|
|
||||||
bind C-c exec /usr/bin/lxterminal
|
|
||||||
# Music player bindings:
|
|
||||||
bind M-Z music_player_previous_track
|
|
||||||
bind M-X music_player_play
|
|
||||||
bind M-C music_player_pause
|
|
||||||
bind M-V music_player_stop
|
|
||||||
bind M-B music_player_next_track
|
|
||||||
bind M-underscore music_player_decrease_volume
|
|
||||||
bind M-plus music_player_increase_volume
|
|
||||||
bind M-U music_player_show_info
|
|
||||||
bind C-exclam run_in_terminal_dialog
|
|
||||||
bind C-A set_window_name
|
|
||||||
bind A set_window_name
|
|
||||||
bind C-a show_date
|
|
||||||
bind a show_date
|
|
||||||
bind C-t show_date
|
|
||||||
bind O exec /usr/bin/orca -r # Restart Orca
|
|
||||||
bind C-v ratpoison_version
|
|
||||||
bind v ratpoison_version
|
|
||||||
bind C-apostrophe window_menu
|
|
||||||
bind apostrophe window_menu
|
|
||||||
bind colon run_ratpoison_command
|
|
||||||
bind C-colon reload_ratpoison_configuration
|
|
||||||
bind C-M-r restart
|
|
||||||
bind C-M-q quit
|
|
||||||
|
|
||||||
# Autostart section
|
|
||||||
exec /usr/bin/rpws init 4 -a
|
|
||||||
bind Up go_to_workspace_one
|
|
||||||
bind Left go_to_workspace_two
|
|
||||||
definekey top C-F1 go_to_workspace_one
|
|
||||||
definekey top C-F2 go_to_workspace_two
|
|
||||||
bind Down go_to_workspace_three
|
|
||||||
definekey top C-F3 go_to_workspace_three
|
|
||||||
bind Right go_to_workspace_four
|
|
||||||
definekey top C-F4 go_to_workspace_four
|
|
||||||
exec /usr/lib/notification-daemon-1.0/notification-daemon
|
|
||||||
exec /usr/bin/xbrlapi --quiet
|
|
||||||
exec if [ "$(gsettings get org.gnome.desktop.a11y.applications screen-reader-enabled)" != "true" ]; then gsettings set org.gnome.desktop.a11y.applications screen-reader-enabled true&& notify-send "QT5 accessibility enabled. You need to restart ratpoison for the changes to take affect.";fi
|
|
||||||
exec /usr/bin/orca
|
|
||||||
|
|
||||||
# Alias Section
|
|
||||||
alias close_window exec ratpoison -c delete
|
|
||||||
alias ratpoison_keybindings exec f=$(mktemp);ratpoison -c "help root" > $f && yad --text-info --show-cursor --title "Ratpoison Keybindings" --button "Close:0" --filename "$f";rm "$f"
|
|
||||||
alias music_player_previous_track exec playerctl previous && notify-send "$(playerctl metadata -f '{{title}} by {{artist}}')"
|
|
||||||
alias music_player_play exec playerctl play && notify-send "$(playerctl metadata -f '{{title}} by {{artist}}')"
|
|
||||||
alias music_player_pause exec playerctl play-pause && notify-send "$(playerctl metadata -f '{{title}} by {{artist}} {{status}}')"
|
|
||||||
alias music_player_stop exec playerctl stop
|
|
||||||
alias music_player_next_track exec playerctl next && notify-send "$(playerctl metadata -f '{{title}} by {{artist}}')"
|
|
||||||
alias music_player_decrease_volume exec playerctl volume 0.05-
|
|
||||||
alias music_player_increase_volume exec playerctl volume 0.05+
|
|
||||||
alias music_player_show_info exec notify-send "$(playerctl metadata -f '{{title}} by {{artist}} from {{album}} via {{playerName}}')"
|
|
||||||
alias run_dialog exec historyPath="${XDG_CONFIG_HOME:-$HOME/.config}/strychnine";if ! [ -d "$historyPath" ]; then mkdir -p "$historyPath";fi;write_history(){ oldHistory="$(grep -v "$txt" "$historyPath/history" | head -n 49)";echo -e "$txt\n$oldHistory" | sed 's/^$//g' > "$historyPath/history"; };if [ -f "$historyPath/history" ]; then txt=$(yad --entry --editable --title "Ratpoison" --text "Execute program or enter file" --button "Open:0" --separator "\n" --rest "$historyPath/history");else txt=$(yad --entry --title "Ratpoison" --text "Execute program or enter file" --button "Open:0");fi;if [ -z "$txt" ]; then exit 0;fi;if [[ "$txt" =~ ^ftp://|http://|https://|www.* ]]; then /usr/bin/brave $txt;write_history;exit 0;fi;if [[ "$txt" =~ ^mailto://.* ]]; then xdg-email $txt;write_history;exit 0;fi;if [[ "$txt" =~ ^man://.* ]]; then eval "${txt/:\/\// }" | yad --text-info --show-cursor --button "Close:0" --title "Ratpoison" -;write_history;exit 0;fi;if command -v "$(echo "$txt" | cut -d " " -f1)" &> /dev/null ; then eval $txt& else xdg-open $txt&fi;write_history;exit 0
|
|
||||||
alias run_in_terminal_dialog exec c="$(yad --entry --title "Ratpoison" --text "Enter command:")" && /usr/bin/lxterminal -e $c
|
|
||||||
alias set_window_name exec t="$(yad --entry --title "Ratpoison" --text "Enter window name") && ratpoison -c "title $t"
|
|
||||||
alias show_date exec notify-send "$(date +"%A, %B %d, %Y%n%I:%M%p")"
|
|
||||||
alias ratpoison_version exec notify-send "$(ratpoison -c "version")"
|
|
||||||
alias window_menu exec ifs="$IFS";IFS=$'\n';w="$(yad --list --title "Ratpoison" --text "Select Window" --column "Select" $(ratpoison -c "windows"))";IFS="$ifs";ratpoison -c "select ${w:0:1}"
|
|
||||||
alias run_ratpoison_command exec c="$(yad --entry --title "Ratpoison" --text="Enter Ratpoison command:")" && ratpoison -c "$c"
|
|
||||||
alias reload_ratpoison_configuration exec ratpoison -c "source /home/storm/.ratpoisonrc"&¬ify-send "Ratpoison configuration reloaded"
|
|
||||||
addhook newwindow announce_new_window
|
|
||||||
addhook key announce_top_level_key
|
|
||||||
alias announce_new_window exec bash -c 'excludedWindowNames="zenity";winName="$(ratpoison -c "info %t")";if ! [[ "$winName" =~ ^(${excludedWindowNames})$ ]]; then play -n synth .25 sin 440:880 sin 480:920 remix - norm -3 pitch -500;fi'
|
|
||||||
alias announce_top_level_key exec play -qV0 "|sox -np synth .07 sq 400" "|sox -np synth .5 sq 800" fade h 0 .5 .5 norm -20
|
|
||||||
alias go_to_workspace_one exec rpws 1
|
|
||||||
alias go_to_workspace_two exec rpws 2
|
|
||||||
alias go_to_workspace_three exec rpws 3
|
|
||||||
alias go_to_workspace_four exec rpws 4
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Create file ~/.gtkrc-2.0
|
|
||||||
cat << "EOF" > ~/.gtkrc-2.0
|
|
||||||
gtk-modules="canberra-gtk-module"
|
|
||||||
gtk-enable-event-sounds=1
|
|
||||||
gtk-enable-input-feedback-sounds=1
|
|
||||||
gtk-sound-theme-name="Smooth"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
# Create file ~/.config/gtk-3.0/settings.ini
|
|
||||||
mkdir -p ~/.config/gtk-3.0/
|
|
||||||
cat << "EOF" > ~/.config/gtk-3.0/settings.ini
|
|
||||||
[Settings]
|
|
||||||
gtk-modules=canberra-gtk-module
|
|
||||||
gtk-enable-event-sounds=1
|
|
||||||
gtk-enable-input-feedback-sounds=1
|
|
||||||
gtk-sound-theme-name=Smooth
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
# Configure speech-dispatcher
|
# Configure speech-dispatcher
|
||||||
if [[ ! -d ~/.config/speech-dispatcher ]]; then
|
if [[ ! -d ~/.config/speech-dispatcher ]]; then
|
||||||
|
@ -67,8 +67,8 @@ while [[ "$choice" != "Exit" ]]; do
|
|||||||
"Install Mate Desktop")
|
"Install Mate Desktop")
|
||||||
source .includes/gui.sh mate
|
source .includes/gui.sh mate
|
||||||
;;
|
;;
|
||||||
"Install Ratpoison Windowmanager")
|
"Install i3 Windowmanager")
|
||||||
source .includes/gui.sh ratpoison
|
source .includes/gui.sh i3
|
||||||
;;
|
;;
|
||||||
"Screen reader")
|
"Screen reader")
|
||||||
source .includes/screenreader.sh
|
source .includes/screenreader.sh
|
||||||
@ -96,7 +96,7 @@ while [[ "$choice" != "Exit" ]]; do
|
|||||||
fi
|
fi
|
||||||
options+=("Install Lxqt Desktop"
|
options+=("Install Lxqt Desktop"
|
||||||
"Install Mate Desktop"
|
"Install Mate Desktop"
|
||||||
"Install Ratpoison Windowmanager"
|
"Install i3 Windowmanager"
|
||||||
"Screen reader"
|
"Screen reader"
|
||||||
)
|
)
|
||||||
if [[ "${architecture}" == "armv7l" ]]; then
|
if [[ "${architecture}" == "armv7l" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user