diff options
| author | srdusr <trevorgray@srdusr.com> | 2024-06-23 19:30:49 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2024-06-23 19:30:49 +0200 |
| commit | f5eaa44d854d0844efa874912f0cdf8cc5907e24 (patch) | |
| tree | ebefb8dcb760856a39f2ccd8aeff4664b391e227 /session | |
| parent | 6710ea003bcf04749761f3774e842278edc92212 (diff) | |
| download | dotfiles-f5eaa44d854d0844efa874912f0cdf8cc5907e24.tar.gz dotfiles-f5eaa44d854d0844efa874912f0cdf8cc5907e24.zip | |
Add session script
Diffstat (limited to 'session')
| -rwxr-xr-x | session | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#!/bin/bash + +# Check if the desired session is provided as an argument +if [ "$1" ]; then + case "$1" in + bspwm | sway | Hyprland) + echo "$1" >~/.session + echo "Session choice set to: $1" + ;; + *) + echo "Unsupported session: $1" + ;; + esac + + # Kill the current X session or logout the user + pkill -KILL -u "$USER" +else + echo "Usage: switch_session.sh <session_name>" + echo "Example: switch_session.sh bspwm" + exit 1 +fi |
