Giter VIP home page Giter VIP logo

linux-dropdown-terminal's Introduction

Profile

๐Ÿ‘‹ Hello There

username

const profile = {
    firstName: 'Edoardo',
    lastName: 'Zerbo',
    telegram: 'https://t.me/WMD_Edoardo',
    linkedin: 'https://www.linkedin.com/in/edoardo-zerbo-551b93190/',
    preferred_os: 'Linux',
    languages: ['Python', 'Java', 'JS', 'Bash', 'TS', "C#"],
    frameworks: ['React', 'SpringBoot'],
    container: ['Docker', 'Kubernetes'],
    databases: ['MongoDB', 'MySQL', 'PostgreSQL'],
    editors: ['nvim', 'VSCode', 'IntelliJ'],
    fullstack: true,
    learning: ['Rust'],
}

Stats

Expertise

react

springboot

python

mongodb

node.js

C#

linux-dropdown-terminal's People

Contributors

nautilor avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

twix53791

linux-dropdown-terminal's Issues

Some little mistakes in the code??

Hi Nautilor,

Thank you for this little script just as I like, simple and efficient.
I am just wondering about some little things strange, probably a first version you corrected after:

  • The function 'is running' check if the drop_terminal process is running, not if the window is hide or displayed ! So, I guess, what we both want to do is to toggle the visibility of the window and not restart every time the drop_down process. So I guess another function is necessary. On bspwm I use:
function status {
    WID=`wmctrl -lx | grep "drop_terminal.drop_terminal" | grep -v "grep" | awk '{print $1}'`
    state=$(bspc query -N -n .hidden)
    [[ "${state,,}" == *"${WID,,}"* ]] && echo 1 || echo 0
}

Any function which check the hidden/visible status of the window can work. the WID check can be replaced by something like WID=cat $file, where $file refers to a file written when the 'spawn' function launches the drop_terminal, putting there the window id ; maybe faster ?

Then, the function 'toggle' checks 'status' and not 'is running' (if [ status -eq 0 ]; then...)

  • The function "show" don't exit if 'is running', but if it is visible, but as personally I just use the toggle function, which checks already if the window is visible, I just deleted this condition from 'show'. On bspwm:
function show {
    WID=`cat $file`
    bspc node $WID -g hidden=off && bspc node -f $WID
    exit
}
  • The verification of 'is running' to spawn the terminal if it is not, I do it at the beginning of the script :
if [ `is_running` -eq 0 ]; then
   spawn
fi

[ $# -eq 0 ] && help
[ "$1" = "hide" ] && hide
[ "$1" = "show" ] && show
[ "$1" = "toggle" ] && toggle

Now I seems to me this code has a little more sense !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.