Post History
MWE startx && xrandr-invert-colors Problem It seems that anything after startx does not get issued in the resulting X session. I'd like to make a bash function that sets up my monito...
#4: Post edited
- # MWE
- ```sh
- startx && xrandr-invert-colors
- ```
- # Problem
- It seems that anything after `startx` does not get issued in the
resulting Xsession. I'd like to make a bash function that sets up my- monitors based on which office I'm working out of. Assuming the
- `*-display` commands are `xrandr` commands, that can be substituted with
- `xrandr-invert-colors`:
- ```sh
- office-one()
- {
- startx
- office-one-display
- }
- office-two()
- {
- startx
- office-two-display
- }
- ```
- Both of these are accessible from the console on startup, and both
- successfully `startx`, but everything after that has no effect.
- # Tried
- Spinning until in an X session:
- ```sh
- in_xsession()
- {
- xhost &> /dev/null
- return !$?
- }
- office-one()
- {
- startx
- until [ in_xsession ]; do done
- office-one-display
- }
- office-two()
- {
- startx
- until [ in_xsession ]; do done
- office-two-display
- }
- ```
- but it has the same behavior.
- # Question
- How do I "append" commands to `startx` such that they issue in the
- resulting X session? For convenience, I'd like to be able to do this
- from a bash function as shown.
- # Notes
- I used `xrandr-invert-colors` for a visual effect, but you can replace
- that with any application launch like `emacs`, `firefox`, etc..
- I am using `zsh`.
- # MWE
- ```sh
- startx && xrandr-invert-colors
- ```
- # Problem
- It seems that anything after `startx` does not get issued in the
- resulting X session. I'd like to make a bash function that sets up my
- monitors based on which office I'm working out of. Assuming the
- `*-display` commands are `xrandr` commands, that can be substituted with
- `xrandr-invert-colors`:
- ```sh
- office-one()
- {
- startx
- office-one-display
- }
- office-two()
- {
- startx
- office-two-display
- }
- ```
- Both of these are accessible from the console on startup, and both
- successfully `startx`, but everything after that has no effect.
- # Tried
- Spinning until in an X session:
- ```sh
- in_xsession()
- {
- xhost &> /dev/null
- return !$?
- }
- office-one()
- {
- startx
- until [ in_xsession ]; do done
- office-one-display
- }
- office-two()
- {
- startx
- until [ in_xsession ]; do done
- office-two-display
- }
- ```
- but it has the same behavior.
- # Question
- How do I "append" commands to `startx` such that they issue in the
- resulting X session? For convenience, I'd like to be able to do this
- from a bash function as shown.
- # Notes
- I used `xrandr-invert-colors` for a visual effect, but you can replace
- that with any application launch like `emacs`, `firefox`, etc..
- I am using `zsh`.
#3: Post edited
- # MWE
- ```sh
- startx && xrandr-invert-colors
- ```
- # Problem
- It seems that anything after `startx` does not get issued in the
- resulting Xsession. I'd like to make a bash function that sets up my
- monitors based on which office I'm working out of. Assuming the
- `*-display` commands are `xrandr` commands, that can be substituted with
- `xrandr-invert-colors`:
- ```sh
- office-one()
- {
- startx
- office-one-display
- }
- office-two()
- {
- startx
- office-two-display
- }
- ```
- Both of these are accessible from the console on startup, and both
- successfully `startx`, but everything after that has no effect.
- # Tried
- Spinning until in an X session:
- ```sh
- in_xsession()
- {
- xhost &> /dev/null
- return !$?
- }
- office-one()
- {
- startx
- until [ in_xsession ]; do done
- office-one-display
- }
- office-two()
- {
- startx
- until [ in_xsession ]; do done
- office-two-display
- }
- ```
- but it has the same behavior.
- # Question
- How do I "append" commands to `startx` such that they issue in the
resulting Xsession? For convenience, I'd like to be able to do this froma bash function as shown.- # Notes
- I used `xrandr-invert-colors` for a visual effect, but you can replace
- that with any application launch like `emacs`, `firefox`, etc..
- I am using `zsh`.
- # MWE
- ```sh
- startx && xrandr-invert-colors
- ```
- # Problem
- It seems that anything after `startx` does not get issued in the
- resulting Xsession. I'd like to make a bash function that sets up my
- monitors based on which office I'm working out of. Assuming the
- `*-display` commands are `xrandr` commands, that can be substituted with
- `xrandr-invert-colors`:
- ```sh
- office-one()
- {
- startx
- office-one-display
- }
- office-two()
- {
- startx
- office-two-display
- }
- ```
- Both of these are accessible from the console on startup, and both
- successfully `startx`, but everything after that has no effect.
- # Tried
- Spinning until in an X session:
- ```sh
- in_xsession()
- {
- xhost &> /dev/null
- return !$?
- }
- office-one()
- {
- startx
- until [ in_xsession ]; do done
- office-one-display
- }
- office-two()
- {
- startx
- until [ in_xsession ]; do done
- office-two-display
- }
- ```
- but it has the same behavior.
- # Question
- How do I "append" commands to `startx` such that they issue in the
- resulting X session? For convenience, I'd like to be able to do this
- from a bash function as shown.
- # Notes
- I used `xrandr-invert-colors` for a visual effect, but you can replace
- that with any application launch like `emacs`, `firefox`, etc..
- I am using `zsh`.
#2: Post edited
- # MWE
- ```sh
- startx && xrandr-invert-colors
- ```
- # Problem
- It seems that anything after `startx` does not get issued in the
- resulting Xsession. I'd like to make a bash function that sets up my
- monitors based on which office I'm working out of. Assuming the
- `*-display` commands are `xrandr` commands, that can be substituted with
- `xrandr-invert-colors`:
- ```sh
- office-one()
- {
- startx
- office-one-display
- }
- office-two()
- {
- startx
- office-two-display
- }
- ```
- Both of these are accessible from the console on startup, and both
- successfully `startx`, but everything after that has no effect.
- # Tried
- Spinning until in an X session:
- ```sh
- in_xsession()
- {
- xhost &> /dev/null
- return !$?
- }
- office-one()
- {
- startx
- until [ in_xsession ]; do done
- office-one-display
- }
- office-two()
- {
- startx
- until [ in_xsession ]; do done
- office-two-display
- }
- but it has the same behavior.
- # Question
- How do I "append" commands to `startx` such that they issue in the
- resulting Xsession? For convenience, I'd like to be able to do this from
- a bash function as shown.
- # Notes
- I used `xrandr-invert-colors` for a visual effect, but you can replace
- that with any application launch like `emacs`, `firefox`, etc..
- I am using `zsh`.
- # MWE
- ```sh
- startx && xrandr-invert-colors
- ```
- # Problem
- It seems that anything after `startx` does not get issued in the
- resulting Xsession. I'd like to make a bash function that sets up my
- monitors based on which office I'm working out of. Assuming the
- `*-display` commands are `xrandr` commands, that can be substituted with
- `xrandr-invert-colors`:
- ```sh
- office-one()
- {
- startx
- office-one-display
- }
- office-two()
- {
- startx
- office-two-display
- }
- ```
- Both of these are accessible from the console on startup, and both
- successfully `startx`, but everything after that has no effect.
- # Tried
- Spinning until in an X session:
- ```sh
- in_xsession()
- {
- xhost &> /dev/null
- return !$?
- }
- office-one()
- {
- startx
- until [ in_xsession ]; do done
- office-one-display
- }
- office-two()
- {
- startx
- until [ in_xsession ]; do done
- office-two-display
- }
- ```
- but it has the same behavior.
- # Question
- How do I "append" commands to `startx` such that they issue in the
- resulting Xsession? For convenience, I'd like to be able to do this from
- a bash function as shown.
- # Notes
- I used `xrandr-invert-colors` for a visual effect, but you can replace
- that with any application launch like `emacs`, `firefox`, etc..
- I am using `zsh`.
#1: Initial revision
How to append commands to startx from console
# MWE ```sh startx && xrandr-invert-colors ``` # Problem It seems that anything after `startx` does not get issued in the resulting Xsession. I'd like to make a bash function that sets up my monitors based on which office I'm working out of. Assuming the `*-display` commands are `xrandr` commands, that can be substituted with `xrandr-invert-colors`: ```sh office-one() { startx office-one-display } office-two() { startx office-two-display } ``` Both of these are accessible from the console on startup, and both successfully `startx`, but everything after that has no effect. # Tried Spinning until in an X session: ```sh in_xsession() { xhost &> /dev/null return !$? } office-one() { startx until [ in_xsession ]; do done office-one-display } office-two() { startx until [ in_xsession ]; do done office-two-display } but it has the same behavior. # Question How do I "append" commands to `startx` such that they issue in the resulting Xsession? For convenience, I'd like to be able to do this from a bash function as shown. # Notes I used `xrandr-invert-colors` for a visual effect, but you can replace that with any application launch like `emacs`, `firefox`, etc.. I am using `zsh`.