|
C0ffeeMan
|
C0ffeeMan
|
whenever i do a /window -h , it should be the opposite of /window -w
they are hide/show button in taskbar, respectively.
but /window -h #channel will minimize the channel also, i don't want it to do that, because /window -n #channel should do that on it's own.
|
|
|
|
Joined: Dec 2002
Posts: 1,253
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,253 |
|
|
|
|
C0ffeeMan
|
C0ffeeMan
|
i fixed my own problem, becuase i had to hide it in the switchbar but not minimize it
but not restore windows that were already minimized (i'm cycling through alot of channels)
so here's my fix
alias hidetask { if ($window($1).state == hidden) { window -h $1 } if ($window($1).state == normal) { window -h $1 | window -r $1 } }
|
|
|
|
Joined: Dec 2002
Posts: 1,253
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,253 |
Why are you re-hiding windows that are already hidden?
alias hidetask {
window $&
$iif($window($1-).state == minimized, -h, $&
$iif($window($1-).state == normal, -hr, $&
$iif($window($1-).state == maximized, -hx))) $&
$iif($2, $+(",$1-,"), $1)
} Using this version, you can /hidetask Status Window or some other multi-word window name (like sends and gets), as well as channel, query, chat or fserve windows.
|
|
|
|
Joined: Feb 2003
Posts: 2,737
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,737 |
mmm, sexy use of $iif and $& What about this method? alias hidetask {
goto $window($$1-).state
:minimized | window -h " $+ $1- $+ " | return
:normal | window -hr " $+ $1- $+ " | return
:maximized | window -hx " $+ $1- $+ " | return
:hidden | return
} - Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Jan 2003
Posts: 2,125
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,125 |
How about this? :tongue: alias hidetask window $$replace($window($1-).state,hidden,$null,minimized,-h,normal,-hr,maximized,-hx) $iif($2," $+ $1-",$1) The reason I use $iif() to check for a 2nd word is that /window does not like quotes around a DCC chat window name, so /window -h "=blah" doesn't work.
|
|
|
|
Joined: Feb 2003
Posts: 2,737
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,737 |
/window does not like quotes around a DCC chat window name
Hmmm, thanks. Never noticed that.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Jan 2003
Posts: 247
Fjord artisan
|
Fjord artisan
Joined: Jan 2003
Posts: 247 |
instead of =nick you can use "Chat nick"
If i remember an old code from a switchbar, it works.
|
|
|
|
ScatMan
|
ScatMan
|
why not just -ha instead of -hr and -hx ?
|
|
|
|
|