Last active
October 26, 2022 09:19
-
-
Save aitseitz/267c01bfe49cca4f31c6234b0b94c67e to your computer and use it in GitHub Desktop.
How I startup my dailywork.sh in Linux (Mint)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a Script to automatically open the applications and webpages I need | |
# for daily work and it places them on the correct linux workspace | |
# I took some code & ideas from: | |
# https://github.com/lu0/dotfiles_linuxMint/blob/master/scripts/startup_session.sh | |
# | |
# Author: Alexander Seitz | |
# Repo: https://gist.github.com/aitseitz | |
# | |
# Documentation: | |
# Here's an example of how the scripts works. | |
# command line 1: Start the desired programm in the background (&) | |
# hypnotix & | |
# command line 2: Wait a reasonable amount of time in seconds till the programm window appears on screen | |
# sleep 2 | |
# command line 3: List all open windows in windowmanager and save the window id from your started programm in a variable | |
# TV_WINDOW_ID=$(wmctrl -lGx | grep -v "grep" | grep "Hypnotix.py" | awk '{print $1}') | |
# command line 4: Move the Programm to the desired workspace | |
# wmctrl -i -r ${TV_WINDOW_ID} -t 3 | |
BROWSER=chromium | |
#BROWSER=vivaldi | |
#******************************************************************************# | |
# Workspace 1: | |
#******************************************************************************# | |
# Time Tracking Tool | |
toptracker & sleep 2 | |
wmctrl -r "TopTracker" -t 0 | |
# Outlook App | |
chromium --profile-directory=Default --app-id=faolnafnngnfdaknnbpnkhgohbobgegn & | |
sleep 7 | |
$OUTLOOK_ID=$(wmctrl -lG | grep -v "grep" | grep "Outlook (PWA)" | awk '{print $1}') | |
wmctrl -i -r ${OUTLOOK_ID} -t 0 | |
# Browser Taps Workspace 1 | |
$BROWSER --new-window "https://teams.microsoft.com/" "https://mama-manager.de/" & | |
sleep 5 | |
COMPANY_BROWSER_ID=$(wmctrl -lG | grep -v "grep" | grep "Mama" | awk '{print $1}') | |
wmctrl -i -r ${COMPANY_BROWSER_ID} -t 0 | |
#******************************************************************************# | |
# Workspace 2: # | |
#******************************************************************************# | |
$BROWSER --new-window "https://community.hyland.com/connect/hyland-research-and-development" & sleep 4 | |
CUSTOMER_BROWSER_ID=$(wmctrl -lGx | grep -v "grep" | grep -i "Hyland" | awk '{print $1}') | |
wmctrl -i -r ${CUSTOMER_BROWSER_ID} -t 1 | |
$PIDGIN=$(wmctrl -lGx | grep -v "grep" | grep -i "Pidgin" | awk '{print $1}') | |
pidgin & | |
wmctrl -i -r ${CUSTOMER_BROWSER_ID} -t 1 | |
teams & sleep 6 | |
TEAMS_ID=$(wmctrl -lGx | grep -v "grep" | grep "Microsoft Teams" | awk '{print $1}') | |
wmctrl -i -r ${TEAMS_ID} -t 1 | |
$BROWSER --new-window "https://alfresco.atlassian.net/jira/software/c/projects/ALF/issues/?filter=allissues" & | |
sleep 3 | |
JIRA=$(wmctrl -lGx | grep -v "grep" | grep "Jira" | awk '{print $1}') | |
wmctrl -i -r ${JIRA} -t 1 | |
evolution & | |
sleep 6 | |
CUSTOMER_EMAIL=$(wmctrl -lG | grep -v "grep" | grep "Evolution" | awk '{print $1}') | |
wmctrl -i -r ${CUSTOMER_EMAIL} -t 1 | |
#******************************************************************************# | |
# Workspace 3: | |
#******************************************************************************# | |
# Start IntelliJ Idea | |
# /home/<yousername>/APPLICATIONS/idea-IU-183.4284.148/bin/idea.sh & | |
/usr/local/bin/idea & sleep 10 | |
INTELLJ=$(wmctrl -lGx | grep -v "grep" | grep -vi "Tip of the Day" | grep "jetbrains-idea" | awk '{print $1}') | |
wmctrl -i -r ${INTELLJ} -t 2 | |
# Nagstamon Monitoring (runs in systemtray, therefore no window movement) | |
nagstamon & | |
#******************************************************************************# | |
# Workspace 4: | |
#******************************************************************************# | |
# Password Manager | |
keepassxc & sleep 2 | |
KEEPASSXC=$(wmctrl -lGx | grep -v "grep" | grep "KeePassXC" | awk '{print $1}') | |
wmctrl -i -r ${KEEPASSXC} -t 3 | |
# Playback cusic with mpv player with Radio streams | |
#gnome-terminal -- /usr/bin/zsh -c "mpv --version; mpv http://streams.fluxfm.de/metalfm/mp3-128/radiode/ --volume=80; exec zsh" & | |
#gnome-terminal -- /usr/bin/zsh -c "mpv --version; mpv https://nashe1.hostingradio.ru:18000/ultra-192.mp3 --volume=80; exec zsh" & | |
#sleep 6 | |
#MPV_MUSIK=$(wmctrl -lGx | grep -v "grep" | grep "Gnome-terminal" | awk '{print $1}') | |
#wmctrl -i -r ${MPV_MUSIK} -t 3 | |
# Switch to default Workspace 2: | |
wmctrl -s 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment