Disable Alt+Tab switcher grouping by script or command

228

I was scared to use ccsm until I read this blog which makes it look like all that ccsm does is to edit the compiz .xml configuration files.

A search for compiz reveals:

~/.config/compiz-1
~/.config/compiz-1/compizconfig
~/.gconf/apps/compizconfig-1
~/.gconf/apps/compiz-1
~/.cache/compizconfig-1

I backed up these directories and then made then changed from "unity switcher" to "static application switcher" using ccsm as shown here

I then logged out and back in again and compared my backup to the changed system. Here are the results of diff -r compiz_before_change/ compiz_after_relogin/

CHANGED:

  • Binary file ~/.cache/compizconfig-1/place.pb
  • ~/.gconf/apps/compiz-1/general/screen0/options/%gconf.xml

    5c5
    <   <entry name="active_plugins" mtime="1354022954" type="list" ltype="string">
    ---
    >   <entry name="active_plugins" mtime="1354023761" type="list" ltype="string">
    70a71,73
    >       </li>
    >       <li type="string">
    >           <stringvalue>staticswitcher</stringvalue>
    
  • ~/.gconf/apps/compiz-1/plugins/unityshell/screen0/options/%gconf.xml

    2a3,5
    >   <entry name="alt_tab_forward_all" mtime="1354023761" type="string">
    >       <stringvalue>Disabled</stringvalue>
    >   </entry>
    

NEW:

  • ~/.compiz-1/session: 108caf9cb18e534392135401026619047100000017270046

These differences don't look big enough to me since I can't see anywhere that shows the keybindings which were changed, only the one which was disabled, so maybe compiz is a real pain and the change is in the binary file :-( Let's hope not!

I think if you expanded the backup and comparison, perhaps to the entire /home/ folder you would be able to find out which files contain the changes you want to make and then all you have to do is copy them from machine to machine.

Aren't human readable config files just awesome! :-D If compiz saves the settings in the binary file the coders who did that need a very stern talking to. >:-|

Good Luck.


P.S. In case your wondering, I actually made another backup of the same files after I had logged back in and then compared the two backups. It seemed quicker to me but then my brain does funny things sometimes ;-)

Share:
228

Related videos on Youtube

Sudheesh
Author by

Sudheesh

Updated on September 18, 2022

Comments

  • Sudheesh
    Sudheesh over 1 year
    #include <stdio.h>
    main()
    {    
        int i, n=1; 
    
        for(i=0;i<n;i++) { 
            fork();
            printf("Hello!");
        }
    }
    

    I am confused if I put n=1, it prints Hello 2 times.

    • If n=2, it prints Hello 8 times
    • If n=3, it prints Hello 24 times..
    • and so on..
    • MestreLion
      MestreLion over 11 years
      Is replacing unity's alt+tab the only way to disable grouping?
    • mmatt
      mmatt over 11 years
      I was like you and so frustrated by all this time I'm loosing to search for the good window in the application switcher ! A little resarch brought to this page : askubuntu.com/a/68171/123882 And I can not thank this guy enough !
    • SLaks
      SLaks about 10 years
      Yes; it just copies all of the process' memory
    • Some programmer dude
      Some programmer dude about 10 years
      It depends on the operating system. Fortunately the most popular POSIX systems have their source available for you to read exactly what happens when doing fork.
    • Sudheesh
      Sudheesh about 10 years
      Is their is any standard formula to know how fork() makes near-perfect copy of the current process? @Joachim
    • Filipe Gonçalves
      Filipe Gonçalves about 10 years
      @Sudheesh we can read, you don't have to repeat yourself :)
    • Some programmer dude
      Some programmer dude about 10 years
      The only answer to that is: No, there is no "standard formula".
    • Useless
      Useless about 10 years
      Although I suspect the question is really "Is there a formula to predict how many times Hello will be printed"
    • Some programmer dude
      Some programmer dude about 10 years
      If it's like Useless proposes, then you have to remember that fork creates a new copy of the process that starts running with the statement after the fork call. And as your process have a loop, after the first fork both processes will continue that loop, including then forking new processes.
    • Jens
      Jens about 10 years
      And you should ask what happens when the SIGCHLD is posted in the parent and when fully or line buffered streams are flushed...
    • EOF
      EOF about 10 years
      Are you sure the number of Hello's isn't 2, 6 and 14?
    • Sudheesh
      Sudheesh about 10 years
      @EOF I am damn sure!! the number of Hello is 2, 8 and 24
    • EOF
      EOF about 10 years
      @Sudheesh Wow, this is the weirdest thing: I made a test program using puts() instead of printf(), and got 2, 6 and 14 messages. A bit of testing revealed that the newline changes the number of messages printed. Test it by adding \n to the end of your printf, like so: printf("Helo!\n");. What the???
    • Zanna
      Zanna almost 7 years
  • Filipe Gonçalves
    Filipe Gonçalves about 10 years
    I would cast getpid() to int or even long (and in that case change printf format specifier) in the call to printf just to make sure that no undefined behaviour arises. If pid_t happens to be wider or narrower than int, this code will break
  • Jens
    Jens about 10 years
    main with default int? Ugh!
  • slim
    slim about 10 years
    Both of you: don't confuse the noob. This is enough to demonstrate the principle.
  • Sudheesh
    Sudheesh about 10 years
    If fork() returns a negative value, the creation of a child process was unsuccessful. fork() returns a zero to the newly created child process. fork() returns a positive value, the process ID of the child process, to the parent. The returned process ID is of type pid_t defined in sys/types.h. Normally, the process ID is an integer. Moreover, a process can use function getpid() to retrieve the process ID assigned to this process.
  • Sudheesh
    Sudheesh about 10 years
    <pre><code>#include <stdio.h> #include <string.h> #include <sys/types.h> #define MAX_COUNT 200 #define BUF_SIZE 100 void main(void) { pid_t pid; int i; char buf[BUF_SIZE]; fork(); pid = getpid(); for (i = 1; i <= MAX_COUNT; i++) { sprintf(buf, "This line is from pid %d, value = %d\n", pid, i); write(1, buf, strlen(buf)); } }</pre></code>